English
Language : 

LM3S5D56 Datasheet, PDF (811/1146 Pages) Texas Instruments – Stellaris® LM3S5D56 Microcontroller
Stellaris® LM3S5D56 Microcontroller
17.3.2
Operation as a Host
When the Stellaris USB controller is operating in Host mode, it can either be used for point-to-point
communications with another USB device or, when attached to a hub, for communication with
multiple devices. Before the USB controller's operating mode is changed from Host to Device or
Device to Host, software must reset the USB controller by setting the USB0 bit in the Software
Reset Control 2 (SRCR2) register (see page 282). Full-speed and low-speed USB devices are
supported, both for point-to-point communication and for operation through a hub. The USB controller
automatically carries out the necessary transaction translation needed to allow a low-speed or
full-speed device to be used with a USB 2.0 hub. Control, bulk, isochronous, and interrupt transactions
are supported. This section describes the USB controller's actions when it is being used as a USB
Host. Configuration of IN endpoints, OUT endpoints, entry into and exit from SUSPEND mode, and
RESET are all described.
When in Host mode, IN transactions are controlled by an endpoint’s receive interface. All IN
transactions use the receive endpoint registers and all OUT endpoints use the transmit endpoint
registers for a given endpoint. As in Device mode, the FIFOs for endpoints should take into account
the maximum packet size for an endpoint.
■ Bulk. Bulk endpoints should be the size of the maximum packet (up to 64 bytes) or twice the
maximum packet size if double buffering is used (described further in the following section).
■ Interrupt. Interrupt endpoints should be the size of the maximum packet (up to 64 bytes) or twice
the maximum packet size if double buffering is used.
■ Isochronous. Isochronous endpoints are more flexible and can be up to 1023 bytes.
■ Control. It is also possible to specify a separate control endpoint to communicate with a Device.
However, in most cases the USB controller should use the dedicated control endpoint to
communicate with a Device’s endpoint 0.
17.3.2.1
Endpoints
The endpoint registers are used to control the USB endpoint interfaces which communicate with
Device(s) that are connected. The endpoints consist of a dedicated control IN endpoint, a dedicated
control OUT endpoint, 15 configurable OUT endpoints, and 15 configurable IN endpoints.
The dedicated control interface can only be used for control transactions to endpoint 0 of Devices.
These control transactions are used during enumeration or other control functions that communicate
using endpoint 0 of Devices. This control endpoint shares the first 64 bytes of the USB controller’s
FIFO RAM for IN and OUT transactions. The remaining IN and OUT interfaces can be configured
to communicate with control, bulk, interrupt, or isochronous Device endpoints.
These USB interfaces can be used to simultaneously schedule as many as 15 independent OUT
and 15 independent IN transactions to any endpoints on any Device. The IN and OUT controls are
paired in three sets of registers. However, they can be configured to communicate with different
types of endpoints and different endpoints on Devices. For example, the first pair of endpoint controls
can be split so that the OUT portion is communicating with a Device’s bulk OUT endpoint 1, while
the IN portion is communicating with a Device’s interrupt IN endpoint 2.
Before accessing any Device, whether for point-to-point communications or for communications via
a hub, the relevant USB Receive Functional Address Endpoint n (USBRXFUNCADDRn) or USB
Transmit Functional Address Endpoint n (USBTXFUNCADDRn) registers must be set for each
receive or transmit endpoint to record the address of the Device being accessed.
January 23, 2012
811
Texas Instruments-Production Data