Firmware upgrade method and apparatus, receiving end device, and storage medium
By sending data packets related to the wireless charging protocol during wireless charging to maintain energy transfer, the problem of increased size and water resistance of the wireless charging receiver chip during firmware upgrades is solved, achieving successful firmware upgrades and cost savings.
Patent Information
- Application Number
- PCT/CN2024/080618
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-05
- Filing Date
- 2024-03-07
- Publication Date
- 2024-11-14
AI Technical Summary
Existing wireless charging receiver chips require a reverse power supply circuit or a wired charging interface during firmware upgrades, which increases the size of wearable devices or makes them unable to meet waterproof requirements. Furthermore, traditional firmware upgrade methods may lead to upgrade failures.
By sending data packets related to the wireless charging protocol during wireless charging, energy transfer between the receiving and transmitting devices is maintained. A preset charging boot program and backup data packets ensure successful firmware upgrades, avoiding the use of reverse power supply circuits and wired interfaces.
Successful firmware upgrades were achieved without a reverse power supply circuit and a wired interface, saving system hardware costs for wearable devices and ensuring the device's waterproof performance.
Smart Images

Figure CN2024080618_14112024_PF_FP_ABST
Abstract
Description
Firmware upgrade method, device, receiving end device and storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese patent application number 2023104921654, filed with the Chinese Patent Office on May 5, 2023, entitled “Firmware Upgrade Method, Apparatus, Receiving Device and Storage Medium,” the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of wireless charging technology, and more specifically, to a firmware upgrade method, apparatus, receiving device, and storage medium. Background Art
[0004] With the development of wireless charging technology (Wireless Charger), wireless charging of wearable devices is very common.
[0005] Due to the development of wireless charging protocols and the update of system requirements of wearable devices, the wireless charging receiver chip (RxIC) needs to perform OTA (Over-the-Air Technology) firmware upgrades.
[0006] During the firmware upgrade process of the existing wireless charging receiver chip, it is necessary to use the battery in the wearable device through a reverse power supply circuit to power the receiver chip, or use wired charging to power the receiver chip.
[0007] However, the reverse power supply circuit will increase the size and hardware cost of the wearable device, and the wired charging interface will cause the wearable device to fail to meet the waterproof requirements. For wearable devices without a reverse power supply circuit or a wired charging interface, if energy transmission cannot be performed during the firmware upgrade process, the firmware upgrade will fail.
[0008] Summary of the Invention
[0009] In view of this, the purpose of this application is to provide a firmware upgrade method, apparatus, receiving device and storage medium, so as to maintain energy transmission during the firmware upgrade process and ensure the success of the firmware upgrade.
[0010] To achieve at least one of the above objectives, the technical solutions adopted in this application are as follows:
[0011] In a first aspect, the present application provides a firmware upgrade method, applied to a wireless charging receiving device, the method comprising:
[0012] If an upgrade message for the charging firmware is received during the wireless charging process, the wireless charging receiving device and the wireless charging transmitting device are controlled to continue wireless charging according to a preset original data packet of the charging firmware;
[0013] During the wireless charging process, updating the data packet of the charging firmware pre-stored in the first storage area according to the upgrade data packet of the charging firmware in the upgrade message to upgrade the charging firmware;
[0014] If the charging firmware is successfully upgraded, the wireless charging receiving device and the wireless charging transmitting device are controlled to perform wireless charging according to the upgraded charging firmware in the first storage area.
[0015] Optionally, controlling the wireless charging receiving device and the wireless charging transmitting device to continue wireless charging according to a preset original data packet of the charging firmware includes:
[0016] caching the preset charging boot program in the second storage area;
[0017] The preset charging boot program cached in the second storage area is executed, and according to the preset original data packet in the preset charging boot program, the wireless charging receiving end device and the wireless charging transmitting end device are controlled to continue wireless charging.
[0018] Optionally, after updating the charging firmware data packet pre-stored in the first storage area according to the charging firmware upgrade data packet in the upgrade message during the wireless charging process to upgrade the charging firmware, the method further includes:
[0019] Check whether there is an upgrade success mark;
[0020] If the upgrade success flag is present, determining that the charging firmware upgrade is successful;
[0021] If the upgrade success flag does not exist, it is determined that the charging firmware upgrade has failed.
[0022] Optionally, before detecting whether an upgrade success flag exists, the method further includes:
[0023] Verifying the data packet of the charging firmware and the upgrade data packet in the first storage area;
[0024] If the verification passes, the upgrade success flag is generated.
[0025] Optionally, the method further includes:
[0026] If the charging firmware upgrade fails, controlling the wireless charging receiving device and the wireless charging transmitting device to continue wireless charging according to the backup data packet of the charging firmware pre-stored in the third storage area;
[0027] According to the preset original data packet, re-control the wireless charging receiving end device and the wireless charging transmitting end device to continue wireless charging;
[0028] During the wireless charging process, the data packet of the charging firmware in the first storage area is re-updated according to the upgrade data packet of the charging firmware until the charging firmware is successfully upgraded.
[0029] Optionally, the first storage area and the third storage area are different storage areas in a first memory, and the first memory is a non-volatile memory.
[0030] Optionally, the second storage area is a storage area in a second memory, and the second memory is a random access memory.
[0031] In a second aspect, the present application further provides a firmware upgrade device, which is applied to a wireless charging receiving device, and the device includes:
[0032] a first charging control module configured to, if an upgrade message for the charging firmware is received during the wireless charging process, control the wireless charging receiving device and the wireless charging transmitting device to continue wireless charging according to a preset original data packet of the charging firmware;
[0033] a data packet updating module configured to update the data packet of the charging firmware pre-stored in the first storage area according to the upgrade data packet of the charging firmware in the upgrade message during the wireless charging process, so as to upgrade the charging firmware;
[0034] The second charging control module is configured to control the wireless charging receiving device and the wireless charging transmitting device to perform wireless charging according to the upgraded charging firmware in the first storage area if the charging firmware is successfully upgraded.
[0035] Optionally, the first charging control module includes:
[0036] a cache unit configured to cache the preset charging boot program in the second storage area;
[0037] The charging control unit is configured to execute a preset charging boot program cached in the second storage area, and control the wireless charging receiving device and the wireless charging transmitting device to continue wireless charging according to the preset original data packet in the preset charging boot program.
[0038] Optionally, after the data packet update module, the device further includes:
[0039] A detection module configured to detect whether there is an upgrade success indicator;
[0040] The determination module is configured to determine that the charging firmware upgrade is successful if the upgrade success mark exists; and is also configured to determine that the charging firmware upgrade fails if the upgrade success mark does not exist.
[0041] Optionally, before the detection module, the device further includes:
[0042] a verification module configured to verify the data packet of the charging firmware and the upgrade data packet in the first storage area;
[0043] The generation module is configured to generate the upgrade success identifier if the verification passes.
[0044] Optionally, the device further includes:
[0045] a third charging control module configured to control the wireless charging receiving device and the wireless charging transmitting device to continue wireless charging according to a backup data packet of the charging firmware pre-stored in a third storage area if the charging firmware upgrade fails;
[0046] The first charging control module is further configured to re-control the wireless charging receiving device and the wireless charging transmitting device to continue wireless charging according to the preset original data packet;
[0047] The data packet updating module is further configured to re-update the data packet of the charging firmware in the first storage area according to the upgrade data packet of the charging firmware during the wireless charging process until the charging firmware is successfully upgraded.
[0048] Optionally, the first storage area and the third storage area are different storage areas in a first memory, and the first memory is a non-volatile memory.
[0049] Optionally, the second storage area is a storage area in a second memory, and the second memory is a random access memory.
[0050] In the third aspect, the present application also provides a receiving device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor. When the receiving device is running, the processor and the storage medium communicate through the bus, and the processor executes the program instructions to perform the steps of the firmware upgrade method as described in any one of the first aspects.
[0051] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the firmware upgrade method as described in any one of the first aspects are executed. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0053] FIG1 is a schematic diagram of the structure of a firmware upgrade system provided in an embodiment of the present application;
[0054] FIG2 is a schematic diagram of the structure of a receiving chip provided in an embodiment of the present application;
[0055] FIG3 is a flowchart of a firmware upgrade method according to an embodiment of the present application;
[0056] FIG4 is a second flow chart of the firmware upgrade method provided in an embodiment of the present application;
[0057] FIG5 is a timing diagram of the preset charging boot program sending the original data packet;
[0058] FIG6 is a third flow chart of the firmware upgrade method provided in an embodiment of the present application;
[0059] FIG7 is a fourth flow chart of a firmware upgrade method according to an embodiment of the present application;
[0060] FIG8 is a fifth flow chart of a firmware upgrade method according to an embodiment of the present application;
[0061] FIG9 is a timing diagram of sending a standby data packet;
[0062] FIG10 is a flowchart of a firmware upgrade method according to an embodiment of the present application;
[0063] FIG11 is a schematic diagram of the structure of a firmware upgrade device provided in an embodiment of the present application;
[0064] FIG12 is a schematic diagram of a receiving device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of illustration and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowcharts can be implemented out of sequence, and steps without logical context can be reversed or implemented simultaneously. In addition, those skilled in the art, under the guidance of the contents of this application, can add one or more other operations to the flowchart, or remove one or more operations from the flowchart.
[0066] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.
[0067] In order to enable those skilled in the art to use the contents of this application, the following implementation methods are provided in conjunction with the specific application scenario of "control of shared electric vehicles". For those skilled in the art, the general principles defined herein can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application. Although this application is mainly described around the control of shared electric vehicles, it should be understood that this is only an exemplary embodiment.
[0068] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0069] During the firmware upgrade process of the existing wireless charging receiver chip, it is necessary to use the battery in the wearable device through a reverse power supply circuit to power the receiver chip, or use wired charging to power the receiver chip.
[0070] However, the reverse power supply circuit will increase the size and hardware cost of the wearable device, and the wired charging interface will cause the wearable device to fail to meet the waterproof requirements. For wearable devices without a reverse power supply circuit or a wired charging interface, when using the traditional firmware upgrade method for upgrading, the traditional firmware upgrade method will not send data packets related to the wireless charging protocol during the firmware upgrade. As a result, after the transmitting chip times out when receiving the charging firmware data packet, the transmitting chip will stop transmitting energy to the receiving chip, causing the firmware upgrade to fail.
[0071] Based on this, the present application intends to provide a firmware upgrade method, apparatus, receiving-end device and storage medium, so that when the firmware of the receiving-end chip is upgraded, data packets related to the wireless charging protocol are sent to the transmitting-end chip, so that the transmitting-end chip maintains the transmission energy to the receiving-end chip, ensuring that the firmware upgrade is successful when the wearable device does not have a reverse power supply circuit and a wired interface, saving the system hardware cost of the wearable device, and ensuring that the wearable device can meet the waterproof requirements.
[0072] Please refer to Figure 1, which is a structural diagram of the firmware upgrade system provided in an embodiment of the present application. As shown in Figure 1, the firmware upgrade system includes: a transmitting end device 10 (Tx) and a receiving end device 20 (Rx), wherein the transmitting end device 10 includes: a power adapter 11 (Power Adapter), a transmitting end chip 12 (Tx IC) and a transmitting end coil 13 (Tx Coil), and the receiving end device 20 includes: a receiving end coil 21 (Rx Coil), a first controller 22, a receiving end chip 23 (Rx IC), a charging circuit 24 (Battery Charger) and a rechargeable battery 25 (Battery).
[0073] In this embodiment, the power adapter 11 is used to connect the AC power supply and the transmission end chip 12 to convert the AC power supply into the voltage required by the transmission end chip 12. The transmission end coil 13 and the receiving end coil 21 communicate and transmit energy through electromagnetic induction. The receiving end chip 23 obtains energy through the receiving end coil 21 and converts the received AC power into DC power. The charging circuit 24 controls the charging current and voltage to charge the rechargeable battery 25.
[0074] The first controller 22 is connected to the receiving chip 23, the charging circuit 24 and the rechargeable battery 25 through the I2C (Inter-Integrated Circuit) bus respectively. The first controller 22 controls the receiving chip 23 to upgrade the firmware, and controls the charging circuit 24 and the rechargeable battery 25 to charge based on the charging program in the charging firmware.
[0075] For example, the first controller 22 can be a microcontroller unit (MCU) in a wearable device or an application processor (AP) in a mobile terminal connected to the wearable device for communication, and the second controller 235 can be the MCU in the receiving end chip 23, which is not limited in this embodiment.
[0076] Please refer to Figure 2, which is a structural diagram of the receiving chip provided in an embodiment of the present application. As shown in Figure 2, the receiving chip 23 may at least include: an I2C processing module 231, a first storage area 232, a second storage area 233, a third storage area 234, a second controller 235, and a modulation module 236.
[0077] Among them, the first storage area 232 and the third storage area 234 constitute the first memory, the second storage area 233 constitutes the second memory, the first controller 22 communicates with the first memory, the second memory and the second controller 235 respectively through the I2C processing module 231, and the second controller 235 is also communicated with the first memory, the second memory and the modulation module 236 respectively to obtain data packets and sending timing from the first memory and the second memory, and send the sending timing of the data packet to the modulation module 236, and the modulation module 236 sends the data packet to the transmission end chip according to the sending timing of the data packet.
[0078] Based on the structure of the above-mentioned firmware upgrade system and the receiving-end chip, the firmware upgrade method applied to the receiving-end device provided in the embodiment of the present application is described below.
[0079] Please refer to FIG3 , which is a flowchart of a firmware upgrade method according to an embodiment of the present application. As shown in FIG3 , the method may include:
[0080] S101: If an upgrade message for the charging firmware is received during the wireless charging process, the wireless charging receiving device and the wireless charging transmitting device are controlled to continue wireless charging according to a preset original data packet of the charging firmware.
[0081] In this embodiment, the wireless charging process is to place the receiving device on the transmitting device, bring the receiving coil 21 of the receiving device into contact with the transmitting coil 13 of the transmitting device, and enter the power transfer (PT) stage through electromagnetic induction between the receiving coil 21 and the transmitting coil 13, thereby realizing wireless charging of the transmitting device to the receiving device.
[0082] The receiving coil 21 and transmitting coil 13 enter the PT phase by sending the current data packet of the charging firmware stored in the first storage area of the receiving chip to the transmitting device. The current data packet includes the firmware program corresponding to the full wireless charging protocol and charging control logic. The full wireless charging protocol includes the Qi BPP (Basic Power Profile) wireless charging protocol and a proprietary charging protocol.
[0083] During the wireless charging process, the first controller checks the version of the charging firmware stored in the receiving-end chip to determine whether the receiving-end chip needs to be upgraded.
[0084] In some embodiments, the method for detecting whether the receiving-end chip needs to be upgraded can be: the first controller periodically and proactively obtains the latest charging firmware version of the receiving-end device from the device management server, obtains the current charging firmware version of the receiving-end device, and determines whether the latest charging firmware version and the current charging firmware version are consistent to determine whether the receiving-end chip needs to be upgraded. If the latest charging firmware version is higher than the current charging firmware version, it is determined that the receiving-end chip needs to be upgraded.
[0085] In other embodiments, a method for detecting whether the receiving-end chip needs to be upgraded may be: the first controller receives an upgrade message sent by the device management server, where the upgrade message is used to instruct the first controller to upgrade the charging firmware in the receiving-end chip.
[0086] When it is determined that the charging firmware of the receiving chip needs to be upgraded, the second controller obtains the preset original data packet of the charging firmware. The charging firmware is a firmware program related to the wireless charging protocol and charging control logic. The preset original data packet can be a default data packet corresponding to the firmware program of the receiving chip. For example, it can be a data packet corresponding to the firmware program used by the receiving device when it leaves the factory, or it can be a data packet corresponding to the firmware program currently used by the receiving device for wireless charging.
[0087] In some embodiments, the second controller obtains the preset original data packet of the charging firmware in the following manner: if the preset original data packet is a data packet corresponding to the firmware program used by the receiving device when it leaves the factory, the second controller can obtain the preset original data packet from the device management server, or store the preset original data packet in the storage medium of the first controller to obtain the preset original data packet from the storage medium of the first controller.
[0088] In another embodiment, the second controller obtains the preset original data packet of the charging firmware in the following manner: if the preset original data packet is a data packet corresponding to the firmware program currently used by the receiving device for wireless charging, the second controller can obtain the preset original data packet from the receiving chip.
[0089] After the second controller obtains the preset original data packet of the charging firmware, it modulates the preset original data packet through the modulation module and sends the preset original data packet to the transmitting end device using the first preset timing, so that the receiving end device and the transmitting end device maintain communication and energy transmission according to the preset original data packet. The original data packet includes a control error packet (CEP) and a received power packet (RPP).
[0090] It should be noted that the transmitting device and the receiving device must first establish the wireless charging energy transmission process according to the Qi BPP protocol, and then maintain the energy transmission according to CEP and RPP. That is, the current data packet is the energy transmission establishment data packet, and the original data packet is the energy transmission maintenance data packet.
[0091] S103: During the wireless charging process, the charging firmware data package pre-stored in the first storage area is updated according to the charging firmware upgrade data package in the upgrade message to upgrade the charging firmware.
[0092] In this embodiment, the receiving device and the sending device maintain communication and energy transmission based on a preset original data packet sent using a first preset timing. During this process, the first controller obtains an upgrade data packet of the charging firmware and loads the obtained upgrade data packet into the first storage area in the receiving end chip to update the data packet of the charging firmware pre-stored in the first storage area to an upgrade data packet, thereby completing the upgrade of the charging firmware.
[0093] In some embodiments, the first controller may obtain the upgrade data packet of the charging firmware in the following manner: if the first controller periodically and proactively obtains the latest charging firmware version of the receiving device from the device management server, and determines that the latest charging firmware version is higher than the current charging firmware version, the upgrade data packet corresponding to the latest charging firmware version is obtained from the device management server.
[0094] In other embodiments, the first controller may obtain the upgrade data packet of the charging firmware in the following manner: if the first controller receives an upgrade message sent by the device management server, and the upgrade message carries the upgrade data packet, the first controller may parse the upgrade message to obtain the upgrade data packet.
[0095] S105: If the charging firmware is successfully upgraded, the wireless charging receiving device and the wireless charging transmitting device are controlled to perform wireless charging according to the upgraded charging firmware in the first storage area.
[0096] In this embodiment, after the charging firmware of the receiving-end chip is successfully upgraded, the second controller calls the upgraded charging firmware in the first storage area to run, and sends the upgrade data packet in the upgraded charging firmware to the transmitting-end device through the modulation module, so that the receiving-end device and the transmitting-end device communicate and transmit energy according to the upgrade data packet.
[0097] The firmware upgrade method provided in the above embodiment uses the original data packet to maintain energy transmission between the receiving device and the transmitting device when upgrading the firmware of the receiving chip, and completes the upgrade of the charging firmware while maintaining energy transmission, ensuring that the firmware upgrade is successful when the receiving device does not have a reverse power supply circuit and a wired interface, saving the system hardware cost of the wearable device and ensuring that the wearable device can meet the waterproof requirements.
[0098] A possible implementation of wireless charging according to the preset original charging firmware is described below in conjunction with FIG. 4 and an embodiment.
[0099] Please refer to FIG4 , which is a second flow chart of the firmware upgrade method provided in an embodiment of the present application. As shown in FIG4 , the above-mentioned S101 controls the wireless charging receiving device and the wireless charging transmitting device to continue wireless charging according to the preset original data packet of the charging firmware, which may include:
[0100] S111: Cache the preset charging boot program in the second storage area.
[0101] S112: Execute the preset charging boot program cached in the second storage area, and control the wireless charging receiving device and the wireless charging transmitting device to continue wireless charging according to the preset original data packet in the preset charging boot program.
[0102] In this embodiment, the preset charging bootloader is the default charging protocol and charging control logic used by the receiving device at the factory. The preset charging bootloader includes a preset original data packet corresponding to the charging protocol and charging control logic, as well as a first preset timing for sending the preset original data packet. The first controller writes the preset charging bootloader into the second storage area via the I2C processing module. After successful writing, the second controller starts the preset charging bootloader, obtains the preset original data packet from the preset charging bootloader, and calls the modulation module to send the preset original data packet to the transmitting device according to the first preset timing to maintain energy transmission between the receiving and transmitting devices. If the transmitting device receives the preset original data packet within a preset time, it will continue to send energy to the receiving device's chip. If the transmitting device does not receive the preset original data packet within the preset time, it will stop sending energy to the receiving device's chip.
[0103] For example, please refer to Figure 5, which shows the timing diagram of the preset charging boot program sending the original data packet. As shown in Figure 5, the cycle is executed to ensure energy maintenance by sending multiple CEPs and then sending RPPs. The figure uses the example of sending 7 CEPs and then sending RPPs.
[0104] The firmware upgrade method of the above embodiment is the same as that of the embodiment, which writes a charging boot program into the second storage area to send the original data packet to the transmitting end device according to the charging boot program, so that the transmitting end device can maintain energy transmission with the receiving end device according to the original data packet, completes the upgrade of the charging firmware, and ensures that the firmware upgrade is successful when the receiving end device does not have a reverse power supply circuit and a wired interface, saves the system hardware cost of the wearable device, and ensures that the wearable device can meet the waterproof requirements.
[0105] A possible implementation of detecting whether the charging firmware is successfully upgraded is described below with reference to FIG6 .
[0106] Please refer to FIG6 , which is a flowchart diagram of a third embodiment of the firmware upgrade method provided in the present application. As shown in FIG6 , after updating the charging firmware data packet pre-stored in the first storage area according to the charging firmware upgrade data packet in the upgrade message during the wireless charging process in the above S103 to upgrade the charging firmware, the method may further include:
[0107] S133: Check whether there is an upgrade success flag.
[0108] S134: If there is an upgrade success flag, it is determined that the charging firmware upgrade is successful.
[0109] S135: If there is no upgrade success flag, it is determined that the charging firmware upgrade has failed.
[0110] In this embodiment, after the first controller successfully upgrades the charging firmware in the first storage area, it will write an upgrade success flag in the preset field. In order to determine whether the charging firmware is successfully upgraded, it can be detected whether there is an upgrade success flag in the preset field. If there is an upgrade success flag, it is determined that the charging firmware upgrade is successful. If there is no upgrade success flag, it is determined that the charging firmware upgrade has failed.
[0111] In some embodiments, before each upgrade of the charging firmware, the first controller initializes the preset field to a default value. If the upgrade is successful, the default value is rewritten as an upgrade success flag.
[0112] A possible implementation of generating an upgrade success identifier is described below with reference to FIG. 7 .
[0113] Please refer to FIG. 7 , which is a fourth flow chart of a firmware upgrade method provided in an embodiment of the present application. As shown in FIG. 7 , before detecting whether there is an upgrade success flag in the above-mentioned S133 , the method may further include:
[0114] S131: Verify the data packet of the charging firmware and the upgrade data packet in the first storage area.
[0115] S132: If the verification passes, an upgrade success flag is generated.
[0116] In this embodiment, the first controller updates the data packet of the charging firmware in the first storage area. After the data packet update is completed, the first controller performs a consistency check on the data packet of the charging firmware and the upgrade data packet in the first storage area to determine whether the data packet of the charging firmware and the upgrade data packet are consistent. If the data packet of the charging firmware and the upgrade data packet are consistent, the check passes, and an upgrade success flag is written in the preset field, indicating that the firmware upgrade is successful; if the data packet of the charging firmware and the upgrade data packet are inconsistent, the check fails, and the upgrade success flag is not written in the preset field, indicating that the firmware upgrade has failed.
[0117] In some embodiments, the check method may be a CRC (Cyclic Redundancy Check).
[0118] A possible implementation of an upgrade failure is described below with reference to FIG8 and an embodiment.
[0119] Please refer to FIG8 , which is a flowchart diagram of a firmware upgrade method according to an embodiment of the present application. As shown in FIG8 , the method may further include:
[0120] S201: If the charging firmware upgrade fails, the wireless charging receiving device and the wireless charging transmitting device are controlled to continue wireless charging according to the backup data packet of the charging firmware pre-stored in the third storage area.
[0121] S202: According to the preset original data packet, the wireless charging receiving device and the wireless charging transmitting device are re-controlled to continue wireless charging.
[0122] S203: During the wireless charging process, the charging firmware data package in the first storage area is updated according to the charging firmware upgrade data package until the charging firmware upgrade is successful.
[0123] In this embodiment, a backup charging firmware is pre-stored in the third storage area. The backup charging firmware contains a backup data packet. The backup data packet is a firmware with a basic Qi BPP wireless charging protocol. If the charging firmware upgrade fails, the current data packet of the charging firmware in the first storage area cannot be used to establish energy transmission between the transmitting device and the receiving device. In this case, the backup data packet must be used to re-establish energy transmission between the transmitting device and the receiving device, so that the receiving device enters the PT stage.
[0124] In some embodiments, after the first controller determines that the charging firmware upgrade has failed, it notifies the second controller to call the backup charging firmware in the third storage area to run, modulates the backup data packet in the backup charging firmware through the modulation module, and uses the second preset timing to send the backup data packet to the transmission end chip, so that the receiving end device enters the PT stage.
[0125] It should be noted that, in addition to the first controller notifying the second controller to call the backup charging firmware in the third storage area to run after determining that the charging firmware upgrade has failed, the second controller can also use the same method as the first controller to determine whether the charging firmware upgrade is successful.
[0126] For an example, please refer to Figure 9, which is a timing diagram for sending backup data packets. As shown in Figure 9, before using the backup charging firmware to establish energy transmission, protocol interaction must be established from the beginning. Therefore, after power-on, it is necessary to first send an SSP (Signal Strength Packet), an IDP (Identification Packet), and a CFGP (Configuration Packet). After that, a cycle is executed to send multiple CEPs and then an RPP to ensure energy maintenance. The figure uses the example of sending 7 CEPs and then an RPP.
[0127] After reestablishing energy transmission based on the backup data packet, to ensure a successful firmware upgrade, the energy transmission process must be maintained. Therefore, the original data packet must be re-used to maintain energy transmission between the receiving and transmitting devices. The specific maintenance process and firmware upgrade process are the same as those in S103 and S105 above and will not be repeated here.
[0128] Repeat the above steps S201-S203 until the charging firmware is successfully upgraded.
[0129] In some embodiments, the Qi BPP wireless charging protocol in the standby data packet in the third storage unit is the default wireless charging protocol at the factory, and may also be the same Qi BPP wireless charging protocol as the current data packet in the first storage unit. If the Qi BPP wireless charging protocol in the standby data packet is the same Qi BPP wireless charging protocol as the current data packet in the first storage unit, after the charging firmware in the first storage unit is successfully upgraded, the Qi BPP wireless charging protocol in the standby data packet is updated to the Qi BPP wireless charging protocol in the upgraded charging firmware.
[0130] The firmware upgrade method provided in the above embodiment, when the firmware upgrade fails when the energy transmission is established using the data packet in the first storage unit, the backup data packet in the third storage unit is used to re-establish the energy transmission to ensure that the firmware in the first storage unit can be successfully upgraded.
[0131] It should be noted that in addition to using the backup data packet in the third storage unit to establish energy transmission when the charging firmware upgrade in the first storage unit fails, the backup data packet in the third storage unit can also be used to establish energy transmission when the first storage unit cannot work normally.
[0132] In a possible implementation, the first storage area and the third storage area are different storage areas in a first memory, the first memory is a non-volatile memory, the second storage area is a storage area in a second memory, and the second memory is a random access memory.
[0133] In this embodiment, the first memory is a non-volatile memory (Non-Volatile Memory), which can ensure the security of stored data.
[0134] The first memory is divided into a first storage area and a third storage area, and the spare data packet is stored in the third storage area, which occupies a small storage space, saves the chip storage medium cost, and can ensure the reliability of firmware upgrade.
[0135] For example, the first memory may be an MTP (multi-time program) memory or a Flash memory.
[0136] The second storage area is located in the second memory, which is a static random-access memory (SRAM). During each upgrade, the first controller will rewrite the preset charging boot program in the second memory. After the upgrade is completed, the preset charging boot program in the second memory will be erased.
[0137] Please refer to FIG10, which is a flowchart of a firmware upgrade method provided in an embodiment of the present application. As shown in FIG10, the process may include:
[0138] S301: Place the receiving device on the sending device.
[0139] S302: Run the charging firmware in the first storage area and enter the PT phase.
[0140] S303: The first controller starts a firmware upgrade process.
[0141] S304: The first controller loads the charging boot program into the second storage area.
[0142] S305: The first controller resets the receiving end chip, and the second controller executes the charging boot program to send the original data packet to maintain energy transmission between the receiving end device and the transmitting end device.
[0143] S306: The first controller loads the charging firmware including the upgrade data package into the first storage area.
[0144] S307: The charging firmware is loaded successfully into the first storage area.
[0145] S308: Re-adopt the new charging firmware to establish energy transmission.
[0146] S309: Loading the charging firmware into the first storage area fails.
[0147] S310: The first controller resets the receiving end chip, and the second controller runs the backup charging firmware in the third storage area, re-enters the PT phase, and continues to execute S303 to S306.
[0148] Based on the above method embodiment, the present application also provides a firmware upgrade device for use in a wireless charging receiving device. Please refer to Figure 11, which is a schematic diagram of the structure of the firmware upgrade device provided in the present application embodiment. As shown in Figure 11, the device may include:
[0149] The first charging control module 101 is configured to control the wireless charging receiving device and the wireless charging transmitting device to continue wireless charging according to a preset original data packet of the charging firmware if an upgrade message for the charging firmware is received during the wireless charging process;
[0150] The data packet updating module 102 is configured to update the data packet of the charging firmware pre-stored in the first storage area according to the upgrade data packet of the charging firmware in the upgrade message during the wireless charging process, so as to upgrade the charging firmware;
[0151] The second charging control module 103 is configured to control the wireless charging receiving device and the wireless charging transmitting device to perform wireless charging according to the upgraded charging firmware in the first storage area if the charging firmware is successfully upgraded.
[0152] Optionally, the first charging control module 101 includes:
[0153] a cache unit configured to cache the preset charging boot program in the second storage area;
[0154] The charging control unit is configured to execute a preset charging boot program cached in the second storage area, and control the wireless charging receiving device and the wireless charging transmitting device to continue wireless charging according to a preset original data packet in the preset charging boot program.
[0155] Optionally, after the data packet updating module 102, the apparatus further includes:
[0156] A detection module configured to detect whether there is an upgrade success indicator;
[0157] The determination module is configured to determine that the charging firmware upgrade is successful if an upgrade success mark is present; and is also configured to determine that the charging firmware upgrade fails if an upgrade success mark is not present.
[0158] Optionally, before the detection module, the device further includes:
[0159] a verification module configured to verify the data packet and the upgrade data packet of the charging firmware in the first storage area;
[0160] The generation module is configured to generate an upgrade success mark if the verification passes.
[0161] Optionally, the device further comprises:
[0162] a third charging control module configured to control the wireless charging receiving device and the wireless charging transmitting device to continue wireless charging according to a backup data packet of the charging firmware pre-stored in the third storage area if the charging firmware upgrade fails;
[0163] The first charging control module 101 is further configured to re-control the wireless charging receiving device and the wireless charging transmitting device to continue wireless charging according to the preset original data packet;
[0164] The data packet updating module 102 is further configured to re-update the data packet of the charging firmware in the first storage area according to the upgrade data packet of the charging firmware during the wireless charging process until the charging firmware is successfully upgraded.
[0165] Optionally, the first storage area and the third storage area are different storage areas in a first memory, and the first memory is a non-volatile memory.
[0166] Optionally, the second storage area is a storage area in a second memory, and the second memory is a random access memory.
[0167] The above-mentioned device is used to execute the method provided in the above-mentioned embodiment. Its implementation principle and technical effect are similar and will not be repeated here.
[0168] The above modules can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more microprocessors, or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented by scheduling program code through a processing element, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0169] Please refer to Figure 12, which is a schematic diagram of a receiving device provided in an embodiment of the present application. As shown in Figure 12, receiving device 20 includes: a processor 201, a storage medium 202, and a bus. Storage medium 202 stores program instructions executable by processor 201. When receiving device 20 is running, processor 201 and storage medium 202 communicate via the bus, and processor 201 executes the program instructions to perform the above-mentioned method embodiment. The specific implementation methods and technical effects are similar and will not be repeated here.
[0170] Optionally, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it is used to execute the above method embodiment.
[0171] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0172] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0173] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0174] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (English: Read-Only Memory, abbreviated: ROM), a random access memory (English: Random Access Memory, abbreviated: RAM), a disk or an optical disk, and other media that can store program code.
[0175] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited to them. Any changes or substitutions that can be easily conceived by any person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims. Industrial Applicability
[0176] By adopting the above solution, when upgrading the firmware of the receiving chip, the original data packet is used to maintain the energy transmission between the receiving device and the transmitting device, and the charging firmware is upgraded while the energy transmission is maintained, thereby ensuring that the firmware upgrade is successful when the receiving device does not have a reverse power supply circuit and a wired interface, saving the system hardware cost of the wearable device, and ensuring that the wearable device can meet the waterproof requirements, making it more practical.
Claims
1. A firmware upgrade method, It is characterized in that Applied to a wireless charging receiving device, the method comprises: If an upgrade message for the charging firmware is received during the wireless charging process, the wireless charging receiving device and the wireless charging transmitting device are controlled to continue wireless charging according to a preset original data packet of the charging firmware; During the wireless charging process, updating the data packet of the charging firmware pre-stored in the first storage area according to the upgrade data packet of the charging firmware in the upgrade message, so as to upgrade the charging firmware; If the charging firmware is successfully upgraded, the wireless charging receiving device and the wireless charging transmitting device are controlled to perform wireless charging according to the upgraded charging firmware in the first storage area.
2. The method according to claim 1, It is characterized in that The controlling the wireless charging receiving device and the wireless charging transmitting device to continue wireless charging according to the preset original data packet of the charging firmware includes: caching the preset charging boot program in the second storage area; The preset charging boot program cached in the second storage area is executed, and according to the preset original data packet in the preset charging boot program, the wireless charging receiving end device and the wireless charging transmitting end device are controlled to continue wireless charging.
3. The method according to claim 1, It is characterized in that After updating the data packet of the charging firmware pre-stored in the first storage area according to the upgrade data packet of the charging firmware in the upgrade message during the wireless charging process to upgrade the charging firmware, the method further includes: Check whether there is an upgrade success mark; If the upgrade success mark is present, determining that the charging firmware upgrade is successful; If the upgrade success mark does not exist, it is determined that the charging firmware upgrade has failed.
4. The method according to claim 3, It is characterized in that Before detecting whether there is an upgrade success mark, the method further includes: Verify the data packet of the charging firmware and the upgrade data packet in the first storage area; If the verification passes, the upgrade success mark is generated.
5. The method according to claim 3, It is characterized in that The method further comprises: If the charging firmware upgrade fails, controlling the wireless charging receiving device and the wireless charging transmitting device to continue wireless charging according to the backup data packet of the charging firmware pre-stored in the third storage area; According to the preset original data packet, re-control the wireless charging receiving end device and the wireless charging transmitting end device to continue wireless charging; During the wireless charging process, the data packet of the charging firmware in the first storage area is re-updated according to the upgrade data packet of the charging firmware until the charging firmware is successfully upgraded.
6. The method according to claim 5, It is characterized in that The first storage area and the third storage area are different storage areas in a first memory, and the first memory is a non-volatile memory.
7. The method according to claim 2, It is characterized in that The second storage area is a storage area in a second memory, and the second memory is a random access memory.
8. The method according to claim 2, It is characterized in that The preset charging boot program includes a charging protocol, a preset original data packet corresponding to a charging control logic, and a first preset timing for sending the preset original data packet, and the executing of the preset charging boot program cached in the second storage area, and controlling the wireless charging receiving end device and the wireless charging transmitting end device to continue wireless charging according to the preset original data packet in the preset charging boot program, including: The preset charging boot program is started to run, the preset original data packet is obtained from the preset charging boot program, and the preset original data packet is sent to the transmission end device according to the first preset timing to maintain energy transmission between the receiving end device and the transmission end device.
9. The method according to claim 5, It is characterized in that The step of controlling the wireless charging receiving device and the wireless charging transmitting device to continue wireless charging according to the backup data packet of the charging firmware pre-stored in the third storage area includes: The standby data packet is called to run, and the standby data packet is sent to the transmission end device according to a second preset timing to maintain energy transmission between the receiving end device and the transmission end device.
10. A firmware upgrade system, It is characterized in that The firmware upgrade system includes: a transmission end device and a receiving end device, wherein the transmission end device includes: a power adapter, a transmission end chip and a transmission end coil, and the receiving end device includes: a receiving end coil, a first controller, a receiving end chip, a charging circuit and a rechargeable battery; The power adapter is used to connect the mains power supply and the transmission end chip, the transmission end coil and the receiving end coil communicate and transmit energy through electromagnetic induction, the receiving end chip obtains energy through the receiving end coil, and converts the received alternating current into direct current, and controls the charging current and voltage through the charging circuit to charge the rechargeable battery; The first controller is respectively connected to the receiving end chip, the charging circuit and the rechargeable battery through an I2C bus; The receiving-end device is used to execute the firmware upgrade method as described in any one of claims 1 to 9 above to control the receiving-end chip to perform firmware upgrade.
11. A firmware upgrade device, It is characterized in that Applied to a wireless charging receiving device, the device comprises: A first charging control module, configured to control the wireless charging receiving device and the wireless charging transmitting device to continue wireless charging according to a preset original data packet of the charging firmware if an upgrade message for the charging firmware is received during the wireless charging process; a data packet updating module, configured to update the data packet of the charging firmware pre-stored in the first storage area according to the upgrade data packet of the charging firmware in the upgrade message during the wireless charging process, so as to upgrade the charging firmware; The second charging control module is used to control the wireless charging receiving device and the wireless charging transmitting device to perform wireless charging according to the upgraded charging firmware in the first storage area if the charging firmware is successfully upgraded.
12. The device according to claim 11, It is characterized in that The first charging control module includes: a cache unit configured to cache a preset charging boot program into a second storage area; The charging control unit is configured to execute a preset charging boot program cached in the second storage area, and control the wireless charging receiving device and the wireless charging transmitting device to continue wireless charging according to the preset original data packet in the preset charging boot program.
13. The device according to claim 11, It is characterized in that The device also includes: a third charging control module, configured to control the wireless charging receiving end device and the wireless charging transmitting end device to continue wireless charging according to the backup data packet of the charging firmware pre-stored in the third storage area if the charging firmware upgrade fails; The first charging control module is further configured to re-control the wireless charging receiving end device and the wireless charging transmitting end device to continue wireless charging according to the preset original data packet; The data packet updating module is further configured to re-update the data packet of the charging firmware in the first storage area according to the upgrade data packet of the charging firmware during the wireless charging process until the charging firmware is successfully upgraded.
14. A receiving device, It is characterized in that include: A processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when the receiving device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the steps of the firmware upgrade method as described in any one of claims 1 to 9.
15. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the firmware upgrade method according to any one of claims 1 to 9 are executed.
Citation Information
Patent Citations
System and method for updating firmware in wireless charger
CN110489137A
Firmware upgrading method and device, electronic equipment and storage medium
CN112306534A
Electronic equipment and equipment control method and device
CN112445505A
Firmware upgrading method and device, receiving end equipment and storage medium
CN116185429A
Wireless control method, and apparatus and server adapted to the same
US20160079802A1
