www.ti.com

USB Controller Host and Peripheral Modes Operation

3.3.2.2CPPI Receive Buffer Descriptor

Rx buffer descriptors provide information about a single corresponding Rx data buffer. Every Rx buffer has a single Rx buffer descriptor that stores the following information:

Pointer to the data buffer

Pointer to the next buffer descriptor in the queue

Buffer length and offset to the first valid byte of buffer data

Start of DMA packet (SOP) indicator

End of DMA packet (EOP) indicator

Ownership (only valid with SOP)

End of queue (EOQ) (only valid on EOP)

Packet Length (only valid with SOP)

Receive buffer descriptors contain 16 bytes (4 words) and must begin on 16-byte aligned addresses. Receive buffer descriptors may be linked together to form packets. Buffer descriptor SOP and EOP bits are used to delimit packets. Packets in turn may be linked together to form receive queue. Each queue consists of a chain of buffer descriptors linked together by Next Descriptor Pointers. The last buffer descriptor in a queue has a zero Next Descriptor Pointer. Each descriptor points to a data buffer yielding a queue of buffers.

Four Words of Receive Buffer Descriptor are described in Table 10 through Table 13.

 

 

Table 10. Receive Buffer Descriptor Word 0

Bits

Name

Description

31:0

Next Descriptor

The 32-bit word aligned memory address of the next buffer descriptor in the Rx queue. This is the

 

Pointer

mechanism used to reference the next buffer descriptor from the current buffer descriptor. If the

 

 

value of this pointer is zero then the current buffer is the last buffer in the queue. The software sets

 

 

the Next Descriptor Pointer.

 

 

Table 11. Receive Buffer Descriptor Word 1

Bits

Name

Description

31:0

Buffer Pointer

The Buffer Pointer is the byte aligned memory address of the buffer associated with the buffer

 

 

descriptor. The software sets the Buffer Pointer.

 

 

Table 12. Receive Buffer Descriptor Word 2

Bits

Name

Description

31:16

Buffer Offset

The Buffer Offset indicates how many unused bytes are at the start of the buffer (SOP buffers only).

 

 

A value of zero indicates that there are no unused bytes at the start of the buffer and that valid data

 

 

begins on the first byte of the buffer. A value of 000Fh (decimal 15) indicates that the first 15 bytes

 

 

of the buffer are to be ignored by the DMA controller while transmitting and that valid buffer data

 

 

starts on byte 16 of the buffer. The software sets the buffer offset to zero on buffer initialization and

 

 

the DMA controller overwrites the zero value on SOP packets with the Rx DMA State buffer offset

 

 

value.

15:0

Buffer Length

The Buffer Length field indicates how many valid data bytes are in the buffer. Unused or protocol

 

 

specific bytes at the beginning of the buffer are not counted in the Buffer Length field. The software

 

 

sets the buffer length on buffer initialization. The DMA controller will overwrite the software initialized

 

 

value on an EOP buffer when the number of received data bytes is less than the host initiated value.

 

 

The DMA controller will overwrite the host initialized value on SOP when the Buffer Offset is greater

 

 

than zero, or the Packet Length is less than the buffer length.

SPRUGH3–November 2008

Universal Serial Bus (USB) Controller

63

Submit Documentation Feedback

 

 

Page 63
Image 63
Texas Instruments TMS320DM357 manual Cppi Receive Buffer Descriptor, Receive Buffer Descriptor Word