Texas Instruments TMS320C6747 DSP Benutzerhandbuch

Seite von 34
2.4
Implementation of OHCI Specification for USB
2.4.1
USB Host Controller Endpoint Descriptor (ED) List Head Pointers
2.4.2
OHCI USB Suspend State
Architecture
www.ti.com
The OHCI Specification for USB provides a specific sequence of operations for the host controller driver to
perform when setting up the host controller. Failure to follow that sequence can result in malfunction. As a
specific example, the HCCONTROLHEADED and HCBULKHEADED pointer registers and the 32
HCCAINTERRUPTTABLE pointers must all point to valid physical addresses of valid endpoint descriptors.
The USB host controller does not check HCCONTROLHEADED registers, HCBULKHEADED registers, or
the values in the 32 HCCAINTERRUPTTABLE pointers before using them to access EDs. In particular if
any of these pointers are NULL when the corresponding list enable bit is set, the USB host controller
attempts to access using the physical address of 0, which is not a valid memory region for the USB
controller to access.
The USB host controller ignores upstream traffic from downstream devices for about 3 ms after the host
controller state (HCCONTROL.HCFS) changes from USB resume state to USB operational state. If any
TDs cause generation of downstream packets during that time, the downstream packets are sent, but
downstream device responses are ignored. Any such TDs are aborted with completion codes marked as
Device Not Responding. TDs on any of the lists (periodic, control, bulk, and isochronous) can cause such
an occurrence.
The USB specification requires that system software must provide a 10-ms resume recovery time
(TRSMRCY) after a bus segment transitions from resume signaling to normal operational mode. During
that time, only start of frame packets are to be sent on the bus segment. The system software should
disable all list enable bits (HCCONTROL.PLE, HCCONTROL.IE, HCCONTROL.CLE, and
HCCONTROL.BLE) and then wait for at least 1 ms before setting the host controller into USB suspend
state (via HCCONTROL.HCFS). When restoring from suspend, system software must set the host
controller into USB resume state, and wait for the host controller to transition into USB operational state.
System software must then wait 10 ms before enabling the host controller list enable bits.
When the host controller has been placed into the USB suspend state under software control, but is
brought out by a remote wake-up, system software must monitor the HCRHPORTSTATUS[x].PSS and
HCRHPORTSTATUS[x].PSSC bits. The HCRHPORTSTATUS[x].PSS bit changes to 0 only after
completion of resume signaling on the bus segment, and completion of the 3-ms period (packets from
downstream devices are ignored).
When using port-specific suspend, it is not necessary to disable the host controller lists, as long as there
are no active EDs and TDs directed toward devices that are downstream of the suspended port. For
port-specific suspend operations, the host controller does not issue a root hub status change interrupt
(HCRHPORTSTATUS[n].PSSC bit = 1 and HCRHPORTSTATUS[n].PSS = 0), until the end of the
approximately 3-ms delay after the resume signaling completes.
When using port-specific suspend, system software must ensure that there are no active EDs for devices
that are downstream of the suspended port before setting the port into suspend mode. While the port is in
suspend or being resumed, system software must not enable any EDs for any devices downstream of the
suspended port. Once the root hub status change interrupt occurs as a result of the suspended port PSS
bit changing to 0, EDs can be enabled for devices downstream of the operational port.
10
Universal Serial Bus OHCI Host Controller
SPRUFM8 – September 2008