LM3S5652 Luminary Micro, Inc, LM3S5652 Datasheet - Page 536

no-image

LM3S5652

Manufacturer Part Number
LM3S5652
Description
Lm3s5652 Arm Microcontroller
Manufacturer
Luminary Micro, Inc
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
LM3S5652-IQR50-A0
Manufacturer:
Texas Instruments
Quantity:
10 000
Part Number:
LM3S5652-IQR50-A0T
Manufacturer:
Texas Instruments
Quantity:
10 000
Univeral Serial Bus (USB) Controller
18.2.1.3 OUT Transactions as a Device
536
Special Bulk Handling
The packets transferred in bulk operations are defined by the USB specification to be 8, 16, 32 or
64 bytes in size. For some system designs, however, it may be more convenient for the application
software to write larger amounts of data to an endpoint in a single operation than can be transferred
in a single USB operation.
To simplify this case, the Stellaris
larger data packets to be written to bulk transmit endpoints, which are then split into packets of an
appropriate size for transfer across the USB bus. With this option, the USBTXMAXPn register uses
the bottom 11 bits to define the payload for each individual transfer, while the top 5 bits define a
multiplier. The application software can then write data packets of size multiplier × payload to the
FIFO, which the USB controller then splits into individual packets of the stated payload for
transmission over the USB bus. From the application software’s point-of-view, the resulting operation
does not differ from the transmission of a single USB packet except in the size of the packet written.
Note:
When in device mode, OUT transactions are handled through the USB controller receive FIFOs.
The sizes of the receive FIFOs for endpoints 1-3 are determined by the USBRXFIFOADD register.
The maximum amount of data received by an endpoint in any packet is determined by the value
written to the USBRXMAXPn register for that endpoint. When double-packet buffering is enabled,
two data packets can be buffered in the FIFO. When double-packet buffering is disabled, only one
packet can be buffered even if the packet is less than half the FIFO size. The Stellaris
also supports a special mode for bulk endpoints that allows automatic splitting of a larger FIFO into
multiple maximum packet size transfers.
Note:
Single-Packet Buffering
If the size of the receive endpoint FIFO is less than twice the maximum packet size for an endpoint,
only one data packet can be buffered in the FIFO and single-packet buffering is required. When a
packet is received and placed in the receive FIFO, the RXRDY and FULL bits in the USBRXCSRLn
register are set and the appropriate receive endpoint is signaled, indicating that a packet can now
be unloaded from the FIFO. After the packet has been unloaded, the RXRDY bit needs to be cleared
in order to allow further packets to be received. This action also generates the acknowledge signaling
to the host controller. If the AUTOCL bit in the USBRXCSRHn register is set and a maximum-sized
packet is unloaded from the FIFO, the RXRDY and FULL bits are cleared automatically. For packet
sizes less than the maximum, RXRDY must be cleared manually.
Double-Packet Buffering
If the size of the receive endpoint FIFO is at least twice the maximum packet size for the endpoint,
two data packets can be buffered and double-packet buffering can be used. When the first packet
is received and loaded into the receive FIFO, the RXRDY bit in the USBRXCSRLn register is set
and the appropriate receive endpoint interrupt is signaled to indicate that a packet can now be
unloaded from the FIFO.
Note:
Packet-splitting can only be used with bulk endpoints and, in accordance with the USB
specification, the payload must be 8, 16, 32, or 64. The payload recorded in the
USBTXMAXPn register must also match the wMaxPacketSize field of the Standard
Endpoint Descriptor for the endpoint (see chapter 9 of the USB specification). The associated
FIFO must also be large enough to accommodate the data packet prior to being split.
In all cases, the maximum packet size must not exceed the FIFO size.
The FULL bit in USBRXCSRLn is not set when the first packet is received. It is only set if
a second packet is received and loaded into the receive FIFO.
®
USB controller includes a packet-splitting feature that allows
Preliminary
®
USB controller
June 02, 2008

Related parts for LM3S5652