Datasheet

Table Of Contents
Section 15 Universal Serial Bus Interface (USB)
REJ09B0140-0900 Rev. 9.00 Page 557 of 846
Sep 16, 2010
H8S/2215 Group
(1) Setup Stage
USB function Firmware
Receive SETUP token
Receive 8-byte command
data in UEDR0s
To data stage
Set setup command
receive complete flag
(SetupTS in UIFR0 = 1)
Automatic
processing by
this module
Clear SetupTS flag
(SetupTS in UIFR0 = 0)
Clear EP0iFIFO (EP0iCLR in UFCLR0 = 1)
Clear EP0oFIFO (EP0oCLR in UFCLR0 = 1)
Read 8-byte data from UEDR0s
Decode command data
Determine data stage direction
*
1
Write 1 to EP0s read complete bit
(EP0sRDFN in UTRG0 = 1)
To control-in
data stage
To control-out
data stage
Command
to be processed by
firmware?
EXIRQx
Yes
No
Notes: 1. In the setup stage, the firmware first analyzes the command data sent from the host required to be
processed by the firmware, and determines subsequent processing.
(For example, the data stage direction.)
2. When the transfer direction must be enabled here. When the transfer direction is control-in, an EP0i
transfer request interrupt is not required and must be disabled.
*
2
Figure 15.13 Setup Stage Operation