Application upgrade method and electronic device
By receiving a restart command from the charging management unit, disconnecting the battery power supply, and switching the VIN pin and TRX pin to conduct, a communication link is established. The upgrade is then performed using the bootloader layer, solving the problem of non-destructive upgrades in existing technologies and enabling flexible upgrades and finished product protection for electronic devices.
Patent Information
- Application Number
- CN202510969463.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-07-15
AI Technical Summary
Existing potting-encapsulated embedded devices cannot be updated via a common path due to software malfunctions, resulting in the scrapping of finished products. Current technologies require destructive disassembly and upgrading.
The charging management unit receives a restart command from the terminal device, disconnects the battery power supply, switches the VIN pin and TRX pin to conduct, establishes a communication link, and uses the bootloader layer to execute application upgrades, avoiding physical disassembly.
It enables application upgrades without physical disassembly, avoids the scrapping of finished products, and improves the maintenance flexibility and reliability of equipment.
Smart Images

Figure CN120492004B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to electronic device program upgrade technology, and more specifically, to an application program upgrade method and an electronic device. Background Technology
[0002] When existing potting-encapsulated embedded devices need repair due to software malfunctions (e.g., application tampering, OTA function defects), firmware updates cannot be performed through a common path. For example, upgrades cannot be performed by triggering physical buttons; upgrades can only be performed by destructively disassembling the device, which may render the finished product unusable. Summary of the Invention
[0003] One object of the present invention is to provide a new technical solution for an application upgrade method.
[0004] According to a first aspect of the present invention, an application upgrade method is provided, applied to an electronic device, the electronic device including a control unit, a charging management unit, and a battery, the method comprising:
[0005] When the charging management unit receives a restart command from the terminal device through the charging interface, the charging management unit disconnects the channel through which the battery supplies power to the control unit;
[0006] When the channel through which the battery supplies power to the control unit is disconnected, and the charging management unit receives a first channel switching command sent by the terminal device, the charging management unit switches the VIN pin and VCC pin to be on, and the VIN pin and TRX pin are both on. The TRX pin is connected to the TX pin and RX pin of the control unit.
[0007] When the channel through which the battery powers the control unit is turned on, the control unit receives application upgrade information through the channel between the VIN pin and the TRX pin when it detects that the VIN pin and the TRX pin are turned on, and performs an upgrade operation based on the application upgrade information using the bootloader layer.
[0008] Optionally, the charging interface of the charging management unit is externally connected to a private protocol conversion device, which is connected to the terminal device. The format of the instructions sent by the terminal device is converted into a format that the charging management unit can recognize by the private protocol conversion device.
[0009] Optionally, the method further includes: when the charging management unit receives a second channel switching instruction sent by the terminal device, the charging management unit switches the VIN pin and TRX pin to be connected to the VIN pin and the VCC pin.
[0010] Optionally, the method further includes: when the charging management unit is connected to an external charging power supply through the charging interface, the charging management unit switches the VIN pin and TRX pin to be connected to the VIN pin and VCC pin.
[0011] Optionally, the VBUS pin of the charging interface of the electronic device is connected to the VIN pin of the charging management unit, and the GND pin of the charging interface is connected to the GND pin of the charging management unit.
[0012] The VBUS and GND pins of the charging interface are both connected to the proprietary protocol conversion device, or the VBUS and GND pins of the charging interface are both connected to the charging power supply.
[0013] Optionally, the method further includes: the control unit sending register values to the charging management unit via a communication interface, so that the charging management unit can be configured based on the register values.
[0014] According to a second aspect of the present invention, an electronic device is provided, comprising a control unit, a charging management unit, and a battery.
[0015] The charging management unit is used to disconnect the battery's power supply channel to the control unit when a restart command is received from the terminal device via the charging interface.
[0016] The charging management unit is also used to switch the VIN pin and VCC pin to be on when the channel through which the battery supplies power to the control unit is disconnected and the charging management unit receives a first channel switching command sent by the terminal device. The VIN pin and TRX pin are both connected to the TX pin and RX pin of the control unit.
[0017] When the channel through which the battery powers the control unit is turned on, the control unit is configured to receive application upgrade information through the channel between the VIN pin and the TRX pin when it detects that the VIN pin and the TRX pin are turned on, and to perform an upgrade operation based on the application upgrade information using the bootloader layer.
[0018] Optionally, the charging interface of the charging management unit is externally connected to a proprietary protocol conversion device, which is connected to the terminal device.
[0019] The proprietary protocol conversion device is used to convert the format of the instructions sent by the terminal device into a format that the charging management unit can recognize.
[0020] Optionally, the charging management unit is further configured to switch the VIN pin and TRX pin to be connected to the VIN pin and VCC pin when receiving a second channel switching command sent by the terminal device.
[0021] Optionally, the charging management unit is further configured to switch the VIN pin and TRX pin to be connected to the VIN pin and VCC pin when an external charging power supply is connected through the charging interface.
[0022] This disclosure provides an application upgrade method. Based on the charging interface of an electronic device, the method receives a restart command and a first channel switching command sent by a terminal device to reset the electronic device and communicate with the terminal device. Then, based on the communication with the terminal device, the method obtains application upgrade information. After the electronic device is reset, it enters the bootloader layer and then uses the bootloader layer to perform an upgrade operation based on the application upgrade information. This method achieves forced software recovery of the potted electronic device without physical disassembly, thus avoiding the scrapping of the finished product.
[0023] The features and advantages of the embodiments of this specification will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0024] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments of this specification and, together with their description, serve to explain the principles of these embodiments.
[0025] Figure 1 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention.
[0026] Figure 2 This is a flowchart illustrating an application upgrade method according to an embodiment of the present invention.
[0027] Figure 3 This is a connection diagram of an electronic device, a proprietary protocol conversion device, and a terminal device according to an embodiment of the present invention.
[0028] Figure 4 This is a flowchart illustrating an electronic device operation monitoring method according to an embodiment of the present invention.
[0029] Figure 5 This is a schematic diagram of a smart ring according to an embodiment of the present invention. Detailed Implementation
[0030] Various exemplary embodiments of this specification will now be described in detail with reference to the accompanying drawings.
[0031] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the embodiments of this specification or their application or use.
[0032] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0033] To address the aforementioned technical issues, this disclosure provides an application upgrade method. The method involves receiving a restart command and a first channel switching command from a terminal device via the charging interface of an electronic device. This resets the electronic device and facilitates communication with the terminal device. Application upgrade information is then obtained based on this communication. After the electronic device is reset, it enters the bootloader layer and performs an upgrade operation based on the application upgrade information. This method eliminates the need for physical disassembly, enabling forced software recovery of the potted electronic device and preventing the product from becoming unusable.
[0034] The application upgrade method disclosed herein is applied to electronic devices. Figure 1 As shown, the electronic device includes a control unit, a charging management unit, and a battery.
[0035] The control unit is the computational control unit of the electronic device. The control unit can be an MCU (Microcontroller Unit). The control unit transmits commands to the charging management unit via the I2C communication interface. Other types of interfaces are also possible.
[0036] The charging management unit is a charging management chip, such as the SY5501. The charging management unit is used to manage the charging process of the battery in an electronic device. Figure 1 As shown, the charging management unit is connected to the battery. The charging management unit is connected to the control unit's VDD pin through the channel between the Vsys pin and the control unit, and controls the battery to supply power to the control unit.
[0037] according to Figure 2 As shown, the application upgrade method in this embodiment includes the following steps S210 to S230.
[0038] In step S210, when the charging management unit receives a restart command sent by the terminal device through the charging interface, the charging management unit disconnects the channel through which the battery supplies power to the control unit.
[0039] This restart command is used to instruct the control unit to restart, that is, to first control the battery to stop supplying power to the control unit, and then control the battery to supply power to the control unit.
[0040] according to Figure 1 As shown, when the charging management unit receives a restart command from the terminal device through the charging interface, the charging management unit disconnects the channel between the Vsys pin and the VDD pin of the control unit, so that the battery no longer supplies power to the control unit before the electronic device restarts.
[0041] In step S220, when the channel for powering the control unit from the battery is disconnected and the charging management unit receives the first channel switching command sent by the terminal device, the charging management unit switches the VIN pin and VCC pin to VIN pin and TRX pin, with the TRX pin connected to the TX pin and RX pin of the control unit.
[0042] according to Figure 1 As shown, the channel between the VIN and VCC pins of the charging management unit is the charging channel for the battery. When the charging management unit does not receive the first channel switching command from the terminal device, the channel between the VIN and VCC pins is in an on state. When the charging management unit receives the first channel switching command from the terminal device, the channel between the VIN and VCC pins is disconnected, and the channel between the VIN and TRX pins is on. The TRX pins are connected to the TX and RX pins of the control unit, thus establishing a communication link between the control unit and the external terminal device.
[0043] The channel between the VIN and VCC pins is mutually exclusive with the channel between the VIN and TRX pins, so only one of the channels can be turned on.
[0044] It should be noted that the control unit sends register values to the charging management unit via the I2C communication interface, enabling the charging management unit to configure itself based on these register values. The register values include charging parameters, including the charging current. Thus, in the event of a fault, such as a power outage or static electricity, the charging management unit can configure itself based on the received register values.
[0045] The control unit cannot control the charging management unit through the communication interface to switch the charging management unit from turning on the VIN pin and VCC pin to turning on the VIN pin and TRX pin.
[0046] In step S230, when the channel for powering the control unit from the battery is turned on, the control unit receives application upgrade information through the channel between the VIN pin and the TRX pin when it detects that the VIN pin and the TRX pin are turned on, and performs an upgrade operation based on the application upgrade information using the bootloader layer.
[0047] A communication link has been established between the control unit and the external terminal device, allowing the external terminal device to send application upgrade information to the control unit through this communication link.
[0048] The battery-powered control unit supply channel is activated, confirming that the electronic device has successfully repowered. Upon successful repowering, the system first enters the bootloader layer, then uses this layer to perform an upgrade based on application upgrade information. The bootloader layer stores the program that guides the application upgrade.
[0049] In some embodiments, the method further includes: upon receiving a second channel switching command from the terminal device, the charging management unit switches the VIN pin and TRX pin to be connected together, or vice versa. This allows the opening and closing of the channel between the TRX pin and VIN pin in the charging management unit to be accomplished via an external terminal device.
[0050] When the terminal device completes the transmission of application upgrade information through the channel between the VIN pin and the TRX pin and the channel between the TRX pin and the RX pin of the control unit, the charging management unit receives the second channel switching command sent by the terminal device and, according to... Figure 1 As shown, the channel between the VIN pin and the TRX pin is open, while the channel between the VIN pin and the VCC pin is open.
[0051] In some embodiments, the method further includes: when the charging management unit is connected to an external charging power supply through the charging interface, the charging management unit switches the VIN pin and TRX pin to be connected to the VIN pin and VCC pin. This allows the channel between the TRX pin and VIN pin in the charging management unit to be disconnected via an external charging power supply, without the need for the intervention of other devices.
[0052] according to Figure 1 As shown, the VBUS pin of the charging interface of the electronic device is connected to the VIN pin of the charging management unit, and the GND pin of the charging interface is connected to the GND pin of the charging management unit. When an external charging power supply is connected to the VBUS pin and GND pin of the charging interface of the electronic device, the charging management unit switches the VIN pin and TRX pin to be on, and the VIN pin and VCC pin to be on.
[0053] In some embodiments, the charging interface of the charging management unit is externally connected to a proprietary protocol conversion device, which is connected to the terminal device. The proprietary protocol conversion device is used to convert the format of the instructions sent by the terminal device into a format that the charging management unit can recognize.
[0054] according to Figure 1 As shown, the VBUS and GND pins of the charging interface of the electronic device can be connected to a proprietary protocol conversion device.
[0055] Specifically, the terminal device sends the first channel switching command to the proprietary protocol conversion device. The proprietary protocol conversion device is used to convert the format of the first channel switching command into a format that the charging management unit can recognize, and then sends the format-converted first channel switching command to the charging management unit, so that the charging management unit switches the VIN pin and VCC pin to VIN pin and TRX pin.
[0056] The first channel switching command received by the proprietary protocol conversion device is a USB signal. The proprietary protocol conversion device is used to convert the USB signal corresponding to the first target command into a TTL signal, and then convert the TTL signal into a signal corresponding to a format recognizable by the charging management unit.
[0057] When the terminal device completes the transmission of application upgrade information through the channel between the VIN and TRX pins and the channel between the TRX pin and the RX pin of the control unit, it sends a second channel switching command to the proprietary protocol conversion device. The proprietary protocol conversion device converts the format of the second channel switching command into a format recognizable by the charging management unit (CMU), and then sends the converted second channel switching command to the CMU, causing the CMU to switch the conduction of the VIN and TRX pins to the VIN and VCC pins.
[0058] The proprietary protocol conversion device receives a USB signal as the second channel switching command. The proprietary protocol conversion device converts the USB signal corresponding to the second channel switching command into a TTL signal, and then converts the TTL signal into a signal in a format recognizable by the charging management unit.
[0059] The application upgrade method provided in this disclosure is described below with reference to a specific embodiment. Figure 3 As shown, the electronic device includes a control unit, a charging management unit, and a battery. The charging interface of the charging management unit is externally connected to a proprietary protocol conversion device. The proprietary protocol conversion device is connected to the terminal device.
[0060] according to Figure 4 As shown, the application upgrade method in this embodiment includes the following steps S401 to S410.
[0061] In step S401, the terminal device sends an electronic device restart command to the private protocol conversion device.
[0062] In step S402, the private protocol conversion device converts the format of the restart command into a format recognizable by the charging management unit, and sends the converted restart command to the charging management unit through the charging interface.
[0063] In step S403, when the charging management unit receives a restart command sent by the terminal device through the charging interface, the charging management unit disconnects the channel through which the battery supplies power to the control unit.
[0064] In step S404, when the channel for powering the control unit by the battery is disconnected, the terminal device sends a first channel switching command to the proprietary protocol conversion device.
[0065] In step S405, the private protocol conversion device converts the format of the first channel switching command into a format recognizable by the charging management unit, and sends the format-converted first channel switching command to the charging management unit through the charging interface.
[0066] In step S406, when the charging management unit receives the first channel switching command, the charging management unit switches the VIN pin and VCC pin to VIN pin and TRX pin, and the TRX pin is connected to the TX pin and RX pin of the control unit.
[0067] In step S407, when the channel for powering the control unit from the battery is turned on, the control unit receives application upgrade information through the channel between the VIN pin and the TRX pin when it detects that the VIN pin and the TRX pin are turned on, and performs an upgrade operation based on the application upgrade information using the bootloader layer.
[0068] In step S408, the terminal device sends the second channel switching command to the private protocol conversion device.
[0069] In step S409, the private protocol conversion device converts the format of the second channel switching command into a format recognizable by the charging management unit, and sends the converted second channel switching command to the charging management unit through the charging interface.
[0070] In step S410, when the charging management unit receives the second channel switching command, the charging management unit switches the VIN pin and TRX pin to VIN pin and VCC pin to be on.
[0071] One embodiment of the present invention provides an electronic device, according to Figure 1As shown, the electronic device includes a control unit, a charging management unit, and a battery.
[0072] The charging management unit is used to disconnect the battery's power supply to the control unit when a restart command is received from the terminal device via the charging interface.
[0073] The charging management unit is also used to switch the VIN pin and VCC pin to VIN pin and TRX pin to be on when the channel for powering the control unit from the battery is disconnected and the charging management unit receives a first channel switching command sent by the terminal device. The TRX pin is connected to the TX pin and RX pin of the control unit.
[0074] When the channel for powering the control unit from the battery is turned on, the control unit is used to receive application upgrade information through the channel between the VIN pin and the TRX pin when it detects that the VIN pin and the TRX pin are turned on, and to perform an upgrade operation based on the application upgrade information using the bootloader layer.
[0075] In some embodiments, the charging interface of the charging management unit is externally connected to a proprietary protocol conversion device, which is connected to the terminal device. The proprietary protocol conversion device is used to convert the format of the instructions sent by the terminal device into a format that the charging management unit can recognize.
[0076] In some embodiments, the charging management unit is further configured to switch the VIN pin and TRX pin to VIN pin and VCC pin to be on when a second channel switching instruction is received from the terminal device.
[0077] In some embodiments, the charging management unit is further configured to switch the VIN pin and TRX pin to be connected to the VIN pin and VCC pin when an external charging power supply is connected through the charging interface.
[0078] In some embodiments, the control unit sends register values to the charging management unit via a communication interface so that the charging management unit can be configured based on the register values.
[0079] This electronic device can be Figure 5 The smart ring shown. The VBUS and GND pins of the smart ring's charging interface can be connected to a proprietary protocol converter, or the VBUS and GND pins of the charging interface can be connected to a charging power source.
[0080] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0081] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0082] Embodiments of this specification may be systems, methods, and / or computer program products. A computer program product may include a computer-readable storage medium having computer instructions stored thereon for causing a processor to implement various aspects of the embodiments of this specification.
[0083] Computer-readable storage media can be tangible devices capable of holding and storing computer instructions for use by computer instruction execution devices. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing computer instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0084] The computer instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper cables, fiber optic cables, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives computer instructions from the network and forwards them to computer-readable storage media within the respective computing / processing device.
[0085] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this specification. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of computer instructions, which contains one or more executable computer instructions for implementing a specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. It will be known to those skilled in the art that implementation in hardware, implementation in software, and implementation using a combination of software and hardware are equivalent.
[0086] Various embodiments of this specification have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. An application upgrade method, characterized in that, Applied to an electronic device, the electronic device including a control unit, a charging management unit, and a battery, the method includes: When the charging management unit receives a restart command sent by the terminal device through the charging interface, the charging management unit disconnects the channel through which the battery supplies power to the control unit, and the restart command is used to instruct the control unit to restart; When the channel through which the battery supplies power to the control unit is disconnected, the charging management unit receives a first channel switching command sent by the terminal device; The charging management unit switches the VIN pin and VCC pin to be on, and the VIN pin and TRX pin are on. The TRX pin is connected to the TX pin and RX pin of the control unit. When the channel through which the battery powers the control unit is activated, and the control unit detects that the VIN pin and the TRX pin are connected, it receives application upgrade information through the channel between the VIN pin and the TRX pin, and performs an upgrade operation based on the application upgrade information using the bootloader layer; wherein, The charging management unit has an external private protocol conversion device connected to its charging interface. The private protocol conversion device is connected to the terminal device, wherein the format of the instructions sent by the terminal device is converted into a format that the charging management unit can recognize by the private protocol conversion device.
2. The method according to claim 1, characterized in that, The method further includes: When the charging management unit receives a second channel switching command sent by the terminal device, the charging management unit switches the VIN pin and TRX pin to be connected, and the VIN pin and VCC pin are connected.
3. The method according to claim 1, characterized in that, The method further includes: When the charging management unit is connected to an external charging power source through the charging interface, the charging management unit switches the VIN pin and TRX pin to be connected to the VIN pin and the VCC pin.
4. The method according to claim 3, characterized in that, The VBUS pin of the charging interface of the electronic device is connected to the VIN pin of the charging management unit, and the GND pin of the charging interface is connected to the GND pin of the charging management unit. The VBUS and GND pins of the charging interface are both connected to the proprietary protocol conversion device, or the VBUS and GND pins of the charging interface are both connected to the charging power supply.
5. The method according to claim 1, characterized in that, The method further includes: The control unit sends register values to the charging management unit via a communication interface, so that the charging management unit can be configured based on the register values.
6. An electronic device, characterized in that, Includes a control unit, a charging management unit, and a battery. The charging management unit is used to disconnect the battery's power supply channel to the control unit when it receives a restart command sent by the terminal device through the charging interface. The restart command is used to instruct the control unit to restart. The charging management unit is also configured to receive a first channel switching command sent by the terminal device when the channel through which the battery supplies power to the control unit is disconnected; The charging management unit is also used to switch the VIN pin and VCC pin to be on, and the VIN pin and TRX pin are both connected to the TX pin and RX pin of the control unit. When the channel through which the battery powers the control unit is turned on, the control unit is used to receive application upgrade information through the channel between the VIN pin and the TRX pin when it detects that the VIN pin and the TRX pin are turned on, and to perform an upgrade operation based on the application upgrade information using the bootloader layer; The charging management unit has an external private protocol conversion device connected to its charging interface. This private protocol conversion device is connected to the terminal device. The proprietary protocol conversion device is used to convert the format of the instructions sent by the terminal device into a format that the charging management unit can recognize.
7. The electronic device according to claim 6, characterized in that, The charging management unit is also used to switch the VIN pin and TRX pin to be connected to the VIN pin and VCC pin when receiving a second channel switching command sent by the terminal device.
8. The electronic device according to claim 6, characterized in that, The charging management unit is also used to switch the VIN pin and TRX pin to be connected to the VIN pin and VCC pin when an external charging power supply is connected through the charging interface.
Citation Information
Patent Citations
Charging device
CN113659663A
Log transmission method and continuous blood glucose monitoring equipment and system
CN120072244A