CN113094105B - Method for guaranteeing low power consumption state of USB device and waking up - Google Patents

Method for guaranteeing low power consumption state of USB device and waking up Download PDF

Info

Publication number
CN113094105B
CN113094105B CN202010023617.0A CN202010023617A CN113094105B CN 113094105 B CN113094105 B CN 113094105B CN 202010023617 A CN202010023617 A CN 202010023617A CN 113094105 B CN113094105 B CN 113094105B
Authority
CN
China
Prior art keywords
usb
bus
processor
signal
state
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.)
Active
Application number
CN202010023617.0A
Other languages
Chinese (zh)
Other versions
CN113094105A (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

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

Abstract

The invention provides a method for guaranteeing low power consumption state of USB equipment and waking up, which comprises the following steps: s1, adding a double-pole double-throw analog switch on a USB path between a processor and a host, ensuring the signal integrity of a USB2.0 bus by using the double-pole double-throw analog switch, and maintaining a suspend state on the USB bus; s2, when the USB equipment receives a suspend signal sent by the host, the suspend signal enters a suspend state with lower power consumption, namely, the processor enters a sleep state, and the processor turns off a power supply, a clock and a bus of the kernel; s3, detecting a K or SE0 signal sent by the host to the USB device through the USB bus, and enabling the processor to exit from the sleep state as an interrupt signal of the processor, and recovering the USB bus, so that the USB device exits from the suspend state. The double-pole double-throw analog switch is a high-speed low-power-consumption double-pole double-throw analog switch.

Description

Method for guaranteeing low power consumption state of USB device and waking up
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 the USB bus is idle, the USB device receives a suspend signal sent by the host through the USB bus, so that the USB device enters 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 side is required to turn off the power supply, the clock and the bus of the processor core, so that the processor enters a sleep state with low power consumption, and only the interrupt signal and the reset signal can enable the processor to exit the sleep state. The USB device cannot respond to the wake-up signal sent by the host over the USB bus in the sleep state of the processor.
Terminology and interpretation in the prior art:
suspended state): the USB bus is not seen to be active for 3ms and is in a power saving state, the USB equipment is not available, the original USB address and configuration are still maintained, and the J state is maintained on the USB bus after entering the suspend state.
J state: d+=1, D- =0 on the USB bus.
K state: d+=0, D- =1 on the USB bus.
SE0 state: d+=0, D- =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 from the suspend state to resume operation, it is necessary to keep the power supply and clock and bus of the processor core open, which may cause the USB device to consume too much power in the suspend state, and may not meet the low power consumption requirement of the USB IF compliance authentication requirement. If the processor is put into a sleep state with low power consumption, the USB device with the clock and bus turned off cannot directly recognize and respond to any signal sent by the host over the USB bus.
Disclosure of Invention
In order to solve the above problems, an object of the present invention is to: the invention can enable the USB device to enter a suspend state with lower power consumption after receiving the suspend command sent by the host through the USB bus, and can detect the K signal and the SE0 signal sent by the host to the USB device through the USB bus and enable the USB device to exit the suspend state.
Specifically, the invention provides a method for ensuring a low power consumption state of a USB device and waking up, which comprises the following steps:
s1, adding a double-pole double-throw analog switch on a USB path between a processor and a host, ensuring the signal integrity of a USB2.0 bus by using the double-pole double-throw analog switch, and maintaining a suspend state on the USB bus;
s2, when the USB equipment receives a suspend signal sent by the host, the suspend signal enters a suspend state with lower power consumption, namely, the processor enters a sleep state, and the processor turns off a power supply, a clock and a bus of the kernel;
s3, detecting a K or SE0 signal sent by the host to the USB device through the USB bus, and enabling the processor to exit from the sleep state as an interrupt signal of the processor, and recovering the USB bus, so that the USB device exits from the suspend 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 suspend signal sent by the host and enters a suspend state with lower power consumption, namely the processor enters a sleep state, the processor turns off the power supply, the clock and the bus of the kernel; the double-pole double-throw analog switch is used for guaranteeing the signal integrity of the USB2.0 bus; 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 an interrupt signal of the processor to enable the processor to exit the sleep state and restore the USB bus, thereby enabling the USB device to exit the suspend 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 and together with the description serve to explain the invention.
Fig. 1 is a schematic flow chart of the method 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 of a wake-up flow of a USB bus from a suspend state.
FIG. 4 is a diagram of a reset handshake process when the USB bus receives a SE0 signal from a suspend state to enter port rest.
Detailed Description
In order that the technical content and advantages of the present invention may be more clearly understood, a further detailed description of the present invention will now be made with reference to the accompanying drawings.
As shown in fig. 1, the present invention relates to a method for 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 a USB path between a processor and a host, ensuring the signal integrity of a USB2.0 bus by using the double-pole double-throw analog switch, and maintaining a suspend state on the USB bus;
s2, when the USB equipment receives a suspend signal sent by the host, the suspend signal enters a suspend state with lower power consumption, namely, the processor enters a sleep state, and the processor turns off a power supply, a clock and a bus of the kernel;
s3, detecting a K or SE0 signal sent by the host to the USB device through the USB bus, and enabling the processor to exit from the sleep state as an interrupt signal of the processor, and recovering the USB bus, so that the USB device exits from the suspend state.
The double-pole double-throw analog switch is a high-speed low-power-consumption double-pole double-throw analog switch.
The ensuring 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 guaranteeing the quality of data signal transmission of the USB bus.
The maintaining the suspend state on the USB bus in step S1 further includes: the other path of the double pole double throw switch is used for connecting with the interrupt input of the processor, and the path is pulled up to a 3.3V power supply through a resistor of 1.5 Kohm to maintain the suspend state on the USB bus.
The step S2 further includes: the J state is maintained on the USB bus according to the USB device entering the suspend state, i.e., d+=1, D- =0.
The step S2 further includes: the pin D+ of the double-pole double-throw analog switch is communicated with the HSD1+ in a default state, and D-is communicated with the HSD 1-; after the USB device of the processor enters a suspend state, the processor sends a control signal USB_SEL of a change-over switch, the DP signal of the USB is changed into another channel, namely D+ is communicated with HSD2+, GPIO connected with the signal is set as an interrupt signal of the processor, and a clock, a bus and a processor kernel 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 is changed from high to low, the processor is made to exit sleep state as an interrupt signal, a control signal of a switch is sent within 6ms of the longest response time of the USB2.0 bus protocol, the connection between D+ and HSD2+ is disconnected, the connection between D+ and HSD1+ is switched into, the connection between D-and HSD 1-is restored, the USB bus between the host and the processor is restored, and the USB device is restored to work.
The USB bus is a high-speed signal bus, and the data transmission rate is 480Mbps.
In a specific embodiment, as shown in fig. 2, an X1500 application circuit design of the integrated circuit corporation of beijing is taken as an example. D+ of the default state analog switch U23 is communicated with HSD1+, and D-is communicated with HSD 1-; after the USB device of the processor enters the suspend state, the processor U24 sends a control signal usb_sel of the switch, switches the DP signal of the USB to another channel, i.e. d+ is connected to hsd2+, and the GPIO connected to the signal is set as an interrupt signal of the processor, and turns off the clock, the bus and the processor core power supply through software to enter a sleep state with lower power consumption. When the host transmits K or SE0, the DP signal edge is changed from high to low, the processor is made to exit sleep state as an interrupt signal, a control signal of a change-over switch is transmitted within 6ms of the longest response time of the USB2.0 bus protocol, the connection between D+ and HSD2+ is disconnected, the connection is switched into D+ and HSD1+, D-and HSD1-, the USB bus between the host and the processor is restored, and the USB device is restored to work.
According to the USB2.0 protocol, the USB device exits the suspend state whenever a K state or a SE0 state appears on the USB bus, as shown in fig. 3, when a K signal appears on the USB bus, the USB device enters the wake-up procedure, as shown in fig. 4, when a SE0 signal appears on the USB bus, the USB device enters the reset handshake procedure. Under the condition of ensuring the quality of USB2.0 signals, the invention enables the controller to exit from sleep state by detecting the K state and the SE0 state as interrupt triggers, thereby recovering the USB bus.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, and various modifications and variations can be made to the embodiments of the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (6)

1. A method of ensuring a low power state of a USB device and waking up, the method comprising:
s1, adding a double-pole double-throw analog switch on a USB path between a processor and a host, ensuring the signal integrity of a USB2.0 bus by using the double-pole double-throw analog switch, and maintaining a suspend state on the USB bus;
the ensuring the integrity of the USB2.0 bus signal in step S1 further includes: one path of the double-pole double-throw analog switch is used for disconnecting and connecting the USB bus connection between the processor and the host, and guaranteeing the quality of data signal transmission of the USB bus;
the maintaining the suspend state on the USB bus in step S1 further includes: the other path of the double-pole double-throw analog switch is used for being connected with the interrupt input of the processor, and the path is pulled up to a power supply of 3.3V through a resistor of 1.5K ohms, so that the suspend state on the USB bus is maintained;
s2, when the USB equipment receives a suspend signal sent by the host, the suspend signal enters a suspend state with lower power consumption, namely, the processor enters a sleep state, and the processor turns off a power supply, a clock and a bus of the kernel;
the step S2 further includes: the pin D+ of the double-pole double-throw analog switch is communicated with the HSD1+ in a default state, and D-is communicated with the HSD 1-; after the USB device of the processor enters a suspend state, the processor sends a control signal USB_SEL of a change-over switch, a DP signal of the USB is changed into another channel, namely D+ is communicated with HSD2+, GPIO connected with the signal is set as an interrupt signal of the processor, and a clock, a bus and a processor kernel power supply are closed through software to enter a sleep state with lower power consumption;
s3, detecting a K or SE0 signal sent by the host to the USB device through the USB bus, and enabling the processor to exit from the sleep state as an interrupt signal of the processor, and recovering the USB bus, so that the USB device exits from the suspend state.
2. The method of 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 S2 further comprises: the J state is maintained on the USB bus according to the USB device entering the suspend state, i.e., d+=1, D- =0.
4. The method of claim 1, wherein the step S3 further comprises: when the host sends a K or SE0 signal, the DP signal edge is changed from high to low, the processor is made to exit sleep state as an interrupt signal, a control signal of a change-over switch is sent within the longest response time of the USB2.0 bus protocol, the connection between D+ and HSD2+ is disconnected, the connection between D+ and HSD1+ is switched into, the connection between D-and HSD 1-is restored, the USB bus between the host and the processor is restored, and the USB device is restored to work.
5. A method of ensuring that a USB device wakes up from a low power state as claimed in claim 4, wherein the maximum response time is 6ms.
6. A method of ensuring that a USB device wakes up from a low power state as claimed in claim 1, wherein the USB bus is a high speed signal bus with a data rate of 480Mbps.
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 CN113094105A (en) 2021-07-09
CN113094105B true 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)

Families Citing this family (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
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

Citations (7)

* 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
CN1517831A (en) * 2003-01-22 2004-08-04 Power supply for computer system by USB keyboard
CN102882508A (en) * 2012-08-30 2013-01-16 广州市捷众科贸有限公司 Simple circuit for switching polarity of RS485 interface
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

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6708278B2 (en) * 1999-06-28 2004-03-16 Apple Computer, Inc. Apparatus and method for awakening bus circuitry from a low power state
TW493120B (en) * 2000-02-11 2002-07-01 Rf Link Systems Inc Waking up system and method for universal serial bus of wireless computer input device
US8352644B2 (en) * 2009-11-23 2013-01-08 Qualcomm Incorporated Apparatus and methods for USB connection in a multi-processor device
US8850252B2 (en) * 2011-11-03 2014-09-30 Nvidia Corporation USB host wake from sleep state for mobile devices
US9625980B2 (en) * 2014-12-16 2017-04-18 Nxp Usa, Inc. Low power configuration for USB (Universal Serial Bus) devices

Patent Citations (7)

* 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
CN1517831A (en) * 2003-01-22 2004-08-04 Power supply for computer system by USB keyboard
CN102882508A (en) * 2012-08-30 2013-01-16 广州市捷众科贸有限公司 Simple circuit for switching polarity of RS485 interface
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

Also Published As

Publication number Publication date
CN113094105A (en) 2021-07-09

Similar Documents

Publication Publication Date Title
CN113094105B (en) Method for guaranteeing low power consumption state of USB device and waking up
US8745417B2 (en) Computer system and notebook computer, and method for controlling computer system
EP2115605B1 (en) Detecting connection to a usb host or hub without using an extra status input
US9310838B2 (en) Power management method for switching power mode of a computer system based on detection of a human interface device
AU2009291819B2 (en) Circuit having a low power mode
US9342131B2 (en) USB hub and control method of USB hub
US9811145B2 (en) Reduction of idle power in a communication port
CN109857243B (en) System-on-chip, universal serial bus master device, system and awakening method
KR101128352B1 (en) Usb controller and method for controlling the suspend mode of the same
US9678554B2 (en) Low power mode operation when charging a device
CN110018976B (en) Method for USB master device to respond to USB slave device and related device
US20080307239A1 (en) Electronic device and power supply method
US9146606B2 (en) Computer and waking method thereof
US20070050649A1 (en) Power saving electronic apparatus and method
US20150253842A1 (en) Semiconductor device, and power control method for usbotg
CN101872232A (en) Controller, mainboard and computer
US20090300395A1 (en) Power saving system and method
US20140157012A1 (en) Information processing apparatus and power supplying method
CN113094103B (en) Detection circuit system for recovering USB bus state
CN113094104A (en) Design method of detection circuit for awakening low-power-consumption circuit
CN212208279U (en) USB interface switching device and terminal equipment
CN114115450A (en) Docking station for power management
US20230333995A1 (en) Pointing device and method capable of correcting its usb state by monitoring voltage/state of usb communication interface
US20240028859A1 (en) Display card and electronic device with wireless communication function
CN114924639A (en) Electronic device and method for waking up micro control unit

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