PD fast charging management method, device and electronic equipment
By detecting hardware reset events and sending notification messages to the charger driver module, the charging state abnormality caused by hardware reset during PD fast charging is solved, and effective management of charging state and stability of the charging process is achieved.
Patent Information
- Application Number
- CN202111383492.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-19
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2041-11-19
AI Technical Summary
During the PD fast charging process, hardware reset causes abnormal charging status, resulting in repeated restarts of the power-off charging and turning on and off the charging icon in the power-on state.
By detecting the hardware reset event, send a notification message to the charger driver module, and keep the charging icon displayed normally when the supply voltage drops to 0V, avoiding misjudgment as pulling out the charger.
Effectively manage the charging status, avoid repeated restarts of the power-off charging and turn off the charging icon in the power-on state, and ensure the stability of the charging process.
Smart Images

Figure CN113922472B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of charging management technology, and in particular to a PD fast charging management method, device and electronic equipment. Background Art
[0002] PD (Power Delivery) fast charging is a universal fast charging protocol developed by the USB standards organization. It is based on the USB TYPE-C interface and the communication is based on the CC (Channel Configuration) line of the TYPE-C protocol. As a mature fast charging protocol, some abnormal conditions will occur more or less in actual use, and when an abnormality occurs, a processing mechanism is required. The PD fast charging protocol provides a hardware reset (Hard Reset) abnormal reset mechanism, which resets the power supply end (Source) and the power consumption end (Sink) by hardware, allowing both parties to return to the reset state and re-handshake. During this hardware reset process, the charger as the power supply end will reset V BUS It will first drop from 5V to 0V, and then recover from 0V to 5V. This phenomenon is the same as unplugging the charger, so it will be mistaken for unplugging the charger, resulting in charging stop. When the machine is on, the charging icon will disappear, and then display again; and if the machine is shut down and charging at the power-consuming end, after charging stops, the upper layer will obtain that the charger is not in place, and will go through the power-off shutdown process; after shutdown, the charger is plugged in again, so the shutdown charging process will be followed, and this will be repeated, the machine will be turned on and off repeatedly, resulting in abnormal use. Summary of the invention
[0003] The PD fast charging management method, device and electronic device provided by the present invention can effectively manage the charging status when a PD hardware reset occurs during the PD fast charging process, thereby avoiding repeated restarts of the shutdown charging and the flashing of the charging icon when the power is on.
[0004] In a first aspect, the present invention provides a PD fast charging management method, the method comprising:
[0005] During PD fast charging, check whether a hardware reset is triggered;
[0006] When it is detected that the hardware reset is triggered, a notification message is sent to the charger driver module through the PD driver module;
[0007] After the charger driver module receives the notification message, when it detects that the power supply voltage drops to 0V, the charging icon is kept displayed normally.
[0008] Optionally, the detecting whether a hardware reset is triggered includes:
[0009] It is detected whether the PD driver module receives a hardware reset interrupt or a notification requesting a PD hardware reset. If the PD driver module receives a hardware reset interrupt or a notification requesting a PD hardware reset, it is detected that the hardware reset is triggered.
[0010] Optionally, the method further comprises:
[0011] After the charging icon is displayed normally for a predetermined period of time, determining whether the charger is in place;
[0012] If the charger is in place, no action will be taken and the charging icon will remain displayed normally;
[0013] If the charger is not in place, charging stops and the charging icon is no longer displayed.
[0014] In a second aspect, the present invention provides a PD fast charging management device, the device comprising:
[0015] A detection unit, used to detect whether a hardware reset is triggered during PD fast charging;
[0016] A sending unit, configured to send a notification message to a charger driver module through a PD driver module when a hardware reset is detected to be triggered;
[0017] The first processing unit is used to keep the charging icon displayed normally when it is detected that the power supply voltage drops to 0V after the charger driving module receives the notification message.
[0018] Optionally, the detection unit is used to detect whether the PD driver module receives a hardware reset interrupt or a notification requesting a PD hardware reset. If the PD driver module receives a hardware reset interrupt or a notification requesting a PD hardware reset, it is detected that the hardware reset is triggered.
[0019] Optionally, the device further comprises:
[0020] A judging unit, configured to judge whether the charger is in place after the charging icon is normally displayed for a predetermined period of time;
[0021] A second processing unit, configured to, when the judgment unit detects that the charger is in place, perform no processing and keep the charging icon displayed normally;
[0022] The third processing unit is used to stop charging and no longer display the charging icon when the judgment unit detects that the charger is not in place.
[0023] In a third aspect, the present invention provides an electronic device, the electronic device comprising:
[0024] at least one processor; and
[0025] a memory communicatively connected to the at least one processor; wherein,
[0026] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned PD fast charging management method.
[0027] In a fourth aspect, the present invention provides a chip, comprising:
[0028] at least one processor; and
[0029] a memory communicatively connected to the at least one processor; wherein,
[0030] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned PD fast charging management method.
[0031] In a fifth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the above-mentioned PD fast charging management method is implemented.
[0032] The PD fast charging management method, device and electronic device provided by the embodiments of the present invention regard the event that the power supply voltage drops to 0V as a PD hardware reset event after the charger driver module receives the message from the PD driver module. Therefore, the event is ignored and not reported to the Android layer, so as to maintain the normal display of the charging icon. In this way, the charging status can be effectively managed when the PD hardware reset occurs during the PD fast charging process, avoiding repeated restart of the power-off charging and the lighting of the charging icon when the power-on state is avoided. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 This is a flow chart of a method for managing PD fast charging according to an embodiment of the present invention;
[0034] Figure 2 This is a flow chart of a method for managing PD fast charging according to another embodiment of the present invention;
[0035] Figure 3 This is a schematic diagram of the structure of a PD fast charging management device according to an embodiment of the present invention;
[0036] Figure 4 This is a structural diagram of a PD fast charging management device according to another embodiment of the present invention. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] An embodiment of the present invention provides a PD fast charging management method, which is applied to electronic devices such as Figure 1 As shown, the method includes:
[0039] S11. During PD fast charging, detect whether a hardware reset is triggered;
[0040] S12, when it is detected that the hardware reset is triggered, sending a notification message to the charger driver module through the PD driver module;
[0041] S13. After the charger driving module receives the notification message, when it detects that the power supply voltage drops to 0V, the charging icon is kept displayed normally.
[0042] The PD fast charging management method provided in the embodiment of the present invention regards the event that the power supply voltage drops to 0V as a PD hardware reset event after the charger driver module receives the message from the PD driver module. Therefore, the event is ignored and not reported to the Android layer, so as to maintain the normal display of the charging icon. In this way, the charging status can be effectively managed when the PD hardware reset occurs during the PD fast charging process, avoiding repeated restart of charging after the power is turned off and the lighting of the charging icon when the power is on.
[0043] The PD fast charging management method of the present invention is described in detail below with reference to specific embodiments.
[0044] like Figure 2 As shown, the PD fast charging management method of this embodiment includes:
[0045] S21. During PD fast charging, detect whether a hardware reset is triggered.
[0046] S22: When it is detected that the hardware reset is triggered, a notification message is sent to the charger driver module through the PD driver module.
[0047] Since the hardware reset is triggered by either the power supply or the power consumption end, the hardware reset is formally initiated to V BUSThere is a time difference when the voltage actually drops from 5V to 0V. By using this time difference, if the hardware reset is initiated by the power supply end, the PD driver module at the power consumption end will receive the hardware reset interrupt first; if the hardware reset is initiated by the power consumption end, then before the hardware reset is officially initiated, the charger driver module can be informed through the extcon (USB drive status control module) notification mechanism, that is, the PD driver module knows in advance that a hardware reset is required, so the charger driver module can be informed in advance.
[0048] S23. After the charger driving module receives the notification message, when it is detected that the power supply voltage drops to 0V, the charging icon is kept displayed normally.
[0049] After receiving the message from the PD driver module, the charger driver module can prepare to turn on V BUS The event of dropping from 5V to 0V is considered to be caused by a PD hardware reset event, so V BUS The off event is ignored and not reported to the Android layer, so the charging icon will not disappear and then be displayed.
[0050] S24. After the charging icon is displayed normally for a predetermined period of time, determine whether the charger is in place. If the charger is in place, execute step S25; if the charger is not in place, execute step S26.
[0051] S25: No processing is done and the charging icon is displayed normally.
[0052] S26. Stop charging and the charging icon will no longer be displayed.
[0053] In order to prevent hardware reset and charger unplugging from happening at the same time, although the probability of this is very low, it is possible to happen. Since the entire hardware reset process will be completed within 3 seconds, when the power supply voltage is detected to drop to 0V, ignore the event and check again after 3 seconds whether the charger is in place. If the charger is in place, it is a PD hardware reset event and no processing is done, and the charging icon remains displayed normally; if the charger is not in place, it means that the charger is unplugged, then charging is stopped and the charging icon disappears. This can prevent the PD hardware reset event and charger unplugging from happening at the same time while the charging icon still exists.
[0054] The embodiment of the present invention also provides a PD fast charging management device, such as Figure 3 As shown, the device comprises:
[0055] The detection unit 11 is used to detect whether a hardware reset is triggered during PD fast charging;
[0056] The sending unit 12 is used to send a notification message to the charger driving module through the PD driving module when it is detected that the hardware reset is triggered;
[0057] The first processing unit 13 is configured to keep the charging icon displayed normally when it is detected that the power supply voltage drops to 0V after the charger driving module receives the notification message.
[0058] The PD fast charging management device provided in the embodiment of the present invention regards the event that the power supply voltage drops to 0V as a PD hardware reset event after the charger driver module receives the message from the PD driver module. Therefore, the event is ignored and not reported to the Android layer, so as to maintain the normal display of the charging icon. In this way, the charging status can be effectively managed when the PD hardware reset occurs during the PD fast charging process, avoiding repeated restart of charging after the power is turned off and the lighting of the charging icon when the power is on.
[0059] Optionally, the detection unit 13 is used to detect whether the PD driver module receives a hardware reset interrupt or a notification requesting a PD hardware reset. If the PD driver module receives a hardware reset interrupt or a notification requesting a PD hardware reset, it is detected that a hardware reset is triggered.
[0060] Furthermore, if Figure 4 As shown, the device also includes:
[0061] A judging unit 14, configured to judge whether the charger is in place after the charging icon is normally displayed for a predetermined period of time;
[0062] The second processing unit 15 is used for not performing any processing and keeping the charging icon displayed normally when the judging unit 14 detects that the charger is in place;
[0063] The third processing unit 16 is configured to stop charging and no longer display the charging icon when the determining unit 14 detects that the charger is not in place.
[0064] The device of this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar and will not be repeated here.
[0065] An embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0066] at least one processor; and
[0067] a memory communicatively connected to the at least one processor; wherein,
[0068] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned PD fast charging management method.
[0069] An embodiment of the present invention further provides a chip, comprising:
[0070] at least one processor; and
[0071] a memory communicatively connected to the at least one processor; wherein,
[0072] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned PD fast charging management method.
[0073] An embodiment of the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the above-mentioned PD fast charging management method is implemented.
[0074] Those skilled in the art can understand that all or part of the processes in the above method embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes in the above method embodiments. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0075] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A PD fast charging management method, characterized in that: The method comprises: During PD fast charging, check whether a hardware reset is triggered; When it is detected that the hardware reset is triggered, a notification message is sent to the charger driver module through the PD driver module at the power consumption end and using the notification mechanism of the USB driver status control module; After the charger driver module receives the notification message, when it detects that the power supply voltage drops to 0V, it does not report to the Android layer and keeps the charging icon displayed normally.
2. The method according to claim 1, characterized in that The detecting whether a hardware reset is triggered comprises: It is detected whether the PD driver module at the power consumption end receives a hardware reset interrupt or a notification requesting a PD hardware reset. If the PD driver module at the power consumption end receives a hardware reset interrupt or a notification requesting a PD hardware reset, it is detected that the hardware reset is triggered.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: After the charging icon is displayed normally for a predetermined period of time, determining whether the charger is in place; If the charger is in place, no action will be taken and the charging icon will remain displayed normally; If the charger is not in place, charging stops and the charging icon is no longer displayed.
4. A PD fast charging management device, characterized in that: The device comprises: A detection unit, used to detect whether a hardware reset is triggered during PD fast charging; The sending unit is used to send a notification message to the charger driver module through the PD driver module at the power consumption end and adopt the USB driver status control module notification mechanism when detecting that the hardware reset is triggered; The first processing unit is used for not reporting to the Android layer when detecting that the power supply voltage drops to 0V after the charger driving module receives the notification message, so as to keep the charging icon displayed normally.
5. The device according to claim 4, characterized in that The detection unit is used to detect whether the PD driver module at the power consuming end receives a hardware reset interrupt or a notification requesting a PD hardware reset. If the PD driver module at the power consuming end receives a hardware reset interrupt or a notification requesting a PD hardware reset, it is detected that the hardware reset is triggered.
6. The device according to claim 4 or 5, characterized in that The device also includes: A judging unit, configured to judge whether the charger is in place after the charging icon is normally displayed for a predetermined period of time; A second processing unit, configured to, when the judgment unit detects that the charger is in place, perform no processing and keep the charging icon displayed normally; The third processing unit is used to stop charging and no longer display the charging icon when the judgment unit detects that the charger is not in place.
7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 3.
8. A chip, characterized in that: The chip comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 3.
9. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Charging animation display method and device, equipment and storage medium
CN111198743A
NFC service device and electronic equipment
CN113300743A