![](http://datasheet.mmic.net.cn/120000/ML60851EGA_datasheet_3559815/ML60851EGA_68.png)
Oki Semiconductor
ML60851E
66/84
Interrupts
The ML60851E requests interrupts to the local MCU, etc., by asserting the -INTR pin. The interrupt causes are the
following:
(a)
Setup ready for the 8-byte setup data
(b)
EP0 receive packet ready
(c)
EP0 transmit packet ready
(d)
EP1 transmit/receive packet ready
(e)
EP2 transmit/receive packet ready
(f)
EP3 transmit packet ready
(g)
USB Bus reset
(h)
Suspend
Although there is only one
INTR pin, the local MCU can identify the contents of the interrupt by reading out the
interrupt status register. These interrupts can also be masked dynamically by making individual settings in the
interrupt enable register.
The causes of the interrupts, their setting and resetting conditions, and the responses to them are described below.
The functions of the setup ready bit and the packet ready bit can, in some situations, be different from those
described here because of some special automatic operations done by the ML60851E. Please see the descriptions
of the registers EP0STAT and PKTRDY for more details of such functions.
(1) Setup ready interrupt
Operation
Source of operation
Description (conditions, responses, etc.)
Setup ready
interrupt generation
ML60851E
The setup ready bit (D0 of EP0STAT) is asserted when the
8-byte setup control data is received normally and has
been stored in the set of setup registers.
An interrupt is generated at this time if D0 of INTENBL has
been asserted.
→ The firmware can now read the set of setup registers.
End of setup ready interrupt Local MCU (firmware)
After making the firmware read the 8-byte setup data, write
a “1” in bit D0 of EP0 status register (EP0STAT). This
causes the interrupt to be de-asserted.
The interrupt will not be de-asserted If a new 8-byte setup
data is received during this period. In this case, discard the
setup data that was being read at that time and read the
new 8-byte setup data.
The following table outlines the relationship between ML60851E registers and setup ready interrupt generation.
INTENBL(D0)
EP0STAT(D0)
INTSTAT(D0)
1
0
1
0
X
0
X This symbol means that it does not matter whether the value is ‘1’ or ‘0’