CN110597532A - Data acquisition module, firmware upgrading method thereof and storage medium - Google Patents

Data acquisition module, firmware upgrading method thereof and storage medium Download PDF

Info

Publication number
CN110597532A
CN110597532A CN201910722901.4A CN201910722901A CN110597532A CN 110597532 A CN110597532 A CN 110597532A CN 201910722901 A CN201910722901 A CN 201910722901A CN 110597532 A CN110597532 A CN 110597532A
Authority
CN
China
Prior art keywords
upgrade
upgrading
firmware
data acquisition
acquisition module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910722901.4A
Other languages
Chinese (zh)
Inventor
李镇
傅克文
刘龙
王世泽
林国伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
XIAMEN KECAN INFORMATION TECHNOLOGY Co Ltd
Kehua Hengsheng Co Ltd
Original Assignee
XIAMEN KECAN INFORMATION TECHNOLOGY Co Ltd
Kehua Hengsheng Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by XIAMEN KECAN INFORMATION TECHNOLOGY Co Ltd, Kehua Hengsheng Co Ltd filed Critical XIAMEN KECAN INFORMATION TECHNOLOGY Co Ltd
Priority to CN201910722901.4A priority Critical patent/CN110597532A/en
Publication of CN110597532A publication Critical patent/CN110597532A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a data acquisition module, a firmware upgrading method thereof and a computer readable storage medium, wherein the data acquisition module comprises two APP space blocks and a bootstrap space block in which a bootstrap is stored; the bootstrap program comprises a preset upgrading instruction; the firmware upgrading method comprises the following steps: executing a soft restart instruction to jump into a boot program after receiving an upgrade command; executing a preset upgrading instruction in a boot program so as to overwrite the acquired firmware code of the new version number into a first APP space block; judging whether the upgrade is successful or not after the upgrade is finished through a bootstrap program; if so, overwriting the firmware code in the first APP space block into the second APP space block; and reporting an upgrade ending response message corresponding to the upgrade result. According to the method and the device, batch online upgrading can be realized by using the preset upgrading instruction in the bootstrap program, and redundancy protection is performed on firmware codes by using the two APP space blocks, so that the upgrading efficiency and the product stability are greatly improved.

Description

Data acquisition module, firmware upgrading method thereof and storage medium
Technical Field
The present disclosure relates to the field of firmware upgrading technologies, and in particular, to a data collection module, a firmware upgrading method thereof, and a computer-readable storage medium.
Background
With the development of information technologies such as the internet of things and big data, the data acquisition technology is widely applied. In a modern machine room, various data acquisition modules are used for acquiring and monitoring data of equipment, environment, batteries and the like, and the data acquisition modules of different types have different acquired data, such as temperature and humidity, battery voltage, current and the like. With the continuous use and the updating of the technology, the firmware upgrading of the data acquisition module is often required. The original upgrading method is one-to-one upgrading, and time and energy are consumed in modes of downloading and burning through a PC (personal computer). Later, online upgrade occurs, but the online upgrade in the prior art has poor fault-tolerant capability, once upgrade fails, a program is damaged, online upgrade cannot be performed again, only burn-in by dismantling machine is performed, and data such as original setting parameters and the like are likely to be eliminated by dismantling machine burn-in, so that the data need to be operated again, and the efficiency is low. In view of the above, it is an important need for those skilled in the art to provide a solution to the above technical problems.
Disclosure of Invention
The application aims to provide a data acquisition module, a firmware upgrading method thereof and a computer readable storage medium, so that the upgrading efficiency of the data acquisition module is effectively improved, the workload is simplified, and the problem of equipment unavailability caused by upgrading failure is avoided.
In order to solve the above technical problem, in a first aspect, the present application discloses a firmware upgrading method for a data acquisition module, where the data acquisition module includes two APP space blocks and a boot program space block in which a boot program is stored; the bootstrap program comprises a preset upgrading instruction; the firmware upgrading method comprises the following steps:
executing a soft restart instruction to jump into the boot program after receiving an upgrade command;
executing the preset upgrading instruction in the boot program so as to overwrite the acquired firmware code with the new version number into a first APP space block;
judging whether the upgrade is successful or not after the upgrade is finished through the bootstrap program;
if yes, overwriting the firmware codes in the first APP space block into a second APP space block;
and reporting an upgrade ending response message corresponding to the upgrade result.
Optionally, after the determining, by the bootstrap program, whether the upgrade is successful after the upgrade is finished, the method further includes:
and if not, overwriting the firmware codes in the second APP space block into the first APP space block.
Optionally, overwriting the acquired firmware code with the new version number in the first APP space block includes:
writing the firmware code of the new version number into a main APP space block in an overlaying manner;
or overwriting the firmware code of the new version number into a standby APP space block;
the main APP space block is an APP space block from which the data acquisition module defaults to read firmware codes to run.
Optionally, the executing a soft restart instruction after receiving an upgrade command to jump into the boot program includes:
determining the new version number of the firmware code according to the received upgrade command;
judging whether the new version number is different from the local old version number;
if yes, starting the step of executing the soft restart instruction to jump into the boot program.
Optionally, the executing the preset upgrade instruction includes:
and executing the preset upgrading instruction in the bootstrap program after receiving an upgrading starting command.
Optionally, the executing the preset upgrade instruction in the boot program after receiving an upgrade start command includes:
judging whether the upgrading starting command is received within a preset time length;
if not, exiting the bootstrap program;
if yes, starting the step of executing the preset upgrading instruction in the bootstrap program.
Optionally, the determining whether the upgrade is successful after the upgrade is completed includes:
reading the mark quantity of a preset mark bit; in the execution process of the preset upgrading instruction, if upgrading is overtime or error is reported, the preset mark quantity is set as a first mark quantity; otherwise, setting the preset mark quantity as a second mark quantity;
and judging whether the upgrading is successful according to the read mark quantity.
Optionally, after reporting the upgrade end response message corresponding to the upgrade result, the method further includes:
running a firmware code stored in the main APP space block after the upgrading is finished; the main APP space block is an APP space block from which the data acquisition module defaults to read firmware codes to run.
In a second aspect, the present application further discloses a data acquisition module, including:
a memory for storing a computer program; the computer program comprises a boot program stored in a boot program space block and firmware codes respectively stored in two APP space blocks;
a processor for executing the computer program to implement the steps of any of the above described methods for upgrading firmware of a data collection module.
In a third aspect, the present application further discloses a computer-readable storage medium, in which a computer program is stored, and the computer program is used for implementing the steps of any one of the above methods for upgrading firmware of a data acquisition module when being executed by a processor.
The application provides a firmware upgrading method of a data acquisition module, wherein the data acquisition module comprises two APP space blocks and a bootstrap space block stored with a bootstrap; the bootstrap program comprises a preset upgrading instruction; the firmware upgrading method comprises the following steps: executing a soft restart instruction to jump into the boot program after receiving an upgrade command; executing the preset upgrading instruction in the boot program so as to overwrite the acquired firmware code with the new version number into a first APP space block; judging whether the upgrade is successful or not after the upgrade is finished through the bootstrap program; if yes, overwriting the firmware codes in the first APP space block into a second APP space block; and reporting an upgrade ending response message corresponding to the upgrade result.
Therefore, the method and the device have the advantages that the firmware codes are automatically upgraded on line by using the preset upgrading instructions in the bootstrap program, and can be realized in batch, so that the upgrading efficiency of the data acquisition module is greatly improved, and the workload of related personnel is reduced; in addition, this application utilizes two APP space blocks to carry out redundancy protection to the firmware code, and the single only upgrades the firmware code in one of them APP space block, has effectively avoided the unavailable problem of equipment because of upgrading failure leads to, has greatly improved the stability and the availability of product. The data acquisition module and the computer-readable storage medium provided by the application also have the beneficial effects.
Drawings
In order to more clearly illustrate the technical solutions in the prior art and the embodiments of the present application, the drawings that are needed to be used in the description of the prior art and the embodiments of the present application will be briefly described below. Of course, the following description of the drawings related to the embodiments of the present application is only a part of the embodiments of the present application, and it will be obvious to those skilled in the art that other drawings can be obtained from the provided drawings without any creative effort, and the obtained other drawings also belong to the protection scope of the present application.
Fig. 1 is a flowchart of a firmware upgrading method for a data acquisition module according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a storage space of a data acquisition module disclosed in an embodiment of the present application;
FIG. 3 is a flowchart of a method for upgrading firmware of a data collection module according to an embodiment of the present disclosure;
fig. 4 is a block diagram of a data acquisition module according to an embodiment of the present disclosure.
Detailed Description
The core of the application is to provide a data acquisition module, a firmware upgrading method thereof and a computer readable storage medium, so that the upgrading efficiency of the data acquisition module is effectively improved, the workload is simplified, and the problem of equipment unavailability caused by upgrading failure is avoided.
In order to more clearly and completely describe the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Currently, data acquisition technologies are widely used in the data information era. With the continuous use and the updating of the technology, the firmware upgrading of the data acquisition module is often required. The original upgrading method is one-to-one upgrading, and time and energy are consumed in modes of downloading and burning through a PC (personal computer). Later, online upgrade occurs, but the online upgrade in the prior art has poor fault-tolerant capability, once upgrade fails, a program is damaged, online upgrade cannot be performed again, only burn-in by dismantling machine is performed, and data such as original setting parameters and the like are likely to be eliminated by dismantling machine burn-in, so that the data need to be operated again, and the efficiency is low. In view of this, the present application provides a method for upgrading firmware of a data acquisition module, which can effectively solve the above problems.
Referring to fig. 1, an embodiment of the present application discloses a firmware upgrade method for a data acquisition module, where the data acquisition module includes two APP space blocks and a boot program space block in which a boot program is stored; the bootstrap program comprises a preset upgrading instruction; the firmware upgrading method comprises the following steps:
s101: executing a soft restart instruction to jump into the boot program upon receiving the upgrade command.
Referring to fig. 2, fig. 2 is a schematic view of a storage space of a data acquisition module disclosed in the embodiment of the present application. Specifically, the storage space of the data acquisition module is divided into a plurality of space blocks, including two APP space blocks and a bootstrap space block.
The data acquisition module comprises a plurality of APP space blocks, wherein each APP space block is stored with a firmware code of the data acquisition module, and the data acquisition module can realize application program functions such as data acquisition by running the firmware code. The two APP space blocks are respectively a main APP space block and a standby APP space block, and the data acquisition module is used for reading a firmware program from the main APP space block by default and running the firmware program; the backup APP space block is used for storing a copy of the firmware program in the main APP space block so as to realize fault-tolerant protection.
As the name implies, a boot program is stored in the boot program space block. As will be understood by those skilled in the art, a boot program is a program that automatically runs on a device upon power up to boot and load firmware code to initiate operation of the data collection module. Therefore, after the data acquisition module is powered on and started, the boot program is generally run first, and then the firmware code is loaded and run by using the boot program, so that the function of the data acquisition module is realized.
In addition, the storage space of the data acquisition module may further include a configuration parameter space block, which is used to store the configuration parameters of the data acquisition module for the firmware code to call when running.
It should be noted that, in the embodiment of the present application, the automatic online upgrade of the data acquisition module is specifically implemented by using a preset upgrade instruction. Specifically, the preset upgrade instruction is set in the boot program, so that the data acquisition module can perform firmware upgrade by executing the preset upgrade instruction when the boot program is run.
And when the data acquisition module running the firmware code in the main APP space block receives the upgrading command, the currently running firmware code can be ended by specifically executing the soft restart instruction, and the boot program is jumped to. In view of the fact that the number and the types of the data acquisition modules are possibly more in practical application, the upgrade command can be specifically sent to each data acquisition module in a broadcast mode through a 485 bus and other communication lines.
S102: and executing a preset upgrading instruction in the boot program so as to overwrite the acquired firmware code with the new version number into the first APP space block.
It should be noted that, because the preset upgrade instruction is in the boot program, when the preset upgrade instruction in the boot program is executed, the upgrade operation may be performed on any one of the two APP space blocks, which may be referred to as the first APP space block, that is, the obtained firmware code of the new version number is overwritten into the first APP space block. It is easily understood that, in the overwriting process, the memory contents in the first APP space block may be cleared first, and then the firmware code with the new version number may be written into the first APP space block.
Thus, as a specific embodiment, the first APP space block may specifically be a main APP space block, and accordingly, the second APP space block is a standby APP space block. Or, as another specific embodiment, the first APP space block may also be a spare space block, and accordingly, the second APP space block is the main APP space block. The main APP space block is an APP space block from which the data acquisition module defaults to read firmware codes to run.
Further, as a specific implementation manner, executing the preset upgrade instruction may specifically include: and executing a preset upgrading instruction in the bootstrap program after receiving the upgrading starting command.
That is, in order to prevent signal crosstalk, the present embodiment may wait for the issued upgrade start command after restarting to enter the jump procedure, so as to execute the preset upgrade instruction after receiving the upgrade start command.
S103: judging whether the upgrade is successful or not after the upgrade is finished through a bootstrap program; if yes, the process proceeds to S104.
Whether the upgrade is successful can be judged after the upgrade is finished by running the bootstrap program. If the upgrading is successful, the firmware code in the first APP space block is the firmware code with the new version number, and can be used subsequently and written into another APP space block in an overwriting manner, namely the second APP space block.
Further, as a specific implementation manner, the specifically determining whether the upgrade is successful after the upgrade is completed may include:
reading the mark quantity of a preset mark bit; in the execution process of the preset upgrading instruction, if upgrading is overtime or error is reported, the preset mark quantity is set as a first mark quantity; otherwise, setting the preset mark quantity as a second mark quantity; and judging whether the upgrading is successful according to the read mark quantity.
For example, the first flag amount may be specifically 1, which represents an upgrade failure; the second flag amount may be specifically 2, which represents that the upgrade is successful.
S104: overwriting firmware code in the first APP space block into the second APP space block.
After the upgrade is finished, if the upgrade is judged to be successful by running the bootstrap program, the firmware code in the first APP space block is the firmware code of the new version number, and the second APP space block can be written in a covering mode, so that the redundancy protection of the firmware code is formed.
S105: and reporting an upgrade ending response message corresponding to the upgrade result.
Furthermore, after step 15, the preset flag may be set to a default third flag, for example, 3, to indicate a non-upgrade status.
The embodiment of the application provides a firmware upgrading method for a data acquisition module, wherein the data acquisition module comprises two APP space blocks and a bootstrap space block stored with a bootstrap; the bootstrap program comprises a preset upgrading instruction; the firmware upgrading method comprises the following steps: executing a soft restart instruction to jump into a boot program after receiving an upgrade command; executing a preset upgrading instruction in a boot program so as to overwrite the acquired firmware code of the new version number into a first APP space block; judging whether the upgrade is successful or not after the upgrade is finished through a bootstrap program; if so, overwriting the firmware code in the first APP space block into the second APP space block; and reporting an upgrade ending response message corresponding to the upgrade result.
Therefore, the method and the device have the advantages that the firmware codes are automatically upgraded on line by using the preset upgrading instructions in the bootstrap program, and can be realized in batch, so that the upgrading efficiency of the data acquisition module is greatly improved, and the workload of related personnel is reduced; in addition, this application utilizes two APP space blocks to carry out redundancy protection to the firmware code, and the single only upgrades the firmware code in one of them APP space block, has effectively avoided the unavailable problem of equipment because of upgrading failure leads to, has greatly improved the stability and the availability of product.
Referring to fig. 3, the embodiment of the present application discloses yet another firmware upgrading method for a data acquisition module, where the data acquisition module includes two APP space blocks and a boot program space block in which a boot program is stored; the bootstrap program comprises a preset upgrading instruction; the firmware upgrading method mainly comprises the following steps:
s201: and determining a new version number of the firmware code according to the received upgrade command.
S202: judging whether the new version number is different from the local old version number; if yes, the process proceeds to S203.
Specifically, in order to avoid the blind firmware upgrade, in this embodiment, the new version number specified by the upgrade command may be determined first, and if the new version number is different from the local old version number, the preset upgrade command may be continuously executed.
S203: a soft restart instruction is executed to jump into the boot program.
S204: judging whether an upgrade start command is received within a preset time length; if yes, the process proceeds to S205.
If the upgrade start command is not received for a long time, it is determined that the upgrade command received in step S201 is likely to be the result of signal crosstalk, and the boot program may exit and terminate the upgrade.
Of course, a person skilled in the art can select and set a reasonable value of the preset duration according to the actual application situation, which is not further limited in the present application.
S205: and executing a preset upgrading instruction in the boot program so as to overwrite the acquired firmware code with the new version number into the first APP space block.
S206: judging whether the upgrade is successful or not after the upgrade is finished through a bootstrap program; if yes, entering S207; if not, the process proceeds to S209.
S207: overwriting firmware codes in the first APP space block into the second APP space block; the process proceeds to S208.
Specifically, if the upgrade is successful, the firmware code in the first APP space block is the upgraded, complete and available firmware code, and thus the firmware code in the first APP space block can be copied to the second APP space block for backup, so as to form redundant protection for the firmware code.
S208: reporting an upgrade success response message and a new version number; the process proceeds to S211.
If the upgrade is successful, the upgrade result response message is specifically an upgrade success response message; and simultaneously, the updated new version number can be further reported.
S209: overwriting firmware codes in the second APP space block into the first APP space block; the process proceeds to S210.
Specifically, if the upgrade fails, the firmware code in the first APP space block is the residual code after the upgrade fails and cannot be used, and can be directly deleted. Therefore, the firmware codes in the second APP space block which is not subjected to the upgrading operation can be written into the first APP space block again in an overlaying mode, so that the first APP space block is restored to the state before the upgrading operation is executed and to the usable state, and the stability and the usability of the product are improved.
S210: reporting an upgrade failure response message and an old version number; the process proceeds to S211.
If the upgrade fails, the upgrade result response message is specifically an upgrade failure response message; and meanwhile, the upgraded old version number can be further reported.
S211: and running the firmware code stored by the main APP space block after the upgrading is finished.
The main APP space block is an APP space block from which the data acquisition module defaults to read firmware codes to run.
Referring to fig. 4, an embodiment of the present application discloses a data acquisition module, which mainly includes:
a memory 401 for storing a computer program; the computer program comprises a boot program stored in a boot program space block and firmware codes respectively stored in two APP space blocks;
a processor 402 for executing a computer program to implement the steps of:
executing a soft restart instruction to jump into a boot program after receiving an upgrade command; executing a preset upgrading instruction in a boot program so as to overwrite the acquired firmware code of the new version number into a first APP space block; judging whether the upgrade is successful or not after the upgrade is finished through a bootstrap program; if so, overwriting the firmware code in the first APP space block into the second APP space block; and reporting an upgrade ending response message corresponding to the upgrade result.
For the specific content of the data acquisition module, reference may be made to the detailed description of the firmware upgrading method of the data acquisition module, which is not described herein again.
Therefore, the data acquisition module disclosed by the embodiment of the application realizes automatic online upgrade of firmware codes by using the preset upgrade instruction in the bootstrap program, and can be realized in batch, so that the upgrade efficiency of the data acquisition module is greatly improved, and the workload of related personnel is reduced; in addition, this application utilizes two APP space blocks to carry out redundancy protection to the firmware code, and the single only upgrades the firmware code in one of them APP space block, has effectively avoided the unavailable problem of equipment because of upgrading failure leads to, has greatly improved the stability and the availability of product.
Further, in one embodiment, the computer sub-program stored in the memory 401, when executed by the processor 402, is specifically adapted to implement the steps of: after judging whether the upgrading is successful or not after the upgrading is finished through the bootstrap program, if not, overwriting the firmware codes in the second APP space block into the first APP space block.
Further, in one embodiment, the computer sub-program stored in the memory 401, when executed by the processor 402, is specifically adapted to implement the steps of: writing the firmware code of the new version number into the main APP space block in a covering manner; or overwriting the firmware code of the new version number into the spare APP space block; the main APP space block is an APP space block from which the data acquisition module defaults to read firmware codes to run.
Further, in one embodiment, the computer sub-program stored in the memory 401, when executed by the processor 402, is specifically adapted to implement the steps of: determining a new version number of the firmware code according to the received upgrading command; judging whether the new version number is different from the local old version number; if yes, executing a soft restart instruction to jump into the boot program.
Further, in one embodiment, the computer sub-program stored in the memory 401, when executed by the processor 402, is specifically adapted to implement the steps of: and executing a preset upgrading instruction in the bootstrap program after receiving the upgrading starting command.
Further, in one embodiment, the computer sub-program stored in the memory 401, when executed by the processor 402, is specifically adapted to implement the steps of: judging whether an upgrade start command is received within a preset time length; if not, exiting the bootstrap program; if yes, executing a preset upgrading instruction in the bootstrap program.
Further, in one embodiment, the computer sub-program stored in the memory 401, when executed by the processor 402, is specifically adapted to implement the steps of: reading the mark quantity of a preset mark bit; in the execution process of the preset upgrading instruction, if upgrading is overtime or error is reported, the preset mark quantity is set as a first mark quantity; otherwise, setting the preset mark quantity as a second mark quantity; and judging whether the upgrading is successful according to the read mark quantity.
Further, in one embodiment, the computer sub-program stored in the memory 401, when executed by the processor 402, is specifically adapted to implement the steps of: after reporting an upgrade end response message corresponding to the upgrade result, operating a firmware code stored in the main APP space block after the upgrade is ended; the main APP space block is an APP space block from which the data acquisition module defaults to read firmware codes to run.
Further, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored, and the computer program is used for implementing the steps of any one of the above methods for upgrading firmware of a data acquisition module when being executed by a processor.
For the details of the computer-readable storage medium, reference may be made to the foregoing detailed description of the firmware upgrading method for the data acquisition module, and details thereof are not repeated here.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the equipment disclosed by the embodiment, the description is relatively simple because the equipment corresponds to the method disclosed by the embodiment, and the relevant parts can be referred to the method part for description.
It is further noted that, throughout this document, relational terms such as "first" and "second" are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The technical solutions provided by the present application are described in detail above. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall into the protection scope of the present application.

Claims (10)

1. A firmware upgrading method of a data acquisition module is characterized in that the data acquisition module comprises two APP space blocks and a bootstrap space block stored with a bootstrap; the bootstrap program comprises a preset upgrading instruction; the firmware upgrading method comprises the following steps:
executing a soft restart instruction to jump into the boot program after receiving an upgrade command;
executing the preset upgrading instruction in the boot program so as to overwrite the acquired firmware code with the new version number into a first APP space block;
judging whether the upgrade is successful or not after the upgrade is finished through the bootstrap program;
if yes, overwriting the firmware codes in the first APP space block into a second APP space block;
and reporting an upgrade ending response message corresponding to the upgrade result.
2. The method for upgrading firmware of a data acquisition module according to claim 1, wherein after the determining whether the upgrade is successful after the upgrade is completed by the boot program, the method further comprises:
and if not, overwriting the firmware codes in the second APP space block into the first APP space block.
3. The method for upgrading firmware of a data acquisition module according to claim 1, wherein overwriting the acquired firmware code of the new version number in the first APP space block includes:
writing the firmware code of the new version number into a main APP space block in an overlaying manner;
or overwriting the firmware code of the new version number into a standby APP space block;
the main APP space block is an APP space block from which the data acquisition module defaults to read firmware codes to run.
4. The method for upgrading firmware of a data acquisition module according to claim 1, wherein executing a soft restart instruction to jump into the boot program after receiving an upgrade command comprises:
determining the new version number of the firmware code according to the received upgrade command;
judging whether the new version number is different from the local old version number;
if yes, starting the step of executing the soft restart instruction to jump into the boot program.
5. The method for upgrading firmware of a data acquisition module according to claim 1, wherein the executing the preset upgrade instruction includes:
and executing the preset upgrading instruction in the bootstrap program after receiving an upgrading starting command.
6. The method for upgrading firmware of a data acquisition module on line according to claim 4, wherein the executing the preset upgrade instruction in the boot program after receiving an upgrade start command comprises:
judging whether the upgrading starting command is received within a preset time length;
if not, exiting the bootstrap program;
if yes, starting the step of executing the preset upgrading instruction in the bootstrap program.
7. The method for upgrading firmware of a data acquisition module according to claim 1, wherein the determining whether the upgrade is successful after the upgrade is completed comprises:
reading the mark quantity of a preset mark bit; in the execution process of the preset upgrading instruction, if upgrading is overtime or error is reported, the preset mark quantity is set as a first mark quantity; otherwise, setting the preset mark quantity as a second mark quantity;
and judging whether the upgrading is successful according to the read mark quantity.
8. The method for upgrading firmware of a data acquisition module according to any one of claims 1 to 7, further comprising, after the reporting of an upgrade end response message corresponding to the upgrade result:
running a firmware code stored in the main APP space block after the upgrading is finished; the main APP space block is an APP space block from which the data acquisition module defaults to read firmware codes to run.
9. A data acquisition module, comprising:
a memory for storing a computer program; the computer program comprises a boot program stored in a boot program space block and firmware codes respectively stored in two APP space blocks;
a processor for executing the computer program to implement the steps of the firmware upgrade method of a data acquisition module according to any one of claims 1 to 8.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, is adapted to carry out the steps of the method for upgrading firmware of a data acquisition module according to one of claims 1 to 8.
CN201910722901.4A 2019-08-06 2019-08-06 Data acquisition module, firmware upgrading method thereof and storage medium Pending CN110597532A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910722901.4A CN110597532A (en) 2019-08-06 2019-08-06 Data acquisition module, firmware upgrading method thereof and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910722901.4A CN110597532A (en) 2019-08-06 2019-08-06 Data acquisition module, firmware upgrading method thereof and storage medium

Publications (1)

Publication Number Publication Date
CN110597532A true CN110597532A (en) 2019-12-20

Family

ID=68853620

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910722901.4A Pending CN110597532A (en) 2019-08-06 2019-08-06 Data acquisition module, firmware upgrading method thereof and storage medium

Country Status (1)

Country Link
CN (1) CN110597532A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112040476A (en) * 2020-08-21 2020-12-04 北京三一智农数据技术有限公司 Upgrading method and device for Internet of things terminal
CN112667265A (en) * 2021-01-20 2021-04-16 北京经纬恒润科技股份有限公司 Method and device for updating bootstrap program
CN113051123A (en) * 2019-12-27 2021-06-29 上海微电子装备(集团)股份有限公司 Processor of semiconductor equipment and firmware data acquisition method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1749963A (en) * 2004-09-14 2006-03-22 华为技术有限公司 Upgrading method for Boot software and recovering method for Boot software
EP2993578A1 (en) * 2014-09-02 2016-03-09 Gemalto M2M GmbH Method for adapting firmware of a wireless communication device
CN105404533A (en) * 2015-11-09 2016-03-16 珠海格力电器股份有限公司 Program upgrading method and device
CN106406962A (en) * 2016-09-29 2017-02-15 四川东方电气自动控制工程有限公司 Wind power generation controller failed remote upgrade recovery method based on ARM
CN106569847A (en) * 2016-10-14 2017-04-19 数源科技股份有限公司 Method for realizing IAP remote upgrade through vehicle-mounted system based on mobile network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1749963A (en) * 2004-09-14 2006-03-22 华为技术有限公司 Upgrading method for Boot software and recovering method for Boot software
EP2993578A1 (en) * 2014-09-02 2016-03-09 Gemalto M2M GmbH Method for adapting firmware of a wireless communication device
CN105404533A (en) * 2015-11-09 2016-03-16 珠海格力电器股份有限公司 Program upgrading method and device
CN106406962A (en) * 2016-09-29 2017-02-15 四川东方电气自动控制工程有限公司 Wind power generation controller failed remote upgrade recovery method based on ARM
CN106569847A (en) * 2016-10-14 2017-04-19 数源科技股份有限公司 Method for realizing IAP remote upgrade through vehicle-mounted system based on mobile network

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113051123A (en) * 2019-12-27 2021-06-29 上海微电子装备(集团)股份有限公司 Processor of semiconductor equipment and firmware data acquisition method
CN113051123B (en) * 2019-12-27 2023-12-26 上海微电子装备(集团)股份有限公司 Processor of semiconductor device and firmware data acquisition method
CN112040476A (en) * 2020-08-21 2020-12-04 北京三一智农数据技术有限公司 Upgrading method and device for Internet of things terminal
CN112040476B (en) * 2020-08-21 2023-08-15 北京三一智农数据技术有限公司 Upgrading method and device for terminal of Internet of things
CN112667265A (en) * 2021-01-20 2021-04-16 北京经纬恒润科技股份有限公司 Method and device for updating bootstrap program
CN112667265B (en) * 2021-01-20 2024-05-07 北京经纬恒润科技股份有限公司 Method and device for updating bootstrap program

Similar Documents

Publication Publication Date Title
CN103299276B (en) The software upgrading process of embedded equipment
CN102033790B (en) Method and device for upgrading embedded-type system BOOTROM
CN110597532A (en) Data acquisition module, firmware upgrading method thereof and storage medium
CN102214113B (en) Method, device and terminal for upgrading operating system
CN102073517A (en) Upgrading and backup method and device for embedded system
CN103902399B (en) Software system repair processing method and software system repair processing device
CN110609692A (en) Data acquisition module, firmware upgrading method thereof and storage medium
CN108345464A (en) A kind of the startup method and Android vehicle device of Android system
CN112433739B (en) Firmware upgrading method
CN113032183A (en) System management method, device, computer equipment and storage medium
KR100832269B1 (en) Program update method and system for wireless communication terminal
CN116382753A (en) High-reliability remote upgrading method for equipment firmware based on network
CN116301973A (en) Firmware upgrading method, device, equipment and readable storage medium
CN107436783B (en) Differential upgrading method for mobile terminal, storage medium and mobile terminal
JP2001331379A (en) Method and device for rewriting flash memory update program
CN100484038C (en) Network element version switching method and device
JP2002189609A (en) System and method for updating software adapted to accident
CN117389578A (en) Cloud terminal system upgrading method and device, cloud terminal and storage medium
CN113467797B (en) Program updating method, device and system and computer readable storage medium
CN114546455A (en) MCU software upgrading method and device for double partitions
CN114995852A (en) Equipment upgrading method, equipment and computer readable storage medium
CN114741119A (en) System starting method and device, computer equipment and storage medium
WO2012077604A1 (en) Processing device, program update method, and program
CN113721959A (en) Information processing method and device and electronic equipment
CN114995845A (en) OTA (over the air) upgrading method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20191220