[go: up one dir, main page]

CN111104138A - Firmware upgrading method and device and computer readable storage medium - Google Patents

Firmware upgrading method and device and computer readable storage medium Download PDF

Info

Publication number
CN111104138A
CN111104138A CN201911287924.3A CN201911287924A CN111104138A CN 111104138 A CN111104138 A CN 111104138A CN 201911287924 A CN201911287924 A CN 201911287924A CN 111104138 A CN111104138 A CN 111104138A
Authority
CN
China
Prior art keywords
firmware
program
data packet
reset
unit
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.)
Withdrawn
Application number
CN201911287924.3A
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201911287924.3A priority Critical patent/CN111104138A/en
Publication of CN111104138A publication Critical patent/CN111104138A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/0757Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs

Landscapes

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

Abstract

本发明实施例公开了一种固件升级方法、装置和计算机可读存储介质,当接收到上位机发送的固件升级指令时,启动用于控制看门狗程序复位的循环等待程序;当预设的初始化程序被运行时,判断看门狗程序是否复位;若看门狗程序未复位,执行预设的应用程序。若看门狗程序复位,判断是否在预设时间内接收到上位机下发的数据包。当未在预设时间内接收到上位机下发的数据包,则执行预设的应用程序。当在预设时间内接收到上位机下发的数据包,则利用数据包对固件执行升级操作。采用独立的看门狗程序触发固件升级操作,有效提高了固件升级的执行效率。并且通过在系统软件程序中增加一个循环等待程序,实现对看门狗程序的复位,极大的降低了软件程序的开发难度。

Figure 201911287924

The embodiments of the present invention disclose a firmware upgrade method, a device and a computer-readable storage medium. When a firmware upgrade instruction sent by a host computer is received, a cyclic waiting program for controlling the reset of a watchdog program is started; When the initialization program is run, it is judged whether the watchdog program is reset; if the watchdog program is not reset, the preset application program is executed. If the watchdog program is reset, it is judged whether the data packet sent by the upper computer is received within the preset time. When the data packet sent by the host computer is not received within the preset time, the preset application program is executed. When a data packet sent by the host computer is received within a preset time, the firmware is upgraded by using the data packet. An independent watchdog program is used to trigger the firmware upgrade operation, which effectively improves the execution efficiency of the firmware upgrade. And by adding a loop waiting program in the system software program, the reset of the watchdog program is realized, which greatly reduces the development difficulty of the software program.

Figure 201911287924

Description

Firmware upgrading method and device and computer readable storage medium
Technical Field
The invention relates to the technical field of cloud computing, in particular to a firmware upgrading method and device and a computer readable storage medium.
Background
An ARM core based 32-bit processor is a microcontroller that is currently in widespread use in the embedded market. The novel embedded type power supply has stable performance, lower power consumption and abundant peripheral equipment, and is very suitable for research and development of embedded devices such as terminals, microcontrollers and the like.
The embedded device, as a device that operates stably for a long time, inevitably encounters a problem of firmware upgrade during use, especially when a user puts new demands on product performance. The common upgrading method of the firmware of the ARM processor is online System upgrading (ISP), and the main means is JLINK upgrading and serial port upgrading.
However, the two upgrading methods have the following problems: (1) a download interface needs to be led out from the circuit board, for example, a JTAG interface or an SWD interface needs to be led out for JLINK upgrade, and a USART interface needs to be led out for serial port upgrade; (2) the downloaders, especially the JLINK downloader, may be purchased at a significant price, perhaps hundreds of dollars; (3) when upgrading the equipment, after-sales personnel are needed to disassemble the shell, update the firmware, assemble and other series of work, the great labor cost is spent, and the efficiency is low.
Therefore, how to improve the efficiency of firmware upgrade is a problem to be solved by those skilled in the art.
Disclosure of Invention
The embodiment of the invention aims to provide a firmware upgrading method, a firmware upgrading device and a computer readable storage medium, which can improve the firmware upgrading efficiency.
To solve the foregoing technical problem, an embodiment of the present invention provides a firmware upgrading method, including:
when a firmware upgrading instruction sent by an upper computer is received, starting a circulating waiting program for controlling the reset of the watchdog program;
when a preset initialization program is operated, judging whether the watchdog program is reset or not;
if the watchdog program is not reset, executing a preset application program;
if the watchdog program is reset, judging whether a data packet sent by the upper computer is received within preset time; if not, executing a preset application program; and if so, utilizing the data packet to execute upgrading operation on the firmware.
Optionally, before the performing an upgrade operation on the firmware by using the data packet, the method further includes:
judging whether the device name carried in the data packet is matched with the device name recorded in the system, whether the firmware version number carried in the data packet is matched with the firmware version number recorded in a preset storage medium, and whether the size of the firmware carried in the data packet is smaller than or equal to the capacity of the storage medium;
if yes, executing the step of executing upgrading operation on the firmware by using the data packet;
if not, judging that the data packet is invalid data, and performing alarm prompt.
Optionally, before the executing the preset application program, the method further includes:
reading firmware information from a preset storage medium, and verifying the firmware information according to a set verification bit;
and executing a preset application program after the firmware information passes the verification.
Optionally, the method further comprises:
and when the firmware information is not verified, displaying prompt information of firmware information failure.
Optionally, when a firmware upgrade instruction sent by the upper computer is received, starting a loop waiting program for controlling reset of the watchdog program includes:
when instruction information sent by an upper computer is received, judging whether the instruction information is a firmware upgrading instruction or not;
if yes, a circular waiting program for controlling the reset of the watchdog program is started.
The embodiment of the invention also provides a firmware upgrading device, which comprises a starting unit, a first judging unit, an executing unit, a second judging unit and an upgrading unit;
the starting unit is used for starting a circulating waiting program for controlling the reset of the watchdog program when receiving a firmware upgrading instruction sent by the upper computer;
the first judging unit is used for judging whether the watchdog program is reset or not when a preset initialization program is operated;
the execution unit is used for executing a preset application program if the watchdog program is not reset;
the second judging unit is used for judging whether a data packet sent by the upper computer is received within a preset time or not if the watchdog program is reset; if not, triggering the execution unit to execute a preset application program; if yes, triggering the upgrading unit;
and the upgrading unit is used for executing upgrading operation on the firmware by using the data packet.
Optionally, the system further comprises a third judging unit and a prompting unit;
the third judging unit is configured to, before the upgrade operation is performed on the firmware by using the data packet, judge whether a device name carried in the data packet matches a device name recorded in a system, whether a firmware version number carried in the data packet matches a firmware version number recorded in a preset storage medium, and whether a size of the firmware carried in the data packet is smaller than or equal to a capacity of the storage medium; if yes, triggering the upgrading unit; if not, triggering the prompting unit;
and the prompting unit is used for judging the data packet as invalid data and carrying out alarm prompting.
Optionally, the system further comprises a verification unit;
the verification unit is used for reading firmware information from a preset storage medium and verifying the firmware information according to a set verification bit; and when the firmware information passes the verification, triggering the execution unit to execute a preset application program.
Optionally, the device further comprises a display unit;
and the display unit is used for displaying prompt information of firmware information failure when the firmware information is not verified.
Optionally, the starting unit is specifically configured to, when receiving instruction information sent by an upper computer, determine whether the instruction information is a firmware upgrade instruction; if yes, a circular waiting program for controlling the reset of the watchdog program is started.
An embodiment of the present invention further provides a firmware upgrading apparatus, including:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the firmware upgrade method as claimed in any one of the above.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the firmware upgrading method according to any one of the above are implemented.
According to the technical scheme, when a firmware upgrading instruction sent by an upper computer is received, a circulating waiting program for controlling the reset of the watchdog program is started; when a preset initialization program is operated, judging whether the watchdog program is reset or not; if the watchdog program is not reset, it indicates that the current initialization program is not operated to implement the firmware upgrade operation, and in order to ensure the normal operation of the system, a preset application program may be executed at this time. If the watchdog program is reset, it indicates that firmware upgrading operation needs to be executed, and at this time, it can be determined whether a data packet sent by the upper computer is received within a preset time. When the data packet sent by the upper computer is not received within the preset time, the reset of the watchdog program caused by the program runaway may occur, the firmware is not upgraded, and the preset application program can be executed at the moment in order to ensure the normal operation of the system. And when the data packet sent by the upper computer is received within the preset time, the data packet is utilized to carry out upgrading operation on the firmware. In the technical scheme, the firmware upgrading operation is triggered by adopting the independent watchdog program, so that the execution efficiency of firmware upgrading is effectively improved. And a cyclic waiting program is added in the system software program, so that the watchdog program is reset, and the development difficulty of the software program is greatly reduced.
Drawings
In order to illustrate the embodiments of the present invention more clearly, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of a firmware upgrading method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a firmware upgrading apparatus according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a hardware structure of a firmware upgrading apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without any creative work belong to the protection scope of the present invention.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Next, a firmware upgrading method provided by an embodiment of the present invention is described in detail. Fig. 1 is a flowchart of a firmware upgrading method according to an embodiment of the present invention, where the method includes:
s101: and when a firmware upgrading instruction sent by the upper computer is received, starting a circulating waiting program for controlling the reset of the watchdog program.
In the embodiment of the invention, the firmware is upgraded by a software deployment mode.
The watchdog program has a set timing time, and when the set timing time is reached and a response message sent by the system is not received, the watchdog program is triggered to reset.
In the embodiment of the invention, in order to reduce the difficulty of software deployment, a loop waiting program can be added in a system software program to reset a watchdog program.
When the system receives a firmware upgrading instruction sent by the upper computer, the loop waiting program can be started, the watchdog program starts timing at the moment, and when the timing time of the watchdog program is reached, the watchdog program can automatically reset.
The system receives the instruction information in various forms, and different types of instruction information are used for executing different operations. In the embodiment of the invention, the specific form of the firmware upgrading instruction can be preset, and when the system receives the instruction information sent by the upper computer, whether the instruction information is the firmware upgrading instruction can be judged; and when the instruction information is a firmware upgrading instruction, starting a loop waiting program for controlling the reset of the watchdog program.
S102: and when the preset initialization program is operated, judging whether the watchdog program is reset or not.
In the embodiment of the present invention, a program for running firmware may be used as an application program, and a preprocessing program for upgrading firmware may be used as an initialization program.
The watchdog program may trigger an initialization program upon reset, at which time the initialization program is run.
Considering that there are many factors that trigger the initialization program in practical applications, when the initialization program is executed, it may not be caused by the reset of the watchdog program. Therefore, when the preset initialization program is executed, it may be further determined whether the watchdog program is reset in order to determine whether the upgrade operation of the firmware needs to be performed.
When the watchdog program is not reset, it indicates that the current initialization program is operated and is not used for implementing the firmware upgrade operation, and in order to ensure the normal operation of the system, S103 may be executed at this time.
When the watchdog program is reset, it indicates that the firmware upgrade operation needs to be performed, and at this time, S104 may be performed.
S103: and executing the preset application program.
S104: and judging whether the data packet sent by the upper computer is received within the preset time.
The value of the preset time can be set according to the time spent by the upper computer for transmitting the data packet, and is not limited herein.
When the firmware upgrading operation needs to be executed, the upper computer issues a corresponding data packet to a system of the lower computer, wherein the data packet is the firmware to be updated.
When the system does not receive the data packet sent by the upper computer within the preset time, the reset of the watchdog program caused by the program runaway may occur, the firmware is not upgraded, and the preset application program can be executed at the moment in order to ensure the normal operation of the system. And when the data packet sent by the upper computer is received within the preset time, S105 is executed.
S105: and performing upgrading operation on the firmware by using the data packet.
The data packet contains the device name corresponding to the firmware. In a specific implementation, the firmware to be upgraded can be determined according to the device name contained in the data packet, so that the firmware information contained in the data packet replaces the original firmware information, and the upgrading operation of the corresponding firmware is completed.
According to the technical scheme, when a firmware upgrading instruction sent by an upper computer is received, a circulating waiting program for controlling the reset of the watchdog program is started; when a preset initialization program is operated, judging whether the watchdog program is reset or not; if the watchdog program is not reset, it indicates that the current initialization program is not operated to implement the firmware upgrade operation, and in order to ensure the normal operation of the system, a preset application program may be executed at this time. If the watchdog program is reset, it indicates that firmware upgrading operation needs to be executed, and at this time, it can be determined whether a data packet sent by the upper computer is received within a preset time. When the data packet sent by the upper computer is not received within the preset time, the reset of the watchdog program caused by the program runaway may occur, the firmware is not upgraded, and the preset application program can be executed at the moment in order to ensure the normal operation of the system. And when the data packet sent by the upper computer is received within the preset time, the data packet is utilized to carry out upgrading operation on the firmware. In the technical scheme, the firmware upgrading operation is triggered by adopting the independent watchdog program, so that the execution efficiency of firmware upgrading is effectively improved. And a cyclic waiting program is added in the system software program, so that the watchdog program is reset, and the development difficulty of the software program is greatly reduced.
In the embodiment of the present invention, the data packet includes information such as a firmware version number and a firmware size in addition to the device name.
In order to ensure smooth execution of firmware upgrade, validity of the data packet may be detected before the firmware is upgraded by the data packet.
Specifically, it may be determined whether the device name carried in the data packet matches the device name recorded in the system, whether the firmware version number carried in the data packet matches the firmware version number recorded in the preset storage medium, and whether the size of the firmware carried in the data packet is smaller than or equal to the capacity of the storage medium.
When the device name carried in the data packet matches with the device name recorded in the system, it indicates that the firmware to be upgraded matches with the device, and at this time, the upgrade operation of the firmware can be executed.
The firmware version number is generally recorded in a digital form, and the higher the value of the number is, the newer the firmware version is. Taking numbers as an example of firmware version numbers, when a firmware upgrade operation is executed, and the firmware version number carried in a data packet is greater than the firmware version number recorded in a preset storage medium, it indicates that the firmware version number carried in the data packet matches the firmware version number recorded in the preset storage medium, and then the upgrade operation of the firmware can be executed.
When the size of the firmware carried in the data packet is smaller than or equal to the capacity of the storage medium, the upgrading operation of the firmware can be realized.
Therefore, when the device name carried in the packet matches the device name recorded in the system, the firmware version number carried in the packet matches the firmware version number recorded in the preset storage medium, and the firmware size carried in the packet is smaller than or equal to the capacity of the storage medium, the step of performing the upgrade operation on the firmware using the packet is performed.
When the device name carried in the data packet is not matched with the device name recorded in the system, or the firmware version number carried in the data packet is not matched with the firmware version number recorded in the preset storage medium, or the size of the firmware carried in the data packet is larger than the capacity of the storage medium, the upgrading operation of the firmware cannot be realized, at this moment, the data packet can be judged to be invalid data, and an alarm prompt is carried out.
By detecting the validity of the data packet, smooth execution of firmware upgrading operation can be guaranteed by the maximum program. When the data packet fails to pass the validity detection, the user can conveniently find and solve the problem in time by carrying out the alarm prompt, and the influence of the wrong data packet on the upgrading of the system firmware is reduced.
When the firmware information has problems, errors can occur in system operation, and when the firmware information is serious, the system can be crashed. Therefore, before executing the preset application program, the firmware information can be read from the preset storage medium and verified according to the set verification bits; and executing the preset application program after the firmware information passes the verification.
In a specific implementation, a Cyclic Redundancy Check (CRC) mode may be used to Check the correctness of the firmware information.
It is assumed that the firmware information is 20-bit data information, the first 18 bits are set as valid data in the CRC check, and the last two bits are set as check bit data. After the firmware information is read from the preset storage medium, the verification data can be calculated according to the first 18 bits of valid data of the firmware information, and when the calculated verification data is consistent with the last two bits of data of the firmware information read from the storage medium, it indicates that the firmware information read from the storage medium is not modified, and at this time, the preset application program can be executed.
In the embodiment of the invention, when the firmware information is not verified, prompt information of firmware information failure can be displayed, so that a user can replace or modify the failed firmware information in time.
By checking the firmware information, the correctness of the firmware information can be effectively ensured, so that the application program is ensured to call the correct firmware information, and the stability and the safety of system operation are ensured.
Fig. 2 is a schematic structural diagram of a firmware upgrading apparatus according to an embodiment of the present invention, where the apparatus includes a starting unit 21, a first determining unit 22, an executing unit 23, a second determining unit 24, and an upgrading unit 25;
the starting unit 21 is used for starting a circulating waiting program for controlling the reset of the watchdog program when receiving a firmware upgrading instruction sent by an upper computer;
a first judging unit 22, configured to judge whether the watchdog program is reset when a preset initialization program is executed;
the execution unit 23 is configured to execute a preset application program if the watchdog program is not reset;
the second judging unit 24 is configured to judge whether a data packet sent by the upper computer is received within a preset time if the watchdog program is reset; if not, the execution unit 23 is triggered to execute the preset application program; if yes, the upgrading unit 25 is triggered;
and an upgrade unit 25 for performing an upgrade operation on the firmware using the data packet.
Optionally, the system further comprises a third judging unit and a prompting unit;
a third judging unit, configured to judge whether a device name carried in the data packet matches a device name recorded in the system, whether a firmware version number carried in the data packet matches a firmware version number recorded in a preset storage medium, and whether a size of firmware carried in the data packet is smaller than or equal to a capacity of the storage medium before performing an upgrade operation on the firmware using the data packet; if yes, triggering an upgrading unit; if not, triggering a prompt unit;
and the prompting unit is used for judging the data packet as invalid data and carrying out alarm prompting.
Optionally, the system further comprises a verification unit;
the verification unit is used for reading the firmware information from a preset storage medium and verifying the firmware information according to a set verification bit; and when the firmware information passes the verification, triggering the execution unit to execute the preset application program.
Optionally, the device further comprises a display unit;
and the display unit is used for displaying prompt information of firmware information failure when the firmware information is not verified.
Optionally, the starting unit is specifically configured to, when receiving instruction information sent by the upper computer, determine whether the instruction information is a firmware upgrade instruction; if yes, a circular waiting program for controlling the reset of the watchdog program is started.
The description of the features in the embodiment corresponding to fig. 2 may refer to the related description of the embodiment corresponding to fig. 1, and is not repeated here.
According to the technical scheme, when a firmware upgrading instruction sent by an upper computer is received, a circulating waiting program for controlling the reset of the watchdog program is started; when a preset initialization program is operated, judging whether the watchdog program is reset or not; if the watchdog program is not reset, it indicates that the current initialization program is not operated to implement the firmware upgrade operation, and in order to ensure the normal operation of the system, a preset application program may be executed at this time. If the watchdog program is reset, it indicates that firmware upgrading operation needs to be executed, and at this time, it can be determined whether a data packet sent by the upper computer is received within a preset time. When the data packet sent by the upper computer is not received within the preset time, the reset of the watchdog program caused by the program runaway may occur, the firmware is not upgraded, and the preset application program can be executed at the moment in order to ensure the normal operation of the system. And when the data packet sent by the upper computer is received within the preset time, the data packet is utilized to carry out upgrading operation on the firmware. In the technical scheme, the firmware upgrading operation is triggered by adopting the independent watchdog program, so that the execution efficiency of firmware upgrading is effectively improved. And a cyclic waiting program is added in the system software program, so that the watchdog program is reset, and the development difficulty of the software program is greatly reduced.
Fig. 3 is a schematic diagram of a hardware structure of a firmware upgrading apparatus 30 according to an embodiment of the present invention, including:
a memory 31 for storing a computer program;
a processor 32 for executing a computer program to implement the steps of any of the firmware upgrade methods described above.
The embodiment of the invention also provides a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when being executed by a processor, the computer program realizes the steps of any one of the firmware upgrading methods.
The above details describe a firmware upgrading method, apparatus, and computer-readable storage medium provided by the embodiments of the present invention. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

Claims (10)

1.一种固件升级方法,其特征在于,包括:1. a firmware upgrade method, is characterized in that, comprises: 当接收到上位机发送的固件升级指令时,启动用于控制看门狗程序复位的循环等待程序;When receiving the firmware upgrade command sent by the host computer, start the cyclic waiting program for controlling the reset of the watchdog program; 当预设的初始化程序被运行时,判断所述看门狗程序是否复位;When the preset initialization program is run, determine whether the watchdog program is reset; 若所述看门狗程序未复位,则执行预设的应用程序;If the watchdog program is not reset, execute the preset application program; 若所述看门狗程序复位,则判断是否在预设时间内接收到所述上位机下发的数据包;若否,则执行预设的应用程序;若是,则利用所述数据包对固件执行升级操作。If the watchdog program is reset, it is determined whether the data packet sent by the host computer is received within the preset time; if not, the preset application program is executed; if so, the firmware is updated with the data packet. Perform the upgrade operation. 2.根据权利要求1所述的方法,其特征在于,在所述利用所述数据包对固件执行升级操作之前还包括:2. The method according to claim 1, further comprising: 判断所述数据包中携带的设备名称与系统中记录的设备名称是否匹配、所述数据包中携带的固件版本号与预设的存储介质中记录的固件版本号是否匹配并且所述数据包中携带的固件大小是否小于或等于所述存储介质的容量;Determine whether the device name carried in the data packet matches the device name recorded in the system, whether the firmware version number carried in the data packet matches the firmware version number recorded in the preset storage medium, and whether the data packet is included in the data packet. Whether the size of the firmware carried is less than or equal to the capacity of the storage medium; 若是,则执行所述利用所述数据包对固件执行升级操作的步骤;If so, execute the step of using the data package to perform an upgrade operation on the firmware; 若否,则判定所述数据包为无效数据,并进行告警提示。If not, it is determined that the data packet is invalid data, and an alarm prompt is given. 3.根据权利要求2所述的方法,其特征在于,在所述执行预设的应用程序之前还包括:3. The method according to claim 2, wherein before the executing the preset application program, further comprising: 从预设的存储介质中读取固件信息,按照设定的校验位对所述固件信息进行校验;Read firmware information from a preset storage medium, and verify the firmware information according to the set check digit; 当所述固件信息通过校验之后,则执行预设的应用程序。After the firmware information is verified, a preset application program is executed. 4.根据权利要求3所述的方法,其特征在于,还包括:4. The method of claim 3, further comprising: 当所述固件信息未通过校验时,则展示固件信息失效的提示信息。When the firmware information fails the verification, a prompt message indicating that the firmware information is invalid is displayed. 5.根据权利要求1-4任意一项所述的方法,其特征在于,所述当接收到上位机发送的固件升级指令时,启动用于控制看门狗程序复位的循环等待程序包括:5. according to the method described in any one of claim 1-4, it is characterized in that, when described when receiving the firmware upgrade instruction that host computer sends, start the cycle waiting program that is used to control the reset of watchdog program and comprises: 当接收到上位机发送的指令信息时,判断所述指令信息是否为固件升级指令;若是,则启动用于控制看门狗程序复位的循环等待程序。When receiving the instruction information sent by the host computer, it is judged whether the instruction information is a firmware upgrade instruction; if so, a cyclic waiting program for controlling the reset of the watchdog program is started. 6.一种固件升级装置,其特征在于,包括启动单元、第一判断单元、执行单元、第二判断单元和升级单元;6. A firmware upgrade device, comprising a startup unit, a first judgment unit, an execution unit, a second judgment unit and an upgrade unit; 所述启动单元,用于当接收到上位机发送的固件升级指令时,启动用于控制看门狗程序复位的循环等待程序;The startup unit is used to start the cyclic waiting program for controlling the reset of the watchdog program when receiving the firmware upgrade instruction sent by the host computer; 所述第一判断单元,用于当预设的初始化程序被运行时,判断所述看门狗程序是否复位;The first judgment unit is used for judging whether the watchdog program is reset when the preset initialization program is run; 所述执行单元,用于若所述看门狗程序未复位,则执行预设的应用程序;The execution unit is configured to execute a preset application program if the watchdog program is not reset; 所述第二判断单元,用于若所述看门狗程序复位,则判断是否在预设时间内接收到所述上位机下发的数据包;若否,则触发所述执行单元执行预设的应用程序;若是则触发所述升级单元;The second judgment unit is used to judge whether the data packet sent by the host computer is received within a preset time if the watchdog program is reset; if not, trigger the execution unit to execute the preset application; if so, trigger the upgrade unit; 所述升级单元,用于利用所述数据包对固件执行升级操作。The upgrade unit is configured to use the data package to perform an upgrade operation on the firmware. 7.根据权利要求6所述的装置,其特征在于,还包括第三判断单元和提示单元;7. The device according to claim 6, further comprising a third judging unit and a prompting unit; 所述第三判断单元,用于在所述利用所述数据包对固件执行升级操作之前,判断所述数据包中携带的设备名称与系统中记录的设备名称是否匹配、所述数据包中携带的固件版本号与预设的存储介质中记录的固件版本号是否匹配并且所述数据包中携带的固件大小是否小于或等于所述存储介质的容量;若是,则触发所述升级单元;若否,则触发所述提示单元;The third judging unit is used to judge whether the device name carried in the data packet matches the device name recorded in the system, and the device name carried in the data packet matches before the firmware is upgraded by using the data packet. Whether the firmware version number of the firmware matches the firmware version number recorded in the preset storage medium and whether the size of the firmware carried in the data packet is less than or equal to the capacity of the storage medium; if so, trigger the upgrade unit; if not , the prompt unit is triggered; 所述提示单元,用于判定所述数据包为无效数据,并进行告警提示。The prompting unit is configured to determine that the data packet is invalid data, and perform an alarm prompt. 8.根据权利要求7所述的装置,其特征在于,还包括校验单元;8. The device according to claim 7, further comprising a verification unit; 所述校验单元,用于从预设的存储介质中读取固件信息,按照设定的校验位对所述固件信息进行校验;当所述固件信息通过校验之后,则触发所述执行单元执行预设的应用程序。The verification unit is configured to read firmware information from a preset storage medium, and verify the firmware information according to a set check bit; when the firmware information passes the verification, trigger the The execution unit executes a preset application program. 9.一种固件升级装置,其特征在于,包括:9. A firmware upgrade device, characterized in that, comprising: 存储器,用于存储计算机程序;memory for storing computer programs; 处理器,用于执行所述计算机程序以实现如权利要求1至5任意一项所述固件升级方法的步骤。The processor is configured to execute the computer program to implement the steps of the firmware upgrade method according to any one of claims 1 to 5. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至5任一项所述固件升级方法的步骤。10. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the firmware upgrade according to any one of claims 1 to 5 is implemented steps of the method.
CN201911287924.3A 2019-12-15 2019-12-15 Firmware upgrading method and device and computer readable storage medium Withdrawn CN111104138A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911287924.3A CN111104138A (en) 2019-12-15 2019-12-15 Firmware upgrading method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911287924.3A CN111104138A (en) 2019-12-15 2019-12-15 Firmware upgrading method and device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111104138A true CN111104138A (en) 2020-05-05

Family

ID=70423093

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911287924.3A Withdrawn CN111104138A (en) 2019-12-15 2019-12-15 Firmware upgrading method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111104138A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656061A (en) * 2021-08-20 2021-11-16 成都亨通光通信有限公司 5G communication power supply firmware updating method and updating device
CN114844780A (en) * 2022-04-28 2022-08-02 浙江灵鹿智能科技有限公司 Method and system for upgrading firmware in batches

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656061A (en) * 2021-08-20 2021-11-16 成都亨通光通信有限公司 5G communication power supply firmware updating method and updating device
CN113656061B (en) * 2021-08-20 2023-12-15 成都亨通光通信有限公司 5G communication power supply firmware updating method and updating device
CN114844780A (en) * 2022-04-28 2022-08-02 浙江灵鹿智能科技有限公司 Method and system for upgrading firmware in batches

Similar Documents

Publication Publication Date Title
JP5575338B2 (en) Information processing apparatus, information processing method, and computer program
JP6124994B2 (en) Method and system for restoring from legacy OS environment to Unified Extensible Firmware Interface (UEFI) pre-boot environment, and computer program
CN108021410A (en) A kind of firmware upgrade method and system of intelligent appliance equipment
CN103930878A (en) Method, apparatus and system for memory validation
CN106610840A (en) FOTA (Firmware Over-The-Air) upgrade method and system
CN109947596A (en) PCIE equipment failure system downtime processing method, device and related components
CN110399153B (en) System upgrading method, device, terminal and computer readable storage medium
CN106547653B (en) Computer system fault state detection method, device and system
CN101807152B (en) Basic output and input system for self verification of selection read only memory and verification method thereof
CN114281394A (en) Method, system, equipment and medium for fast on-line upgrading program
CN103760950A (en) Wireless routing equipment management method and device
CN111104138A (en) Firmware upgrading method and device and computer readable storage medium
US20130080751A1 (en) Method and device for updating bios program for computer system
CN105279043B (en) A kind of method and system that scm software mistake is restored
CN110457058A (en) Control node online upgrade method, device, host computer, system and electronic equipment
CN110399719A (en) BIT file loading method, apparatus, device and computer-readable storage medium
CN102184115B (en) Method for updating system software and terminal device
WO2024139423A1 (en) Fault detection method and computer device
CN109002317B (en) PCBA firmware upgrading method and system and PCBA
CN115309464B (en) Method, device, equipment and medium for verifying suspend function of flash memory chip
CN106130815B (en) Board level testing method and device
CN109614279B (en) Industrial personal computer self-checking system and control method thereof and related equipment
CN117908910A (en) MCU upgrade method, device, electronic device and storage medium
WO2012097761A1 (en) Recovery method for communication exceptions between data card and host, and data card
CN112463438B (en) Method, device and readable storage medium for generating configuration information of storage product

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20200505