A charging control method, charging device and charging control chip
By checking and adjusting the power supply information of the internal firmware data in the charging device, the problem of MCU software code failure in high temperature and high voltage environments of the PD power supply system is solved, and the problem of illegal firmware intrusion of the TYPE-C interface is achieved. Safety and stability of charging equipment and power receiving equipment.
Patent Information
- Application Number
- CN202110249214.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-08
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2041-03-08
AI Technical Summary
The MCU software code failure of the PD power system in high temperature and high voltage environments causes the charging device to output overvoltage, and the TYPE-C interface is susceptible to illegal firmware intrusion, resulting in unstable charging, which has electricity safety problems.
Configure a charging control method in the charging device, and verify the internal firmware data and adjust the power supply information to ensure the safety of the powered equipment, ensure the reliability and legality of the firmware, and avoid the security problems caused by illegal intrusion.
It effectively avoids charging safety issues caused by illegal firmware intrusion, ensures the safety and stability of charging equipment and power receiving equipment, and ensures the legality and real-time nature of power supply information.
Smart Images

Figure CN112910047B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of charging, and in particular to a charging control method, a charging device and a charging control chip. Background Art
[0002] PD (Power Delivery) power supply systems are basically designed based on MCU as the control core. In a high temperature and high voltage environment, if the software code burned by the MCU fails, it may cause the charging device (power supply device) to output a voltage exceeding the maximum voltage that the powered device can tolerate, causing damage to the powered device or even the entire PD power supply system. In addition, the PD (Power Delivery) power supply system is designed based on the TYPE-C interface. The TYPE-C interface can upgrade the software firmware inside the PD power supply, but it is prone to illegal firmware intrusion, resulting in instability in the charging process and causing power safety issues (high voltage and high current). Summary of the invention
[0003] In order to ensure the reliability, security and legality of the firmware required by the charging device, the present invention discloses a charging control method, a charging device and a charging control chip. The specific technical solutions are as follows:
[0004] A charging control method is configured in a charging device, and the charging control method includes: step A, when the charging device determines to use a fast charging protocol of an appropriate type, the charging device adjusts the power supply information for supplying a powered device according to the verification result of the firmware data stored internally, so as to ensure the safety of the powered device. Compared with the prior art in the same charging field, before the charging device adjusts the power supply information for supplying the powered device, a check is performed on the firmware required to run by the charging device, so that the firmware can be ensured to be reliable and legal during the process of the charging device supplying power to the powered device, thereby avoiding charging safety problems caused by illegal intrusion of the charging device.
[0005] Furthermore, in step A, the method in which the charging device adjusts the power supply information for supplying the powered device according to the verification result of the firmware data stored internally includes: when the firmware data stored internally in the charging device is successfully verified, according to the charging request issued by the powered device, the charging device calls the power adjustment program included in the successfully verified firmware data to adjust the power supply information for supplying the powered device to respond to the charging request; when the firmware data stored internally in the charging device fails to be verified, the charging device outputs a fixed pre-configured safety voltage but does not respond to the charging request. When adjusting the power supply information for supplying the powered device, this technical solution adaptively adjusts the output voltage of the charging device according to the verification result of the firmware data to ensure the safety of the powered device or the powered device receives the requested target power.
[0006] Furthermore, the charging control method also includes: when the charging device is powered on and reset, the charging device verifies the firmware data stored inside it, and if the verification succeeds, runs the fast charging protocol handler to determine the currently used fast charging protocol of the appropriate type, and if the verification fails, outputs a fixed pre-configured safety voltage but does not respond to the charging request issued by the powered device; wherein, the firmware data stored inside the charging device includes the fast charging protocol handler, which is used to distinguish and identify the type of fast charging protocol used by the charging device. This technical solution starts to check the firmware when the charging device is powered on, so that the charging device starts to run the fast charging protocol handler by obtaining reliable firmware, and ensures the power supply safety of the charging device and the charging safety of the powered device when the firmware is unreliable.
[0007] Furthermore, after the adjustment of the power supply information currently used to supply the powered device is completed under the condition that the firmware data stored in the charging device is successfully verified, the fast charging protocol processing program is run to enable the charging device to determine to use the appropriate type of fast charging protocol. It is ensured that the firmware data is checked in real time, and the legitimacy of the firmware data is not stopped due to the completion of the adjustment operation of the power supply information currently used to supply the powered device, so as to avoid providing opportunities for the invasion of illegal firmware during the adjustment of the power supply information.
[0008] Furthermore, when the charging device determines to use a fast charging protocol of an appropriate type, before the charging device verifies the firmware data stored in the charging device, the step of running the fast charging protocol handler includes: step B, the charging device detects the charging request issued by the powered device, so that the charging device subsequently adjusts the output power supply information in response to the charging request issued by the powered device under the communication conditions of the fast charging protocol, and the charging device also monitors the electrical state information inside it; wherein the charging request includes adjustment instructions for the target power supply current and the target power supply voltage sent by the powered device to the charging device. This technical solution selects and determines the type of fast charging protocol used by the charging device by detecting the request issued by the powered device and other system states, and monitors the charging device for abnormalities based on the system state. It is also compatible with multiple fast charging protocols included in the firmware data, thereby protecting the charging device and avoiding losses to the charging device caused by different charging and discharging protocols requested by the powered device.
[0009] Furthermore, after executing step B and before the charging device verifies the firmware data stored in its internal storage, it also includes: step C, the charging device determines whether the current operation is to start adjusting the power supply information for supplying the power receiving device in response to the charging request issued by the power receiving device, and if so, verifies the firmware data stored in its internal storage, otherwise returns to step B to wait for a decision on whether to adjust the power supply information for supplying the power receiving device; wherein the power supply information for supplying the power receiving device includes the power supply current and the power supply voltage output to the power receiving device. Compared with the prior art, each time the charging device adjusts the actual power supply information supplied to the power receiving device (including adjusting the actual power supply current and the actual power supply voltage), it is necessary to directly or after waiting to check the legitimacy of the firmware data stored in the charging device, that is, to detect whether the currently stored firmware data is the same as the firmware data released when the charging device is powered on, to ensure the integrity of the firmware data, and to avoid the problem of high voltage or high current safety electricity use of the charging device under the communication conditions of the fast charging protocol.
[0010] Furthermore, the charging device determines whether the current operation is to start adjusting the power supply information for supplying the powered device in a manner including: the charging device determines whether the current operation is to issue an instruction to adjust the power supply information for supplying the powered device; or the charging device determines whether the timing meets the timing for adjusting the power supply information for supplying the powered device; or the charging device determines whether the trigger mark information for starting to adjust the power supply information for supplying the powered device is detected; wherein, the adjustment method for supplying the power supply information for the powered device includes gradually increasing the voltage value output by the charging device, gradually increasing the charging current value required by the powered device, and maintaining the voltage value output by the charging device in a constant voltage state. This ensures that the charging device adjusts the power supply information for supplying the powered device in a timely manner, improves the real-time and legality of the power supply adjustment during the fast charging protocol communication process, and also enables the firmware data verification to be performed in an appropriate fast charging negotiation time period.
[0011] Furthermore, the method for the charging device to verify the firmware data stored internally includes: based on a preconfigured verification method, the charging device performs verification calculations on the firmware data stored internally to obtain a verification code under the verification method; then the calculated verification code is compared with the verification code preconfigured in the charging device, and when the calculated verification code is equal to the verification code preconfigured in the charging device, the charging device determines that the verification of the internally stored firmware data is successful; when the calculated verification code is not equal to the verification code preconfigured in the charging device, the charging device determines that the verification of the internally stored firmware data has failed. Improve the firmware verification speed during the communication process of the fast charging protocol and shorten the charging time.
[0012] A charging control method is configured in a charging system, the charging system includes a charging device and a powered device, and the charging control method includes: Step A, when the charging system determines to use a fast charging protocol of an appropriate type, based on the verification result of the firmware data stored in the charging device, the charging device is controlled to adjust the power supply information for supplying the powered device to ensure the safety of the powered device. Compared with the existing technology in the same charging field, before the charging device adjusts the power supply information for supplying the powered device, the firmware required to run by the charging system is checked, so that it can be ensured that the firmware is reliable and legal during the process of the charging device supplying power to the powered device, avoiding charging safety problems caused by illegal intrusion into the charging system.
[0013] Furthermore, in step A, the method of controlling the charging device to adjust the power supply information for supplying the powered device according to the verification result of the firmware data stored in the charging device includes: when the firmware data stored in the charging device is successfully verified, according to the charging request issued by the powered device, controlling the charging device to call the power adjustment program included in the successfully verified firmware data to adjust the power supply information for supplying the powered device to respond to the charging request; when the firmware data stored in the charging device fails to be verified, controlling the charging device to output a fixed pre-configured safety voltage but not responding to the charging request. When adjusting the power supply information for supplying the powered device, this technical solution adaptively adjusts the output voltage of the charging device according to the verification result of the firmware data to ensure the safety of the powered device or the powered device receives the requested target power.
[0014] Furthermore, the charging control method also includes: when the charging system is powered on and reset, the charging device is controlled to verify the firmware data stored inside it, if the verification is successful, the charging device is controlled to run the fast charging protocol processing program so that the charging system determines that the fast charging protocol of the appropriate type is currently used, if the verification fails, the charging device is controlled to output a fixed pre-configured safety voltage but does not respond to the charging request issued by the powered device; wherein, the firmware data stored inside the charging device includes the fast charging protocol processing program, which is used to distinguish and identify the type of fast charging protocol used by the charging system. This technical solution starts to check the firmware when the charging system is powered on, so that the charging device starts to run the fast charging protocol processing program by obtaining reliable firmware, and ensures the power supply safety of the charging device and the charging safety of the powered device when the firmware is unreliable.
[0015] Furthermore, after the adjustment of the power supply information currently used to supply the power receiving device is completed under the condition that the firmware data stored in the charging device is successfully verified, the fast charging protocol processing program is run again to enable the charging system to determine to use the appropriate type of fast charging protocol. It is ensured that the firmware data is checked in real time, and the legitimacy of the firmware data is not stopped due to the completion of the adjustment operation of the power supply information currently used to supply the power receiving device, so as to avoid providing opportunities for the invasion of illegal firmware during the adjustment of the power supply information.
[0016] Furthermore, when the charging system determines to use a fast charging protocol of an appropriate type, before the charging device verifies the firmware data stored internally, the step of running the fast charging protocol handler includes: step B, controlling the charging device to detect the charging request issued by the powered device, so that the charging device subsequently adjusts the output power supply information in response to the charging request issued by the powered device under the communication conditions of the fast charging protocol, and monitors the electrical state information of the charging device; wherein the charging request includes adjustment instructions for the target power supply current and the target power supply voltage sent by the powered device to the charging device. This technical solution selects and determines the type of fast charging protocol used by the charging system by detecting the request issued by the powered device and other system states, and monitors the charging device for abnormalities based on the system state. It is also compatible with multiple fast charging protocols included in the firmware data, thereby protecting the charging device and avoiding losses to the charging device caused by different charging and discharging protocols requested by the powered device.
[0017] Furthermore, after executing step B and before the charging device verifies the firmware data stored in its internal storage, it also includes: step C, judging whether the current operation of the charging device is to start adjusting the power supply information for supplying the power receiving device in response to the charging request issued by the power receiving device, if yes, controlling the charging device to verify the firmware data stored in its internal storage, otherwise returning to step B to wait for the decision whether to adjust the power supply information for supplying the power receiving device; wherein the power supply information for supplying the power receiving device includes the power supply current and the power supply voltage output to the power receiving device. Compared with the prior art, every time the charging device adjusts the actual power supply information supplied to the power receiving device (including adjusting the actual power supply current and the actual power supply voltage), it is necessary to directly or after waiting to check the legitimacy of the firmware data stored in the charging device, that is, to detect whether the currently stored firmware data is the same as the firmware data released when the system is powered on, to ensure the integrity of the firmware data, and to avoid the problem of high voltage or high current safety electricity use of the charging device under the communication conditions of the fast charging protocol.
[0018] Further, the method for determining whether the current operation of the charging device is to start adjusting the power supply information for supplying the powered device includes: determining whether the current operation of the charging device is to issue an instruction to adjust the power supply information for supplying the powered device; or determining whether the charging device has timed to meet the timing for adjusting the power supply information for supplying the powered device; or determining whether the charging device has detected the trigger mark information for starting to adjust the power supply information for supplying the powered device; wherein, the adjustment method for supplying the power supply information to the powered device includes gradually increasing the voltage value output by the charging device, gradually increasing the charging current value required by the powered device, and maintaining the voltage value output by the charging device in a constant voltage state. This ensures that the charging device adjusts the power supply information for supplying the powered device in a timely manner, improves the real-time and legality of the power supply adjustment during the fast charging protocol communication process, and also enables the firmware data verification to be performed in an appropriate fast charging negotiation time period.
[0019] Furthermore, the method of controlling the charging device to verify the firmware data stored inside the charging device includes: based on a preconfigured verification method, controlling the charging device to perform verification calculations on the firmware data stored inside the charging device to obtain a verification code under the verification method; then comparing the calculated verification code with the verification code preconfigured in the charging device, and when the calculated verification code is equal to the verification code preconfigured in the charging device, determining that the verification of the firmware data stored inside the charging device is successful; when the calculated verification code is not equal to the verification code preconfigured in the charging device, determining that the verification of the firmware data stored inside the charging device fails. Improve the firmware verification speed during the communication process of the fast charging protocol and shorten the charging time.
[0020] A charging device, the charging device is used to have a communication interaction relationship with an external power receiving device, the charging device includes a charging protocol control module, a power adjustment module, a verification calculation module and a memory; the memory, the power adjustment module and the verification calculation module are all electrically connected to the charging protocol control module, and the verification calculation module is electrically connected to the memory; the charging protocol control module is used to control the verification calculation module to perform verification calculation on the firmware data stored in the memory after determining to use a fast charging protocol of an appropriate type, and then control the charging device to adjust the power supply information for supplying the power receiving device according to the verification result to ensure the safety of the power receiving device. Compared with the existing technology in the same charging field, before the charging device adjusts the power supply information for supplying the power receiving device, the charging protocol control module controls the verification calculation module to perform a check on the firmware to be run, thereby ensuring that the firmware is reliable and legal during the process of the charging device supplying power to the power receiving device, thereby avoiding charging safety problems caused by illegal firmware intrusion into the charging device.
[0021] Furthermore, the charging protocol control module is used to call the power adjustment program included in the firmware data with correct verification according to the charging request issued by the powered device when receiving the verification success information fed back by the verification calculation module, so as to control the power adjustment module to adjust the power supply information for supplying the powered device; the charging protocol control module is also used to control the charging device to output a fixed pre-configured safety voltage when receiving the verification failure information fed back by the verification calculation module. In this technical solution, when adjusting the power supply information supplied to the powered device, the charging protocol control module controls the power adjustment module to adjust the output voltage of the charging device according to the verification result of the firmware data to ensure the safety of the powered device or the powered device receives the requested target power.
[0022] Furthermore, when the charging device is powered on and reset, the verification calculation module is used to verify the firmware data stored in the memory and return the verification result to the register inside the verification calculation module. If the verification is successful, the charging protocol control module is triggered to read and run the fast charging protocol processing program included in the firmware data from the memory so that the charging device determines that the fast charging protocol of the appropriate type is currently used. If the verification fails, the charging protocol control module is triggered to control the charging device to output a fixed pre-configured safety voltage but not respond to the charging request issued by the powered device; wherein the firmware data stored inside the charging device includes the fast charging protocol processing program, which is used to distinguish and identify the type of fast charging protocol used by the charging device. This technical solution starts the verification calculation module to start checking the firmware when the charging device is powered on, so that the charging protocol control module obtains reliable firmware from the memory to start running the fast charging protocol processing program, and ensures the power supply safety of the charging device and the charging safety of the powered device when the firmware is unreliable.
[0023] Furthermore, the charging protocol control module is used to complete the adjustment of the power supply information currently used to supply the powered device under the condition that the verification calculation module has successfully verified, and then run the fast charging protocol processing program to enable the charging device to determine to use the appropriate type of fast charging protocol. It is ensured that the firmware data is checked in real time, and the legitimacy of the firmware data will not be stopped due to the completion of the adjustment operation of the power supply information used to supply the powered device, so as to avoid providing opportunities for the invasion of illegal firmware.
[0024] Furthermore, after the charging protocol control module determines to use the appropriate type of fast charging protocol, before the verification calculation module verifies the firmware data stored in its internal storage, the charging protocol control module is used to detect the charging request issued by the powered device so that the charging protocol control module subsequently adjusts the output power supply information in response to the charging request issued by the powered device under the communication conditions of the fast charging protocol, and monitors the electrical state information of the charging device to realize the operation of the fast charging protocol processing program; wherein, the charging request includes an instruction for the powered device to request the charging device to send the target power supply current and the target power supply voltage. In this technical solution, the charging protocol control module selects and determines the type of fast charging protocol it uses by detecting the request issued by the powered device and other system states, and monitors the charging device for abnormalities based on the system state. It is also compatible with multiple fast charging protocols included in the firmware data, realizes the protection of the charging device, and avoids the loss of the battery on the charging device due to different charging and discharging protocols requested by the powered device.
[0025] Furthermore, after the charging protocol control module detects the charging request issued by the powered device and monitors the electrical status information of the charging device, and before the verification calculation module verifies the firmware data stored in it, the charging protocol control module is also used to determine whether its current operation is to start adjusting the power supply information for supplying the powered device. If so, the verification calculation module is controlled to verify the firmware data stored in the memory; otherwise, the charging request issued by the powered device is continued to be detected to wait for a decision on whether the current operation performed by the charging protocol control module is to adjust the power supply information for supplying the powered device; wherein the power supply information for supplying the powered device includes the power supply current and the power supply voltage output to the powered device.
[0026] Compared with the prior art, whenever the charging protocol control module needs to adjust the actual power supply information supplied to the powered device (including adjusting the actual power supply current and the actual power supply voltage), it is necessary to check the legitimacy of the firmware data stored in the memory directly or after waiting, that is, control the verification calculation module to detect whether the currently stored firmware data is the same as the firmware data released when the charging device is powered on, so as to ensure the integrity and reliability of the firmware data and avoid the problem of safe power use of high voltage or large current generated by the charging device under the communication conditions of the fast charging protocol.
[0027] Furthermore, the verification calculation module verifies the firmware data stored in the memory in a manner including: the verification calculation module is used to, under the control of the charging protocol control module, perform verification calculations on the firmware data stored in the memory based on a preconfigured verification method to obtain a verification code under the verification method, and then compare the calculated verification code with the verification code preconfigured in the charging device. When the calculated verification code is equal to the verification code preconfigured in the charging device, it is determined that the verification of the firmware data stored in the memory is successful; when the calculated verification code is not equal to the verification code preconfigured in the charging device, it is determined that the verification of the firmware data stored in the memory fails. It is ensured that the charging device timely adjusts the power supply information used to supply the powered device, improves the real-time and legality of the power supply adjustment during the fast charging protocol communication process, and also enables the firmware data verification to be performed in a suitable fast charging negotiation time period.
[0028] Furthermore, in the check calculation module, the check codes calculated based on the preconfigured check method include parity check codes, Hamming check codes, and CRC check codes.
[0029] A charging control chip, comprising the charging protocol control module, the power adjustment module, the verification calculation module and the memory, is disposed inside a charging device. In this technical solution, since the firmware data inside the chip is checked in real time, it can be ensured that when the charging control chip adjusts the power supply information of the power supply device, the firmware is reliable, complete and legal, thus avoiding security issues caused by illegal intrusion into the power supply device.
[0030] A charging control chip, the charging control chip includes the charging protocol control module, the power adjustment module and the verification calculation module, the external part of the charging control chip is connected to the memory, the charging control chip is used to first verify the firmware data stored in the memory, and then call the firmware data that has been successfully verified, so that the charging device adjusts the output power supply information in response to the charging request issued by the power receiving device, and controls the charging device to output a fixed pre-configured safety voltage when the verification fails. In this technical solution, since the firmware data outside the chip is calculated and checked in real time, it can be ensured that when the charging control chip adjusts the power supply information of the power supply device, the firmware is reliable, complete and legal, avoiding security problems caused by illegal intrusion into the power supply device. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 The present invention is a flowchart of a charging control method for a charging device disclosed in an embodiment of the present invention.
[0032] Figure 2 The present invention is a flowchart of a charging control method for a charging system disclosed in another embodiment of the present invention.
[0033] Figure 3 A schematic diagram of the system framework of a charging system disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0034] The specific implementation of the present invention will be further described below in conjunction with the accompanying drawings:
[0035] An embodiment of the present invention discloses a charging control method, which is configured in a charging device. The charging control method includes: when the charging device determines to use a fast charging protocol, that is, after the charging device and the powered device establish an electrical connection or wireless communication connection, by running a program about a fast charging protocol of a corresponding type in firmware data, a powered device (charged device) that complies with a charging protocol of a corresponding type is allowed to establish a communication connection with a charging device that also complies with a charging protocol of a corresponding type, so that customized charging data interaction exists between the powered device and the charging device, including voltage, current, and adjustment instructions requested by the powered device to the charging device. Then, the charging device adjusts the power supply information for supplying the powered device according to the verification result of the firmware data (the firmware data that has been controlled to run) stored inside the charging device, specifically including: when the firmware data stored inside the charging device is successfully verified, according to the charging request issued by the powered device, the charging device calls the power adjustment program included in the successfully verified firmware data to adjust the power supply information for supplying the powered device to achieve the response to the charging request; when the firmware data stored inside the charging device fails to be verified, the charging device outputs a fixed pre-configured safety voltage but does not respond to the charging request, which means that the power adjustment program included in the firmware data cannot be called. Preferably, the pre-configured safety voltage is a default voltage of 5V. In this embodiment, when adjusting the power supply information for supplying the powered device, the charging device adaptively adjusts the output voltage according to the verification result of the firmware data to ensure the safety of the powered device or the powered device receives the requested target power. It should be emphasized that the charging safety of the powered device can only be guaranteed when the firmware data is valid, and the firmware that is illegally invaded can be prevented from causing damage to the charging device and the powered device.
[0036] It should be noted that when the firmware data stored in the charging device is successfully verified, the charging device can retrieve and execute the corresponding firmware data for negotiated charging, that is, the receiving device sends the required voltage and current adjustment instructions to the charging device, and the charging device adjusts the voltage and current and sets the corresponding protection value according to the charging request of the receiving device. After the adjustment is completed, the AC / DC is controlled to adjust the output voltage and current capabilities and set the corresponding voltage and current protection value (to deal with abnormal conditions such as overcurrent and overvoltage), and after the adjustment is completed, the power supply is ready to send information to notify the receiving device that the voltage and current adjustment is correct, thereby confirming the completion of the standard negotiated charging at this time. Among them, the adjustment method for supplying the power supply information to the receiving device includes gradually increasing the voltage value output by the charging device, gradually increasing the charging current value required by the receiving device, and maintaining the voltage value output by the charging device in a constant voltage state.
[0037] Since the firmware data contains a fast charging protocol processing program, a power adjustment program, and other programs, the success or failure of the firmware data verification will affect the normal execution of the charging negotiation mechanism between the powered device and the charging device, as well as the safety of the powered device. If the fast charging protocol uses standard PD negotiation charging, then based on the high voltage and high current problems of the PD power supply, each time the power supply needs to be negotiated and adjusted, it is necessary to check whether it is legal, otherwise it may cause safety problems. This embodiment avoids abnormal firmware from the source of the fast charging protocol execution (internally stored firmware data) causing the charging device to output abnormal voltage (exceeding the maximum voltage value that the powered device can withstand), thereby ensuring the safety of the powered device.
[0038] Compared with the existing technology in the same charging field, before the charging device adjusts the power supply information for supplying the powered device, the present embodiment checks the firmware required to run by the charging device, thereby ensuring that the firmware is reliable and legal during the process of the charging device supplying power to the powered device, thereby avoiding charging safety issues caused by illegal intrusion into the charging device.
[0039] Preferably, after the adjustment of the power supply information for supplying the power receiving device is completed once when the firmware data stored in the charging device is successfully verified, the fast charging protocol processing program is run again to enable the charging device to determine the use of the appropriate type of fast charging protocol, and once again allow the power receiving device (charged device) that complies with the appropriate type of charging protocol to establish communication with the charging device that also complies with the appropriate type of charging protocol, and repeat the above steps, so that the charging device can repeatedly perform power supply negotiation adjustment for the power receiving device when the firmware data stored in the charging device is successfully verified, and maintain normal power supply to the power receiving device under the corresponding type of fast charging protocol, reducing the impact of illegal firmware intrusion. Ensure real-time entry to check firmware data, and do not stop detecting the legitimacy of firmware data due to the end of the adjustment operation of the power supply information for supplying the power receiving device, so as to avoid providing opportunities for illegal firmware intrusion during the adjustment of power supply information.
[0040] Another embodiment of the present invention discloses a charging control method, which is configured in a charging system, wherein the charging system includes a charging device and a powered device, wherein the charging device and the powered device may be connected by a cable for charging communication, or may establish a charging connection through a non-contact wireless charging method. The charging control method includes:
[0041] When the charging system determines to use the fast charging protocol, by running the program of the fast charging protocol of the corresponding type in the firmware data, the powered device (charged device) that complies with the charging protocol of the corresponding type is allowed to establish communication with the charging device that also complies with the charging protocol of the corresponding type, so that there is a customized charging data interaction between the powered device and the charging device, including the voltage, current, and adjustment instructions requested by the powered device to the charging device. Then, according to the verification result of the firmware data (firmware data that has been controlled and run) stored in the charging device, the charging device is controlled to adjust the power supply information for supplying the powered device, specifically including: when the firmware data stored in the charging device is successfully verified, according to the charging request issued by the powered device, the charging device is controlled to call the power adjustment program included in the firmware data that has been successfully verified, so as to adjust the power supply information for supplying the powered device, so as to respond to the charging request; when the firmware data stored in the charging device fails to be verified, the charging device is controlled to output a fixed pre-configured safety voltage but does not respond to the charging request, which means that the power adjustment program included in the firmware data cannot be called. Preferably, the pre-configured safety voltage is a default voltage of 5V. When adjusting the power supply information supplied to the powered device, this embodiment adaptively adjusts the output voltage of the charging device according to the verification result of the firmware data to ensure the safety of the powered device or the powered device receives the requested target power. It should be emphasized that the safety of the powered device can only be guaranteed when the firmware data is valid to prevent the illegally invaded firmware from causing damage to the charging device and the powered device.
[0042] It should be noted that when the firmware data stored in the charging device is successfully verified, the charging device can retrieve and execute the corresponding firmware data for negotiated charging, that is, the receiving device sends the required voltage and current adjustment instructions to the charging device, and the charging device adjusts the voltage and current and sets the corresponding protection value according to the charging request of the receiving device. After the adjustment is completed, the AC / DC is controlled to adjust the output voltage and current capabilities and set the corresponding voltage and current protection value (to deal with abnormal conditions such as overcurrent and overvoltage), and after the adjustment is completed, the power supply is ready to send information to notify the receiving device that the voltage and current adjustment is correct, thereby confirming the completion of the standard negotiated charging at this time. Among them, the adjustment method for supplying the power supply information to the receiving device includes gradually increasing the voltage value output by the charging device, gradually increasing the charging current value required by the receiving device, and maintaining the voltage value output by the charging device in a constant voltage state.
[0043] Since the firmware data contains the fast charging protocol processing program, power adjustment program and other programs, the success or failure of the firmware data verification will affect the normal execution of the charging negotiation mechanism between the powered device and the charging device, as well as the safety of the powered device. If the fast charging protocol adopts standard PD negotiation charging, then based on the high voltage and high current problems of the PD power supply, each time the power supply needs to be negotiated and adjusted, it is necessary to check whether it is legal, otherwise it may cause safety problems. Avoid abnormal firmware controlling the charging device to output abnormal voltage (exceeding the maximum voltage value that the powered device can withstand) from the source of the fast charging protocol execution (internally stored firmware data), and ensure the safety of the powered device.
[0044] Compared with the existing technology in the same charging field, before the charging device adjusts the power supply information for supplying the powered device, the present embodiment checks the firmware required to run by the charging system, thereby ensuring that the firmware is reliable and legal during the process of the charging device supplying power to the powered device, thereby avoiding charging power safety issues caused by illegal intrusion into the charging system.
[0045] Preferably, after the adjustment of the power supply information for supplying the power receiving device is completed once when the firmware data stored in the charging device is successfully verified, the fast charging protocol processing program is run again to enable the charging system to determine the use of the appropriate type of fast charging protocol, and once again allow the power receiving device (charged device) that complies with the appropriate type of charging protocol to establish communication with the charging device that also complies with the appropriate type of charging protocol, and repeat the above steps, so that the charging device can repeatedly perform power supply negotiation adjustment for the power receiving device when the firmware data stored in the charging device is successfully verified, and maintain normal power supply to the power receiving device under the corresponding type of fast charging protocol, reducing the impact of illegal firmware intrusion. Ensure real-time entry to check firmware data, and do not stop detecting the legitimacy of firmware data due to the end of the adjustment operation of the power supply information for supplying the power receiving device, so as to avoid providing opportunities for illegal firmware intrusion during the adjustment of power supply information.
[0046] The fast charging protocols in the aforementioned embodiments include MediaTek PE / PE+, Qualcomm QC2.0 / 3.0, USBBC1.2, Apple, USB PD, etc. It is known that the voltage adjustment method under the communication conditions of the fast charging protocol includes two methods: voltage reduction and current increase and voltage increase. This embodiment does not limit the implementation method of fast charging, but only provides a communication method when a charging device is connected to a powered device. The fast charging protocol refers to the data interaction between the two parties when a charging device that complies with the corresponding type of charging protocol is connected to a powered device, including the voltage and current requested by the powered device to the charging device. The charging data request refers to the request sent by the powered device to the charging device when the powered device that complies with the charging protocol is connected to the charging device that also complies with the fast charging protocol. The content of the request includes the transmission of relevant charging data, for example, requesting a voltage of 6V. It is known that the charging data request also includes some preset unit values, which constitute the charging rules.
[0047] It should be noted that the charging data in the aforementioned embodiment refers to: some data generated by the two parties (i.e., the charging device and the powered device) that comply with the fast charging protocol in this application during charging interaction, which may include voltage and current, etc. The electrical parameters in this embodiment refer to the voltage, current, power, impedance, etc. of the charging device and the powered device, and these electrical parameters reflect the performance and status of the electrical equipment (i.e., the charging device and the powered device). It can be seen that the electrical parameters may change with changes in the environment (such as temperature and humidity). This embodiment discloses the communication program of the fast charging protocol. After confirming the data and power supply relationship between the powered device and the charging device, the charging device will adjust these electrical parameters according to the charging request of the powered device, and then the fast charging protocol communication program will output these electrical parameters to determine the charging data.
[0048] As an example, Figure 1 As shown, a charging control method is disclosed, which specifically includes the following steps:
[0049] Step A1, the charging device is powered on and reset. At this time, the relevant charging control chip inside the charging device can be powered on and reset, and the peripherals and subroutines are initialized, but the main loop program for the fast charging protocol has not yet been entered; then enter step A2.
[0050] Step A2: The charging device verifies the firmware data stored in its internal storage, and then proceeds to step A3. In step A2, the verification calculation circuit designed inside the charging device is reset to quickly verify the firmware data in the entire memory, and the verification result is returned to the corresponding register. The firmware check starts when the charging device is powered on, so that the charging device starts running the fast charging protocol processing program by obtaining reliable firmware, and ensures the power supply safety of the charging device and the charging safety of the powered device when the firmware is unreliable.
[0051] The method for the verification calculation circuit to perform verification calculation on the stored firmware data includes: based on the pre-configured verification method, controlling the verification calculation circuit to perform verification calculation on the stored firmware data to obtain the verification code under the verification method; then comparing the calculated verification code with the verification code pre-configured in the charging device; when the calculated verification code is equal to the verification code pre-configured in the charging device, it is determined that the firmware data stored in the charging device is successfully verified, and it is determined that the charging device can execute the fast charging protocol processing program, the power adjustment program and other programs; when the calculated verification code is not equal to the verification code pre-configured in the charging device, it is determined that the firmware data stored in the charging device fails to be verified, and the program included in the execution of these firmware data cannot be called. Improve the firmware verification speed in the communication process of the fast charging protocol and shorten the charging time. Among them, the verification method includes but is not limited to parity check, cyclic redundancy check, and Hamming check, and the corresponding verification codes are parity check code, cyclic redundancy check code, and Hamming check code.
[0052] Step A3: The charging device determines whether the verification is successful. If so, it proceeds to step A5; otherwise, it proceeds to step A4.
[0053] Step A4: the charging device fixedly outputs a pre-configured safety voltage but does not respond to a charging request from the powered device. Preferably, the charging device fixedly outputs a default voltage of 5V to the powered device to ensure the safety of the powered device.
[0054] Step A5, the charging device runs the fast charging protocol processing program to determine the fast charging protocol of the appropriate type currently in use, detects the charging request issued by the powered device and monitors the electrical status information of the charging device, and then proceeds to step A6. Among them, the charging request includes the adjustment instructions of the target power supply current and the target power supply voltage sent by the powered device to the charging device; the electrical status information includes current, voltage, temperature and other information. The fast charging protocol processing program is used to distinguish and identify the type of fast charging protocol used by the charging device, and then determine the powered device and its power supply role, the current and voltage tolerance of the powered device, the maximum charging power of the charging device, the maximum charging current and the maximum charging voltage.
[0055] In step A5, the charging device detects the charging request issued by the powered device, so that the charging device subsequently adjusts the output power supply information in response to the charging request issued by the powered device under the communication conditions of the fast charging protocol, and the power supply information includes the power supply current and the power supply voltage output to the powered device, which are the actual adjusted current values and voltage values. The charging device of this embodiment selects and determines the type of fast charging protocol used by the charging device by detecting the request issued by the powered device and other system states, and monitors the charging device for abnormalities based on the system state (the electrical system state of the charging device and / or the electrical system state of the powered device). It is also compatible with multiple fast charging protocols included in the firmware data, to protect the charging device, and to avoid the loss of the battery on the charging device due to different charging and discharging protocols requested by the powered device.
[0056] Step A6: The charging device determines whether the current operation is to start adjusting the power supply information for supplying the powered device in response to the charging request issued by the powered device. If yes, it goes to step A7; otherwise, it returns to step A5. The charging device continues to run the fast charging protocol processing program to wait for the decision on whether to adjust the power supply information for supplying the powered device, which is affected by the request signal from the powered device. The power supply information for supplying the powered device includes the power supply current and the power supply voltage output to the powered device. It should be noted that the charging request issued by the powered device includes an adjustment instruction for the power supply information for supplying the powered device, so that the powered device can obtain the target power supply current and target power supply voltage.
[0057] In step A6, the charging device determines whether the current operation is to start adjusting the power supply information for supplying the powered device, including: the charging device determines whether the current operation is to issue an instruction to adjust the power supply information for supplying the powered device; or the charging device determines whether the timing meets the timing for adjusting the power supply information for supplying the powered device; or the charging device determines whether the trigger flag information for starting to adjust the power supply information for supplying the powered device is detected. It is ensured that the charging device adjusts the power supply information for supplying the powered device in a timely manner, improves the real-time and legality of the power supply adjustment during the fast charging protocol communication process, and also enables the firmware data verification to be performed in an appropriate fast charging negotiation time period.
[0058] Step A7, the charging device determines to start adjusting the power supply information for supplying the power receiving device (including but not limited to detecting that the charging device issues an instruction to adjust the power supply information for supplying the power receiving device, timing to meet the timing of adjusting the power supply information for supplying the power receiving device, and detecting the trigger flag information for starting to adjust the power supply information for supplying the power receiving device), but has not yet formally executed the power adjustment program included in the firmware data, the charging device starts to verify the firmware data stored in its internal storage, and then enters step A8. The specific verification method is the same as the verification calculation method of step A2, except that the same firmware data is checked for legitimacy at different charging negotiation communication stages to verify whether the firmware data after executing step A7 is the same as that released when the power is just reset.
[0059] Step A8, the charging device determines whether the verification is successful, if so, it goes to step A9, otherwise it returns to step A4. Step A8 further completes the validity check of the firmware data on the basis of the previous steps. If the verification is successful when executing step A8, it proves that the firmware data is still valid, and the power supply information can be adjusted by entering step A9, otherwise it proves that the firmware data has expired. Therefore, compared with the prior art, every time the charging device adjusts the actual power supply information supplied to the powered device (including adjusting the actual power supply current and the actual power supply voltage), it is necessary to directly or after waiting, the charging device checks the legitimacy of the firmware data stored internally, that is, to detect whether the currently stored firmware data is the same as the firmware data released when the charging device is powered on, to ensure the integrity of the firmware data, and to avoid the problem of safe power use of high voltage or high current generated by the charging device under the communication conditions of the fast charging protocol.
[0060] Step A9, the charging device adjusts the power supply information for supplying the powered device, and preferably proceeds to step A10. In step A9, it is determined that the firmware data stored in the charging device is successfully verified, then according to the charging request issued by the powered device, the charging device calls the power adjustment program included in the successfully verified firmware data to adjust the power supply information for supplying the powered device, respond to the charging request, and thus complete a fast charging negotiation between the charging device and the powered device.
[0061] Step A10, the charging device determines whether the current power supply information adjustment is completed in step A9 and sends it to the powered device. If yes, it returns to step A5 to re-run the fast charging protocol processing program so that the charging device determines to use the appropriate type of fast charging protocol, forming a firmware data verification step and a power adjustment step cycle process that are executed successively under the guidance of the fast charging protocol processing program; otherwise, it returns to step A9 to wait for the charging device to complete the current power supply information adjustment. The powered device can perform real-time calculation and inspection of the overall firmware stored in the charging device during the entire charging process, so it can be ensured that when the power supply information is adjusted, the firmware is reliable, complete, and legal, avoiding security issues caused by illegal intrusion of firmware data, that is, the powered device can be effectively protected, so that the charging safety of the powered device can be effectively improved.
[0062] As another example, Figure 2 As shown, a charging control method is disclosed, which specifically includes the following steps:
[0063] Step S1, the charging system is powered on and reset. At this time, it can be the power-on reset of the relevant charging control chip inside the charging device, the initialization of the peripherals and subroutines, but it has not entered the main loop program of the fast charging protocol; then enter step S2.
[0064] Step S2, control the charging device to verify the firmware data stored inside it, and then enter step S3. In step S2, the verification calculation circuit designed inside the charging device is reset to quickly verify the firmware data in the entire memory, and the verification result is returned to the corresponding register. The firmware check starts when the charging system is powered on, so that the charging device starts running the fast charging protocol processing program by obtaining reliable firmware, and ensures the power supply safety of the charging device and the charging safety of the receiving device when the firmware is unreliable.
[0065] The method for the verification calculation circuit to perform verification calculation on the stored firmware data includes: based on the pre-configured verification method, controlling the verification calculation circuit to perform verification calculation on the stored firmware data to obtain the verification code under the verification method; then comparing the calculated verification code with the verification code pre-configured in the charging device; when the calculated verification code is equal to the verification code pre-configured in the charging device, it is determined that the firmware data stored in the charging device is successfully verified, and it is determined that the charging device can execute the fast charging protocol processing program, the power adjustment program and other programs; when the calculated verification code is not equal to the verification code pre-configured in the charging device, it is determined that the firmware data stored in the charging device fails to be verified, and the program included in the execution of these firmware data cannot be called. Improve the firmware verification speed in the communication process of the fast charging protocol and shorten the charging time. Among them, the verification method includes but is not limited to parity check, cyclic redundancy check, and Hamming check, and the corresponding verification codes are parity check code, cyclic redundancy check code, and Hamming check code.
[0066] Step S3, determine whether the verification is successful, if yes, go to step S5, otherwise go to step S4.
[0067] Step S4: Control the charging device to output a pre-configured safety voltage but not respond to a charging request from the powered device. Preferably, control the charging device to output a default voltage of 5V to the powered device to ensure the safety of the powered device.
[0068] Step S5, control the charging device to run the fast charging protocol processing program to determine the currently used fast charging protocol of the appropriate type, detect the charging request issued by the powered device and monitor the electrical status information of the charging device, and then enter step S6. Among them, the charging request includes the adjustment instructions of the target power supply current and the target power supply voltage sent by the powered device to the charging device; the electrical status information includes current, voltage, temperature and other information. The fast charging protocol processing program is used to distinguish and identify the type of fast charging protocol used by the charging system, and then determine the powered device and its power supply role, the current and voltage tolerance of the powered device, the maximum charging power of the charging device, the maximum charging current and the maximum charging voltage.
[0069] In step S5, the charging device is controlled to detect the charging request issued by the powered device, so that the charging device subsequently adjusts the output power supply information in response to the charging request issued by the powered device under the communication conditions of the fast charging protocol, and the power supply information includes the power supply current and the power supply voltage output to the powered device, which are the actual adjusted current values and voltage values. This embodiment selects and determines the type of fast charging protocol used by the charging system by detecting the request issued by the powered device and other system states, and monitors the charging device for abnormalities based on the system state. It is also compatible with multiple fast charging protocols included in the firmware data, to protect the charging device, and to avoid losses to the battery on the charging device due to different charging and discharging protocols requested by the powered device.
[0070] Step S6, determine whether the current operation of the charging device is to start adjusting the power supply information for supplying the powered device in response to the charging request issued by the powered device, if yes, go to step S7; otherwise, return to step S5 and continue to run the fast charging protocol processing program to wait for the decision whether to adjust the power supply information for supplying the powered device, which is affected by the request signal on the powered device side; wherein the power supply information for supplying the powered device includes the power supply current and the power supply voltage output to the powered device. It should be noted that the charging request issued by the powered device includes an adjustment instruction for supplying the power supply information to the powered device, so that the powered device obtains the target power supply current and the target power supply voltage.
[0071] In step S6, the method for determining whether the current operation of the charging device is to start adjusting the power supply information for supplying the powered device includes: determining whether the current operation of the charging device is to issue an instruction to adjust the power supply information for supplying the powered device; or determining whether the charging device has timed to meet the timing for adjusting the power supply information for supplying the powered device; or determining whether the charging device has detected the trigger flag information for starting to adjust the power supply information for supplying the powered device. It is ensured that the charging device adjusts the power supply information for supplying the powered device in a timely manner, improves the real-time and legality of the power supply adjustment during the fast charging protocol communication process, and also enables the firmware data verification to be performed in an appropriate fast charging negotiation time period.
[0072] Step S7: Determine that the charging device starts to adjust the power supply information for supplying the power receiving device (including but not limited to detecting that the charging device issues an instruction to adjust the power supply information for supplying the power receiving device, timing to meet the timing of adjusting the power supply information for supplying the power receiving device, and detecting the trigger flag information for starting to adjust the power supply information for supplying the power receiving device), but has not formally executed the power adjustment program included in the firmware data, control the charging device to verify the firmware data stored in it, and then enter step S8. The specific verification method is the same as the verification calculation method of step S2, except that the same firmware data is checked for legitimacy at different charging negotiation communication stages to verify whether the firmware data after executing step S7 is the same as that released when the power is just reset.
[0073] Step S8, determine whether the verification is successful, if yes, proceed to step S9, otherwise return to step S4. Step S8 further completes the validity check of the firmware data on the basis of the previous steps. If the verification is successful when executing step S8, it proves that the firmware data is still valid, and the power supply information can be adjusted in step S9, otherwise it proves that the firmware data has expired. Therefore, compared with the prior art, every time the charging device adjusts the actual power supply information supplied to the powered device (including adjusting the actual power supply current and the actual power supply voltage), it is necessary to check the legitimacy of the firmware data stored in the charging device directly or after waiting, that is, to detect whether the currently stored firmware data is the same as the firmware data released when the system is powered on, to ensure the integrity of the firmware data, and to avoid the problem of safe power use of high voltage or high current generated by the charging device under the communication conditions of the fast charging protocol.
[0074] Step S9, control the charging device to adjust the power supply information for supplying the powered device, and then preferably proceed to step S10. In step S9, it is determined that the firmware data stored in the charging device is successfully verified, then according to the charging request issued by the powered device, the charging device is controlled to call the power adjustment program included in the successfully verified firmware data to adjust the power supply information for supplying the powered device, realize the response to the charging request, and thus complete the fast charging negotiation between the charging device and the powered device.
[0075] Step S10, determine whether step S9 has completed the adjustment of the current power supply information and sent it to the powered device. If so, return to step S5 to re-run the fast charging protocol processing program so that the charging system determines to use the appropriate type of fast charging protocol, forming a firmware data verification step and a power adjustment step cycle process that are executed successively under the guidance of the fast charging protocol processing program; otherwise, return to step S9 to wait for the charging device to complete the adjustment of the current power supply information. The powered device can calculate and check the overall firmware stored in the charging device in real time during the entire charging process, so it can be ensured that when the power supply information is adjusted, the firmware is reliable, complete, and legal, avoiding security issues caused by illegal intrusion of firmware data, that is, the powered device can be effectively protected, so that the charging safety of the powered device can be effectively improved.
[0076] The present invention also discloses a charging device, such as Figure 3 As shown in the charging system, the charging system includes a charging device and a powered device. The charging device and the powered device can establish an electrical connection relationship through a type-c data cable, or establish a communication connection through other non-contact inductive charging methods (not shown in the figure); the charging device includes a charging protocol control module, a power adjustment module, a verification calculation module and a memory; the memory, the power adjustment module and the verification calculation module are all electrically connected to the charging protocol control module, and the verification calculation module is electrically connected to the memory; the cable interface of the charging device and the cable interface of the powered device can establish an electrical connection relationship by connecting a fast charging cable, and the fast charging cable here can be a type-c data cable; considering that the information stored in the RAM no longer exists after power failure, while the ROM will not be like this, in this embodiment, in charging applications that are not frequently written, the memory used to store firmware data is set to a read-only memory.
[0077] Since the charging protocol control module, power adjustment module, verification calculation module and memory are all hardware modular divisions of the corresponding functional steps of the firmware-based charging control method disclosed in the above-mentioned embodiment, some calculation, control and adjustment module units can be attributed to the CPU unit in the charging device for execution. Therefore, in the following embodiments, when the charging device needs to adjust the power supply information for supplying the powered device, the action of checking the firmware required to run the charging system and the action of adjusting the power supply information under the corresponding verification results are no longer described in detail.
[0078] The charging protocol control module is used to control the verification calculation module to perform verification calculations on the firmware data stored in the memory after determining to use an appropriate type of fast charging protocol, and then control the charging device to adjust the power supply information used to supply the powered device according to the verification results to ensure the safety of the powered device.
[0079] After the charging device and the powered device are electrically connected, the charging protocol control module runs the program of the corresponding type of fast charging protocol in the firmware data, so that the powered device (charged device) that complies with the corresponding type of charging protocol can establish a communication connection with the charging device that also complies with the corresponding type of charging protocol, so that there is a customized charging data interaction between the powered device and the charging device, including the voltage, current, and adjustment instructions requested by the powered device to the charging device. Then, according to the verification calculation result of the verification calculation module of the firmware data (firmware data that has been controlled and run by the charging protocol control module) stored in the charging device, the charging device is controlled to adjust the power supply information for supplying the powered device. Compared with the existing technology in the same charging field, before the charging device adjusts the power supply information for supplying the powered device, the charging protocol control module controls the verification calculation module to check the firmware to be run, so that it can ensure that the firmware is reliable and legal during the process of the charging device supplying power to the powered device, avoiding power safety problems caused by illegal intrusion into the charging system.
[0080] As an embodiment, the charging protocol control module is used to call the power adjustment program included in the firmware data with correct verification according to the charging request issued by the powered device when receiving the verification success information fed back by the verification calculation module, so as to control the power adjustment module to adjust the power supply information for supplying the powered device; the charging protocol control module is also used to control the charging device to output a pre-configured safety voltage when receiving the verification failure information fed back by the verification calculation module. At this time, the power adjustment module is not controlled to adjust the power supply information for supplying the powered device, but the charging system outputs a default safety voltage. In this embodiment, when adjusting the power supply information for supplying the powered device, the charging protocol control module controls the power adjustment module to adjust the output voltage of the charging device according to the verification result of the firmware data to ensure the safety of the powered device or the powered device receives the requested target power.
[0081] As an embodiment, after the charging device is powered on and reset, the verification calculation module is used to verify the firmware data stored in the memory and return the verification result to the register inside the verification calculation module. If the verification is successful, the charging protocol control module is triggered to read and run the fast charging protocol processing program included in the firmware data from the memory so that the charging system determines that the fast charging protocol of the appropriate type is currently used. If the verification fails, the charging protocol control module is triggered to control the charging device to output a fixed pre-configured safety voltage but not respond to the charging request issued by the powered device; wherein the firmware data stored inside the charging device includes the fast charging protocol processing program, which is used to distinguish and identify the type of fast charging protocol used by the charging device. In this embodiment, the verification calculation module is started to check the firmware when the charging system is powered on, so that the charging protocol control module obtains reliable firmware from the memory to start running the fast charging protocol processing program, and ensures the power supply safety of the charging device and the charging safety of the powered device when the firmware is unreliable.
[0082] As an embodiment, the charging protocol control module is used to complete the adjustment of the power supply information currently used to supply the powered device when the verification calculation module has successfully verified, and then run the fast charging protocol processing program to enable the charging system to determine to use the appropriate type of fast charging protocol. It is ensured that the firmware data is checked in real time, and the legitimacy of the firmware data will not be stopped due to the completion of the adjustment operation of the power supply information used to supply the powered device, so as to avoid providing opportunities for the invasion of illegal firmware during the adjustment of the power supply information.
[0083] As an embodiment, after the charging protocol control module determines to use the appropriate type of fast charging protocol, before the verification calculation module verifies the firmware data stored in its internal storage, the charging protocol control module is used to detect the charging request issued by the powered device so that the charging protocol control module subsequently adjusts the output power supply information in response to the charging request issued by the powered device under the communication conditions of the fast charging protocol, and monitors the electrical state information of the charging device to realize the operation of the fast charging protocol processing program; wherein the charging request includes an instruction for the powered device to request the charging device to send the target power supply current and the target power supply voltage. In this embodiment, the charging protocol control module selects and determines the type of fast charging protocol it uses by detecting the request issued by the powered device and other system states, and monitors the charging device for abnormalities based on the system state. It is also compatible with multiple fast charging protocols included in the firmware data, realizes the protection of the charging device, and avoids the loss of the battery on the charging device due to different charging and discharging protocols requested by the powered device.
[0084] As an embodiment, after the charging protocol control module detects the charging request issued by the powered device and monitors the electrical status information of the charging device, and before the verification calculation module verifies the firmware data stored in it, the charging protocol control module is also used to determine whether its current operation is to start adjusting the power supply information for supplying the powered device. If so, the verification calculation module is controlled to verify the firmware data stored in the memory; otherwise, the charging request issued by the powered device is continued to be detected to wait for a decision on whether the current operation performed by the charging protocol control module is to adjust the power supply information for supplying the powered device; wherein the power supply information for supplying the powered device includes the power supply current and the power supply voltage output to the powered device. Compared with the prior art, whenever the charging protocol control module needs to adjust the actual power supply information supplied to the powered device (including adjusting the actual power supply current and the actual power supply voltage), it is necessary to check the legitimacy of the firmware data stored in the memory directly or after waiting, that is, to control the verification calculation module to detect whether the currently stored firmware data is the same as the firmware data released when the system is powered on, to ensure the integrity of the firmware data and avoid the problem of safe power use of high voltage or large current generated by the charging device under the communication conditions of the fast charging protocol.
[0085] As an embodiment, the verification calculation module verifies the firmware data stored in the memory in a manner including: the verification calculation module is used to, under the control of the charging protocol control module, perform verification calculations on the firmware data stored in the memory based on a preconfigured verification method to obtain a verification code under the verification method, and then compare the calculated verification code with the verification code preconfigured in the charging device. When the calculated verification code is equal to the verification code preconfigured in the charging device, it is determined that the verification of the firmware data stored in the memory is successful; when the calculated verification code is not equal to the verification code preconfigured in the charging device, it is determined that the verification of the firmware data stored in the memory fails. This embodiment ensures that the charging device timely adjusts the power supply information used to supply the powered device, performs firmware data verification in an appropriate fast charging negotiation time period, and improves the real-time and legality of the power supply adjustment during the fast charging protocol communication process.
[0086] In the check calculation module, the check codes calculated based on the preconfigured check method include parity check codes, Hamming check codes, and CRC check codes.
[0087] Based on the aforementioned embodiments, the present invention discloses a charging control chip, which includes a charging protocol control module of the charging system, a power adjustment module of the charging system, a verification calculation module of the charging system and a memory of the charging system, and the charging control chip is arranged inside a charging device.
[0088] The present invention also discloses another charging control chip, which includes a charging protocol control module of the charging system, a power adjustment module of the charging system and a verification calculation module of the charging system. The outside of the charging control chip is connected to a memory of the charging system. The memory and the charging control chip are both arranged inside a charging device. The charging control chip is used to first verify the firmware data stored in the memory, and then call and execute the firmware data that has been successfully verified, so that the charging device adjusts the output power supply information in response to the charging request issued by the powered device, and controls the charging device to output a fixed pre-configured safety voltage when the verification fails.
[0089] The device implementation described above is merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present implementation scheme. Those of ordinary skill in the art may understand and implement it without creative work.
Claims
1. A charging control method, which is configured in a charging device, characterized in that: The charging control method comprises: Step A: When the charging device determines to use a fast charging protocol of an appropriate type, the charging device adjusts the power supply information for supplying the powered device according to the verification result of the firmware data stored internally to ensure the safety of the powered device; When the charging device is powered on and reset, the charging device verifies the firmware data stored inside the charging device. If the verification succeeds, the fast charging protocol processing program is run to determine the fast charging protocol of the appropriate type currently used. If the verification fails, the pre-configured safety voltage is fixedly output but the charging request issued by the powered device is not responded. The firmware data stored inside the charging device includes the fast charging protocol processing program, which is used to distinguish and identify the type of fast charging protocol used by the charging device. When the charging device determines to use a fast charging protocol of an appropriate type, before the charging device verifies the firmware data stored in the charging device, the step of running the fast charging protocol processing program includes: step B, the charging device detects a charging request issued by the powered device, so that the charging device subsequently adjusts the output power supply information in response to the charging request issued by the powered device under the communication conditions of the fast charging protocol, and the charging device also monitors the electrical state information inside the charging device; wherein the charging request includes an adjustment instruction of a target power supply current and a target power supply voltage sent by the powered device to the charging device; After executing step B and before the charging device verifies the firmware data stored in its internal storage, the method further includes: step C, the charging device determines whether the current operation is to start adjusting the power supply information for supplying the powered device in response to the charging request issued by the powered device, and if so, verifies the firmware data stored in its internal storage, otherwise returns to step B to wait for a decision on whether to adjust the power supply information for supplying the powered device; wherein the power supply information for supplying the powered device includes the power supply current and the power supply voltage output to the powered device.
2. The charging control method according to claim 1, characterized in that: In step A, the method in which the charging device adjusts the power supply information for supplying the powered device according to the verification result of the firmware data stored internally includes: when the firmware data stored internally in the charging device is successfully verified, according to the charging request issued by the powered device, the charging device calls the power adjustment program included in the successfully verified firmware data to adjust the power supply information for supplying the powered device, so as to respond to the charging request; When the firmware data stored in the charging device fails to be verified, the charging device outputs a pre-configured safety voltage but does not respond to the charging request.
3. The charging control method according to claim 2, characterized in that: After the adjustment of the power supply information currently used to supply the powered device is completed in a state where the firmware data stored in the charging device is successfully verified, the fast charging protocol processing program is run to enable the charging device to determine to use a fast charging protocol of an appropriate type.
4. The charging control method according to claim 3, characterized in that: The method for the charging device to determine whether the current operation is to start adjusting the power supply information for supplying the powered device includes: The charging device determines whether the current operation is to issue an instruction to adjust the power supply information for supplying the power receiving device; or the charging device determines whether the timing meets the timing for adjusting the power supply information for supplying the power receiving device; or the charging device determines whether the trigger flag information for starting to adjust the power supply information for supplying the power receiving device is detected; The adjustment method for supplying power information to the powered device includes gradually increasing the voltage value output by the charging device, gradually increasing the charging current value required by the powered device, and maintaining the voltage value output by the charging device in a constant voltage state.
5. The charging control method according to any one of claims 2 to 4, characterized in that: The method for the charging device to verify the firmware data stored inside the charging device includes: Based on the preconfigured verification method, the charging device performs verification calculations on the firmware data stored internally to obtain a verification code under the verification method; the calculated verification code is then compared with the verification code pre-configured in the charging device. When the calculated verification code is equal to the verification code pre-configured in the charging device, the charging device determines that the verification of the internally stored firmware data is successful; when the calculated verification code is not equal to the verification code pre-configured in the charging device, the charging device determines that the verification of the internally stored firmware data has failed.
6. A charging control method, the charging control method being configured in a charging system, the charging system comprising a charging device and a power receiving device, characterized in that: The charging control method comprises: Step A: After the charging system determines to use a suitable type of fast charging protocol, the charging device is controlled to adjust the power supply information for supplying the powered device according to the verification result of the firmware data stored in the charging device, so as to ensure the safety of the powered device; When the charging system is powered on and reset, the charging device is controlled to verify the firmware data stored therein; if the verification succeeds, the charging device is controlled to run the fast charging protocol processing program so that the charging system determines that the fast charging protocol of the appropriate type is currently used; if the verification fails, the charging device is controlled to output a fixed pre-configured safety voltage but does not respond to the charging request issued by the powered device; wherein the firmware data stored inside the charging device includes the fast charging protocol processing program, which is used to distinguish and identify the type of fast charging protocol used by the charging system; When the charging system determines to use a fast charging protocol of an appropriate type, before the charging device verifies the firmware data stored therein, the step of running the fast charging protocol processing program includes: step B, controlling the charging device to detect a charging request issued by the powered device, so that the charging device subsequently adjusts the output power supply information in response to the charging request issued by the powered device under the communication conditions of the fast charging protocol, and monitors the electrical state information of the charging device; wherein the charging request includes an adjustment instruction of a target power supply current and a target power supply voltage sent by the powered device to the charging device; After executing step B and before the charging device verifies the firmware data stored inside it, it also includes: step C, judging whether the current operation of the charging device is to start adjusting the power supply information for supplying the powered device in response to the charging request issued by the powered device, and if so, controlling the charging device to verify the firmware data stored inside it, otherwise returning to step B to wait for a decision on whether to adjust the power supply information for supplying the powered device; wherein the power supply information for supplying the powered device includes the power supply current and the power supply voltage output to the powered device.
7. The charging control method according to claim 6, characterized in that: In the step A, the method of controlling the charging device to adjust the power supply information for supplying the powered device according to the verification result of the firmware data stored in the charging device comprises: when the firmware data stored in the charging device is successfully verified, according to the charging request issued by the powered device, controlling the charging device to call the power adjustment program included in the successfully verified firmware data to adjust the power supply information for supplying the powered device, so as to respond to the charging request; When the firmware data stored in the charging device fails to be verified, the charging device is controlled to output a pre-configured safety voltage but does not respond to the charging request.
8. The charging control method according to claim 7, characterized in that: After the adjustment of the power supply information currently used to supply the powered device is completed under the condition that the firmware data stored in the charging device is successfully verified, the fast charging protocol processing program is run again to enable the charging system to determine to use the appropriate type of fast charging protocol.
9. The charging control method according to claim 8, characterized in that: The method of determining whether the current operation of the charging device is to start adjusting the power supply information for supplying the powered device includes: Determine whether the current operation of the charging device is to issue an instruction to adjust the power supply information for supplying the power receiving device; or determine whether the charging device has timed to meet the timing for adjusting the power supply information for supplying the power receiving device; or determine whether the charging device has detected trigger flag information for starting to adjust the power supply information for supplying the power receiving device; The adjustment method for supplying power information to the powered device includes gradually increasing the voltage value output by the charging device, gradually increasing the charging current value required by the powered device, and maintaining the voltage value output by the charging device in a constant voltage state.
10. The charging control method according to any one of claims 7 to 9, characterized in that: The method for controlling the charging device to verify the firmware data stored therein comprises: Based on the preconfigured verification method, the charging device is controlled to perform verification calculations on the firmware data stored inside it to obtain a verification code under the verification method; the calculated verification code is then compared with the verification code preconfigured in the charging device. When the calculated verification code is equal to the verification code preconfigured in the charging device, it is determined that the verification of the firmware data stored inside the charging device is successful; when the calculated verification code is not equal to the verification code preconfigured in the charging device, it is determined that the verification of the firmware data stored inside the charging device has failed.
11. A charging device, the charging device being used to communicate and interact with an external powered device, characterized in that: The charging device includes a charging protocol control module, a power adjustment module, a verification calculation module and a memory; The memory, the power adjustment module and the verification calculation module are all electrically connected to the charging protocol control module, and the verification calculation module is electrically connected to the memory; The charging protocol control module is used to control the verification calculation module to perform verification calculation on the firmware data stored in the memory after determining to use the appropriate type of fast charging protocol, and then control the charging device to adjust the power supply information for supplying the powered device according to the verification result to ensure the safety of the powered device; When the charging device is powered on and reset, the verification calculation module is used to verify the firmware data stored in the memory and return the verification result to the register inside the verification calculation module. If the verification is successful, the charging protocol control module is triggered to read and run the fast charging protocol processing program included in the firmware data from the memory so that the charging device determines that the fast charging protocol of the appropriate type is currently used. If the verification fails, the charging protocol control module is triggered to control the charging device to output a fixed pre-configured safety voltage but not respond to the charging request issued by the powered device; wherein the firmware data stored inside the charging device includes the fast charging protocol processing program, which is used to distinguish and identify the type of fast charging protocol used by the charging device; When the charging protocol control module determines to use the fast charging protocol of the appropriate type, before the verification calculation module verifies the firmware data stored in the internal storage, the charging protocol control module is used to detect the charging request issued by the powered device so that the charging protocol control module subsequently adjusts the output power supply information in response to the charging request issued by the powered device under the communication conditions of the fast charging protocol, and monitors the electrical state information of the charging device to implement the operation of the fast charging protocol processing program; wherein the charging request includes an instruction for the powered device to request the charging device to send a target power supply current and a target power supply voltage; After the charging protocol control module detects the charging request issued by the powered device and monitors the electrical status information of the charging device, and before the verification calculation module verifies the firmware data stored in it, the charging protocol control module is also used to determine whether its current operation is to start adjusting the power supply information for supplying the powered device. If so, the verification calculation module is controlled to verify the firmware data stored in the memory; otherwise, the charging request issued by the powered device is continued to be detected to wait for a decision on whether the current operation performed by the charging protocol control module is to adjust the power supply information for supplying the powered device; wherein the power supply information for supplying the powered device includes the power supply current and the power supply voltage output to the powered device.
12. The charging device according to claim 11, characterized in that: The charging protocol control module is used to call the power adjustment program included in the firmware data with correct verification according to the charging request issued by the powered device when receiving the verification success information fed back by the verification calculation module, so as to control the power adjustment module to adjust the power supply information for supplying the powered device; The charging protocol control module is further used to control the charging device to output a fixed pre-configured safety voltage when receiving the verification failure information fed back by the verification calculation module.
13. The charging device according to claim 12, characterized in that: The charging protocol control module is used to complete the adjustment of the power supply information currently used to supply the powered device when the verification calculation module has successfully verified, and then run the fast charging protocol processing program to enable the charging device to determine to use the appropriate type of fast charging protocol.
14. The charging device according to any one of claims 12 to 13, characterized in that: The verification calculation module verifies the firmware data stored in the memory in the following manner: The verification calculation module is used to perform verification calculation on the firmware data stored in the memory based on a preconfigured verification method under the control of the charging protocol control module to obtain a verification code under the verification method, and then compare the calculated verification code with the verification code preconfigured in the charging device. When the calculated verification code is equal to the verification code preconfigured in the charging device, it is determined that the verification of the firmware data stored in the memory is successful; when the calculated verification code is not equal to the verification code preconfigured in the charging device, it is determined that the verification of the firmware data stored in the memory has failed.
15. The charging device according to claim 14, characterized in that: In the check calculation module, the check codes calculated based on the preconfigured check method include parity check codes, Hamming check codes, and CRC check codes.
16. A charging control chip, characterized in that: The charging control chip comprises a charging protocol control module of the charging device according to any one of claims 11 to 15, a power adjustment module of the charging device according to any one of claims 11 to 15, a verification calculation module of the charging device according to any one of claims 11 to 15 and a memory of the charging device according to any one of claims 11 to 15, and the charging control chip is arranged inside the charging device.
17. A charging control chip, characterized in that: The charging control chip comprises a charging protocol control module of the charging device according to any one of claims 11 to 15, a power adjustment module of the charging device according to any one of claims 11 to 15, and a verification calculation module of the charging device according to any one of claims 11 to 15. The charging control chip is externally connected to a memory of the charging device according to any one of claims 11 to 15. The charging control chip is used to first verify the firmware data stored in the memory, and then call and execute the firmware data that has successfully verified, so that the charging device adjusts the output power supply information in response to the charging request issued by the powered device, and controls the charging device to output a fixed pre-configured safety voltage when the verification fails.
Citation Information
Patent Citations
Quick charging control method, device and equipment and storage medium
CN111245070A
Charging control method and device, electronic equipment and storage medium
CN112448450A
