Master USB 2.0 Hub power management

advertisement
Master USB 2.0 Hub power management
Prajith Cheerakkoda, Cypress Semiconductor - July 01, 2013
A USB hub supplies data and power to downstream USB ports. It also allows the host to manage the
power of the devices connected to its downstream ports using software. The distribution and
management of power in USB 2.0 hub systems is a major factor in determining if a system is in full
compliance with the USB Specification (Rev. 2.0).
Power Distribution All devices connected to a USB port are configured as either low power or
high-power, depending on their voltage and current requirements (shown in Table 1 and Table 2).
All USB devices enumerate as low-power devices at first. After enumeration, the host examines the
bMaxPower field of the configuration descriptor for the device. If bMaxPower indicates that the
device is high-power, and the power is available, the host allows the device to transition to highpower.
USB devices are classified as either self-powered or bus-powered, Figure 1 shows both hub
configurations.
Bus-Powered HUB Systems
In this configuration, the power for both the hub’s internal operation and its downstream ports are
supplied from VBUS on the hub’s upstream facing port. This configuration eliminates the need for a
local power supply.
In bus-powered systems, all downstream devices must be low power. This is due to the fact that the
maximum current a hub can draw from an upstream power source is 500 mA. Because the hub uses
some of this current for its own operation, it cannot provide a full 500 mA to downstream devices.
Therefore, a bus-powered hub configuration is not recommended for designs that have more than
four ports or include downstream high-power devices.
Important Design Considerations
●
●
●
●
Never connect two bus-powered hubs in series.
Bus-powered hubs cannot provide more than 100 mA and therefore, cannot power a hub connected
to one of its downstream ports.
Bus-powered hubs cannot power high-power devices.
Bus-powered hubs are required to have power switches (as described in Power Management).
Self-Powered HUB Systems
A self-powered hub distributes power from a local power supply to its downstream ports. Power for
the hub’s controller can come from either a local power supply or VBUS. Self-powered hubs can draw
a maximum of 100 mA for their operation. A self-powered hub that uses VBUS to power its USB
interface is called a hybrid-powered hub. Using a hybrid-powered hub makes it possible to
differentiate between a disconnected and powered off device.
Using a self-powered hub adds complexity to your design. Section 7.2.1 of the USB Specification (Rev.
2.0) requires a mechanism to recognize the presence of VBUS and power D+/D- pull-up resistors
accordingly. When VBUS is removed, the device must remove power from the D+/D- pull-up resistors
within 10 seconds. Violating this requirement may cause several system failures and will fail USB
compliance testing. One documented failure is reset problems on upstream devices. Reset problems
may result in PC cold boot problems or failure of the hub to enumerate downstream devices. Other
failures include the inability to properly resume from a suspend state and forcing other enumerated
devices off the bus. Hybrid-powered hub designs avoid the need for VBUS monitoring.
Important Design Considerations
●
●
●
●
Self-powered hubs require a mechanism to check for the presence of VBUS and drive the D+/Dlines accordingly.
Self-powered hubs require over current protection on the downstream ports.
Use self-powered hubs in systems that have more than four downstream ports.
Use self-powered hubs in systems that include high-power devices.
Power Management
For safety reasons, the USB Specification (Rev. 2.0) requires over current protection for all self-
powered hub designs. An external power switch is required for over current detection and power
switching. Over current protection can be implemented using Polymeric PTCs or solid-state
switches.
Power switching means that your USB hub has the ability to turn power off to its downstream
devices. Power switching is required for all bus-powered hub designs. Self-powered hubs can also
implement power switching for downstream ports; however, it is not required. Power switching can
be implemented in Gang mode or Individual mode. In Gang mode the hub turns off a group of ports
if the total current drawn by all the ports together in the group exceeds a preset limit. In Individual
mode the hub turns off a single port if it exceeds its limit.
Power to an individual port is turned off when it is in Un-Configured or in Powered-off state. In Gang
mode, the hub turns off a group of ports only if all of the ports in the group are in Un-Configured or
in Powered-off state The hub turns on a group of ports if any of the ports in the gang receives a
SetPortFeature(PORT_POWER) request.
Individual Mode Power Switching
Individual mode port protection uses dedicated switches for each port. When a port experiences a
surge in power the hub turns its power off. Because Individual mode requires a dedicated switch for
each port, it is more costly. Figure 2 shows an example of Individual mode power switching.
Power Switch Pins:
●
●
●
FLAG A and FLAG B alert the hub when downstream ports are over current
OUT A and OUT B power downstream ports
EN1 and EN2 enable or disable power to downstream ports by switching OUT A and OUT B
Gang Mode Power Switching
Gang Mode Power Switching
A power surge on any of the ports included in the gang causes the hub to turn off power to all of the
ports in the group. This method is less costly because it uses one switch for multiple ports. The
obvious drawback with this method is that a surge on one port in the group results in loss of power
to all of the ports. Figure 3 shows an example of Gang mode power switching.
Suspend State
All USB devices should support Suspend state to minimize power consumption. USB devices can
move to Suspend state from any other USB state. A device enters the Suspend state after seeing an
Idle state for more than 3 ms on the upstream facing data lines. In Suspend state, the USB hub is
required to supply current to the D+ or D- lines to keep the correct status of its downstream device.
Any activity on the bus takes the device out of Suspend state. In Suspend state, a device can draw a
maximum of 2.5 mA from the upstream port.
Even though the USB protocol is host-centric, a remote-wakeup enabled device has the ability to
notify the host to take the device out of the Suspend state and resume transactions. This article
introduces configurations and power management options for USB 2.0 hub systems, and serves as a
reference guide for designing hub systems that fully comply with USB Specification (Rev. 2.0).
Download