DMA Operation
13-114
13.7 DMA Operation
The USB function module provides support for six DMA channels. Three
receive DMA channels are reserved for OUT transfers (isochronous or non-
isochronous) and three transmit DMA channels are reserved for IN transfers
(isochronous or non-isochronous). It is not possible to operate DMA trans-
actions on control EP0.
The local host must not access an endpoint used in a DMA transfer
through EP_NUM, CTRL and STAT_FLG registers (in DMA, this remark
applies after the local host has set the Set_FIFO_En bit to enable the RX
DMA transfer). In particular, the local host must not set the halt feature
while the endpoint is selected in the RXDMA_CFG register.
13.7.1 Receive DMA Channels Overview
Receive DMA channels are programmed via the three RXDMA control
registers. Each channel is assigned to a given endpoint number by assigning
a non-zero value in RXDMAn_EP fields (a 0 value means the DMA channel
is deselected). Received OUT data must be read when a RX DMA request is
active, through the register DATA_DMA. The RX FIFO accessed is that of the
endpoint for which DMA request is active (only one RX DMA request active at
a time).
13.7.2 Non-Isochronous OUT (USB HOST
−>
LH) DMA Transactions
During non-isochronous transfers to a DMA-operated OUT endpoint, a re-
quest to the local host DMA controller is generated when data has been placed
into the endpoint FIFO and must be read. Notice that ACK and NAK interrupts
are always disabled automatically by the core for DMA operated endpoints.
There are two dedicated maskable interrupts per DMA channel to control
non-isochronous OUT transfers.
-
End of transfer interrupt (the RXn_EOT)
This interrupt signals that the core has detected an end-of-transfer (EOT).
EOT occurs in the two following cases:
J
When the last valid transaction to the endpoint is either an empty
packet (ACK and buffer empty) or a packet whose size is less than the
physical endpoint buffer size (ACK and buffer not full).
J
When the number of received transactions has reached the
programmed value in RXn_TC field, if Rxn_Stop bit has been set by
the local host.