Download Print this page

Renesas H8S Family Hardware Manual page 922

Advertisement

Section 22 USB Function Module (USB)
(2)
Data Stage (Control-In)
Data transmission to host
The application first analyzes command data from the host in the setup stage, and determines the
subsequent data stage direction. If the result of command data analysis is that the data stage is in-
transfer, one packet of data to be sent to the host is written to the FIFO. If there is more data to be
sent, this data is written to the FIFO after the data written first has been sent to the host (EP0iTS
bit in IFR0 = 1).
The end of the data stage is identified when the host transmits an OUT token and the status stage
is entered.
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 returning 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.
Rev. 1.00 Mar. 12, 2008 Page 874 of 1178
REJ09B0403-0100
USB function
IN token reception
1 written
to TRG.EP0s
RDFN?
Yes
Valid data
in EP0i FIFO?
Yes
ACK
Set EP0i transmission
complete flag
(IFR0.EP0i TS = 1)
Figure 22.11 Data Stage (Control-In) Operation
From setup stage
Write data to EP0i
No
data register (EPDR0i)
NAK
Write 1 to EP0i packet
(TRG.EP0i PKTE = 1)
No
NAK
Clear EP0i transmission
(IFR0.EP0i TS = 0)
Interrupt
request
Write data to EP0i
data register (EPDR0i)
Write 1 to EP0i packet
(TRG.EP0i PKTE = 1)
Application
enable bit
complete flag
enable bit

Advertisement

loading

This manual is also suitable for:

R4f2472R4f2462H8s/2462H8s/2400 seriesH8s/2472