CN113326222B - Communication method based on universal serial bus power supply and related device - Google Patents

Communication method based on universal serial bus power supply and related device Download PDF

Info

Publication number
CN113326222B
CN113326222B CN202110883437.4A CN202110883437A CN113326222B CN 113326222 B CN113326222 B CN 113326222B CN 202110883437 A CN202110883437 A CN 202110883437A CN 113326222 B CN113326222 B CN 113326222B
Authority
CN
China
Prior art keywords
adapter
power supply
hard reset
charging device
physical layer
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
CN202110883437.4A
Other languages
Chinese (zh)
Other versions
CN113326222A (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.)
Shenzhen Injoinic Technology Co Ltd
Original Assignee
Shenzhen Injoinic Technology 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 Shenzhen Injoinic Technology Co Ltd filed Critical Shenzhen Injoinic Technology Co Ltd
Priority to CN202110883437.4A priority Critical patent/CN113326222B/en
Priority to CN202111407909.5A priority patent/CN115706437A/en
Publication of CN113326222A publication Critical patent/CN113326222A/en
Application granted granted Critical
Publication of CN113326222B publication Critical patent/CN113326222B/en
Priority to PCT/CN2022/108982 priority patent/WO2023011351A1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • G06F13/4072Drivers or receivers
    • G06F13/4077Precharging or discharging
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/00032Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
    • H02J7/00034Charger exchanging data with an electronic device, i.e. telephone, whose internal battery is under charge
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J2207/00Indexing scheme relating to details of circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J2207/30Charge provided using DC bus or data bus of a computer

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Power Engineering (AREA)
  • Power Sources (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The application provides a communication method and a related device based on universal serial bus power supply, firstly receiving a hard reset signal from a charging device to carry out initialization processing, wherein the initialization processing comprises suspending a power supply communication link between the charging device and the initialization processing; then, adjusting the power supply voltage to a first voltage value within a first time period; then, when detecting that the first voltage value is not adjusted to the second voltage value in a second period of time, determining that the adapter is in a hard reset abnormal state, and enabling a communication function of a first physical layer of the adapter; finally, a data packet is sent to the charging device to reestablish the power communication link. In the USB Power Delivery hard reset process, the communication function of the adapter and the charging equipment is automatically enabled when abnormal conditions occur, the process is prevented from being blocked, and the charging compatibility is improved.

Description

Communication method based on universal serial bus power supply and related device
Technical Field
The present application relates to the field of power supply communication technologies, and in particular, to a communication method and related apparatus based on usb power supply.
Background
With the rapid spread of universal serial bus Power supply technology (USB Power Delivery), more and more charging devices are beginning to support USB Power Delivery charging technology. However, the USB Power Delivery chargers on the market are uneven, which may cause the device charging compatibility problem. When the charger receives a hard reset signal, the voltage VBUS of the serial bus does not power down, so that the charging of the charging equipment is interrupted, and the communication flow is wrong.
Disclosure of Invention
The application provides a communication method and a related device based on universal serial bus Power supply, which can automatically enable the communication function of an adapter and a charging device when an abnormal condition occurs in a USB Power Delivery hard reset process, prevent the process from being blocked and improve the charging compatibility.
In a first aspect, an embodiment of the present application provides a communication method based on usb power supply, which is applied to an adapter, and the method includes:
receiving a hard reset signal from a charging device to perform an initialization process, the initialization process including suspending a power supply communication link with the charging device;
adjusting the supply voltage to a first voltage value within a first time period;
when the first voltage value is not adjusted to the second voltage value within the second time period, determining that the adapter is in a hard reset abnormal state, and enabling the communication function of the first physical layer of the adapter;
transmitting a data packet to the charging device to reestablish the power communication link.
In a second aspect, an embodiment of the present application provides a communication method based on usb power supply, which is applied to a charging device, and the method includes:
sending a hard reset signal to an adapter and suspending a power communication link with the adapter;
enabling a communication function of a second physical layer of the charging device after a third period of time upon detecting that the adapter is in a hard reset abnormal state;
receiving a data packet from the adapter to reestablish the powered communication link.
In a third aspect, an embodiment of the present application provides a communication device based on usb power supply, which is applied to an adapter, and the communication device includes:
a receiving unit configured to receive a hard reset signal from a charging device to perform an initialization process, the initialization process including suspending a power supply communication link with the charging device;
the voltage adjusting unit is used for adjusting the power supply voltage to a first voltage value in a first time interval;
the first enabling unit is used for determining that the adapter is in a hard reset abnormal state when detecting that the first voltage value is not adjusted to a second voltage value in a second period of time, and enabling the communication function of a first physical layer of the adapter;
a first communication unit for transmitting a data packet to the charging device to reestablish the power supply communication link.
In a fourth aspect, an embodiment of the present application provides a communication apparatus based on usb power supply, which is applied to a charging device, and the communication apparatus includes:
a transmitting unit for transmitting a hard reset signal to an adapter and suspending a power supply communication link with the adapter;
the second enabling unit is used for enabling the communication function of the second physical layer of the charging equipment after a third time interval when the adapter is detected to be in a hard reset abnormal state;
a second communication unit to receive a data packet from the adapter to reestablish the power communication link.
In a fifth aspect, embodiments of the present application provide an adapter comprising a processor, a memory, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps of the method according to any one of the first aspect of embodiments of the present application.
In a sixth aspect, embodiments provide a charging device comprising a processor, a memory, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps of the method according to any one of the second aspects of the embodiments.
In a seventh aspect, an embodiment of the present application provides a computer storage medium storing a computer program, the computer program comprising program instructions, which, when executed by a processor, cause the processor to perform the method according to any one of the first and/or second aspects of the embodiments of the present application.
In an eighth aspect, embodiments of the present application provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps as described in any one of the methods of the first and/or second aspects of the embodiments of the present application. The computer program product may be a software installation package.
It can be seen that, by the above communication method and related apparatus based on usb power supply, a hard reset signal from a charging device is received first to perform an initialization process, where the initialization process includes suspending a power supply communication link with the charging device; then, adjusting the power supply voltage to a first voltage value within a first time period; then, when it is detected that the first voltage value is not adjusted to a second voltage value within a second time period, determining that the adapter is in a hard reset abnormal state, and enabling a communication function of a first physical layer of the adapter, wherein the second voltage value is lower than the first voltage value; finally, a data packet is sent to the charging device to reestablish the power communication link. In the USB Power Delivery hard reset process, the communication function of the adapter and the charging equipment is automatically enabled when abnormal conditions occur, the process is prevented from being blocked, and the charging compatibility is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a graph of an output voltage in a power supply process based on a universal serial bus according to an embodiment of the present application;
fig. 2 is a schematic system architecture diagram of a communication method based on usb power supply according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of a communication method based on usb power supply according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart of another communication method based on usb power supply according to an embodiment of the present disclosure;
fig. 5 is a schematic flowchart of another communication method based on usb power supply according to an embodiment of the present disclosure;
fig. 6 is a block diagram illustrating functional units of a communication device powered by a universal serial bus according to an embodiment of the present disclosure;
fig. 7 is a block diagram illustrating functional units of another usb power supply-based communication device according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
First, a description will be given of a background art in the embodiment of the present application.
Supplying power to a universal serial bus: one of the USB PD protocols is the USB Power expansion standard that utilizes a USB (universal Serial bus) cable and can receive 100W of Power at maximum.
The Downstream Port (DFP), which may be understood as Host, provides VBUS and may provide data. In the protocol specification, DFP refers specifically to downstream transmission of data, and in a general sense refers to data downstream and to devices that provide power to the outside. In the embodiments of the present application, an adapter is described as an example.
The Upstream Facing Port (UFP) can be understood as a Device, and the UFP takes power from VBUS and can provide data. Typical devices are a U disk, a removable hard disk, and the like.
A Dual Role Port (Dual Role Port) may be used as a device for supplying power or as a device for receiving power.
VBUS is a cable for the adapter to supply power to the charging device, and VBUS voltage is a supply voltage.
In the USB PD process, Hardreset may be required to be performed on the adapter and the charging device in some cases, for example, as shown in fig. 1, the charging device sends a Hardreset instruction to the adapter, when the adapter receives the Hardreset instruction, the adapter may adjust the output voltage to vSafe5V within time t1, where vSafe5V is a term in a protocol standard, and is generally 4.75V to 5.25V, and then adjust the output voltage from vSafe5V to vSafe0V within time t2, where vSafe0V is generally 0 to 0.8V, which is not described herein again, and finally, after waiting time t3, the output voltage needs to be restored to vSafe5V to complete the Hard reset process, so as to perform subsequent USB PD communication again.
In some cases, a Hard reset exception may occur, for example, the output voltage does not decrease from vSafe5V to vSafe0V within time t2, but continues to maintain vSafe5V, because the charging device temporarily turns off the communication function after sending the Hard reset command and detects the Hard reset process of the adaptor, when it is detected that the output voltage does not decrease from vSafe5V to vSafe0V, the next procedure cannot be skipped, that is, the subsequent USB PD communication cannot be performed, resulting in a compatibility problem.
In order to solve the above problem, embodiments of the present application provide a communication method and a related apparatus based on USB power supply, which can automatically detect a hard reset exception in a USB PD process, optimize a USB PD process on the basis of not increasing hardware cost, and improve compatibility.
A system architecture of a communication method based on usb power supply in the embodiment of the present application is described below with reference to fig. 2, where fig. 2 is a schematic diagram of a system architecture of a communication method based on usb power supply in the embodiment of the present application, and the system architecture includes an adapter 110 and a charging device 120.
The adapter 110 serves as a source and may supply power to the charging device 120, the charging device 120 serves as a sink, and the adapter 110 may be connected to the charging device 120 through a cable. The adapter 110 and the charging device 120 may be adapted to a protocol related to the USB PD communication standard, and in the embodiment of the present application, no further improvement is made to the hardware of the adapter 110 and the charging device 120, which may refer to the existing configurations of the adapter and the charging device, and is not limited herein.
For convenience of understanding, the adapter 110 and the charging device 120 are described below with respect to a software architecture layer, the adapter 110 may include a first physical layer 111, a first protocol layer 112, and a first policy engine 113, and the charging device 120 may include a second physical layer 121, a second protocol layer 122, and a second policy engine 123. The charging device 120 may send a Hard reset instruction through the second policy engine 123, and transmit the Hard reset instruction to the adapter 110 sequentially through the second protocol layer 122 and the second physical layer 121, specifically, the Hard reset instruction may be transmitted to the first policy engine 113 through the first physical layer 111 and the first protocol layer 112, and after receiving the Hard reset instruction, the adapter 110 may execute a corresponding Hard reset procedure. The specific process is not repeated herein, and refer to the following description of the usb power supply-based communication method.
It should be noted that, when USB PD communication is normally performed between the adapter 110 and the charging device 120, hard reset is not required, and when an abnormal condition occurs, a hard reset procedure is performed, and the method provided in the embodiment of the present application is applied.
With reference to the above system architecture, a communication method based on usb power supply in this embodiment is further described with reference to fig. 3, where fig. 3 is a schematic flow diagram of the communication method based on usb power supply in this embodiment, and the communication method is applicable to an adapter, and specifically includes the following steps:
step 301, a hard reset signal is received from a charging device to perform an initialization process.
Wherein the initialization process includes suspending a power supply communication link with the charging device.
Specifically, the first physical layer may receive a hard reset signal from the charging device, and when receiving the hard reset signal, the first physical layer may transmit a first receive Message to the first protocol layer of the adaptor, and turn off a communication function of the first physical layer, and reset, by the first protocol layer, a first Message identification Counter Message ID Counter for indicating that the hard reset signal has been received and a first retransmission Counter Retry Counter for recording the number of times of the power supply communication link, that is, the Message ID, and the first retransmission Counter Retry Counter for recording the number of retransmissions of the power supply communication link, where the count and the number of retransmissions all become zero due to the first Message identification Counter Message ID Counter and the first retransmission Counter being reset, which may be understood as an initialized process, thereafter, the first received message is transmitted to a first policy engine of the adapter through the first protocol layer.
As can be seen, by receiving a hard reset signal from the charging device for initialization processing, the count content can be reset, facilitating subsequent resumption of performing USB PD communication.
Step 302, adjusting the supply voltage to a first voltage value in a first time period.
Wherein, a first timer may be started by the first policy engine, the power supply voltage is adjusted to the first voltage value within the first time period recorded by the first timer, the first timer may be NoResponseTimer, and when the first policy engine receives the first receive message and determines that the Hard reset command has been received, the first timer may be started, the first timer may time the first time period, the power supply voltage needs to be decreased to the first voltage value within the first time period, and the first voltage value may be vsefe 5V in the PD communication standard.
Step 303, when it is detected that the first voltage value is not adjusted to the second voltage value within the second time period, determining that the adapter is in a hard reset abnormal state, and enabling a communication function of the first physical layer of the adapter.
The first timer may set a second time period, determine that the adapter is in the hard reset abnormal state when the first voltage value is not adjusted to the second voltage value within the second time period recorded by the first timer, and enable the communication function of the first physical layer through the first policy engine when the adapter is in the hard reset abnormal state, where the second voltage value may be Vsafe0V in the PD communication standard.
In a possible embodiment, when the first voltage value is adjusted to the second voltage value within the second time period recorded by the first timer, the hard reset is normal, and the subsequent process is continuously executed, specifically, when the first voltage value is adjusted to the second voltage value within the second time period, a first reset message may be transmitted to the first protocol layer by the first policy engine, where the first reset message is used to indicate that the power supply power reset in the hard reset is completed;
further transmitting, by the first protocol layer, a second reset message to the first physical layer and enabling communication functionality of the first physical layer to reestablish the powered communication link, the second reset message indicating that a hard reset is complete.
It can be seen that when it is detected that the first voltage value is not adjusted to the second voltage value within the second time period, it is determined that the adapter is in the hard reset abnormal state, so that the communication function of the first physical layer of the adapter is enabled, and the communication function of the first physical layer can be automatically restarted after the hard reset abnormality is detected, thereby facilitating the propulsion of the subsequent flow, preventing the flow from being blocked, and reducing the compatibility problem in the USB PD process.
Step 304, sending a data packet to the charging device to reestablish the power supply communication link.
Wherein, the data packet may be transmitted to the first protocol layer through the first policy engine, and the data packet may be a Souce cap packet;
specifically, a second timer may be started by the first protocol layer, and the data packet may be transmitted to the first physical layer, where the second timer is used to indicate a third time period of Cyclic Redundancy Check (CRC), where the second timer may be a CRC timer, the duration of the third time period may be 0.9 to 1.1mS, and the second timer may be used to prompt that the sent Souce cap information is lost, for example, after sending the Souce cap message, if the goodc CRC information of the other party is not received within the third time period of the second timer, which is 0.9 to 1.1mS, the message is considered to have failed to be sent, and the Souce cap message is sent again;
then sending the data packet to the charging device through the first physical layer;
and when a second message fed back by the charging equipment is received in the third time period, closing the first timer and the second timer, and controlling the message identifier counter to increase a count so as to complete the power supply communication link.
Therefore, by the method, the adapter can automatically enable the communication function of the first physical layer when the hard reset is abnormal, and drives the flow to advance, so that the compatibility of the USB PD process is greatly increased.
Another usb power supply-based communication method in this embodiment is described below with reference to fig. 4, where fig. 4 is a charging device to which the another usb power supply-based communication method provided in this embodiment is applied, and specifically includes the following steps:
step 401, a hard reset signal is sent to an adapter and a power communication link with the adapter is suspended.
The hard reset signal may be transmitted to a second protocol layer of the charging device through a second Policy Engine of the charging device, where the second Policy Engine may be Policy Engine;
resetting, by the second protocol layer, a second Message identifier Counter and a second retransmission Counter, and transmitting the hard reset signal to the second physical layer, where the second Message identifier Counter is configured to record the number of times of the power supply communication link, the second retransmission Counter is configured to record the number of retransmissions of the power supply communication link, the second Message identifier Counter is configured to record the number of times of the power supply communication link, that is, a Message ID, and the second retransmission Counter is configured to record the number of retransmissions of the power supply communication link, where the count and the number of retransmissions all become zero because the second Message identifier Counter and the second retransmission Counter have been reset;
further, the hard reset signal is sent to the adapter through the second physical layer, and the communication function of the second physical layer is closed.
And 402, enabling the communication function of the second physical layer of the charging device after a third period of time when the adapter is detected to be in the hard reset abnormal state.
Wherein the charging device may detect a supply voltage of the adapter for a first period of time and a second period of time;
determining that the adapter is in the hard reset exception state when the supply voltage is not at a second voltage value at the end of a second period of time;
starting a third timer by the second physical layer, and enabling the communication function of the second physical layer after the third period recorded by the third timer, where the third period may be the same as t3 in fig. 1, for example, the third period may be 800 ms.
It will be appreciated that upon detecting that the power supply voltage has not been powered down from the Vsafe5V to the Vsafe0V for the second period of time, then it may be determined that the adapter is in a hard reset exception state, and the second policy engine informs the second protocol layer charging device that it has been reset, and forces the second physical layer enabled communication function after waiting for the third period of time.
Therefore, whether the hard reset process of the adapter is abnormal or not can be determined by automatically detecting the change of the power supply voltage of the adapter, and the communication function of the second physical layer is automatically enabled when the hard reset is abnormal, so that the USB PD process is prevented from being blocked, and the compatibility of the USB PD process is greatly improved.
At step 403, a data packet is received from the adapter to reestablish the power communication link.
Receiving the data packet from the adapter through the second physical layer, where the data packet may be a Souce cap packet;
storing a message identification MessageID through the second protocol layer, and performing cyclic redundancy check on the data packet to obtain a check result, wherein the check result comprises a pass and a fail;
when the check result is passed, transmitting the check result GoodCRC to the second physical layer through the second protocol layer;
and feeding back the check result GoodCRC to the adapter through the second physical layer to complete the power supply communication link.
Therefore, by the method, the charging equipment can automatically enable the communication function of the second physical layer when the hard reset is abnormal, and the compatibility of the USB PD process is greatly improved.
For convenience of understanding, another communication method based on usb power supply in this embodiment is described below with reference to fig. 5, where fig. 5 is a schematic flow chart of another communication method based on usb power supply in this embodiment, and is applied to an adapter and a charging device, and specifically includes the following steps:
step 501, the second policy engine sends a hard reset signal to the second protocol layer;
step 502, the second protocol layer transmits a hard reset signal to the second physical layer, and resets the second message identifier counter and the second retransmission counter;
step 503, the second physical layer transmits a hard reset signal to the first physical layer, and closes its own communication function;
step 504, the first physical layer transmits a first receiving message to the first protocol layer after receiving the hard reset signal, and closes the communication function of the first physical layer;
wherein the first received message is used to indicate that a hard reset signal has been received;
step 505, the first protocol layer transmits a first received message to the first policy engine, and resets a first message identifier counter and a first retransmission counter;
step 506, the first policy engine starts a first timer, controls the power supply voltage to be powered down to Vsafe5V in a first period, and is powered down to Vsafe0V in a second period;
step 507, when the power is not reduced to Vsafe0V in the second time period, the communication function of the first physical layer is enabled forcibly through the first protocol layer;
step 508, the second policy engine informs the second protocol layer that the charging device has recovered;
in step 509, when the adapter is detected to be in the hard reset abnormal state, a third timer is started through the second protocol layer, and after a third period of time, the communication function of the second physical layer is forcibly enabled to complete the hard reset process.
In one possible embodiment, the USB PD communications may be reestablished after the hard reset is complete. The method comprises the following steps:
step 510, the first policy engine sends a soutech packet to the first protocol layer;
step 511, the first protocol layer starts a second timer CRC receive timer and sends a Souce cap packet to the first physical layer;
step 512, the first physical layer sends a Souce cap packet to the second physical layer and performs CRC (cyclic redundancy check) check;
step 513, the second physical layer sends a Souce cap packet to the second protocol layer;
step 514, the second protocol layer informs the second policy engine that the package of the Souce cap has been received, and verifies the package of the Souce cap;
step 515, the second protocol layer sends a goodccrc message to the second physical layer;
step 516, the second physical layer transmits a goodccr message to the first physical layer;
step 517, the first physical layer transmits goodccr message to the first protocol layer;
step 518, the first protocol layer transmits a goodccr message to the first policy engine, and stops the second timer;
in step 519, the first policy engine controls the first message identifier counter to increment by one, and the USB PD communication is successfully established.
The steps that are not described in detail above may refer to all or part of the steps of the method described in fig. 3 and fig. 4, and are not described again here.
Therefore, by the method, the USB Power Delivery flow can be optimized on the basis of not increasing hardware cost, and the Sink end flow of the charging equipment can normally operate under the condition that the Hard reset flow of the source end is not detected, so that the compatibility of the USB Power Delivery charging equipment is increased.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
In the case of dividing each functional module according to each function, a usb power supply-based communication device in the embodiment of the present application is described in detail below with reference to fig. 6, where fig. 6 is a block diagram of functional units of a usb power supply-based communication device 600 provided in the embodiment of the present application, and the usb power supply-based communication device is applied to an adapter, and the usb power supply-based communication device includes:
a receiving unit 610, configured to receive a hard reset signal from a charging device to perform an initialization process, where the initialization process includes suspending a power supply communication link with the charging device;
a voltage adjusting unit 620 for adjusting the supply voltage to a first voltage value in a first period;
a first enabling unit 630, configured to determine that the adapter is in a hard reset abnormal state when it is detected that the first voltage value is not adjusted to a second voltage value within a second time period, and enable a communication function of a first physical layer of the adapter;
a first communication unit 640 configured to transmit a data packet to the charging device to reestablish the power supply communication link.
In the case of dividing each function module according to each function, another usb power supply-based communication device in this embodiment is described in detail below with reference to fig. 7, where fig. 7 is a block diagram of functional units of another usb power supply-based communication device 700 provided in this embodiment, and the device is applied to a charging device, and the device includes:
a transmitting unit 710 for transmitting a hard reset signal to an adapter and suspending a power supply communication link with the adapter;
a second enabling unit 720, configured to enable a communication function of a second physical layer of the charging device after a third period of time when the adapter is detected to be in the hard reset abnormal state;
a second communication unit 730, configured to receive the data packet from the adapter to reestablish the power supply communication link.
All relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
Embodiments of the present application also provide an adapter comprising a processor, a memory, and one or more programs stored in the memory and configured to be executed by the processor, the programs including instructions for performing the steps in the method of any of fig. 3.
An embodiment of the application provides a charging device comprising a processor, a memory, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of fig. 4.
Embodiments of the present application also provide a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, the computer program enabling a computer to execute part or all of the steps of any one of the methods described in the above method embodiments, and the computer includes an electronic device.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (9)

1. A communication method based on universal serial bus power supply is applied to an adapter, and the method comprises the following steps:
receiving a hard reset signal from a charging device for an initialization process, the initialization process for suspending a power communication link with the charging device, the initialization process comprising the steps of: transmitting a first receiving message to a first protocol layer of the adapter, and closing a communication function of a first physical layer of the adapter, wherein the first receiving message is used for indicating that the hard reset signal is received; resetting a first message identifier counter and a first retransmission counter through the first protocol layer, wherein the first retransmission counter is used for recording the retransmission times of the power supply communication link; transmitting, by the first protocol layer, the first receive message to a first policy engine of the adapter;
adjusting the supply voltage to a first voltage value within a first time period;
when the first voltage value is not adjusted to the second voltage value within the second time period, determining that the adapter is in a hard reset abnormal state, and enabling the communication function of the first physical layer of the adapter;
transmitting a data packet to the charging device to reestablish the power communication link.
2. The method of claim 1, wherein adjusting the supply voltage to a first voltage value during the first time period comprises:
starting a first timer by the first policy engine, and adjusting the supply voltage to the first voltage value within the first time period recorded by the first timer.
3. The method of claim 2, wherein determining that the adapter is in a hard reset exception state when detecting that the first voltage value is not adjusted to the second voltage value within the second time period, enabling a communication function of the first physical layer of the adapter comprises:
determining that the adapter is in the hard reset abnormal state when the first voltage value is not adjusted to the second voltage value within the second time period recorded by the first timer;
enabling, by the first policy engine, a communication function of the first physical layer.
4. The method of claim 2, wherein the sending the data packet to the charging device to reestablish the power communication link comprises:
transmitting, by the first policy engine, the data packet to the first protocol layer;
starting a second timer by the first protocol layer and transmitting the data packet to the first physical layer, wherein the second timer is used for indicating a third period of cyclic redundancy check;
transmitting the data packet to the charging device through the first physical layer;
and when a second message fed back by the charging equipment is received in the third time period, closing the first timer and the second timer, and controlling the first message identification counter to increase a count so as to complete the power supply communication link.
5. The method of claim 1, wherein after adjusting the supply voltage to the first voltage value within the first time period, the method further comprises:
transmitting, by the first policy engine, a first reset message to the first protocol layer while adjusting the first voltage value to the second voltage value within the second time period, the first reset message indicating that a power supply power reset in a hard reset is complete;
transmitting, by the first protocol layer, a second reset message to the first physical layer and enabling a communication function of the first physical layer to reestablish the power communication link, the second reset message indicating that a hard reset is complete.
6. A communication method based on universal serial bus power supply is applied to a charging device, and comprises the following steps:
transmitting, by a second policy engine of the charging device, a hard reset signal to a second protocol layer of the charging device;
resetting a second message identifier counter and a second retransmission counter through the second protocol layer, and transmitting the hard reset signal to a second physical layer of the charging device, wherein the second retransmission counter is used for recording retransmission times of a power supply communication link;
sending the hard reset signal to an adapter through the second physical layer, and closing a communication function of the second physical layer to suspend the power supply communication link with the adapter;
enabling a communication function of a second physical layer of the charging device after a third period of time upon detecting that the adapter is in a hard reset abnormal state;
receiving a data packet from the adapter to reestablish the powered communication link.
7. A usb-based communication device, applied to an adapter, the communication device comprising:
a receiving unit configured to receive a hard reset signal from a charging device to perform an initialization process, the initialization process being configured to suspend a power supply communication link with the charging device, the initialization process including the steps of: transmitting a first receiving message to a first protocol layer of the adapter, and closing a communication function of a first physical layer of the adapter, wherein the first receiving message is used for indicating that the hard reset signal is received; resetting a first message identifier counter and a first retransmission counter through the first protocol layer, wherein the first retransmission counter is used for recording the retransmission times of the power supply communication link; transmitting, by the first protocol layer, the first receive message to a first policy engine of the adapter;
the voltage adjusting unit is used for adjusting the power supply voltage to a first voltage value in a first time interval;
the first enabling unit is used for determining that the adapter is in a hard reset abnormal state when detecting that the first voltage value is not adjusted to a second voltage value in a second period of time, and enabling the communication function of a first physical layer of the adapter;
a first communication unit for transmitting a data packet to the charging device to reestablish the power supply communication link.
8. A communication device based on universal serial bus power supply is characterized in that the communication device is applied to charging equipment and comprises:
a sending unit, configured to transmit, by a second policy engine of the charging device, a hard reset signal to a second protocol layer of the charging device; resetting a second message identifier counter and a second retransmission counter through the second protocol layer, and transmitting the hard reset signal to a second physical layer of the charging device, wherein the second retransmission counter is used for recording retransmission times of a power supply communication link; sending the hard reset signal to an adapter through the second physical layer, and closing a communication function of the second physical layer to suspend the power supply communication link with the adapter;
the second enabling unit is used for enabling the communication function of the second physical layer of the charging equipment after a third time interval when the adapter is detected to be in a hard reset abnormal state;
a second communication unit to receive a data packet from the adapter to reestablish the power communication link.
9. A computer storage medium, characterized in that the computer storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to perform the method according to any of claims 1-6.
CN202110883437.4A 2021-08-03 2021-08-03 Communication method based on universal serial bus power supply and related device Active CN113326222B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN202110883437.4A CN113326222B (en) 2021-08-03 2021-08-03 Communication method based on universal serial bus power supply and related device
CN202111407909.5A CN115706437A (en) 2021-08-03 2021-08-03 Communication method and apparatus, medium, and program for supplying power based on universal serial bus
PCT/CN2022/108982 WO2023011351A1 (en) 2021-08-03 2022-07-29 Universal serial bus power delivery-based communication method and related apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110883437.4A CN113326222B (en) 2021-08-03 2021-08-03 Communication method based on universal serial bus power supply and related device

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202111407909.5A Division CN115706437A (en) 2021-08-03 2021-08-03 Communication method and apparatus, medium, and program for supplying power based on universal serial bus

Publications (2)

Publication Number Publication Date
CN113326222A CN113326222A (en) 2021-08-31
CN113326222B true CN113326222B (en) 2021-12-10

Family

ID=77426900

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202111407909.5A Pending CN115706437A (en) 2021-08-03 2021-08-03 Communication method and apparatus, medium, and program for supplying power based on universal serial bus
CN202110883437.4A Active CN113326222B (en) 2021-08-03 2021-08-03 Communication method based on universal serial bus power supply and related device

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202111407909.5A Pending CN115706437A (en) 2021-08-03 2021-08-03 Communication method and apparatus, medium, and program for supplying power based on universal serial bus

Country Status (2)

Country Link
CN (2) CN115706437A (en)
WO (1) WO2023011351A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115706437A (en) * 2021-08-03 2023-02-17 深圳英集芯科技股份有限公司 Communication method and apparatus, medium, and program for supplying power based on universal serial bus

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7921250B2 (en) * 2004-07-29 2011-04-05 International Business Machines Corporation Method to switch the lock-bits combination used to lock a page table entry upon receiving system reset exceptions
JP5601696B2 (en) * 2009-03-23 2014-10-08 ローム株式会社 Power supply
JP5617453B2 (en) * 2010-09-03 2014-11-05 株式会社リコー Secondary battery charger
CN103381756B (en) * 2013-07-03 2015-10-21 惠州市亿能电子有限公司 A kind of method of monitoring battery management system exceptional reset or powered-off fault
US10230235B2 (en) * 2016-01-28 2019-03-12 Renesas Electronics Corporation Semiconductor device and power feed system
JP6697957B2 (en) * 2016-06-07 2020-05-27 ローム株式会社 Power supply device, power supply controller, and power supply method
KR102478307B1 (en) * 2017-07-07 2022-12-19 삼성전자 주식회사 Electronic device supporting usb power delivery standard and a method of charging the electronic device
JP7148293B2 (en) * 2018-06-29 2022-10-05 キヤノン株式会社 Electronic device, electronic device control method, and imaging device
CN109696903B (en) * 2018-12-11 2020-07-03 东风汽车集团有限公司 Functional safety circuit for automobile controller
CN115706437A (en) * 2021-08-03 2023-02-17 深圳英集芯科技股份有限公司 Communication method and apparatus, medium, and program for supplying power based on universal serial bus

Also Published As

Publication number Publication date
WO2023011351A1 (en) 2023-02-09
CN115706437A (en) 2023-02-17
CN113326222A (en) 2021-08-31

Similar Documents

Publication Publication Date Title
JP6974686B2 (en) Power saving mode for USB power transfer sourcing devices
US8661168B2 (en) Specialized universal serial bus controller
US20190312446A1 (en) Power Adapter and Mobile Terminal
WO2017117730A1 (en) Rapid charging method, mobile terminal and adapter
CN110687993B (en) Controlling power delivery by tunneling messages over USB
JP3764338B2 (en) Method and apparatus for recognizing battery
CN113326222B (en) Communication method based on universal serial bus power supply and related device
US20070198761A1 (en) Connection management mechanism
US7043267B1 (en) Communication device disconnecting a communication line by detecting an abnormal state of computer equipment
CN110780909A (en) Distributed embedded system upgrading method and device
WO2017117729A1 (en) Rapid charging method, mobile terminal and adapter
US20080242369A1 (en) Portable electronic apparatus
EP1531577B1 (en) Method for transmitting and processing command and data
CN114553457A (en) Electronic device and control method thereof
WO2017080411A1 (en) Method and apparatus for checking charging parameter and charger
JP5309932B2 (en) Relay device for connecting hot-plug device devices
US6732262B1 (en) Method and system for controlling reset of IEEE 1394 network
CN115733729A (en) Communication fault processing method, system and equipment
US6651184B1 (en) Isochronous transfer mode on a universal serial bus with error correction algorithms
CN108231131B (en) eMMC test method and device
CN106201933A (en) Control device, controlled device and operation method
CN110716821B (en) Communication method and device for watchdog
CN115996222B (en) Vehicle-mounted charging pile online upgrading method based on mobile communication and Bluetooth communication
JP2002055887A (en) Transmission controller, transmission control method, information processor and information recording medium
CN110515443B (en) Charging control method and 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