CN113094105A - Method for ensuring low power consumption state of USB device and awakening USB device - Google Patents

Method for ensuring low power consumption state of USB device and awakening USB device Download PDF

Info

Publication number
CN113094105A
CN113094105A CN202010023617.0A CN202010023617A CN113094105A CN 113094105 A CN113094105 A CN 113094105A CN 202010023617 A CN202010023617 A CN 202010023617A CN 113094105 A CN113094105 A CN 113094105A
Authority
CN
China
Prior art keywords
usb
processor
bus
signal
double
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010023617.0A
Other languages
Chinese (zh)
Other versions
CN113094105B (en
Inventor
魏芳芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Ingenic Semiconductor Co Ltd
Original Assignee
Beijing Ingenic Semiconductor Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Ingenic Semiconductor Co Ltd filed Critical Beijing Ingenic Semiconductor Co Ltd
Priority to CN202010023617.0A priority Critical patent/CN113094105B/en
Publication of CN113094105A publication Critical patent/CN113094105A/en
Application granted granted Critical
Publication of CN113094105B publication Critical patent/CN113094105B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/3243Power saving in microcontroller unit
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Power Sources (AREA)

Abstract

The invention provides various methods for ensuring the low power consumption state of a USB device and awakening the USB device, which comprise the following steps: s1, adding a double-pole double-throw analog switch on the USB path between the processor and the host, ensuring the integrity of USB2.0 bus signals by using the double-pole double-throw analog switch, and maintaining the suspended state on the USB bus; s2, when the USB device receives the suspended signal sent by the host computer and enters a suspended state with lower power consumption, namely the processor enters a sleep state, the processor closes the power supply, the clock and the bus of the kernel; s3, detecting the K or SE0 signal sent by the host to the USB device through the USB bus, taking the signal as the interrupt signal of the processor to make the processor exit the sleep state, and restoring the USB bus, thereby making the USB device exit the suspended state. The double-pole double-throw analog switch is a high-speed low-power consumption double-pole double-throw analog switch.

Description

Method for ensuring low power consumption state of USB device and awakening USB device
Technical Field
The present invention relates to the field of electronic circuits, and in particular, to a method for ensuring a low power consumption state of a USB device and waking up the USB device.
Background
In the prior art, when a USB bus is idle, a USB device receives a suspend signal sent by a host through the USB bus, so as to enter a low-power consumption suspend state, and when the USB device receives a wake-up signal sent by the host through the USB bus, the USB device exits the suspend state. If the power consumption is further reduced, the USB device end is required to close the processor core power supply, the clock and the bus, so that the processor enters a low-power-consumption sleep state, and the processor can exit the sleep state only by the interrupt signal and the reset signal. And the USB equipment cannot respond to the wake-up signal sent by the host through the USB bus in the sleep state of the processor.
Terms and explanations in the prior art:
suspended (suspend state): the USB bus is in a power-saving state without the activity of the USB bus for 3ms, the USB equipment is unavailable, the original USB address and configuration are still kept, and the J state is kept on the USB bus after the USB bus enters the suspended state.
J state: d + is 1, and D-is 0 on the USB bus.
The K state: d + is 0, and D-is 1 on the USB bus.
SE0 state: d + is 0, and D-is 0 on the USB bus.
In order to ensure that the USB device can receive and respond to the wake-up signal sent by the host through the USB bus to exit the suspended state and resume working, the power supply, the clock and the bus of the processor core need to be kept on, which may cause that the power consumption of the USB device in the suspended state is too large, and may not meet the low power consumption requirement of the USB IF compliance authentication requirement. However, if the processor enters a low power sleep state, the USB device with the clock and bus turned off cannot directly recognize and respond to any signal sent by the host through the USB bus.
Disclosure of Invention
In order to solve the above problems, the present invention is directed to: the invention can enable the USB equipment to enter a suspended state with lower power consumption after receiving a suspended command sent by the host through the USB bus, and can detect a K signal and a SE0 signal sent by the host to the USB equipment through the USB bus and enable the USB equipment to exit the suspended state.
Specifically, the present invention provides a method for ensuring a low power consumption state of a USB device and waking up the USB device, the method comprising:
s1, adding a double-pole double-throw analog switch on the USB path between the processor and the host, ensuring the integrity of USB2.0 bus signals by using the double-pole double-throw analog switch, and maintaining the suspended state on the USB bus;
s2, when the USB device receives the suspended signal sent by the host computer and enters a suspended state with lower power consumption, namely the processor enters a sleep state, the processor closes the power supply, the clock and the bus of the kernel;
s3, detecting the K or SE0 signal sent by the host to the USB device through the USB bus, taking the signal as the interrupt signal of the processor to make the processor exit the sleep state, and restoring the USB bus, thereby making the USB device exit the suspended state.
The double-pole double-throw analog switch is a high-speed low-power consumption double-pole double-throw analog switch.
Thus, the present application has the advantages that: when the USB equipment receives a suspended signal sent by the host computer and enters a suspended state with lower power consumption, namely the processor enters a sleep state, the processor closes the power supply, the clock and the bus of the kernel; the integrity of USB2.0 bus signals is ensured by using a double-pole double-throw analog switch; the invention can detect the K or SE0 signal sent by the host computer to the USB device through the USB bus, and the signal is used as the interrupt signal of the processor to enable the processor to exit from the sleep state and recover the USB bus, thereby enabling the USB device to exit from the suspended state.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the principles of the invention.
FIG. 1 is a schematic flow diagram of the process of the present invention.
FIG. 2 is a schematic diagram of an application circuit design of an embodiment of the system of the present invention.
FIG. 3 is a diagram illustrating a wake-up procedure of the USB bus receiving a K signal from a suspended state.
FIG. 4 is a diagram illustrating the USB bus entering port rest, i.e., reset handshake flow, receiving a SE0 signal from suspended state.
Detailed Description
In order that the technical contents and advantages of the present invention can be more clearly understood, the present invention will now be described in further detail with reference to the accompanying drawings.
As shown in fig. 1, the present invention relates to a method for guaranteeing a low power consumption state of a USB device and waking up, the method comprising:
s1, adding a double-pole double-throw analog switch on the USB path between the processor and the host, ensuring the integrity of USB2.0 bus signals by using the double-pole double-throw analog switch, and maintaining the suspended state on the USB bus;
s2, when the USB device receives the suspended signal sent by the host computer and enters a suspended state with lower power consumption, namely the processor enters a sleep state, the processor closes the power supply, the clock and the bus of the kernel;
s3, detecting the K or SE0 signal sent by the host to the USB device through the USB bus, taking the signal as the interrupt signal of the processor to make the processor exit the sleep state, and restoring the USB bus, thereby making the USB device exit the suspended state.
The double-pole double-throw analog switch is a high-speed low-power consumption double-pole double-throw analog switch.
The ensuring of the integrity of the USB2.0 bus signal in step S1 further includes: one path of the double-pole double-throw switch is used for disconnecting and connecting the USB bus connection between the processor and the host, and the quality of data signal transmission of the USB bus is ensured.
Maintaining the suspended state on the USB bus in step S1, further includes: the other path of the double-pole double-throw switch is used for being connected with an interrupt input of the processor, and the other path is pulled up to a 3.3V power supply through a 1.5K ohm resistor to maintain a suspended state on the USB bus.
The step S2 further includes: the J state is maintained on the USB bus upon the USB device entering the suspended state, i.e., D + ═ 1 and D- ═ 0.
The step S2 further includes: the pin D + of the double-pole double-throw analog switch is communicated with the HSD1+ and the D-is communicated with the HSD 1-in a default state; when the processor USB equipment enters a suspended state, the processor sends a control signal USB _ SEL of the selector switch, a DP signal of the USB is switched to another channel, namely D + is communicated with HSD2+, GPIO connected with the DP signal is set as an interrupt signal of the processor, and a clock, a bus and a processor core power supply are closed through software to enter a sleep state with lower power consumption.
The step S3 further includes: when the host sends a K or SE0 signal, the DP signal edge changes from high to low as an interrupt signal to enable the processor to exit from a sleep state, and sends a control signal of the change-over switch within 6ms of the longest response time of the USB2.0 bus protocol, the connection between the D + and the HSD2+ is disconnected, the D + is switched to be connected with the HSD1+ and the D-is connected with the HSD1-, the USB bus between the host and the processor is restored, and the USB device resumes operation.
The USB bus is a high-speed signal bus, and the data transmission rate is 480 Mbps.
In the specific embodiment, as shown in fig. 2, an X1500 application circuit design of beijing jun zheng integrated circuit gmbh is taken as an example. D + of the default state analog switch U23 is communicated with HSD1+ and D-is communicated with HSD 1-; when the processor USB equipment enters a suspended state, the processor U24 sends a control signal USB _ SEL of the selector switch, a DP signal of the USB is switched to another channel, namely D + is communicated with HSD2+, GPIO connected with the DP signal is set as an interrupt signal of the processor, and a clock, a bus and a processor core power supply are turned off through software to enter a sleep state with lower power consumption. When the host sends K or SE0, the DP signal edge changes from high to low as an interrupt signal to enable the processor to exit from sleep state, and sends a control signal of the change-over switch within the longest response time of 6ms of the USB2.0 bus protocol to disconnect the connection between the D + and the HSD2+, switch the connection between the D + and the HSD1+, the connection between the D-and the HSD1-, and restore the USB bus between the host and the processor, so that the USB device recovers work.
According to the USB2.0 protocol, the USB device exits the suspended state as long as the USB bus has the K state or the SE0 state, as shown in FIG. 3, when the USB bus has the K signal, the USB device enters the wake-up process, as shown in FIG. 4, when the USB bus has the SE0 signal, the USB device enters the reset handshake process. According to the invention, under the condition of ensuring the USB2.0 signal quality, the controller is made to exit from the sleep state by detecting the K state and the SE0 state as interrupt trigger, so that the USB bus is recovered.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes may be made to the embodiment of the present invention by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. A method of ensuring a low power consumption state of a USB device and waking up, the method comprising:
s1, adding a double-pole double-throw analog switch on the USB path between the processor and the host, ensuring the integrity of USB2.0 bus signals by using the double-pole double-throw analog switch, and maintaining the suspended state on the USB bus;
s2, when the USB device receives the suspended signal sent by the host computer and enters a suspended state with lower power consumption, namely the processor enters a sleep state, the processor closes the power supply, the clock and the bus of the kernel;
s3, detecting the K or SE0 signal sent by the host to the USB device through the USB bus, taking the signal as the interrupt signal of the processor to make the processor exit the sleep state, and restoring the USB bus, thereby making the USB device exit the suspended state.
2. The method as claimed in claim 1, wherein the double-pole double-throw analog switch is a high-speed low-power double-pole double-throw analog switch.
3. The method of claim 1, wherein the step of ensuring USB2.0 bus signal integrity in S1 further comprises: one path of the double-pole double-throw switch is used for disconnecting and connecting the USB bus connection between the processor and the host, and the quality of data signal transmission of the USB bus is ensured.
4. The method of claim 1, wherein the step S1 of maintaining a suspended state on the USB bus further comprises: the other path of the double-pole double-throw switch is used for being connected with an interrupt input of the processor, and the other path is pulled up to a 3.3V power supply through a 1.5K ohm resistor to maintain a suspended state on the USB bus.
5. The method according to claim 1, wherein the step S2 further comprises: the J state is maintained on the USB bus upon the USB device entering the suspended state, i.e., D + ═ 1 and D- ═ 0.
6. The method according to claim 1, wherein the step S2 further comprises: the pin D + of the double-pole double-throw analog switch is communicated with the HSD1+ and the D-is communicated with the HSD 1-in a default state; when the processor USB equipment enters a suspended state, the processor sends a control signal USB _ SEL of the selector switch, a DP signal of the USB is switched to another channel, namely D + is communicated with HSD2+, GPIO connected with the DP signal is set as an interrupt signal of the processor, and a clock, a bus and a processor core power supply are closed through software to enter a sleep state with lower power consumption.
7. The method according to claim 1, wherein the step S3 further comprises: when the host sends a K or SE0 signal, the DP signal edge changes from high to low as an interrupt signal to enable the processor to exit from a sleep state, and sends a control signal of the change-over switch within the longest response time of the USB2.0 bus protocol to disconnect the connection between the D + and the HSD2+, switch the connection between the D + and the HSD1+ and the connection between the D-and the HSD1-, restore the USB bus between the host and the processor, and restore the USB equipment to work.
8. A method for ensuring that a USB device is woken up from a low power consumption state according to claim 7, wherein the maximum response time is 6 ms.
9. The method of claim 1, wherein the USB bus is a high-speed signal bus with a data transfer rate of 480 Mbps.
CN202010023617.0A 2020-01-09 2020-01-09 Method for guaranteeing low power consumption state of USB device and waking up Active CN113094105B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010023617.0A CN113094105B (en) 2020-01-09 2020-01-09 Method for guaranteeing low power consumption state of USB device and waking up

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010023617.0A CN113094105B (en) 2020-01-09 2020-01-09 Method for guaranteeing low power consumption state of USB device and waking up

Publications (2)

Publication Number Publication Date
CN113094105A true CN113094105A (en) 2021-07-09
CN113094105B CN113094105B (en) 2024-02-27

Family

ID=76663591

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010023617.0A Active CN113094105B (en) 2020-01-09 2020-01-09 Method for guaranteeing low power consumption state of USB device and waking up

Country Status (1)

Country Link
CN (1) CN113094105B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114020139A (en) * 2021-11-05 2022-02-08 珠海全志科技股份有限公司 CPU power consumption management method, computer device and computer readable storage medium
CN114327102A (en) * 2021-12-06 2022-04-12 深圳市千分一智能技术有限公司 Protocol switching method, device, equipment and computer readable storage medium
CN114564099A (en) * 2022-01-20 2022-05-31 珠海亿智电子科技有限公司 Method for reducing USB transmission power consumption and electronic device

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1050451A (en) * 1989-06-12 1991-04-03 栅格体系有限公司 Can be in the computing machine of low-power dormant state
US20010027530A1 (en) * 2000-02-11 2001-10-04 Andy Yen Wake-up system and method for universal serial bus of wireless input device
US20030014677A1 (en) * 1999-06-28 2003-01-16 Apple Computer, Inc. Apparatus and method for awakening bus circuitry from a low power state
CN1517831A (en) * 2003-01-22 2004-08-04 Power supply for computer system by USB keyboard
US20110145445A1 (en) * 2009-11-23 2011-06-16 Qualcomm Incorporated Apparatus and methods for usb connection in a multi-processor device
CN102882508A (en) * 2012-08-30 2013-01-16 广州市捷众科贸有限公司 Simple circuit for switching polarity of RS485 interface
US20130117489A1 (en) * 2011-11-03 2013-05-09 Nvidia Corporation Usb host wake from sleep state for mobile devices
US20160170472A1 (en) * 2014-12-16 2016-06-16 Freescale Semiconductor, Inc. Low power configuration for usb (universal serial bus) devices
CN106773959A (en) * 2016-12-16 2017-05-31 深圳创维空调科技有限公司 A kind of light current for being based on the communication of two heart yearns wakes up system and method
CN208168565U (en) * 2018-03-15 2018-11-30 王鹏霄 A kind of low-power-consumption embedded system for Fingerprint Lock
CN109857243A (en) * 2017-11-28 2019-06-07 华为技术有限公司 System level chip, universal serial bus main equipment, system and awakening method
CN110018976A (en) * 2018-01-10 2019-07-16 华为技术有限公司 USB main equipment responds USB from device, method and relevant device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1050451A (en) * 1989-06-12 1991-04-03 栅格体系有限公司 Can be in the computing machine of low-power dormant state
US20030014677A1 (en) * 1999-06-28 2003-01-16 Apple Computer, Inc. Apparatus and method for awakening bus circuitry from a low power state
US20010027530A1 (en) * 2000-02-11 2001-10-04 Andy Yen Wake-up system and method for universal serial bus of wireless input device
CN1517831A (en) * 2003-01-22 2004-08-04 Power supply for computer system by USB keyboard
US20110145445A1 (en) * 2009-11-23 2011-06-16 Qualcomm Incorporated Apparatus and methods for usb connection in a multi-processor device
US20130117489A1 (en) * 2011-11-03 2013-05-09 Nvidia Corporation Usb host wake from sleep state for mobile devices
CN102882508A (en) * 2012-08-30 2013-01-16 广州市捷众科贸有限公司 Simple circuit for switching polarity of RS485 interface
US20160170472A1 (en) * 2014-12-16 2016-06-16 Freescale Semiconductor, Inc. Low power configuration for usb (universal serial bus) devices
CN106773959A (en) * 2016-12-16 2017-05-31 深圳创维空调科技有限公司 A kind of light current for being based on the communication of two heart yearns wakes up system and method
CN109857243A (en) * 2017-11-28 2019-06-07 华为技术有限公司 System level chip, universal serial bus main equipment, system and awakening method
CN110018976A (en) * 2018-01-10 2019-07-16 华为技术有限公司 USB main equipment responds USB from device, method and relevant device
CN208168565U (en) * 2018-03-15 2018-11-30 王鹏霄 A kind of low-power-consumption embedded system for Fingerprint Lock

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114020139A (en) * 2021-11-05 2022-02-08 珠海全志科技股份有限公司 CPU power consumption management method, computer device and computer readable storage medium
CN114327102A (en) * 2021-12-06 2022-04-12 深圳市千分一智能技术有限公司 Protocol switching method, device, equipment and computer readable storage medium
CN114327102B (en) * 2021-12-06 2023-07-21 深圳市千分一智能技术有限公司 Protocol switching method, device, equipment and computer readable storage medium
CN114564099A (en) * 2022-01-20 2022-05-31 珠海亿智电子科技有限公司 Method for reducing USB transmission power consumption and electronic device
CN114564099B (en) * 2022-01-20 2024-06-04 珠海亿智电子科技有限公司 Method for reducing USB transmission power consumption and electronic device

Also Published As

Publication number Publication date
CN113094105B (en) 2024-02-27

Similar Documents

Publication Publication Date Title
EP2115605B1 (en) Detecting connection to a usb host or hub without using an extra status input
CN113094105B (en) Method for guaranteeing low power consumption state of USB device and waking up
CN109857243B (en) System-on-chip, universal serial bus master device, system and awakening method
US8745417B2 (en) Computer system and notebook computer, and method for controlling computer system
AU2009291819B2 (en) Circuit having a low power mode
CN100359435C (en) Information processing apparatus and control method for the same
US20170139467A1 (en) Usb interface circuit and method for low power operation
KR101128352B1 (en) Usb controller and method for controlling the suspend mode of the same
US9811145B2 (en) Reduction of idle power in a communication port
JP3610424B2 (en) Electronic equipment and interface circuit
JP2000105638A (en) Usb device and usb connection system
US20150253842A1 (en) Semiconductor device, and power control method for usbotg
CN101872232A (en) Controller, mainboard and computer
US7197578B1 (en) Power management system for bridge circuit
US8549337B2 (en) Memory card control device and method for controlling the same
CN113094104A (en) Design method of detection circuit for awakening low-power-consumption circuit
CN113094103B (en) Detection circuit system for recovering USB bus state
CN108966079B (en) Control method and system of audio device
CN114115450A (en) Docking station for power management
CN114924639B (en) Electronic device and method for waking up micro control unit
US11741023B1 (en) Pointing device and method capable of correcting its USB state by monitoring voltage/state of USB communication interface
CN111427719B (en) Method and device for improving reliability and abnormal restarting performance of SOC (system on chip) system
KR100403371B1 (en) Power supply apparatus and method for a mobile terminal using an universal serial bus
TW202304179A (en) High-speed transimission system, signal redriver and control method of signal redriver
KR0130785Y1 (en) Card exchange detecting device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant