CN110825405A - Inverter program updating method - Google Patents

Inverter program updating method Download PDF

Info

Publication number
CN110825405A
CN110825405A CN201911019099.9A CN201911019099A CN110825405A CN 110825405 A CN110825405 A CN 110825405A CN 201911019099 A CN201911019099 A CN 201911019099A CN 110825405 A CN110825405 A CN 110825405A
Authority
CN
China
Prior art keywords
program
area
inverter
read
original
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
CN201911019099.9A
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 Haipeng Technology Co Ltd
Original Assignee
Suzhou Haipeng 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 Haipeng Technology Co Ltd filed Critical Suzhou Haipeng Technology Co Ltd
Priority to CN201911019099.9A priority Critical patent/CN110825405A/en
Publication of CN110825405A publication Critical patent/CN110825405A/en
Pending 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

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 invention discloses an inverter program updating method, which adopts an internal flash to store two programs, wherein a new program is stored in an area 2 when the inverter updates the program each time, and the original program of an old version is stored in an area 1. When the inverter starts to work, the new program in the area 2 is read first, if the new program is verified to be wrong, the old program in the area 1 is read and started, and if the new program is verified to be correct, the new program is started and copied into the area 1 to cover the original old program. The application of the invention ensures that the inverter program can be normally started and operated under any condition, and omits an external flash memory (flsah), thereby saving the cost and improving the user experience.

Description

Inverter program updating method
Technical Field
The invention relates to the field of inverters, in particular to an inverter program updating method.
Background
The inverter is an electronic component for converting direct current electric energy (battery and accumulator jar) into alternating current (generally 220V,50Hz sine wave), and is composed of an inverter bridge, a control logic and a filter circuit, and is widely applied to air conditioners, home theaters, electric grinding wheels, electric tools, sewing machines, DVDs, VCDs, computers, televisions, washing machines and other electrical appliances.
The inverter is actually a transformer, has high conversion efficiency, quick start and good safety performance, has five protection functions of short circuit, overload, over/under voltage and over temperature, has strong load adaptability and stability, and is popularized in the market. However, the current program of the inverter is usually only stored in an external flash memory (flash), and if the upgrading process is interrupted by an emergency such as power failure in the process of upgrading the program, the original program of the inverter is damaged, so that the inverter cannot normally work when being started again, which brings great trouble to users and affects daily work.
Therefore, it is desirable to provide a new technical solution to solve this problem, so that a backup solution can be started when the upgrade program has an error.
Disclosure of Invention
The invention aims to solve the problems in the prior art and provides an inverter program updating method.
In order to achieve the purpose, the invention adopts the technical scheme that:
an inverter program updating method comprises the following steps:
s1: writing an update program into the inverter internal region 2, and writing check and update flag bits into the inverter internal region 3;
s2: starting the main controller, reading the program with the fixed length in the area 2, and performing segmented calculation on the read program with the fixed length to obtain a check program;
s3: comparing the verification procedure of step S2 with the original procedure in area 2;
s4: if the comparison result between the verification program and the original program in the area 2 is the same in step S3, the program in the area 1 is overwritten with the original program in the area 2, the verification in the area 3 is cleared, and the flag is updated, and the program in the area 1 is executed.
Further, in the above technical solution, in the step S2, the program length stored in the area 2 is read, and the program of the fixed length in the area 2 is read according to the program length read from the area 2.
Further, if the comparison result between the verification program and the original program in the area 2 is different in step S3, the program in the area 1 is executed.
Further, the inverter includes a main controller having a flash memory (flash) including an area 1, an area 2, and an area 3 to store a program.
Further, the programs in the region 1, the region 2 and the other regions are not cleared at the same time.
Compared with the prior art, the invention has the beneficial effects that:
1. the method stores the program in the flash inside the main controller, thereby avoiding the program damage caused by sudden conditions such as power failure and the like in the program upgrading process;
2. the method ensures that the inverter program can be correctly started under any condition, omits external flash and saves cost.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of the update method of the present invention.
Detailed Description
The technical solutions of the embodiments of the present invention will be described below in detail by referring to the drawings of 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, 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 invention.
In the prior art, a program of an inverter is usually only stored in an external flash, and if the upgrading process is interrupted by an emergency such as power failure in the process of upgrading the program, the original program of the inverter is damaged, so that the inverter cannot normally work when being restarted. Fig. 1 is a flow chart of the updating method according to the present invention.
The gist of the present invention is further illustrated by the following examples:
example (b):
in order to solve the above problems, the present invention provides a new technical solution:
an inverter program updating method comprises the following steps:
s1: writing an update program into the inverter internal region 2, and writing check and update flag bits into the inverter internal region 3;
s2: starting the main controller, reading the program with the fixed length in the area 2, and performing segmented calculation on the read program with the fixed length to obtain a check program;
s3: comparing the verification procedure of step S2 with the original procedure in area 2;
s4: if the comparison result between the verification program and the original program in the area 2 is the same in step S3, the program in the area 1 is overwritten with the original program in the area 2, the verification in the area 3 is cleared, and the flag is updated, and the program in the area 1 is executed.
Further, in the above technical solution, in the step S2, the program length stored in the area 2 is read, and the program of the fixed length in the area 2 is read according to the program length read from the area 2.
Further, if the comparison result between the verification program and the original program in the area 2 is different in step S3, the program in the area 1 is executed.
Further, the inverter includes a main controller having a flash memory (flash) including an area 1, an area 2, and an area 3 to store a program.
Further, the programs in the region 1, the region 2 and the other regions are not cleared at the same time.
The updating method of the invention has the following main principles:
the flash is arranged in the inverter main controller, and the capacity of the flash is enough to store the programs of two versions, so that the internal flash is adopted to store the two programs, the new program is stored in the area 2 when the inverter updates the program each time, and the original program of the old version is stored in the area 1. When the inverter starts to work, the new program in the area 2 is read first, if the new program is verified to be wrong, the old program in the area 1 is read and started, and if the new program is verified to be correct, the new program is started and copied into the area 1 to cover the original old program.
As shown in the flowchart of fig. 1, each time a program needs to be updated, the program in the area 2 is updated, and after the program is stored in the area 2, the length and the update flag bit of the program are written into other fields except the area 1 and the area 2 for storage.
When starting up, detecting whether the program in the area 2 is complete, if the program in the area 2 fails to be verified, reading the program from the area 1 and starting the program;
when reading the program in the area 2, first, a fixed-length program is read according to the stored program length and is calculated and checked in segments.
And after the calculation is finished, comparing the calculated verification result with the program in the area 2, and if the verification results are the same, confirming that the program in the area 2 is complete and can be used.
After confirming that the program for area 2 is available, the data in area 2 is read into area 1, covering the previous program in area 1.
And when the program in the area 1 is updated to the program in the area 2, clearing the checksum and the update mark in the flash inside the main controller.
After the steps are completed, the program starting point is jumped to the starting address of the program in the flash area 1 in the main controller, and the inverter program starts to start and run.
The method stores the program in the flash inside the main controller, avoids program damage caused by sudden conditions such as power failure and the like in the program upgrading process, ensures that the inverter program can be correctly started under any condition, omits external flash, saves cost, provides economic benefits for the market and improves user experience.

Claims (5)

1. An inverter program updating method is characterized by comprising the following steps:
s1: writing an update program into the inverter internal region 2, and writing check and update flag bits into the inverter internal region 3;
s2: starting the main controller, reading the program with the fixed length in the area 2, and performing segmented calculation on the read program with the fixed length to obtain a check program;
s3: comparing the verification procedure of step S2 with the original procedure in area 2;
s4: if the comparison result between the verification program and the original program in the area 2 is the same in step S3, the program in the area 1 is overwritten with the original program in the area 2, the verification in the area 3 is cleared, and the flag is updated, and the program in the area 1 is executed.
2. The method according to claim 1, wherein in step S2, the program length stored in area 2 is read, and the program with the fixed length in area 2 is read according to the program length read from area 2.
3. The method according to claim 1, wherein if the comparison result of the verification procedure and the original procedure in the area 2 is different in step S3, the procedure in the area 1 is executed.
4. The method of claim 1, wherein the inverter comprises a master controller having a flash memory (flash) comprising area 1, area 2, and area 3 to store a program.
5. The method of claim 1, wherein the procedures in zone 1, zone 2 and other zones are not cleared simultaneously.
CN201911019099.9A 2019-10-24 2019-10-24 Inverter program updating method Pending CN110825405A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911019099.9A CN110825405A (en) 2019-10-24 2019-10-24 Inverter program updating method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911019099.9A CN110825405A (en) 2019-10-24 2019-10-24 Inverter program updating method

Publications (1)

Publication Number Publication Date
CN110825405A true CN110825405A (en) 2020-02-21

Family

ID=69550495

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911019099.9A Pending CN110825405A (en) 2019-10-24 2019-10-24 Inverter program updating method

Country Status (1)

Country Link
CN (1) CN110825405A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104102514A (en) * 2014-07-18 2014-10-15 江苏兆伏新能源有限公司 Firmware upgrading method and firmware upgrading device
JP2016099937A (en) * 2014-11-26 2016-05-30 東芝アルパイン・オートモティブテクノロジー株式会社 Method for back-up activation processing
CN105808296A (en) * 2016-03-08 2016-07-27 江苏万帮德和新能源科技有限公司 Client side software startup method used for charging pile to safely upgrade own program
CN107229495A (en) * 2017-05-25 2017-10-03 沃太能源南通有限公司 A kind of system and method for preventing EMS remote upgrade from failing
WO2018120213A1 (en) * 2016-12-30 2018-07-05 深圳配天智能技术研究院有限公司 Firmware updating method and controller

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104102514A (en) * 2014-07-18 2014-10-15 江苏兆伏新能源有限公司 Firmware upgrading method and firmware upgrading device
JP2016099937A (en) * 2014-11-26 2016-05-30 東芝アルパイン・オートモティブテクノロジー株式会社 Method for back-up activation processing
CN105808296A (en) * 2016-03-08 2016-07-27 江苏万帮德和新能源科技有限公司 Client side software startup method used for charging pile to safely upgrade own program
WO2018120213A1 (en) * 2016-12-30 2018-07-05 深圳配天智能技术研究院有限公司 Firmware updating method and controller
CN107229495A (en) * 2017-05-25 2017-10-03 沃太能源南通有限公司 A kind of system and method for preventing EMS remote upgrade from failing

Similar Documents

Publication Publication Date Title
US20070055969A1 (en) System and method for updating firmware
CN102567135B (en) Refreshing/recovering method and electronic equipment
CN101373451B (en) Computer system for protecting double-basic input /output system program and control method thereof
CN103473067A (en) Embedded Linux partitioning and data recovery method, embedded Linux partitioning and data recovery system and system development method
CN102541690B (en) Intelligent card and method for recovering data
CN103902399B (en) Software system repair processing method and software system repair processing device
CN104636217A (en) Root file system automatic backup and exception recovery method and partition structure
CN106775610A (en) A kind of electronic equipment starts method and a kind of electronic equipment
CN106897166B (en) Mobile terminal and repairing method thereof
CN112596672B (en) Storage processing method and device of main control chip, processor and electronic equipment
CN109634781B (en) Double-area backup image system based on embedded program and starting method
CN104133730A (en) Method and device for repairing system abnormality and mobile terminal
CN105302663A (en) Mirror image starting method and terminal equipment
CN104123208A (en) System abnormality repairing method and device and mobile terminal
CN110825405A (en) Inverter program updating method
CN111552592A (en) Double-backup starting method and system
CN108170456B (en) Firmware upgrading method and device for electronic equipment
CN113127035A (en) Traceable upgrading method based on single chip microcomputer
CN102722669A (en) Completeness verification method of operating system
CN104102505A (en) Computer power-on method
CN112379843B (en) EEPROM data processing method, system, storage medium and terminal
CN110581642B (en) Converter soft start circuit and method
CN110688141A (en) Firmware updating method
CN110609692A (en) Data acquisition module, firmware upgrading method thereof and storage medium
CN111475343A (en) Computer state power failure recovery method and device and terminal equipment

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