Single Transfer
in Main Memory
(608 Bytes)
CPPI Packet in
Main Memory
(256-Byte DBs)
Endpoint FIFOs
(512 Bytes)
Single Transfer
in External USB
Host (608 Bytes)
CPPI Transmit (USB IN)
CPPI Receive (USB OUT)
CPU
PD
CPPI FIFO
(64-Byte Blocks)
USB Packets
DB
DB
DB
XDMA
CPPI DMA
BD
BD
Functional Description
The 608 bytes data to be transferred is described using three descriptors. Since each data buffer defined
within a single descriptor has a size of 256 bytes, a 608 bytes data buffer would require three descriptors.
Figure 16-17. High-level Transmit and Receive Data Transfer Example
Example assumptions:
•
The CPPI data buffers are 256 bytes in length.
•
USB0 module is to be used to perform this transfer. Note that the steps required is similar for USB1
use.
•
The USB0 endpoint 1 Tx and Rx endpoint 1 size are programmed to handle max USB packet size of
512 bytes.
•
A single transfer length is 608 bytes.
•
The SOP offset is 0.
The above translates to the following multi-descriptor setup:
Transmit Case
Transmit setup is as follows:
•
One packet descriptor with packet length (this is NOT data buffer length, the term packet used here is
to mean a transfer length not USB packet) field of 608 bytes and a Data Buffer of size 256 Bytes linked
to the 1st host buffer descriptor.
•
Two buffer descriptors with first buffer descriptor (this is the one linked to the packet descriptor)
defining the second data buffer size of 256 Bytes which in turn is linked to the next (second) buffer
descriptor.
•
Second buffer fescriptor with a fata buffer size of 96 bytes (can be greater, the packet descriptor
contain the size of the packet) linked to no other descriptor (NULL).
Receive Case
For this example since each data buffer size is 256 bytes, we would require a minimum of three
descriptors that would define data buffer size of 608 bytes. The receive setup is as follows:
•
Two buffer descriptors with 256 bytes of data buffer size
•
One buffer descriptor with 96 bytes (can be greater) of data buffer size
Within the rest of this section, the following nomenclature is used:
BD — Buffer Descriptor or Host Buffer Descriptor
DB — Data Buffer Size of 256 Bytes
1751
SPRUH73H – October 2011 – Revised April 2013
Universal Serial Bus (USB)
Copyright © 2011–2013, Texas Instruments Incorporated