Program upgrading circuit and electronic equipment

Through the cooperation of detection circuit and control circuit, the automation of chip program upgrade is realized, which solves the problems of complex hardware design and high cost in the existing technology and improves convenience and reliability.

CN223401229UActive Publication Date: 2025-09-30INVT POWER ELECTRONICS SUZHOU CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202422448215.1
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-09-30
Estimated Expiration
2034-10-10

AI Technical Summary

Technical Problem

Existing chip program upgrade hardware design is complex, costly and cumbersome to use.

Method used

A program upgrade circuit is provided, wherein a detection circuit responds to an input voltage to output a trigger signal, and a control circuit performs program upgrade based on a wired communication signal, thereby simplifying hardware design and reducing costs.

Benefits of technology

Automatic program upgrades can be achieved without special tools or professional operations, reducing hardware design costs and improving ease of use and circuit reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN223401229U_ABST
    Figure CN223401229U_ABST
Patent Text Reader

Abstract

A program upgrading circuit and an electronic device belong to the technical field of chips, and a detection circuit outputs a trigger signal in response to an input voltage greater than or equal to a preset voltage; the control circuit is used for accessing a wired communication signal and performing program upgrading based on the wired communication signal in response to the trigger signal; when a program needs to be upgraded, an input voltage and a wired communication signal are accessed through the program upgrading interface, the detection circuit outputs a trigger signal when the input voltage is greater than or equal to a preset voltage, and the control circuit performs program upgrading based on the wired communication signal after receiving the trigger signal. Therefore, the program upgrading can be automatically realized without independently setting a dial code or manufacturing a special programming tool and without complex operation of professionals, the hardware design is simplified, the cost is reduced, and the use convenience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of chip technology, and in particular relates to a program upgrade circuit and electronic equipment. Background Art

[0002] Program upgrades are a common occurrence during the development and maintenance of embedded products. To address this need, embedded control chip manufacturers typically integrate a bootloader program into the chip. To support a wider range of program upgrade methods, the bootloader typically monitors external signal status after execution to determine which program upgrade method to use. In specific implementation, after the boot loader is run, it usually enters two working states: the first is the "normal working state", that is, the program is loaded from the non-volatile memory inside or outside the chip and started to run normally, where the non-volatile memory can be a flash memory card, a secure digital (SD) card, a multimedia card (MMC card), etc.; the second is the "program upgrade state", that is, the "upgrade program file" is loaded from the chip peripherals and the "program file" is written to the non-volatile memory inside or outside the chip, where the peripherals are usually communication peripherals, such as: serial communication interface (SCI), serial peripheral interface (SPI), controller area network bus (CAN), universal serial bus (USB), secure digital input and output (SDIO), parallel port, etc.

[0003] Currently, the main approaches to program upgrades include: 1. Adding jumpers or DIP switches on the circuit board to direct the bootloader and enter the "program upgrade state" of the corresponding chip peripherals. 2. Using an external control unit to control the chip to be booted into the appropriate boot mode and enter the "program upgrade state" of the corresponding chip peripherals. The disadvantages of these approaches are that they require specialized programming tools and complex operation by professionals, resulting in high costs, inconvenience, and complex hardware design.

[0004] Therefore, the hardware design of the related program upgrade circuit is complex, costly, and cumbersome to use. Utility Model Content

[0005] The purpose of this application is to provide a program upgrade circuit and electronic equipment, aiming to solve the problems of complex hardware design, high cost and cumbersome use of existing chip program upgrades.

[0006] The embodiment of the present application provides a program upgrade circuit, including:

[0007] a detection circuit, configured to receive an input voltage and output a trigger signal in response to the input voltage being greater than or equal to a preset voltage;

[0008] The control circuit is connected to the detection circuit, and is used to access the wired communication signal and perform program upgrade based on the wired communication signal in response to the trigger signal.

[0009] In one embodiment, the program upgrade circuit further includes:

[0010] a unidirectional conduction circuit, connected to the detection circuit and the control circuit, for conducting unidirectional conduction of the input voltage when the input voltage is connected, and preventing the system voltage from flowing back into the detection circuit;

[0011] The detection circuit is further configured to stop outputting the trigger signal in response to the input voltage being less than the preset voltage;

[0012] The control circuit is further configured to execute a program based on the system voltage in response to stopping of the trigger signal.

[0013] In one embodiment, the program upgrade circuit further includes:

[0014] a voltage conversion circuit, connected to the control circuit, for converting the unidirectionally conducted input voltage and / or the system voltage into the supply voltage to power the control circuit;

[0015] The control circuit is specifically used to access the wired communication signal, respond to the trigger signal, perform program upgrade based on the power supply voltage and the wired communication signal, and respond to the cessation of the trigger signal to run the program based on the power supply voltage.

[0016] In one embodiment, the program upgrade circuit further includes:

[0017] a reset circuit, connected to the voltage conversion circuit, the detection circuit, and the control circuit, configured to charge according to the supply voltage and output a reset signal after a preset time;

[0018] The control circuit is further configured to perform an upgrade based on the power supply voltage and the wired communication signal in response to the reset signal and the trigger signal, and to perform program execution based on the power supply voltage in response to the reset signal.

[0019] In one embodiment, the program upgrade circuit further includes:

[0020] a communication circuit, connected to the control circuit, for receiving the wired communication signal and converting the wired communication signal;

[0021] The control circuit is specifically configured to respond to the trigger signal and perform a program upgrade based on the converted wired communication signal.

[0022] In one embodiment, the program upgrade circuit further includes:

[0023] The first protection circuit is connected to the communication circuit and the control circuit, and is configured to discharge the ESD current in the converted wired communication signal.

[0024] In one embodiment, the program upgrade circuit further includes:

[0025] The second protection circuit is connected to the detection circuit and the control circuit, and is configured to discharge the ESD current in the trigger signal.

[0026] In one embodiment, the detection circuit includes a transistor, a first resistor, a second resistor, a third resistor, and a fourth resistor;

[0027] The first end of the second resistor and the first end of the third resistor serve together as an input voltage input end of the detection circuit to access the input voltage; the second end of the second resistor is connected to the base of the transistor, the first end of the first resistor is connected to the power supply voltage, the second end of the third resistor, the first end of the fourth resistor, the collector of the transistor and the second end of the first resistor serve as a trigger signal output end of the detection circuit, connected to the control circuit and the second protection circuit to output the trigger signal; the second end of the fourth resistor and the emitter of the transistor are connected to the power ground.

[0028] In one embodiment, the control circuit includes a microprocessor;

[0029] The power input terminal of the microprocessor serves as the power supply voltage input terminal of the control circuit, and is connected to the voltage conversion circuit, the detection circuit, the first protection circuit, the second protection circuit and the reset circuit to input the power supply voltage; the first mode controllable terminal of the microprocessor and the second mode controllable terminal of the microprocessor jointly serve as the trigger signal input terminal of the control circuit, and are connected to the detection circuit to input the trigger signal; the reset signal terminal of the microprocessor serves as the reset signal input terminal of the control circuit, and is connected to the reset circuit to input the reset signal; the serial communication interface receiving terminal of the microprocessor serves as the converted wired communication signal input terminal of the control circuit, and is connected to the communication circuit to input the converted wired communication signal; the ground terminal of the microprocessor is connected to the power ground.

[0030] An embodiment of the present application further provides an electronic device, which includes the above-mentioned program upgrade circuit.

[0031] Compared with the prior art, the embodiments of the present application have the following advantages: when the program needs to be upgraded, the input voltage and wired communication signal are connected through the program upgrade interface, the detection circuit outputs a trigger signal when the input voltage is greater than or equal to the preset voltage, and the control circuit upgrades the program based on the wired communication signal after receiving the trigger signal. Therefore, there is no need to set the dial separately or make a special burning tool, and there is no need for professionals to perform complicated operations. The program upgrade can be automatically realized, which simplifies the hardware design, reduces costs, and improves the convenience of use. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical application in the embodiments of the present application, the following will briefly introduce the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0033] Figure 1 A schematic diagram of a program upgrade circuit according to an embodiment of the present application;

[0034] Figure 2 Another structural diagram of a program upgrade circuit provided in one embodiment of the present application;

[0035] Figure 3 Another structural diagram of a program upgrade circuit provided in one embodiment of the present application;

[0036] Figure 4 Another structural diagram of a program upgrade circuit provided in one embodiment of the present application;

[0037] Figure 5Another structural diagram of a program upgrade circuit provided in one embodiment of the present application;

[0038] Figure 6 Another structural diagram of a program upgrade circuit provided in one embodiment of the present application;

[0039] Figure 7 Another structural diagram of a program upgrade circuit provided in one embodiment of the present application;

[0040] Figure 8 A partial exemplary circuit schematic diagram of a program upgrade circuit provided in one embodiment of the present application. DETAILED DESCRIPTION

[0041] In order to make the technical problems, technical solutions and beneficial effects to be solved by this application more clearly understood, this application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0042] It should be noted that when an element is referred to as being “fixed on” or “disposed on” another element, it may be directly on the other element or indirectly on the other element. When an element is referred to as being “connected to” another element, it may be directly connected to the other element or indirectly connected to the other element.

[0043] It should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on this application.

[0044] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. Throughout the description of this application, "plurality" means two or more, unless otherwise specifically defined.

[0045] Figure 1 A schematic diagram of the structure of a program upgrade circuit provided in one embodiment of the present application is shown. For ease of explanation, only the parts related to this embodiment are shown, which are described in detail as follows:

[0046] The program upgrade circuit includes a detection circuit 10 and a control circuit 20 .

[0047] The detection circuit 10 is used to receive an input voltage and output a trigger signal in response to the input voltage being greater than or equal to a preset voltage.

[0048] The control circuit 20 is connected to the detection circuit 10 and is used to access the wired communication signal and perform program upgrade based on the wired communication signal in response to the trigger signal.

[0049] In the specific implementation, the program upgrade interface can be used from the host computer ( Figure 1 Not shown) access to wired communication signals, the program upgrade interface can be SCI, USB interface, SPI, CAN, SDIO, parallel port and network port and other communication peripherals, in actual use according to the microprocessor ( Figure 1 The type of the device (not shown) can be flexibly selected, and this application does not impose any restrictions on this.

[0050] The detection circuit 10 outputs a trigger signal in response to the input voltage being greater than or equal to the preset voltage; the control circuit 20 powers on and starts the loading program, and after detecting the trigger signal, enters the program upgrade state and performs program upgrade based on the wired communication signal.

[0051] The trigger signal may be a level signal with a specified polarity.

[0052] When the program needs to be upgraded, the input voltage and wired communication signal are connected to the host computer through the program upgrade interface. The detection circuit 10 outputs a trigger signal when the input voltage is greater than or equal to the preset voltage. After receiving the trigger signal, the control circuit 20 performs a program upgrade based on the wired communication signal. There is no need to set the dial separately or make a special burning tool, and there is no need for professionals to perform complicated operations. The program upgrade can be automatically realized, thereby reducing costs, improving ease of use, and reducing hardware design costs.

[0053] By way of example and not limitation, Figure 2 As shown, the program upgrade circuit further includes a unidirectional conduction circuit 30 .

[0054] The unidirectional conduction circuit 30 is connected to the detection circuit 10 and the control circuit 20 , and is used to unidirectionally conduct the input voltage when the input voltage is connected, and prevent the system voltage from flowing back to the detection circuit 10 .

[0055] The detection circuit 10 is further configured to stop outputting the trigger signal in response to the input voltage being lower than a preset voltage.

[0056] The control circuit 20 is further configured to execute a program based on the system voltage in response to the cessation of the trigger signal.

[0057] After the upgrade is completed, the program upgrade circuit is disconnected from the host computer, and the program upgrade circuit is powered by the system voltage. Since the unidirectional conduction circuit 30 prevents the system voltage from flowing back to the detection circuit 10, the detection circuit 10 will not output a detection signal based on the system voltage. Therefore, the detection circuit 10 will respond to the input voltage being less than the preset voltage and stop outputting the trigger signal. The control circuit 20 responds to the stop of the trigger signal and runs the program based on the system voltage.

[0058] The unidirectional conduction circuit 30 avoids the situation where the system voltage flows back to the detection circuit 10 when the input voltage is disconnected and the system voltage is supplied, causing the detection circuit 10 to erroneously output a trigger signal, causing the control circuit 20 to continue program upgrades and be unable to run the program. This ensures that the control circuit 20 can run the program when the input voltage is disconnected and the system voltage is supplied, thereby improving the reliability of the circuit.

[0059] By way of example and not limitation, Figure 3 As shown, the program upgrade circuit further includes a voltage conversion circuit 40 .

[0060] The voltage conversion circuit 40 is connected to the control circuit 20 and is used to convert the unidirectionally conducted input voltage and / or system voltage into a supply voltage to supply power to the control circuit 20 .

[0061] The control circuit 20 is specifically used to access the wired communication signal, respond to the trigger signal, perform program upgrade based on the power supply voltage and the wired communication signal, and respond to the cessation of the trigger signal to run the program based on the power supply voltage.

[0062] The voltage conversion circuit 40 may include a low dropout linear regulator.

[0063] During the upgrade, the unidirectional conduction circuit 30 is connected to the input voltage. If the system voltage is connected at this time, the voltage conversion circuit 40 converts the unidirectional conduction input voltage and the system voltage into the power supply voltage to power the control circuit 20. If the system voltage is not connected, the voltage conversion circuit 40 converts the unidirectional conduction input voltage into the power supply voltage to power the control circuit 20. The detection circuit 10 outputs a trigger signal in response to the input voltage being greater than the preset voltage. The control circuit 20 responds to the trigger signal and performs a program upgrade based on the power supply voltage and the wired communication signal.

[0064] After the upgrade is completed, the input voltage and wired communication signal are stopped, the unidirectional conduction circuit 30 reversely cuts off the system voltage, the voltage conversion circuit 40 converts the system voltage into a power supply voltage to power the control circuit 20, the detection circuit 10 stops outputting the trigger signal, and the control circuit 20 responds to the cessation of the trigger signal and runs the program based on the power supply voltage.

[0065] It can be understood that since the control circuit 20 can be powered by the power supply voltage converted from the input voltage, when performing a program upgrade, there is no need to apply strong power to the electronic equipment of the application upgrade circuit. The control circuit 20 can be upgraded only by a low-voltage input voltage (for example, the input voltage can be 5V), thereby reducing the possibility of equipment damage and personal injury during program upgrades and improving the safety of the circuit.

[0066] The input voltage and / or system voltage is converted by the voltage conversion circuit 40 , so that the program upgrade circuit can be applied to a wide voltage range, thereby broadening the applicable scenarios of the program upgrade circuit.

[0067] By way of example and not limitation, Figure 4 As shown, the program upgrade circuit further includes a reset circuit 50 .

[0068] The reset circuit 50 is connected to the voltage conversion circuit 40 and the control circuit 20, and is used to charge according to the supply voltage and output a reset signal after a preset time period.

[0069] The control circuit 20 is further configured to perform an upgrade based on the power supply voltage and the wired communication signal in response to a reset signal and a trigger signal, and to perform program execution based on the power supply voltage in response to a reset signal.

[0070] Among them, the preset duration can be set according to actual needs.

[0071] When the power supply voltage is first connected, the power supply is not stable and the microprocessor in the control circuit 20 ( Figure 4 The trigger signal receiving end level of the microprocessor (not shown) is not stable and has low reliability. At this time, the microprocessor may malfunction based on the unstable level, so a reset circuit 50 is used to put the microprocessor in a reset state. The reset circuit 50 is charged according to the power supply voltage. After a preset period of time, the reset circuit 50 outputs a reset signal, and the microprocessor starts to start from the read-only memory (ROM) inside the chip and runs the loader. After the microprocessor is initialized and configured based on the loader, it detects whether a trigger signal is received. If a trigger signal is received, it is upgraded based on the power supply voltage and the wired communication signal; if no trigger signal is received, the user program is loaded from the non-volatile memory inside the chip and the program is run based on the power supply voltage, thereby reducing the possibility of malfunction of the control circuit 20 and improving the reliability of the program upgrade circuit.

[0072] By way of example and not limitation, Figure 5 As shown, the program upgrade circuit further includes a communication circuit 60 .

[0073] The communication circuit 60 is connected to the control circuit 20 and is used to receive and convert wired communication signals.

[0074] The control circuit 20 is specifically configured to perform a program upgrade based on the converted wired communication signal in response to a trigger signal.

[0075] For example, the wired communication signal can be a USB signal. In this case, if the wired communication signal receiving end of the control circuit 20 is a universal asynchronous receiver / transmitter (UART) port, the communication circuit 60 can be set to include a USB bridge chip, thereby converting the received USB signal into a UART communication signal and outputting it to the control circuit 20 to achieve program upgrade.

[0076] The communication circuit 60 can be connected to different types of interface devices and realize data transmission, making the connection between the program upgrade circuit and the host computer more flexible and convenient.

[0077] By way of example and not limitation, Figure 6 As shown, the program upgrade circuit further includes a first protection circuit 70 .

[0078] The first protection circuit 70 is connected to the communication circuit 60 and the control circuit 20 , and is configured to discharge the ESD current in the converted wired communication signal.

[0079] The ESD current in the wired communication signal is discharged through the first protection circuit 70, thereby protecting the control circuit 20 and further improving the reliability of the program upgrade circuit.

[0080] By way of example and not limitation, Figure 7 As shown, the program upgrade circuit further includes a second protection circuit 80 .

[0081] The second protection circuit 80 is connected to the detection circuit 10 and the control circuit 20 , and is configured to discharge the ESD current in the trigger signal.

[0082] The second protection circuit 80 discharges the ESD current in the trigger signal, thereby protecting the control circuit 20 and further improving the reliability of the program upgrade circuit.

[0083] Figure 8 A partial exemplary circuit structure of a program upgrade circuit provided in an embodiment of the present application is shown. For ease of illustration, only the portion relevant to the embodiment of the present application is shown, as detailed below:

[0084] The detection circuit 10 includes a transistor Q1 , a first resistor R1 , a second resistor R2 , a third resistor R3 , and a fourth resistor R4 .

[0085] The first end of the second resistor R2 and the first end of the third resistor R3 jointly serve as an input voltage input end of the detection circuit 10 to receive the input voltage; the second end of the second resistor R2 is connected to the base of the transistor Q1, and the first end of the first resistor R1 is connected to the power supply voltage. The second end of the third resistor R3, the first end of the fourth resistor R4, the collector of the transistor Q1, and the second end of the first resistor R1 serve as trigger signal output ends of the detection circuit 10, and are connected to the control circuit 20 and the second protection circuit 80 to output a trigger signal; the second end of the fourth resistor R4 and the emitter of the transistor Q1 are connected to the power ground.

[0086] The circuit only includes a transistor Q1 and a resistor element, and has low cost.

[0087] The control circuit 20 includes a microprocessor U1.

[0088] The power input terminal VCC of the microprocessor U1 serves as the power supply voltage input terminal of the control circuit 20, and is connected to the voltage conversion circuit 40, the detection circuit 10, the first protection circuit 70, the second protection circuit 80 and the reset circuit 50 to input the power supply voltage; the first mode controllable terminal MODE0 of the microprocessor U1 and the second mode controllable terminal MODE1 of the microprocessor U1 jointly serve as the trigger signal input terminal of the control circuit 20, and are connected to the detection circuit 10 to input the trigger signal; the reset signal terminal RESET of the microprocessor U1 serves as the reset signal input terminal of the control circuit 20, and is connected to the reset circuit 50 to input the reset signal; the serial communication interface receiving terminal SCI-RX of the microprocessor U1 serves as the converted wired communication signal input terminal of the control circuit 20, and is connected to the communication circuit 60 to input the converted wired communication signal; the ground terminal GND of the microprocessor U1 is connected to the power ground.

[0089] The circuit is simple, reliable and easy to use.

[0090] The unidirectional conducting circuit 30 includes a first diode D1 .

[0091] The anode of the first diode D1 serves as the input voltage input terminal of the unidirectional conducting circuit 30 and is connected to the detection circuit 10 to input the input voltage; the cathode of the first diode D1 serves as the input voltage output terminal of the unidirectional conducting circuit 30 after unidirectional conduction and the system voltage input terminal of the unidirectional conducting circuit 30 and is connected to the voltage conversion circuit 40 to output the input voltage after unidirectional conduction and input the system voltage.

[0092] The reset circuit 50 includes a fifth resistor R5 and a capacitor C1.

[0093] The first end of the fifth resistor R5 serves as the power supply voltage input end of the reset circuit 50, and is connected to the voltage conversion circuit 40, the detection circuit 10, the first protection circuit 70 and the second protection circuit 80 to input the power supply voltage; the second end of the fifth resistor R5 and the first end of the capacitor C1 jointly serve as the reset signal output end of the reset circuit 50, and are connected to the control circuit 20 to output the reset signal; the second end of the capacitor C1 is connected to the power ground.

[0094] The first protection circuit 70 includes a sixth diode D6 and a seventh diode D7.

[0095] The cathode of the sixth diode D6 is connected to the positive bus. The anode of the sixth diode D6 and the cathode of the seventh diode D7 serve as the wired communication signal input end of the first protection circuit 70, and are connected to the control circuit 20 and the communication circuit 60 to input the wired communication signal; the anode of the seventh diode D7 is connected to the negative bus.

[0096] Among them, the positive bus is used to transmit the power supply voltage, and the negative bus is connected to the power ground.

[0097] When the ESD voltage at the wired communication signal input end of the first protection circuit 70 is greater than the power supply voltage, the sixth diode D6 is turned on. At this time, the ESD current in the wired communication signal is discharged to the positive bus through the sixth diode D6. When the ESD voltage at the wired communication signal input end of the first protection circuit 70 is less than the power ground voltage, the seventh diode D7 is turned on. At this time, the ESD current in the wired communication signal is discharged to the negative bus through the seventh diode D7 (it should be noted that the ESD current in the wired communication signal is a negative value at this time).

[0098] The second protection circuit 80 includes a second diode D2 , a third diode D3 , a fourth diode D4 , and a fifth diode D5 .

[0099] The cathode of the second diode D2 and the cathode of the third diode D3 are commonly connected to the positive bus. The anode of the second diode D2, the anode of the third diode D3, the cathode of the fourth diode D4, and the cathode of the fifth diode D5 serve as trigger signal input terminals of the second protection circuit 80, and are connected to the detection circuit 10 and the control circuit 20 to input trigger signals. The anode of the fourth diode D4 and the anode of the fifth diode D5 are connected to the negative bus.

[0100] When the ESD voltage at the trigger signal input end of the second protection circuit 80 is greater than the power supply voltage, the second diode D2 and the third diode D3 are both turned on. At this time, the ESD current in the trigger signal is discharged to the positive bus through the second diode D2 and the third diode D3. When the ESD voltage at the trigger signal input end of the second protection circuit 80 is less than the power ground voltage, the fourth diode D4 and the fifth diode D5 are turned on. At this time, the ESD current in the trigger signal is discharged to the negative bus through the fourth diode D4 and the fifth diode D5 (it should be noted that the ESD current in the trigger signal is a negative value at this time).

[0101] The following is combined with the working principle Figure 8 As shown for further explanation:

[0102] When performing a program upgrade, the positive electrode of the first diode D1, the first end of the second resistor R2, and the first end of the third resistor R3 are connected to the input voltage. The first diode D1 conducts unidirectional conduction to the input voltage, and outputs the unidirectional conducted input voltage from the negative electrode of the first diode D1 to the voltage conversion circuit 40. The voltage conversion circuit 40 converts the unidirectional conducted input voltage into a power supply voltage, and outputs the power supply voltage to the first end of the first resistor R1, the first end of the fifth resistor R5, and the power input terminal VCC of the microprocessor U1. The capacitor C1 is charged, and after a preset time, a reset signal is output from the second end of the fifth resistor R5 and the first end of the capacitor C1 to the reset signal terminal RESET of the microprocessor U1. The microprocessor U1 starts to boot from the internal ROM of the chip, runs the loader, and the microprocessor The device is initialized and configured based on the loader. At the same time, the transistor Q1 is turned on and a low level (i.e., 0) is output from the collector of the transistor Q1 and the second end of the first resistor R1 to the first mode-controllable end MODE0 of the microprocessor U1. The second end of the third resistor R3 and the first end of the fourth resistor R4 jointly output a high level (i.e., 1) to the second mode-controllable end MODE1 of the microprocessor U1. The communication circuit 60 receives the wired communication signal and converts the wired communication signal to output the converted wired communication signal to the serial communication interface receiving end SCI-RX of the microprocessor U1. After the microprocessor U1 is initialized and configured based on the loader, it detects the trigger signal (01) and, in response to the trigger signal, performs an upgrade based on the power supply voltage and the converted wired communication signal.

[0103] When the input voltage and wired communication signal are stopped, the system voltage is connected, the voltage conversion circuit 40 converts the system voltage into the power supply voltage, the transistor Q1 is turned off, the first mode controllable terminal MODE0 of the microprocessor U1 is connected to a high level (i.e., 1), the first mode controllable terminal MODE1 of the microprocessor U1 is connected to a low level (i.e., 0), the capacitor C1 is charged, and after a preset time, a reset signal is output from the second end of the fifth resistor R5 and the first end of the capacitor C1 to the reset signal terminal RESET of the microprocessor U1, the microprocessor U1 starts to start from the internal ROM of the chip and runs the loader. The microprocessor U1 is initialized and configured based on the loader. Afterwards, the microprocessor U1 responds to the stop of the trigger signal and runs the program based on the power supply voltage.

[0104] It should be emphasized that, after the program upgrade is completed, if the input voltage and wired communication signal are directly stopped, the voltage conversion circuit 40 converts the system voltage into the power supply voltage, the transistor Q1 is turned off, the first mode controllable terminal MODE0 of the microprocessor U1 is connected to a high level (i.e. 1), and the first mode controllable terminal MODE1 of the microprocessor U1 is connected to a low level (i.e. 0). The microprocessor U1 responds to the stop of the trigger signal and runs the program based on the power supply voltage.

[0105] An embodiment of the present application further provides an electronic device, which includes the above-mentioned program upgrade circuit.

[0106] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0107] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A program upgrade circuit, characterized in that: include: a detection circuit, configured to receive an input voltage and output a trigger signal in response to the input voltage being greater than or equal to a preset voltage; a control circuit connected to the detection circuit, configured to receive a wired communication signal and, in response to the trigger signal, perform a program upgrade based on the wired communication signal; Wherein, the control circuit includes a microprocessor; the power input terminal of the microprocessor serves as the power supply voltage input terminal of the control circuit, and is connected to the voltage conversion circuit, the detection circuit, the first protection circuit, and the second protection circuit to input the power supply voltage; The first mode controllable end and the second mode controllable end of the microprocessor serve together as the trigger signal input end of the control circuit, and are connected to the detection circuit to input the trigger signal; the serial communication interface receiving end of the microprocessor serves as the converted wired communication signal input end of the control circuit, and is connected to the communication circuit to input the converted wired communication signal; the ground end of the microprocessor is connected to the power ground.

2. The program upgrade circuit according to claim 1, wherein: Also includes: a unidirectional conduction circuit, connected to the detection circuit and the control circuit, for conducting unidirectional conduction of the input voltage when the input voltage is connected, and preventing the system voltage from flowing back into the detection circuit; The detection circuit is further configured to stop outputting the trigger signal in response to the input voltage being less than the preset voltage; The control circuit is further configured to execute a program based on the system voltage in response to stopping of the trigger signal.

3. The program upgrade circuit according to claim 2, wherein: Also includes: a voltage conversion circuit, connected to the control circuit, for converting the unidirectionally conducted input voltage and / or the system voltage into the supply voltage to power the control circuit; The control circuit is specifically used to access the wired communication signal, respond to the trigger signal, perform program upgrade based on the power supply voltage and the wired communication signal, and respond to the cessation of the trigger signal to run the program based on the power supply voltage.

4. The program upgrade circuit according to claim 3, wherein: Also includes: a reset circuit, connected to the voltage conversion circuit, the detection circuit, and the control circuit, configured to charge according to the supply voltage and output a reset signal after a preset time; The control circuit is further configured to perform an upgrade based on the power supply voltage and the wired communication signal in response to the reset signal and the trigger signal, and to perform program execution based on the power supply voltage in response to the reset signal.

5. The program upgrade circuit according to any one of claims 1 to 4, characterized in that: Also includes: a communication circuit, connected to the control circuit, for receiving the wired communication signal and converting the wired communication signal; The control circuit is specifically configured to respond to the trigger signal and perform a program upgrade based on the converted wired communication signal.

6. The program upgrade circuit according to claim 5, wherein: Also includes: The first protection circuit is connected to the communication circuit and the control circuit, and is configured to discharge the ESD current in the converted wired communication signal.

7. The program upgrade circuit according to any one of claims 1 to 4, characterized in that: Also includes: The second protection circuit is connected to the detection circuit and the control circuit, and is configured to discharge the ESD current in the trigger signal.

8. The program upgrade circuit according to claim 1, wherein: The detection circuit includes a transistor, a first resistor, a second resistor, a third resistor and a fourth resistor; The first end of the second resistor and the first end of the third resistor serve together as an input voltage input end of the detection circuit to access the input voltage; the second end of the second resistor is connected to the base of the transistor, the first end of the first resistor is connected to the power supply voltage, the second end of the third resistor, the first end of the fourth resistor, the collector of the transistor and the second end of the first resistor serve as a trigger signal output end of the detection circuit, connected to the control circuit and the second protection circuit to output the trigger signal; the second end of the fourth resistor and the emitter of the transistor are connected to the power ground.

9. The program upgrade circuit according to claim 1, wherein: The microprocessor includes a reset circuit; The power input terminal of the microprocessor is connected to the reset circuit, and the reset signal terminal of the microprocessor serves as the reset signal input terminal of the control circuit and is connected to the reset circuit to input a reset signal.

10. An electronic device, characterized in that: The method comprises the program upgrade circuit according to any one of claims 1 to 9.