English
Language : 

LM3S3748 Datasheet, PDF (504/753 Pages) List of Unclassifed Manufacturers – Microcontroller
Univeral Serial Bus (USB) Controller
17.2
Functional Description
The Stellaris® USB controller provides the ability for the controller to switch from host controller to
device controller functionality. The USB controller requires both A and B connectors in the system
to provide host or device connectivity. If both connectors are present, the controller provides external
signals to enable or disable power to the USB0VBUS pin on the USB connector when not in use.
The controller can only be used in host or device mode and cannot be used in both modes
simultaneously. However, the controller can be manually switched at run time if the system requires
both host and device functionality.
17.2.1
Operation as a Device
This section describes the Stellaris® USB controller's actions when it is being used as a USB device.
IN endpoints, OUT endpoints, entry into and exit from Suspend mode, and recognition of Start of
Frame (SOF) are all described.
When in device mode, IN transactions are controlled by an endpoint’s transmit interface and use
the transmit endpoint registers for the given endpoint. OUT transactions are handled with an
endpoint's receive interface and use the receive endpoint registers for the given endpoint.
When configuring the size of the FIFOs for endpoints, take into account the maximum packet size
for an endpoint.
■ Bulk. Bulk endpoints should be sized to be multiples of the maximum packet size (up to 64
bytes). For instance, if maximum packet size is 64 bytes, the FIFO should be configured to a
multiple of 64-byte packets (64, 128, 192, or 256 bytes). This allows for efficient use of double
buffering or packet splitting (described further in the following sections).
■ 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 for a USB device. However,
in most cases the USB device should use the dedicated control endpoint on the USB controller’s
endpoint 0.
17.2.1.1 Endpoints
When operating as a device, there is a single dedicated bidirectional control endpoint on endpoint
0 and three additional endpoints that can be used for both IN and OUT communications with a host
controller. The endpoint number associated with an endpoint is directly related to its register
designation. For example, when the host is communicating with endpoint 1, all events will occur in
the endpoint 1 register interface.
Endpoint 0 is a dedicated control endpoint used for all control transactions to endpoint 0 during
enumeration or when any other control requests are made to endpoint 0. Endpoint 0 uses the first
64 bytes of the USB controller's FIFO RAM as a shared memory for both IN and OUT transactions.
The remaining three endpoints can be configured as control, bulk, interrupt or isochronous endpoints.
They should be treated as three OUT and three IN endpoints with endpoint numbers 1, 2, and 3.
The endpoints are not required to have the same type for their IN and OUT endpoint configuration.
For example, the OUT portion of an endpoint could be a bulk endpoint, while the IN portion could
be an interrupt endpoint. The address and size of the FIFOs attached to each endpoint can be
modified to fit the application's needs.
504
April 08, 2008
Preliminary