CN105446916B - USB bus state switching method and device - Google Patents
USB bus state switching method and device Download PDFInfo
- Publication number
- CN105446916B CN105446916B CN201410436123.XA CN201410436123A CN105446916B CN 105446916 B CN105446916 B CN 105446916B CN 201410436123 A CN201410436123 A CN 201410436123A CN 105446916 B CN105446916 B CN 105446916B
- Authority
- CN
- China
- Prior art keywords
- usb
- instruction
- wakes
- bus
- time threshold
- 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
Links
Classifications
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy efficient computing, e.g. low power processors, power management or thermal management
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/50—Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate
Landscapes
- Power Sources (AREA)
Abstract
A kind of usb bus state switching method of present invention offer and device, by when being hung up in system entire bus or Idle state is more than first time threshold, it is then electricity under the physical layer PHY of USB, the controller of USB is set to battery saving mode, and retain resource, application processor AP is sent first is received again and wakes up instruction, and sending first to modem wakes up instruction.Although realizing electric under the physical layer PHY to USB, and the controller of USB is set to battery saving mode, but when AP wakes up modem by usb bus, or, when modem wakes up AP by usb bus, since usb bus remains the related resource for wake-up, so as to avoid the process of re-enumeration in the prior art, to reduce the time from suspend mode to wake-up, system stability is improved.
Description
Technical field
The present invention relates to the communication technology more particularly to a kind of usb bus state switching methods and device.
Background technology
With popularizing for intelligent terminal, intelligent terminal and the relationship that people live are more and more closer, now eventually by some intelligence
End, due to the continuous enhancing of its function, power consumption is also continuously increased, and therefore, an industry problem urgently to be resolved hurrily is how to drop
The power consumption of low intelligent terminal.
For example, for the intelligent terminal of Android (Android) operating system, application processor is provided in the terminal
(Application processor, referred to as:AP) and modem (modem), wherein application processor is in low-power consumption
The super large-scale integration that audio and video function and special purpose interface are extended on the basis of CPU is used to handle and applies phase with various
The process of pass.There are two types of connection relation between existing AP and modem is usual:System on chip (System on
Chip, referred to as:SoC) internal bus connection is connected with chip exterior bus.The former be AP and modem are solidificated in it is same
In chip;The latter is then that AP and modem are different chip respectively, passes through the high speed outer of some standards between them
Bus is attached, such as universal serial bus (Universal Serial Bus, abbreviation:USB), SD input/output interfaces
(Secure Digital Input Output, referred to as:SDIO), 1394, mini third generation I/O bussing techniques (Peripheral
Component Interconnection Express, referred to as:PCIe) etc., wherein USB's is most widely used.At present
The power managed of USB interface also mainly hangs up (system suspend) using original system entire bus under Android
With the mode that bus suspension (run-time suspend) is combined when operation, this mode is the state by usb bus in work
It poses (Active) and is switched between Idle state (Idle), reduce the data transmission in unnecessary bus, to USB
The lower power consumption of the transceiver (transceiver) of physical layer (PHY).
But existing scheme just with usb bus pause (suspend), restart (resume) and Remote Wake Up
(remote wakeup) these operations carry out the behavior in controlling bus, do not touch USB PHY and controller
(Controller) internal logic, wherein most logic can USB it is idle too when turn off, restore when USB restores.
If USB PHY and controller are done shutdown and recovery is handled, since PHY has been switched off at this time, then cannot
By usb bus itself, and must be Jing Guo re-enumeration process, for this equipment complex of modem, this
A process is about 500ms or so after tested than relatively time-consuming, this delays time of the system from suspend mode to wake-up significantly,
Reduce the reliability of system.
Invention content
A kind of usb bus state switching method of present invention offer and device carry for reducing the time from suspend mode to wake-up
High system stability.
The first aspect of the invention is to provide a kind of usb bus state switching method, including:
When being hung up in system entire bus or Idle state is more than first time threshold, then under the physical layer PHY of USB
The controller of USB is set to battery saving mode, and retains resource by electricity;
It receives application processor AP is sent first and wakes up instruction, sending described first to modem wakes up instruction.
In conjunction with the first aspect, in the first possible implementation, further include:
When the duration that the controller of electricity under the PHY of the USB and the USB is set to battery saving mode is more than second time threshold
When, then discharge the resource;
Wherein, the second time threshold is more than the first time threshold.
In conjunction with the possible realization method of the first of the first aspect or the first aspect, second of possible realization side
In formula, described first, which wakes up instruction, includes the instruction of setting address and setting configuration instruction.
The second aspect of the invention is to provide a kind of usb bus state switching device, including:
Processing module, for being then USB when being hung up in system entire bus or Idle state is more than first time threshold
Physical layer PHY under electricity, the controller of USB is set to battery saving mode, and retain resource;
Receiving module wakes up instruction for receiving application processor AP is sent first;
Sending module wakes up instruction for sending described first to the modem.
In conjunction with the second aspect, in the first possible implementation, the processing module is additionally operable to work as the USB
PHY under electricity when being set to the duration of battery saving mode with the controller of the USB and being more than second time threshold, then discharge the money
Source;
Wherein, the second time threshold is more than the first time threshold.
In conjunction with the possible realization method of the first of the second aspect or the second aspect, second of possible realization side
In formula, described first, which wakes up instruction, includes the instruction of setting address and setting configuration instruction.
Usb bus state switching method and device provided in an embodiment of the present invention, by being hung when in system entire bus
It rises or when Idle state is more than first time threshold, is then electric under the physical layer PHY of USB, the controller Controller of USB is set
For battery saving mode, and retain resource, then receive application processor AP is sent first and wake up instruction, institute is sent to modem
State the first wake-up instruction.Although realizing electricity under the physical layer PHY to USB, and the controller of USB is set to battery saving mode,
But work as AP and modem is waken up by usb bus, alternatively, when modem wakes up AP by usb bus, since USB is total
Line remains the related resource for wake-up, so as to avoid the process of re-enumeration in the prior art, to substantially increase
Time from suspend mode to wake-up, improve system stability.
Description of the drawings
Fig. 1 is a kind of schematic diagram of usb bus state switching method provided in an embodiment of the present invention;
Fig. 2 is the schematic diagram of another usb bus state switching method provided in an embodiment of the present invention;
Fig. 3 is usb bus power consumption contrast schematic diagram;
Fig. 4 is USB wakeup time contrast schematic diagrams;
Fig. 5 is a kind of structural schematic diagram of usb bus state switching device provided in an embodiment of the present invention;
Fig. 6 is AP and modem connection signal inside usb bus state switching device provided in an embodiment of the present invention
Figure.
Specific implementation mode
USB power consumption state machines under Android (Android) system are defined as 4 by the following embodiments of the present invention:S0 indicates work
It poses (Busy);S1 indicates Idle state (Idle);S2 indicates run time off-state (run-time disconnect);S3 tables
Show off-state (disconnect).
The prior art, when USB is switched between S1 and S0, just with the pause (suspend) of usb bus,
Restart the behavior that (resume) and Remote Wake Up (remote wakeup) these behaviors come in controlling bus, does not touch USB
The internal logic of physical layer (PHY) and controller (Controller), wherein most logic can be turned off in the USB free time,
Restore when USB restores.It, cannot if USB PHY and controller (Controller) are done shutdown and recovery is handled
By usb bus itself because PHY has been switched off at this time, and must be Jing Guo re-enumeration process, to modem
(modem) for this equipment complex, this process is about 500ms or so after tested than relatively time-consuming, this postpones significantly
Time of the system from suspend mode to wake-up, reduce the reliability of system.
Therefore, ensure shortest wakeup time, the embodiment of the present invention while usb bus more power consumptions in order to reduce
S2 states are increased, with by the conversion between S2 and S0, S1, S3, to solve above-mentioned technical problem.Specifically, with reference to following
Embodiment illustrates.
Fig. 1 is a kind of schematic diagram of usb bus state switching method provided in an embodiment of the present invention, which, which illustrates, works as
Usb bus can switch to S2 described above under what circumstances, and realize those functions in S2, and referring to Fig.1, this method includes
Following steps:
Step 100, when in system entire bus hang up or Idle state be more than first time threshold when, then be the object of USB
Electricity under layer PHY is managed, the controller (Controller) of USB is set to battery saving mode, and retain resource;
Specifically, the resource retained is and suspend mode to the related resource of wake-up.Such as the information of USB enumeration equipment, address,
Configuration information etc., these resources are all that modem is reported to AP during USB enumeration, and retaining these resources can save
Wakeup time.
Step 101 receives the first wake-up instruction that application processor AP is sent, and institute is sent to modem (Modem)
State the first wake-up instruction.
Usb bus state switching method provided in an embodiment of the present invention, by when in the hang-up of system entire bus or sky
When not busy state is more than first time threshold, then it is electric under the physical layer PHY of USB, the controller of USB is set to battery saving mode, and protect
Resource is stayed, then receives application processor AP is sent first and wakes up instruction, sending described first to modem wakes up instruction.
Although realizing electricity under the physical layer PHY to USB, and the controller of USB is set to battery saving mode, when AP is total by USB
Line wakes up modem, since usb bus remains the related resource for wake-up, so as to avoid in the prior art again
The process enumerated improves system stability to reduce the time from suspend mode to wake-up.
Further, on the basis of Fig. 1, further include:
When the duration that the controller of electricity under the PHY of the USB and the USB is set to battery saving mode is more than second time threshold
When, then discharge the resource;
Wherein, the second time threshold is more than the first time threshold.
Further, described first wake up indicate to include the instruction of setting address and setting configuration instruction.
Fig. 2 is the schematic diagram of another usb bus state switching method provided in an embodiment of the present invention, with reference to Fig. 2, to upper
The function of stating usb bus under the switching between S0, S1, S2, S3 and each state is described further.
S2 is as the state newly increased, in this state, to electricity under the Phy of USB, and USB controller is set to province
Power mode, in this mode, USB drivings also retain original resource and do not discharge, from the mode wakeup when, AP wakes up modulation /demodulation
The first of device wakes up instruction and only needs to indicate (set_address) and setting configuration instruction (set_ comprising setting address
configuration).To be restored to S0 states with the shortest time.After to electricity under Phy, in fact USB has been in disconnected
ON state allows USB to be set to so after S2 states are more than 10s (this time can be depending on modem concrete condition)
S3, free system resources, the process that the process from S3 to S0 is inserted into USB are the same.After electricity under the Phy of USB, wake operation
External interface is had to rely on, so to increase two-way universal input/output (General Purpose Input on hardware
Output, referred to as:GPIO), the operation that AP wakes up modem and modem wakes up AP is initiated respectively.S0 passes through operation
Time stopped (run-time suspend) switches to S1 states, and opposite S1 restarts (run-time by run time
Resume S0 states) are switched to.S1 switches to S2:In the case of system suspend mode, S1 states are more than that (this time can be according to tune by 3s
Depending on modulator-demodulator concrete condition), or (System suspend) operation is hung up by system entire bus and is switched to from S1
S2。
Fig. 3 is usb bus power consumption contrast schematic diagram, and Fig. 4 is USB wakeup time contrast schematic diagrams, can with reference to Fig. 3 and Fig. 4
Know, using the scheme of the embodiment of the present invention while ensureing wakeup time, hence it is evident that reduce the power consumption of usb bus.
Fig. 5 is a kind of structural schematic diagram of usb bus state switching device provided in an embodiment of the present invention, which can be with
The corresponding steps for executing Fig. 1 or Fig. 2 corresponding embodiments, realize identical technique effect, which can be terminal device, example
Such as, mobile phone, tablet computer etc., with reference to Fig. 5, which includes:Processing module 100, receiving module 101, sending module 102.
Processing module 100, for when in system entire bus hang up or Idle state be more than first time threshold when, then for
It is electric under the physical layer PHY of USB, the controller (Controller) of USB is set to battery saving mode, and retain resource;
Receiving module 101 wakes up instruction for receiving application processor AP is sent first.
Sending module 102 wakes up instruction for sending described first to modem.
Usb bus state switching device provided in an embodiment of the present invention, by processing module when in system entire bus
When hang-up or Idle state are more than first time threshold, then it is electric under the physical layer PHY of USB, the controller of USB is set to power saving mould
Formula, and retain resource, receiving module receive application processor AP is sent first and wake up instruction, and sending module is to modem
It sends described first and wakes up instruction.Although realizing electricity under the physical layer PHY to USB, and the controller of USB is set to power saving
Pattern, but work as AP and modem is waken up by usb bus, alternatively, when modem wakes up AP by usb bus, due to
Usb bus remains the related resource for wake-up, so as to avoid the process of re-enumeration in the prior art, to reduce
Time from suspend mode to wake-up, improve system stability.
Further, processing module 100 are additionally operable to be set to province when the controller of electricity and the USB under the PHY of the USB
When the duration of power mode is more than second time threshold, then the resource is discharged;
Wherein, the second time threshold is more than the first time threshold.
Further, described first wake up indicate to include the instruction of setting address and setting configuration instruction.
Fig. 6 is AP and modem connection signal inside usb bus state switching device provided in an embodiment of the present invention
Figure, with reference to Fig. 6, which includes comprising AP, modem, further includes modem interface subsystem inside wherein AP;
Modem interface subsystem is connect by usb bus with modem.
Specifically, for example, the sides AP use Android4.2 operating systems.In USB drive parts, modification USB core and
Code in USB hub adds S2 states and correlative code logic;In the parts HCD, when adding dormancy awakening to the Phy of USB and
The operation that controller turns off and restores;In system entire bus hangs up (System suspend) and restarting process, addition pair
The operation of GPIO.Wherein, further include that AP initiates to wake up to modem, called out alternatively, modulation volume demodulator initiates abbot to AP
It wakes up
One of ordinary skill in the art will appreciate that:Realize that all or part of step of above-mentioned each method embodiment can lead to
The relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer read/write memory medium.The journey
When being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned includes:ROM, RAM, magnetic disc or
The various media that can store program code such as person's CD.
Finally it should be noted that:The above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent
Present invention has been described in detail with reference to the aforementioned embodiments for pipe, it will be understood by those of ordinary skill in the art that:Its according to
So can with technical scheme described in the above embodiments is modified, either to which part or all technical features into
Row equivalent replacement;And these modifications or replacements, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution
The range of scheme.
Claims (4)
1. a kind of usb bus state switching method, which is characterized in that including:
When being hung up in system entire bus or Idle state is more than first time threshold, then to be electric under the physical layer PHY of USB,
The controller of USB is set to battery saving mode, and retains resource;
It receives application processor AP is sent first and wakes up instruction, sending described first to modem wakes up instruction;
The usb bus state switching method further includes:
When the duration that the controller of electricity under the PHY of the USB and the USB is set to battery saving mode is more than second time threshold,
Then discharge the resource;
Wherein, the second time threshold is more than the first time threshold.
2. according to the method described in claim 1, it is characterized in that, described first wakes up instruction comprising the instruction of setting address and sets
Set configuration instruction.
3. a kind of usb bus state switching device, which is characterized in that including:
Processing module, for being then the object of USB when being hung up in system entire bus or Idle state is more than first time threshold
Electricity under layer PHY is managed, the controller of USB is set to battery saving mode, and retain resource;
Receiving module wakes up instruction for receiving application processor AP is sent first;
Sending module wakes up instruction for sending described first to modem;
The processing module is additionally operable to be set to the duration of battery saving mode when the controller of electricity under the PHY of the USB and the USB
When more than second time threshold, then the resource is discharged;
Wherein, the second time threshold is more than the first time threshold.
4. device according to claim 3, which is characterized in that described first, which wakes up instruction, indicates and set comprising setting address
Set configuration instruction.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410436123.XA CN105446916B (en) | 2014-08-29 | 2014-08-29 | USB bus state switching method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410436123.XA CN105446916B (en) | 2014-08-29 | 2014-08-29 | USB bus state switching method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105446916A CN105446916A (en) | 2016-03-30 |
CN105446916B true CN105446916B (en) | 2018-10-02 |
Family
ID=55557138
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410436123.XA Active CN105446916B (en) | 2014-08-29 | 2014-08-29 | USB bus state switching method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105446916B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107622029A (en) * | 2016-07-13 | 2018-01-23 | 中兴通讯股份有限公司 | A kind of control method, device, circuit and data card |
CN106507454B (en) * | 2016-10-31 | 2019-10-08 | 努比亚技术有限公司 | A kind of wake-up control method and terminal |
CN107678530B (en) * | 2017-08-29 | 2021-01-19 | 芯启源电子科技有限公司 | USB low-power-consumption state exit method, USB electronic device and communication system |
CN109857243B (en) * | 2017-11-28 | 2022-04-05 | 华为技术有限公司 | System-on-chip, universal serial bus master device, system and awakening method |
CN111026693B (en) * | 2019-12-19 | 2022-11-25 | 展讯通信(上海)有限公司 | Dual-function port USB Type-C interface device and configuration method thereof |
CN111182617B (en) * | 2019-12-30 | 2023-03-10 | 上海创功通讯技术有限公司 | Low-power-consumption control method, electronic equipment and storage medium |
CN114416190B (en) * | 2022-01-19 | 2023-11-24 | 深圳市诠云科技有限公司 | Android device and computer USB linkage dormancy awakening circuit |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101170777A (en) * | 2007-11-23 | 2008-04-30 | 中兴通讯股份有限公司 | A method for realizing sleeping/awaking of multi-mode mobile terminal |
CN101308399A (en) * | 2008-06-23 | 2008-11-19 | 北京中星微电子有限公司 | Universal serial bus equipment selective dormancy realization method and related device |
CN101425049A (en) * | 2008-11-29 | 2009-05-06 | 中兴通讯股份有限公司 | Customer equipment based on USB and data channel switching method |
CN101697148A (en) * | 2009-10-12 | 2010-04-21 | 中兴通讯股份有限公司 | Method and system for raising interface rate of computer memory cards |
-
2014
- 2014-08-29 CN CN201410436123.XA patent/CN105446916B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101170777A (en) * | 2007-11-23 | 2008-04-30 | 中兴通讯股份有限公司 | A method for realizing sleeping/awaking of multi-mode mobile terminal |
CN101308399A (en) * | 2008-06-23 | 2008-11-19 | 北京中星微电子有限公司 | Universal serial bus equipment selective dormancy realization method and related device |
CN101425049A (en) * | 2008-11-29 | 2009-05-06 | 中兴通讯股份有限公司 | Customer equipment based on USB and data channel switching method |
CN101697148A (en) * | 2009-10-12 | 2010-04-21 | 中兴通讯股份有限公司 | Method and system for raising interface rate of computer memory cards |
Also Published As
Publication number | Publication date |
---|---|
CN105446916A (en) | 2016-03-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105446916B (en) | USB bus state switching method and device | |
KR20180052539A (en) | Methods and apparatus for providing individualized power control for peripheral sub-systems | |
CN107957885B (en) | PCIE link equipment standby and recovery method based on Feiteng platform | |
CN101498964B (en) | Wireless modulation-demodulation apparatus and system, sleeping/waking method and terminal | |
TWI528165B (en) | System for power management | |
JP5773288B2 (en) | Wake-up method, hot-swap method, and device based on high-speed interchip HSIC interface | |
WO2014046847A1 (en) | Reducing latency in a peripheral component interconnect express link | |
JP5095682B2 (en) | Information processing apparatus, power control method for information processing apparatus, and computer-executable program | |
TW201250459A (en) | Method of operating a heterogneous computer system | |
US20140189401A1 (en) | Block-level sleep logic | |
KR20160033764A (en) | Techniques enabling low power states for a communications port | |
US9176570B2 (en) | System and method for providing universal serial bus link power management policies in a processor environment | |
JP2015170292A (en) | semiconductor device | |
CN105116975A (en) | Computer onboard hard disk and implementation method thereof | |
CN104460925A (en) | Power management implementation method based on ShenWei platform | |
TW201738687A (en) | Apparatus, article and controller for entering a low power state | |
CN102929381A (en) | Electronic system and power management system thereof | |
CN102736928B (en) | Fast wake-up computer system method and computer system | |
CN115525137A (en) | Data coprocessing method and system, storage medium and electronic equipment | |
JP2016066361A (en) | Indication of battery critical status in mobile device | |
CN103105920A (en) | Energy-saving system and energy-saving method | |
CN101950281B (en) | A kind of method and apparatus controlling coprocessor | |
CN104750223A (en) | Method and system for reducing memory access power consumption of multi-core terminal | |
CN103106757B (en) | A kind of bluetooth is waken the method for pos machine up | |
JP6093036B2 (en) | Cyclic activity alignment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |