DMA Operation
13-120
13.7.4 Transmit DMA Channels Overview
Transmit DMA channels are programmed via the three TXDMA control regis-
ters. Each channel can be assigned to a given endpoint number by assigning
a nonzero value in TXDMAn_EP (a 0 value means the DMA channel is
deselected). The other three control registers (TXDMA0, TXDMA1, and
TXDMA2) operate in a different manner for isochronous or non-isochronous
endpoints. Transmitted data must be written into the DATA_DMA when a TX
DMA request is active. They are written into the TX FIFO of the endpoint asso-
ciated with active request (only one TX DMA request active at a given time).
13.7.5 Non-Isochronous IN (LH
−>
USB HOST) DMA Transactions
Non-isochronous (bulk) TX DMA file transfers are virtually unlimited in size.
The flowcharts depicted in Figure 13–42 and Figure 13–43 show how to han-
dle small, medium, or large file transfers.
TXDMA0, TXDMA1, and TXDMA2 registers operate for non-isochronous end-
points in the following manner. The transfer size counter (TXn_TSC) corre-
sponds to either the number of bytes to transmit (EOT bit set) or the number
of buffers to transmit (EOT bit cleared). The buffer size corresponds to the
programmed size of the TX endpoint.
A request to the local host main DMA controller is generated when the end-
point buffer is empty initially after that the START bit is set and then each time
there is space free in TX FIFO for other TX packets to be written, until
TXn_TSC counts down to zero. The request is removed when the buffer is full
or when there are no more bytes of data to be sent.
A DMA transmit transfer done interrupt is signaled to the local host after the
last IN transaction completes successfully. This is after the START bit was set
and after TXn_TSC equals 0 for the selected DMA channel.
The local host must not initiate a new TX DMA transfer until it receives
a TX_Done interrupt.
Small file transfer less than 1024 bytes can be achieved in a single DMA pass
signaled by a single interrupt completion. File size equal or greater than 1024
bytes needs two or more DMA passes signaled by an interrupt completion
after each pass.