RM0082
HS_USB 2.0 device
Doc ID 018672 Rev 1
473/844
Figure 42.
In transaction flow in DMA mode
23.4.3
Out operation (Data transfer from USB host)
In the out direction, as soon as the UDC-AHB subsystem receives an out (or SETUP) data
from the USB host (that is, when a packet of data is completed or - if thresholding is enabled
- a threshold is reached), it transfers the data to the buffers allocated to the endpoint in
application memory. Once the data is transferred, the subsystem updates the status of the
received data to the buffer’s status quadlet.
SETUP data is transferred to a 16-byte SETUP buffer. The pointer for this buffer is indicated
in the SETUP buffer pointer register,
Endpoint setup buffer pointer register on page 503
Out data is transferred to the buffers indicated by the descriptor, and the pointer for these
descriptors is programmed in the CSRs.
Note:
The SETUP data directly addresses the buffers, while regular out data addresses the out
data buffers indirectly.
The transaction flow for all out endpoints is similar. The only difference is that isochronous
(iso-out) data is tagged with the frame number when the packet is received.
The transaction flow of out data from the USB host to the application memory is given in
.
Data
available?
Idle
IN
Transaction
Read the
TxFIFO &Provide
IN data
Wait for Status
from USB host
Transfer done
Got ACK
Status?
Generate INTR
and NAK
No
No
Yes
Yes
Idle
Transfer data
From memory to
TxFIFO
TxFIFO
Availabe?
Packet
Completely
Transferred?
Service other IN
requests and
return when done
Update Descriptor
Status
Yes
No
Yes
No
Rewined
READ pointer
Poll demand