Datasheet

Table Of Contents
Section 15 Universal Serial Bus Interface (USB)
REJ09B0140-0900 Rev. 9.00 Page 559 of 846
Sep 16, 2010
H8S/2215 Group
USB function Firmware
Receive IN token
Transmit data to host
Set EP0i transmit
complete flag
(EP0iTS in UIFR0 = 1)
From setup stage
Write data to USB endpoint
data register 0i (UEDR0i)
Write 1 to EP0i packet
enable bit
(EP0iPKTE in UTRG0 = 1)
Clear EP0i transmit
complete flag
(EP0iTS in UIFR0 = 0)
Write 1 to EP0i packet
enable bit
(EP0iPKTE in UTRG0 = 1)
Write data to USB endpoint
data register 0i (UEDR0i)
1 written
to EP0sRDFN in
UTRG0?
Valid data
in EP0iFIFO?
NAK
NAK
No
No
Yes
Yes
ACK
EXIRQx
Note: If the size of the data transmitted by the function is smaller than the data size requested by the host,
the function indicates the end of the data stage by returnning to the host a packet shorter than the
maximum packet size. If the size of the data transmitted by the function is an integral multiple of the
maximum packet size, the function indicates the end of the data stage by transmitting a zero-length
packet.
Figure 15.14 Data Stage Operation (Control-In)