Texas Instruments TMS320DM357 사용자 설명서

다운로드
페이지 144
USB Controller Host and Peripheral Modes Operation
www.ti.com
End of queue (EOQ) (only valid on EOP)
Packet Length (only valid with SOP)
Transmit buffer descriptors contain 16 bytes (4 words) and must begin on 16-byte aligned addresses.
Transmit 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 transmit 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 Transmit Buffer Descriptor are described below.
Table 6. Transmit 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 Tx 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 7. Transmit 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 8. Transmit 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 Buffer Offset is valid only on Start Of Packet buffer descriptors
and must be zero otherwise. The software sets the Buffer Offset. The Buffer Offset must be less
than the Buffer Length.
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.
Table 9. Transmit Buffer Descriptor Word 3
Bits
Name
Value
Description
31
SOP
Start of Packet: SOP Indicates that the descriptor buffer is the first buffer in the packet. The
software sets the SOP bit.
0
Not start of packet buffer
1
Start of packet buffer
30
EOP
End of Packet: EOP Indicates that the descriptor buffer is the last buffer in the packet. The
software sets the EOP bit. It is valid to set both SOP and EOP in the same descriptor.
0
Not end of packet buffer
1
End of packet buffer
29
Ownership
The Ownership bit indicates ownership of the DMA packet and is valid only on SOP. This bit
is set by the software and cleared by the DMA controller when the packet has been
transmitted. The software can use this bit to reclaim buffers.
0
The packet is owned by the host processor
1
The packet is owned by the DMA controller
Universal Serial Bus (USB) Controller
58
SPRUGH3 – November 2008