Preliminary
Protocol Description(s)
www.ti.com
20.3.1.2.2.1 Bulk OUT Transfer Setup: Peripheral Mode
In configuring an Rx endpoint for Bulk OUT transactions, the RXMAXP register must be written with the
maximum packet size (in bytes) for the endpoint. This value should be the same as the
wMaxPacketSize field of the Standard Endpoint Descriptor for the endpoint. When using DMA for Rx
Endpoints, the PERI_RXCSR needs to have its DMAEN bit set and have its AUTOCLEAR and
DMAMODE bits cleared. In addition, the relevant interrupt enable bit in the INTRRXE register should be
set (if an interrupt is required for this endpoint) and the PERI_RXCSR register should be set as shown
in
.
Table 20-3. PERI_RXCSR Register Bit Configuration for Bulk OUT Transactions
Bit Field
Bit Name
Description
Bit 15
AUTOCLEAR
Cleared to 0 if using DMA. In CPU Mode of usage, if the CPU sets AUTOCLEAR bit, the
RXPKTRDY bit will be automatically cleared when a packet of RXMAXP bytes has been
unloaded from the Receive FIFO.
Bit 14
ISO
Cleared to 0 to enable Bulk protocol.
Bit 13
DMAEN
Set to 1 if a DMA request is required for this Rx endpoint.
Bit 12
DISNYET
Cleared to 0 to allow normal PING flow control. This will affect only high speed
transactions.
Bit 11
DMAMODE
Always clear this bit to 0.
When the Rx endpoint is first configured (following a SET_CONFIGURATION or SET_INTERFACE
command on Endpoint 0), the lower byte of PERI_RXCSR should be written to set the CLRDATATOG
bit (bit 7). This will ensure that the data toggle (which is handled automatically by the USB controller)
starts in the correct state.
Also if there are any data packets in the FIFO (indicated by the RXPKTRDY bit (bit 0 of PERI_RXCSR)
being set), they should be flushed by setting the FLUSHFIFO bit (bit 4 of PERI_RXCSR).
NOTE: It may be necessary to set this bit twice in succession if double buffering is enabled.
20.3.1.2.2.2 Bulk OUT Operation: Peripheral Mode
When a data packet is received by a Bulk Rx endpoint, the RXPKTRDY bit (bit 0 of PERI_RXCSR) is
set and an interrupt is generated. The software should read the RXCOUNT register for the endpoint to
determine the size of the data packet. The data packet should be read from the FIFO, and then the
RXPKTRDY bit should be cleared.
The packets received should not exceed the size specified in the RXMAXP register (as this should be
the value set in the wMaxPacketSize field of the endpoint descriptor sent to the host). When a block of
data larger than wMaxPacketSize needs to be sent to the function, it will be sent as multiple packets.
All the packets will be wMaxPacketSize in size, except the last packet which will contain the residue.
The software may use an application specific method of determining the total size of the block and
hence when the last packet has been received. Alternatively it may infer that the entire block has been
received when it receives a packet which is less than wMaxPacketSize in size. (If the total size of the
data block is a multiple of wMaxPacketSize, a null data packet will be sent after the data to signify that
the transfer is complete.)
In the general case, the application software will need to read each packet from the FIFO individually. If
large blocks of data are being transferred, the overhead of calling an interrupt service routine to unload
each packet can be avoided by using DMA.
1772
Universal Serial Bus (USB)
SPRUGX9 – 15 April 2011
© 2011, Texas Instruments Incorporated
Содержание TMS320C6A816 Series
Страница 2: ...Preliminary 2 SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 92: ...92 Read This First SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1122: ...1122 Multichannel Audio Serial Port McASP SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1562: ...1562 Real Time Clock RTC SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1658: ...1658 Timers SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1750: ...1750 UART IrDA CIR Module SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1984: ...1984 Universal Serial Bus USB SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...