Figure 9-3 illustrates a typical USB ISR for endpoint 2-IN.
USB_ISR: push
dps
push
dpl
push
dph
push
push
push
dpl1
dph1
acc
;
mov
clr
mov
;
a,EXIF
acc.4
EXIF,a
; FIRST clear the USB (INT2) interrupt request
; Note: EXIF reg is not 8051 bit-addressable
mov
mov
movx
;
dptr,#IN07IRQ ; now clear the USB interrupt request
a,#00000100b
@dptr,a
; use IN2 as example
; (perform interrupt routine stuff)
;
pop
pop
pop
pop
pop
pop
acc
dph1
dpl1
dph
dpl
dps
;
reti
Figure 9-3. The Order of Clearing Interrupt Requests is Important
Page 9-6
Chapter 9. EZ-USB Interrupts
EZ-USB TRM v1.9