Suspend and resume)

Source: Internet
Author: User

Chapter 1 of the USB Protocol describes the status of the USB visible device [universal serial bus specification, section 9.1.1, PG 9th], which can be divided into attached, powered ), default, address, configured, and suspend are six statuses. Visible, that is, the visible status of the USB system and host. Other states are not visible within the USB device. The power supply can be roughly divided into the following three types:
1. attached: the device is connected, but the power supply is not provided.
2. power-on status (powered): the device is reset, or is in the address or configuration status. (See USB enumeration process , USB
specification, page 241)

3. Suspended: the device is in the power-saving status after 3 ms, but the original USB address and configuration remain unchanged.

Device Suspension
We know that in the USB system, the hub or root hub will periodically send the sof package (start of frame, one full speed USB packet per 1 ms, and the high speed USB packet is 125 Μ S ). According to the USB protocol, if the USB cable remains idle for more than 3 ms, the device should treat it as a suspended signal, requiring the device to be suspended within 10 ms, and the current required by the device is reduced to the specified value (for low-power devices, the requirement is 500
5mA [section 7.2.3, pg176 ]). In the pending state, the device must continue to provide voltage to the pull-up resistor of the data item d +/D-to maintain the idle state. However, there are some additional requirements for high-speed devices of USB2.0:
1. High-Speed Devices Receive pending Signal After (3 ms idle), switch to the full speed status within 0.125ms, that is, remove the terminal resistor and re-mount the K resistor on the D + data cable.
2. The device detects the status of the data cable within-μs. If the status is Full speed J indicates that the host sends a pending signal. If the status is se0, it indicates that the host drive data line D is + to 0, this is a reset signal (the reset signal will last for at least 10 ms ).
Note that the high-speed device is in high-speed mode when it is suspended, but only uses the full-speed signal. Once it is restored from the suspended state, it immediately enters the high-speed working state without resetting.


As shown in, the host stops sending messages at a point. Sof: The system is in the se0 state. Point B is a 3 ms time point, followed by 125 Μ Within S, the device removes the terminal resistor and hangs K to pull it up. In this case, if the host sends a suspend signal, it will not drive D + data lines, resulting in D + being increased by the device, forming a full
Speed J status. After point C Within-μs, the device detects host behavior and finds that the device is a suspend signal. The device enters the suspend state of low power consumption. (If hsot sends a reset signal, when the device has a K resistance at the cpoint, the host will act on drive of the D + line, The D + line cannot be pulled up and is still in the se0 state. After the device is detected at, it still finds the se0 state. After 10 ms, it can be determined that this is a reset signal and the device is reset. .)


Device wake-up
When a device is suspended, any activity on the bus (non-idle signal) can wake up or restore the device to exit the low power consumption mode. (Likewise, a device can also wake up the host. For example, a computer uses a USB keyboard to wake up the host when it is in standby mode. This function is called remote wakeup ), not in the scope of this article .)
Because the device is at full speed when it is suspended, when the host needs to disconnect the device from the suspend state, it needs to first send a fulll speed K State that lasts for more than 20 ms. The device wakes up within 1.3us when the K State ends, and the host needs to send the usof signal within 3 ms to maintain the normal high-speed signal mode. Otherwise, the device enters the suspend. As shown in:



This article is purely reproduced. Original address: USB suspension and wake-up


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.