Method and device for updating firmware program

A firmware program and firmware upgrade technology, which is applied in the field of data communication, can solve problems such as firmware upgrade failure, limited application range, and easily damaged equipment, and achieve the effect of avoiding irreversible damage

CN100456246CActive Publication Date: 2009-01-28BEIJING INHAND NETWORKS TECH
3 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Publication Date
2009-01-28

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

An upgrading device of firmware program is prepared for simultaneously storing new firmware and old firmware downloaded by firmware download processing module into flash memory, judging whether new firmware is correct or not by new firmware effectiveness detection module and loading master control program in new firmware through loading treatment module if it is or otherwise loading master control program in old firmware for realizing switch-over between load and new firmware.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention relates to the fields of data communication and industrial control, in particular to a method and device for updating firmware programs. Background technique

[0002] Firmware (Firmware) is hardware with software functions. In the early days, this kind of hardware was generally EROM or EPROM (Electrically Erasable Programmable Read-Only Memory) with software, etc. Usually, the programs stored in these hardware cannot be stored. It is directly read or modified by the user, and it is difficult or impossible for the end user to change the firmware. Generally, there is no need to upgrade the firmware. Even if a serious error (Bug) is found in the firmware, it must be brought by a professional. Replace the EPROM on the original machine with the EPROM with the written program.

[0003] Due to the progress of the current integrated circuit, the firmware of the device uses flash memory (Flash Memory for short: Flash) as the carrier, and the Flas...

Examples

Embodiment Construction

[0047] A method for upgrading firmware programs according to the present invention, its specific implementation method can be divided into two process descriptions of new firmware download and new firmware validity detection and switching, such as figure 1 Shown is the new firmware download process as follows:

[0048] First, define the system flag F, the length is 2 bytes, and the meaning of each bit is as follows:

[0049] Table 1. Bit definition of system flag F

[0050]

[0051] Firmware index (I); represent the address of old and new firmware in Flash;

[0052] Reserved (R): Represented as a reserved bit in the system flag F;

[0053] Failure Count (CNT): Indicates the number of failures to load the main control program for the new firmware.

[0054] Step 11, the main program runs;

[0055] After the device starts normally, the main program works normally;

[0056] Step 12, download new firmware;

[0057] The new firmware is obtained through the serial port or ne...