Datasheet

Table Of Contents
Section 15 Universal Serial Bus Interface (USB)
Page 562 of 846 REJ09B0140-0900 Rev. 9.00
Sep 16, 2010
H8S/2215 Group
(5) Status Stage (Control-Out)
The control-out status stage starts with an IN token from the host. When an IN-token is received at
the start of the status stage, there is not yet any data in the EP0iFIFO, and so an EP0i transfer
request interrupt is generated. The application recognizes from this interrupt that the status stage
has started. Next, in order to transmit 0-byte data to the host, 1 is written to the EP0i packet enable
bit but no data is written to the EP0iFIFO. As a result, the next IN token causes 0-byte data to be
transmitted to the host, and control transfer ends.
After the application has finished all processing relating to the data stage, 1 should be written to
the EP0i packet enable bit.
USB function Firmware
Receive IN token
Transfer 0-byte data to host
End of control transfer
Set EP0i transmit
complete flag
(EP0iTS in UIFR0 = 1)
Clear EP0i transfer
request flag
(EP0iTR in UIFR0 = 0)
Write 1 to EP0i packet
enable bit
(EP0iPKTE in UTRG0 = 1)
Clear EP0i transmit
complete flag
(EP0iTS in UIFR0 = 0)
End of control transfer
Valid data
in EP0iFIFO?
Write 0 to EP0i transfer
request interrupt enable bit
(EP0iTRE in UIER0 = 0)
ACK
Yes
No
NAK
EXIRQx
EXIRQx
Figure 15.17 Status Stage Operation (Control-Out)