In some situations, the host may send IN tokens before the 8051 has loaded and armed an
IN endpoint. To alert the 8051 that an IN endpoint is being pinged, the AN2122/26 add a
set of interrupts, one per IN endpoint, that indicate that an IN endpoint just sent a NAK to
the host. This happens when the host sends an IN token and the IN endpoint does not have
data (yet) for the host.
The new interrupt is called “IBN,” for IN Bulk NAK. Its INT2 Autovector is 05, which
was previously reserved in the EZ-USB family.
The IBN interrupt requests and enables are controlled by two new registers. Note that
because the IBN interrupt exists only in the AN2122/AN2126, which has 6 bulk IN end-
points, there are IRQ and IEN bits endpoints IN0 through IN6.
IBNIRQ
IN Bulk NAK Interrupt Requests
7FB0
b7
b6
b5
b4
b3
b2
b1
b0
-
EP6IN
EP5IN
EP4IN
EP3IN
EP2IN
EP1IN
EP0IN
R/W
x
R/W
x
R/W
x
R/W
x
R/W
x
R/W
x
R/W
x
R/W
x
Figure 9-9. IN Bulk NAK Interrupt Request Register
IBNEN
IN Bulk NAK Interrupt Enables
7FB1
b7
b6
b5
b4
b3
b2
b1
b0
-
EP6IN
EP5IN
EP4IN
EP3IN
EP2IN
EP1IN
EP0IN
R/W
x
R/W
0
R/W
0
R/W
0
R/W
0
R/W
0
R/W
0
R/W
0
Figure 9-10. IN Bulk NAK Interrupt Enable Register
Each of the individual IN endpoints may be enabled for an IBN interrupt using the IBNEN
register. The 8051 sets an interrupt enable bit to “1” to enable the corresponding interrupt.
The ISR tests the IBNIRQ bits to determine which endpoint or endpoints generated the
interrupt request. As with all other EZ-USB interrupt requests, the 8051 clears an
IBNIRQ bit by writing a “1” to it.
Page 9-14
Chapter 9. EZ-USB Interrupts
EZ-USB TRM v1.9