Remote firmware upgrade apparatus and method

CN122816655APending Publication Date: 2026-09-25HEBEI ELECTROMECHANICAL INTEGRATION PILOT BASE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611327765.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-31
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0005]本发明的目的,是要提供一种远程固件升级装置,旨在解决现有技术中无法高效、可靠地对外部目标MCU进行远程程序烧录的问题;

Benefits of technology

(1)本发明的远程固件升级装置独立于待升级的外部目标MCU,通过程序烧录接口与外部目标MCU连接,使得主机厂家无需技术人员到场,即可对已售出设备中的第三方MCU进行远程程序烧录,极大地降低了升级维护的人力与时间成本,提升了响应速度;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122816655A_ABST
    Figure CN122816655A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of computers and discloses a remote firmware upgrading device and method, which comprises an MCU, a WiFi module, an off-chip RAM, a program burning interface, a power control module and a power module; the MCU is in communication connection with a remote server or a terminal device through the WiFi module, receives firmware upgrading data and stores the data in the off-chip RAM; the data is subjected to integrity check before burning; after the check, the MCU performs power-off delay power-on operation on the program burning interface through the power control module to reset an external target MCU to be upgraded; then, the firmware upgrading data in the off-chip RAM is burned to the external target MCU through the program burning interface; after the burning is completed, the program burning interface is controlled to be powered off and restarted again, so that the external target MCU is automatically restarted. As an independent external burning device, the application solves the problem that the third-party MCU in the sold device cannot be reliably and efficiently subjected to remote program upgrading in the prior art and has the advantages of high automation degree and safety and reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer technology and relates to a remote firmware upgrade device and method. Background Technology

[0002] Currently, many microcontrollers, such as STC microcontrollers, primarily rely on dedicated wired download tools provided by the manufacturer for local programming. However, in practical applications, after selling devices to customers, manufacturers often face the need for feature updates or bug fixes, requiring program upgrades for the sold devices. The traditional approach is for manufacturers to send technicians with dedicated download tools to the customer's site to program each device individually. However, this method has drawbacks: firstly, customer sites may be geographically remote, making travel time-consuming and labor-intensive for technicians, resulting in poor upgrade timeliness and an inability to respond promptly to sudden program defects; secondly, when the number of devices to be upgraded is large or widely distributed, the manpower and time costs of on-site upgrades are extremely high.

[0003] Several remote upgrade solutions have been developed, such as the Chinese invention patent with authorization announcement number CN116382745B, which discloses a method and apparatus for firmware loading and upgrading. This solution obtains firmware packages from a remote server through a communication module to achieve remote firmware updates. It mainly targets firmware loading and upgrading between the device's internal main control chip and the communication module. Its core lies in utilizing the communication module's storage area to temporarily store firmware packages when the device supports multiple working modes and requires multiple firmware packages, thus solving the problem of limited storage space in the main control chip. The firmware package is then loaded from the communication module's storage area when the device starts up, enabling the switching of working modes. However, this solution is an embedded self-upgrade solution, meaning the upgrade target is the device's own main control chip or communication module. The device and method are built into the device and cannot be used as an independent, external programming tool for remotely programming already sold products that use third-party microcontrollers. Furthermore, during the upgrade process, the firmware data is usually temporarily stored in the program area or swap storage area inside the main control chip, or relies on the storage area built into the communication module. No independent off-chip RAM is set up for fully receiving firmware data. Once the data transmission is interrupted or the data is incorrect, it may lead to upgrade failure or even the device being unable to start normally.

[0004] Therefore, how to provide a device and method for remotely and reliably upgrading the program of an external target MCU of a sold device has become a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0005] The purpose of this invention is to provide a remote firmware upgrade device, which aims to solve the problem in the prior art that it is impossible to efficiently and reliably remotely program external target MCUs; Another objective of this invention is to provide a remote firmware upgrade method.

[0006] To achieve the above objectives, the technical solution adopted by this invention is as follows: A remote firmware upgrade device includes an MCU, a WiFi module, an external RAM, a program programming interface, a power control module, and a power module; the power output terminal of the power module is connected to the power input terminals of the MCU, the WiFi module, the external RAM, and the power control module, respectively. The communication terminal of the WiFi module is bidirectionally connected to the first communication terminal of the MCU. The WiFi module is used to establish a communication connection with a remote server or terminal device to receive complete firmware upgrade data. The data terminal of the off-chip RAM is bidirectionally connected to the data terminal of the MCU, and the off-chip RAM is used to store firmware upgrade data received by the MCU; The input terminal of the programming interface is connected to the programming terminal of the MCU, the power output terminal of the programming interface is connected to the power terminal of the external target MCU to be upgraded, and the data communication output terminal of the programming interface is connected to the data communication input terminal of the external target MCU. The output terminal of the power control module is connected to the power input terminal of the program burning interface, and the control terminal of the power control module is connected to the first control output terminal of the MCU. The power control module is used to control the power supply of the program burning interface according to the control instructions output by the MCU. The MCU is configured as follows: the MCU receives complete firmware upgrade data via a WiFi module and stores it in external RAM; before programming the external target MCU, the MCU performs data integrity verification on the firmware upgrade data in the external RAM; after successful verification, the MCU powers off the programming interface via the power control module and powers it back on after a first preset time to reset the external target MCU; after resetting, the MCU programs the firmware upgrade data in the external RAM to the external target MCU via the programming interface; after programming the external target MCU is completed, the MCU again powers off the programming interface via the power control module and powers it back on after a second preset time to control the external target MCU to automatically restart.

[0007] As a limitation, the MCU is further configured to: after the MCU passes the data integrity verification of the firmware upgrade data in the external RAM, further verify whether the target MCU model information in the firmware upgrade data is consistent with the model of the external target MCU, and / or verify whether the target unique identity ID information in the firmware upgrade data is consistent with the unique identity ID of the external target MCU.

[0008] As a second limitation, the WiFi module is configured to operate in site mode or soft access point mode; When operating in site mode, the MCU connects to a remote server in a designated wireless network via the WiFi module; When operating in soft access point mode, the MCU creates a wireless access point through the WiFi module for terminal devices to connect to. The terminal devices provide a firmware upgrade operation interface through the built-in web server, which is used to upload or select firmware upgrade data.

[0009] As a third limitation, the remote firmware upgrade device also includes an OLED display module and a USB interface; The input terminal of the OLED display module is connected to the second control output terminal of the MCU, and is used to receive the status display signal and progress display signal output by the MCU, and to display the working status, data download progress and / or burning process information of the remote firmware upgrade device; The communication end of the USB interface is bidirectionally connected to the second communication end of the MCU. The connection end of the USB interface is used to connect to an external host computer. The USB interface is used to receive local firmware burning data sent by the external host computer and transmit it to the MCU.

[0010] The present invention also provides a remote firmware upgrade method, implemented using the aforementioned remote firmware upgrade device, comprising the following steps: S1, the MCU establishes a communication connection with a remote server or terminal device through the WiFi module and receives complete firmware upgrade data; S2, the MCU stores the received firmware upgrade data in off-chip RAM; S3. Before programming the external target MCU, the MCU performs data integrity verification on the firmware upgrade data in the external RAM. S4. After the verification is passed, the MCU turns off the power of the program burning interface through the power control module, and then powers on again after a first preset time to reset the external target MCU connected to the program burning interface. S5. After reset, the MCU will burn the firmware upgrade data in the external RAM to the external target MCU through the program burning interface. S6. After the external target MCU is programmed, the MCU will shut off the power to the programming interface through the power control module again, and then power it back on after a second preset time to control the external target MCU to restart automatically.

[0011] As a limitation, the MCU is further configured to: after the MCU passes the data integrity verification of the firmware upgrade data in the external RAM, further verify whether the target MCU model information in the firmware upgrade data is consistent with the model of the external target MCU, and / or verify whether the target unique identity ID information in the firmware upgrade data is consistent with the unique identity ID of the external target MCU; The steps following step S3 and before step S4 include: A. Verify whether the target MCU model information in the firmware upgrade data matches the model of the external target MCU; and / or B. Verify whether the target unique identity ID information in the firmware upgrade data is consistent with the unique identity ID of the external target MCU; If the above verification step is selected and the verification fails, the burning process will be terminated.

[0012] As a second limitation, the WiFi module is configured to operate in site mode or soft access point mode; When operating in site mode, the MCU connects to a remote server in a designated wireless network via the WiFi module; When operating in soft access point mode, the MCU creates a wireless access point through the WiFi module for terminal devices to connect to. The terminal devices provide a firmware upgrade operation interface through the built-in web server, which is used to upload or select firmware upgrade data. In step S1, the MCU establishes a communication connection with the remote server via the WiFi module in the following ways: The WiFi module is configured in site mode, and the MCU connects to a remote server in a designated wireless network through the WiFi module to establish a communication connection with the remote server; the MCU obtains firmware upgrade data from the remote server in a segmented reception manner; The ways in which the MCU establishes a communication connection with the terminal device via the WiFi module include: The WiFi module is configured as a soft access point, and the MCU creates a wireless access point through the WiFi module. The terminal device connects to the wireless access point and provides a firmware upgrade operation interface through the built-in web server to upload or select firmware upgrade data. The MCU obtains the firmware upgrade data uploaded or selected by the terminal device in a segmented reception manner.

[0013] The present invention, by adopting the above-described technical solution, achieves the following technical advancements compared to existing technologies: (1) The remote firmware upgrade device of the present invention is independent of the external target MCU to be upgraded. It is connected to the external target MCU through the program burning interface, so that the host manufacturer can remotely program the third-party MCU in the sold equipment without the need for technical personnel to be present. This greatly reduces the manpower and time costs of upgrade and maintenance and improves the response speed. (2) The present invention sets up an independent off-chip RAM for receiving and storing firmware upgrade data completely. Before the burning operation is performed, the MCU will first perform data integrity verification on the firmware upgrade data in the off-chip RAM to ensure the correctness of the firmware upgrade data and effectively avoid the risks caused by network transmission interruption or data error. (3) In this invention, the MCU controls the power supply of the program burning interface through the power control module, which can automatically complete the entire process of resetting the external target MCU, burning firmware, and restarting the external target MCU without manual intervention, thus realizing fully automated remote upgrade; (4) In addition to data integrity verification, this invention can further verify the consistency between the target MCU model information and the target unique identity ID information in the firmware upgrade data and the external target MCU, effectively preventing the wrong program from being burned into the mismatched device due to incorrect firmware file selection, and improving the security of operation. (5) By configuring the WiFi module to site mode or soft access point mode, the present invention can automatically obtain firmware upgrade data from a remote server, or allow on-site personnel to directly upload firmware upgrade data via mobile phone or other terminal devices in a network-free environment, which greatly enhances the applicability and flexibility of the device. (6) By setting up an OLED display module, the present invention can display the working status, download and burning progress in real time, which is convenient for local debugging and status monitoring; by setting up a USB interface, the local burning function is retained, and it can be used as a general-purpose burner, making the function more complete.

[0014] In summary, this invention is applicable as an independent external remote programming device for secure, efficient, and automated remote firmware upgrades of various electronic products that use third-party MCUs, whether they have been sold or deployed. It has the advantages of high automation, security and reliability, and adaptability to various network environments. Attached Figure Description

[0015] Figure 1 The diagram shown is a structural block diagram of the remote firmware upgrade device according to Embodiment 1 of the present invention. Detailed Implementation

[0016] To better explain and facilitate understanding of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. Example 1

[0017] like Figure 1 As shown, this embodiment is a remote firmware upgrade device, including an MCU, a WiFi module, an off-chip RAM, an OLED display module, a USB interface, a program burning interface, a power control module, and a power module; the power output terminal of the power module is connected to the power input terminals of the MCU, WiFi module, off-chip RAM, OLED display module, USB interface, and power control module respectively (the power module is not shown in the figure).

[0018] The WiFi module's communication terminal is bidirectionally connected to the MCU's first communication terminal. The WiFi module is used to establish a communication connection with a remote server or terminal device to receive complete firmware upgrade data and output it to the MCU.

[0019] The MCU can set the WiFi module to either site mode or soft access point mode based on preset configuration or external commands. In site mode, the MCU connects to a remote server in a designated wireless network via the WiFi module; the address of the remote server can be modified in real time. In soft access point mode, the MCU creates a wireless access point via the WiFi module. After users connect to this access point using mobile phones or computers, the devices access a firmware upgrade interface provided by a built-in web server, allowing them to upload or select firmware upgrade data. The MCU acquires firmware upgrade data via the WiFi module using a segmented reception method.

[0020] The data terminal of the off-chip RAM is bidirectionally connected to the data terminal of the MCU. The off-chip RAM is used to receive and store the firmware upgrade data output by the MCU, and output the stored firmware upgrade data to the MCU according to the MCU's read instructions.

[0021] The input terminal of the programming interface connects to the programming terminal of the MCU, the power output terminal connects to the power supply terminal of the external target MCU to be upgraded, and the data communication output terminal connects to the data communication input terminal of the external target MCU. The programming interface receives the programming timing signals and firmware upgrade data output by the MCU and then outputs them to the external target MCU. The external target MCU does not have an independent direct power supply. The programming interface is a standard connector (programming socket) with multiple pins.

[0022] The output terminal of the power control module is connected to the power input terminal of the program burning interface, and the control terminal of the power control module is connected to the first control output terminal of the MCU. The power control module is used to control the power supply of the program burning interface according to the control instructions output by the MCU.

[0023] The input terminal of the OLED display module is connected to the second control output terminal of the MCU to receive the status display signal and progress display signal output by the MCU, and to display the working status, data download progress and / or burning process information of the remote firmware upgrade device.

[0024] The USB interface's communication end is bidirectionally connected to the MCU's second communication end. The USB interface's connection end is used to connect to an external host computer, and the USB interface is used to receive local firmware burning data sent by the host computer and transmit it to the MCU.

[0025] In this embodiment, the MCU is configured as follows: the MCU receives complete firmware upgrade data via a WiFi module and stores it in external RAM; before programming the external target MCU, the MCU performs data integrity verification on the firmware upgrade data in the external RAM. After the data integrity verification passes, it further verifies whether the target MCU model information in the firmware upgrade data is consistent with the model of the external target MCU, and / or verifies whether the target unique identification ID information in the firmware upgrade data is consistent with the unique identification ID of the external target MCU; after the verification passes, the MCU powers off the programming interface via the power control module and powers it back on after a first preset time to reset the external target MCU; after resetting, the MCU programs the firmware upgrade data in the external RAM to the external target MCU via the programming interface; after programming the external target MCU is completed, the MCU again powers off the programming interface via the power control module and powers it back on after a second preset time to control the external target MCU to automatically restart. The first preset time and the second preset time both do not exceed 2 seconds. Data integrity verification can be performed using the CRC32 cyclic redundancy check algorithm to verify the firmware upgrade data, ensuring that the received data is consistent with the original firmware upgrade data in the remote server or terminal device. If the data integrity verification, target MCU model information, target unique identification ID information, and consistency verification with the external target MCU fail, the flashing process will be terminated. Example 2

[0026] This embodiment is a remote firmware upgrade method, implemented using the remote firmware upgrade device of Embodiment 1, and includes the following steps: S1. The MCU establishes a communication connection with a remote server or terminal device through the WiFi module and receives complete firmware upgrade data. At this time, the OLED display module will display the current download progress.

[0027] In this step, the MCU establishes a communication connection with the remote server through the WiFi module in the following ways: setting the WiFi module to station mode, the MCU connects to the remote server in the specified wireless network through the WiFi module and establishes a communication connection with the remote server; the MCU obtains the firmware upgrade data from the remote server in a segmented reception manner.

[0028] The MCU establishes a communication connection with the terminal device through the WiFi module in the following ways: the WiFi module is set to soft access point mode, and the MCU creates a wireless access point through the WiFi module; the terminal device connects to the wireless access point and uploads or selects firmware upgrade data through the built-in web server providing a firmware upgrade operation interface; the MCU obtains the firmware upgrade data uploaded or selected by the terminal device in a segmented reception manner.

[0029] S2, the MCU stores the received firmware upgrade data in off-chip RAM.

[0030] S3. Before programming the external target MCU, the MCU performs data integrity verification on the firmware upgrade data in the external RAM. After performing data integrity verification, verify whether the target MCU model information in the firmware upgrade data is consistent with the model of the external target MCU; And / or verify whether the target unique identity ID information in the firmware upgrade data is consistent with the unique identity ID of the external target MCU; If the above verification step is selected and the verification fails, the burning process will be terminated.

[0031] S4. After the verification is successful, the MCU turns off the power of the program burning interface through the power control module, and then turns it back on after a first preset time to reset the external target MCU connected to the program burning interface, so that the external target MCU to be upgraded can be programmed and booted.

[0032] S5. After reset, the program burning stage officially begins. At this time, the OLED display module displays the words "Burning firmware". At the same time, the MCU burns the firmware upgrade data in the external RAM to the external target MCU through the program burning interface.

[0033] S6. After the external target MCU is programmed, the MCU will shut off the power to the programming interface through the power control module again, and then power it back on after a second preset time to control the external target MCU to restart automatically; at the same time, the OLED display module will display the words "programming complete".

[0034] This embodiment can also use a USB interface to connect to an external host computer via a wired connection and be used as a local programmer. This method is consistent with the existing programming method. The local firmware programming data is directly programmed to the external target MCU to be upgraded through the MCU's program programming interface via the programming software of the host computer.

[0035] It should be noted that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art can still modify the technical solutions described in the above embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A remote firmware upgrade device, characterized in that, It includes an MCU, a WiFi module, an external RAM, a programming interface, a power control module, and a power module; the power output terminal of the power module is connected to the power input terminals of the MCU, the WiFi module, the external RAM, and the power control module, respectively. The communication terminal of the WiFi module is bidirectionally connected to the first communication terminal of the MCU. The WiFi module is used to establish a communication connection with a remote server or terminal device to receive complete firmware upgrade data. The data terminal of the off-chip RAM is bidirectionally connected to the data terminal of the MCU, and the off-chip RAM is used to store firmware upgrade data received by the MCU; The input terminal of the programming interface is connected to the programming terminal of the MCU, the power output terminal of the programming interface is connected to the power terminal of the external target MCU to be upgraded, and the data communication output terminal of the programming interface is connected to the data communication input terminal of the external target MCU. The output terminal of the power control module is connected to the power input terminal of the program burning interface, and the control terminal of the power control module is connected to the first control output terminal of the MCU. The power control module is used to control the power supply of the program burning interface according to the control instructions output by the MCU. The MCU is configured to: receive complete firmware upgrade data via a WiFi module and store it in external RAM; before programming the external target MCU, the MCU performs data integrity verification on the firmware upgrade data in the external RAM; after successful verification, the MCU powers off the programming interface via the power control module and powers it back on after a first preset time to reset the external target MCU; after reset, the MCU programs the firmware upgrade data in the external RAM to the external target MCU via the programming interface. After the external target MCU is programmed, the MCU will power off the programming interface again through the power control module and power it back on after a second preset time to control the external target MCU to restart automatically.

2. The remote firmware upgrade device according to claim 1, characterized in that, The MCU is further configured to: after the MCU passes the data integrity verification of the firmware upgrade data in the external RAM, further verify whether the target MCU model information in the firmware upgrade data is consistent with the model of the external target MCU, and / or verify whether the target unique identity ID information in the firmware upgrade data is consistent with the unique identity ID of the external target MCU.

3. The remote firmware upgrade device according to claim 1 or 2, characterized in that, The WiFi module is configured to operate in site mode or soft access point mode. When operating in site mode, the MCU connects to a remote server in a designated wireless network via the WiFi module; When operating in soft access point mode, the MCU creates a wireless access point through the WiFi module for terminal devices to connect to. The terminal devices provide a firmware upgrade operation interface through the built-in web server, which is used to upload or select firmware upgrade data.

4. The remote firmware upgrade device according to claim 1 or 2, characterized in that, The remote firmware upgrade device also includes an OLED display module and a USB interface; The input terminal of the OLED display module is connected to the second control output terminal of the MCU, and is used to receive the status display signal and progress display signal output by the MCU, and to display the working status, data download progress and / or burning process information of the remote firmware upgrade device; The communication end of the USB interface is bidirectionally connected to the second communication end of the MCU, and the connection end of the USB interface is used to connect to an external host computer. The USB interface is used to receive local firmware burning data sent by an external host computer and transmit it to the MCU.

5. A remote firmware upgrade method, implemented using the remote firmware upgrade device according to any one of claims 1 to 4, characterized in that, Includes the following steps: S1, the MCU establishes a communication connection with a remote server or terminal device through the WiFi module and receives complete firmware upgrade data; S2, the MCU stores the received firmware upgrade data in off-chip RAM; S3. Before programming the external target MCU, the MCU performs data integrity verification on the firmware upgrade data in the external RAM. S4. After the verification is passed, the MCU turns off the power of the program burning interface through the power control module, and then powers on again after a first preset time to reset the external target MCU connected to the program burning interface. S5. After reset, the MCU will burn the firmware upgrade data in the external RAM to the external target MCU through the program burning interface. S6. After the external target MCU is programmed, the MCU will shut off the power to the programming interface through the power control module again, and then power it back on after a second preset time to control the external target MCU to restart automatically.

6. The remote firmware upgrade method according to claim 5, characterized in that, The MCU is also configured to: after the MCU passes the data integrity verification of the firmware upgrade data in the off-chip RAM, further verify whether the target MCU model information in the firmware upgrade data is consistent with the model of the external target MCU, and / or verify whether the target unique identity ID information in the firmware upgrade data is consistent with the unique identity ID of the external target MCU. The steps following step S3 and before step S4 include: A. Verify whether the target MCU model information in the firmware upgrade data matches the model of the external target MCU; and / or B. Verify whether the target unique identity ID information in the firmware upgrade data is consistent with the unique identity ID of the external target MCU; If the above verification step is selected and the verification fails, the burning process will be terminated.

7. The remote firmware upgrade method according to claim 5 or 6, characterized in that, The WiFi module is configured to operate in site mode or soft access point mode. When operating in site mode, the MCU connects to a remote server in a designated wireless network via the WiFi module; When operating in soft access point mode, the MCU creates a wireless access point through the WiFi module for terminal devices to connect to. The terminal devices provide a firmware upgrade operation interface through the built-in web server, which is used to upload or select firmware upgrade data. In step S1, the MCU establishes a communication connection with the remote server via the WiFi module in the following ways: The WiFi module is configured in site mode, and the MCU connects to a remote server in a designated wireless network through the WiFi module to establish a communication connection with the remote server; the MCU obtains firmware upgrade data from the remote server in a segmented reception manner; The ways in which the MCU establishes a communication connection with the terminal device via the WiFi module include: The WiFi module is configured as a soft access point, and the MCU creates a wireless access point through the WiFi module. The terminal device connects to the wireless access point and provides a firmware upgrade operation interface through the built-in web server to upload or select firmware upgrade data. The MCU obtains the firmware upgrade data uploaded or selected by the terminal device in a segmented reception manner.

Citation Information

Patent Citations

  • A method and apparatus for firmware loading and upgrading

    CN116382745B