![](http://datasheet.mmic.net.cn/90000/ML66Q525-NTB_datasheet_3507944/ML66Q525-NTB_366.png)
ML66525 Family User’s Manual
Chapter 17 USB Control Function
17 - 9
(1) Setup ready interrupt
Operation
Source of operation
Description (conditions, responses, etc.)
Setup ready interrupt
generation
USB controller
The setup ready bit (D2 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 D1 of INTENBL1
has been asserted.
→ The firmware can now read the set of setup registers.
End of setup ready
interrupt
CPU (firmware)
After making the firmware read the 8-byte setup data,
write a “1” in bit D2 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.
(2) EP0 Receive packet ready interrupt
This is used mainly during the reception of a data packet in a control write transfer.
Operation
Source of operation
Description (conditions, responses, etc.)
EP0 Receive packet
ready interrupt
generation
USB controller
The EP0 receive packet ready bit (D0 of EP0STAT) is
asserted during a control write transfer when the
processing has changed from the setup stage to the
data stage, and USB controller has detected EOP of the
data packet and has stored the data without error in the
EP0 receive FIFO. The end of a packet is recognized
when an EOP has arrived in the cases of both full
packets and short packets.
An interrupt is generated at this time, if the EP0 receive
packet ready interrupt enable bit (D6 of INTENBL1) has
been asserted.
(EOP: End of packet)
End of EP0 receive
packet ready interrupt
CPU (firmware)
In the case of EP0 reception, after the number of bytes
of the EP0 receive FIFO data indicated by the EP0
receive byte count register (EP0RXCNT) has been
read, write a “1” to the EP0 receive packet ready bit (bit
D0 of EP0STAT). (This status is reset when a “1” is
written in this bit.)
Note: A short packet is a packet with a number of bytes less than the maximum packet size.