The EZ-USB core sets an endpoint’s interrupt request bit when the endpoint’s busy bit (in
the endpoint CS register) goes low, indicating that the endpoint buffer is available to the
8051. For example, when endpoint 4-OUT receives a data packet, the busy bit in the
OUT4CS register goes low, and OUT07IRQ.4 goes high, requesting the endpoint 4-OUT
interrupt.
9.10 USB Autovectors
The USB interrupt is shared by 21 interrupt sources. To save the code and processing time
required to sort out which USB interrupt occurred, the EZ-USB core provides a second
level of interrupt vectoring, called “Autovectoring.” When the 8051 takes a USB inter-
rupt, it pushes the program counter onto its stack, and then executes a jump to address 43,
where it expects to find a jump instruction to an interrupt service routine. The 8051 jump
instruction is encoded as follows:
Table 9-2. 8051 JUMP Instruction
Address
0043
Op-Code
Jump
Hex Value
0x02
0044
AddrH
AddrL
0xHH
0045
0xLL
If Autovectoring is enabled (AVEN=1 in the USBBAV register), the EZ-USB core substi-
tutes its AVEC byte for the byte at address 0x0045. Therefore, if the programmer pre-
loads the high byte (“page”) of a jump table address at location 0x0044, the core-inserted
byte at 0x45 will automatically direct the JUMP to one of 21 addresses within the page. In
the jump table, the programmer then puts a series of jump instructions to each particular
ISR.
Page 9-10
Chapter 9. EZ-USB Interrupts
EZ-USB TRM v1.9