CN102945173A - User program on-line upgrading system and method - Google Patents

User program on-line upgrading system and method Download PDF

Info

Publication number
CN102945173A
CN102945173A CN201210428285XA CN201210428285A CN102945173A CN 102945173 A CN102945173 A CN 102945173A CN 201210428285X A CN201210428285X A CN 201210428285XA CN 201210428285 A CN201210428285 A CN 201210428285A CN 102945173 A CN102945173 A CN 102945173A
Authority
CN
China
Prior art keywords
chip microcomputer
user program
burning
program
instruction
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.)
Granted
Application number
CN201210428285XA
Other languages
Chinese (zh)
Other versions
CN102945173B (en
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.)
Hisense Broadband Multimedia Technology Co Ltd
Original Assignee
Hisense Broadband Multimedia 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 Hisense Broadband Multimedia Technology Co Ltd filed Critical Hisense Broadband Multimedia Technology Co Ltd
Priority to CN201210428285.XA priority Critical patent/CN102945173B/en
Publication of CN102945173A publication Critical patent/CN102945173A/en
Application granted granted Critical
Publication of CN102945173B publication Critical patent/CN102945173B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a user program on-line upgrading system and method. The method comprises the following steps: reading writing mark in a memorizer after a singlechip is electrified or rest; if the writing mark value is A, running an IAP (In-Application Program) in the memorizer and performing on-line upgrading for the use program in the memorizer; if the writing mark value is B, running the use program in the memorizer; and in use program operation process, if a writing instruction is received, changing the writing mark value to A so as to perform soft reset. According to the invention, during the user program operation process, if receiving the writing instruction, the singlechip is rest after the writing mark value is modified to B; and after the singlechip is reset, the IAP is carried out according to the writing mark so as to realize the on-line upgrading of the user program, so that a host is not required to control the upgrading of the user program of the single chip through a hardware pin, so as to save pin resources.

Description

User program online upgrade system and upgrade method
Technical field
The present invention relates to singlechip technology, relate in particular to a kind of user program online upgrade system and upgrade method.
Background technology
User program in the single-chip microcomputer is carried out burning and upgrading, is to adopt the parallel programming device traditionally.When in this way single-chip microcomputer being upgraded, need to repeatedly plug single-chip microcomputer, and the single-chip microcomputer of iron plate encapsulation then needs Rewelding and dismounting when upgrading, troublesome poeration not only, and damage easily single-chip microcomputer.
IAP(In-Application Program programmes in application) technology then solved this problem well.As shown in Figure 1, in non-volatile program storage (FLASH program storage), store user program; Single-chip microcomputer is by loading the FLASH(flash memory) user program operation in the program storage realizes various functions, such as functions such as collection, calculating, controls.User program is stored in the user program area in the FLASH program storage usually.
In addition, also store the IAP program in the FLASH program storage, the IAP program is the download mouth by special use, is burnt in the FLASH program storage such as JTAG or the ISP of single-chip microcomputer; The IAP power function is arranged in the IAP program usually, during single-chip microcomputer operation IAP program, by calling the IAP power function, can realize receiving user program from its all purpose communication port (such as iic bus, spi bus or parallel bus), user program is burnt to the FLASH program storage; Like this, when carrying out the user program upgrading, needn't pass through specialized equipment or port, but by operation IAP program, realize the online upgrading of user program by all purpose communication port.The IAP program is stored in the IAP program area in the FLASH program storage usually.
After single-chip microcomputer powers on, carry out the Boot(guiding) program: the voltage that detects first the IAPPin pin; If the level of IAPPin pin is high level, then single-chip microcomputer is carried out the IAP program in the FLASH program storage; If the level of LoadPin pin also is high level, then the IAP program begins to receive binary file from main frame (Host) by communication bus and is burnt to the FLASH program storage, as the user program of new edition; Main frame send binary file complete after, the level of control LoadPin pin transfers low level to, then single-chip microcomputer finishes the IAP program implementation.After host computer control ResetPin pin resetted, single-chip microcomputer was restarted; After single-chip microcomputer is restarted, be low-voltage if detect the voltage of IAPPin pin, the user program of the new edition of burning before then carrying out, thereby the online upgrading of the user program of realization single-chip microcomputer.
The present inventor finds that the online upgrading method of the single-chip microcomputer user program of prior art need to take the more hardware resource of single-chip microcomputer; In fact, in order to realize the control of online upgrading, taken 3 pins of single-chip microcomputer (I O port) and linked to each other with main frame as IAPPin, LoadPin, ResetPin pin respectively, main frame comes the online upgrading of the user program of control single chip computer by these three pins.
Therefore, the online upgrading method of the single-chip microcomputer user program of prior art takies the more hardware resource of single-chip microcomputer, in the increasing situation of function of the MCU, more and more has the demand of saving the single-chip microcomputer hardware resource.
Summary of the invention
Embodiments of the invention provide a kind of user program online upgrade system and upgrade method, in order to reduce taking the hardware resource of single-chip microcomputer when the online upgrading of user program.
According to an aspect of the present invention, provide a kind of user program online upgrading method, having comprised:
After described single-chip microcomputer powers on or resets, the burning sign in the reading non-volatile program storage;
If described burning is designated numerical value A, then move the IAP program in the described non-volatile program storage, the user program in the described non-volatile program storage is carried out online upgrading;
If described burning is designated numerical value B, then move the user program in the described non-volatile program storage; In operation during described user program, if receive the burning instruction, after then changing described burning and being designated numerical value A, carry out warm reset.
Wherein, the IAP program in the described non-volatile program storage of described operation, the user program in the described non-volatile program storage is carried out online upgrading specifically comprise:
After described single-chip microcomputer moves described IAP program, write data command if receive, then according to the data command of writing that receives the binary file that receives is written in the user program area of described non-volatile program storage, as the user program of upgrade version the user program in the described non-volatile program storage is carried out online upgrading.
Further, after described single-chip microcomputer moves described IAP program, also comprise:
Write the instruction of burning sign if described single-chip microcomputer receives, then write the instruction of burning sign numerical value B is written in the burning sign in the non-volatile program storage according to described; Afterwards,
Jump to the porch of the user program area of described non-volatile program storage, begin to carry out the user program of described upgrade version.
Further, described receive write data command after, also comprise:
Described single-chip microcomputer carries out verification according to the check bit in the write data instruction to the write data instruction; If the check results mistake is then returned and is received wrong feedback command; And
The described data command of writing according to receiving is specially the user program area that the binary file that receives is written to described non-volatile program storage:
If check results is correct, then according to the data command of writing that receives the binary file that receives is written to the user program area of described non-volatile program storage, and returns the correct feedback command of reception.
Preferably, behind the user program of the described upgrade version of described execution, also comprise:
In the user program operation process of described upgrade version, if described single-chip microcomputer receives described burning instruction, after then changing described burning and being designated numerical value A, carry out warm reset.
According to another aspect of the present invention, also provide a kind of user program online upgrade system, having comprised:
Single-chip microcomputer is used for powering on or the burning of the rear reading non-volatile program storage that resets identifies; If described burning is designated numerical value B, then move the user program in the described non-volatile program storage;
Main frame is used for sending the burning instruction to described single-chip microcomputer;
Described single-chip microcomputer is in operation during described user program, if receive described burning instruction, after then changing described burning and being designated numerical value A, carries out warm reset; The burning sign of the numerical value A that the rear basis that resets reads is moved the IAP program in the described non-volatile program storage;
Described main frame sends the upgrade version user program to described single-chip microcomputer;
Described single-chip microcomputer writes the upgrade version user program that receives in the user program area of described non-volatile program storage, carries out the online upgrading of user program.
Wherein, described main frame is specially to described single-chip microcomputer transmission upgrade version user program:
Described main frame is write data command with the binary file of described upgrade version user program by at least one and is sent to described single-chip microcomputer.
Preferably, described main frame also for after complete to described single-chip microcomputer transmission upgrade version user program, is write the instruction of burning sign to described single-chip microcomputer transmission; And
Described single-chip microcomputer also is used for writing the instruction of burning sign according to what receive, and numerical value B is written in the burning sign in the non-volatile program storage; Afterwards, jump to the porch of the user program area of described non-volatile program storage, begin to carry out the user program of described upgrade version.
Preferably, described single-chip microcomputer also is used for according to the check bit of writing data command that receives the data command of writing that receives being carried out verification; If the check results mistake is then returned to described main frame and is received wrong feedback command; And
Described main frame resends and writes data command behind the feedback command that receives the reception mistake that described single-chip microcomputer returns.
Preferably, described single-chip microcomputer also is used for behind the user program of carrying out described upgrade version, in the user program operation process of described upgrade version, if described single-chip microcomputer receives described burning instruction, after then changing described burning and being designated numerical value A, carries out warm reset.
In the technical scheme that the embodiment of the invention provides, owing to increase the burning sign is arranged in non-volatile program storage, after powering at single-chip microcomputer, the indication single-chip microcomputer is carried out IAP program or user program; And, in the user program of single-chip microcomputer operation, increase the function of the burning instruction of a reception and processing host transmission: after receiving the burning instruction of main frame transmission, after the burning sign being revised as the value (numerical value B) of indication single-chip microcomputer execution IAP program, single-chip microcomputer resets; Single-chip microcomputer is carried out the IAP program according to the burning sign after resetting, obtain the upgrade version user program from main frame, realizes the online upgrading of user program.In this process, main frame needn't be controlled upgrading to the single-chip microcomputer user program by the hardware pin, but by the software mode that sends the burning instruction control that realizes upgrading; Thereby saved the pin resource of single-chip microcomputer, namely reduced taking the hardware resource of single-chip microcomputer.
Further, main frame user program is carried out online upgrading complete after, main frame also control single chip computer is revised as the value (numerical value A) that the indication single-chip microcomputer is carried out user program with the burning sign, so that single-chip microcomputer is after the user program online upgrading is complete, power at every turn or reset after can automatically perform user program.
Description of drawings
Fig. 1 is the synoptic diagram of the single-chip microcomputer user program online upgrade system of prior art;
Fig. 2 is the synoptic diagram of the single-chip microcomputer user program online upgrade system of the embodiment of the invention;
Fig. 3 is the single-chip microcomputer boot process flow diagram of the embodiment of the invention;
Fig. 4 is the user program online upgrading method flow diagram of the embodiment of the invention.
Embodiment
For making purpose of the present invention, technical scheme and advantage clearer, referring to accompanying drawing and enumerate preferred embodiment, the present invention is described in more detail.Yet, need to prove that many details of listing in the instructions only are in order to make the reader to one or more aspects of the present invention a thorough understanding be arranged, even if there are not these specific details also can realize these aspects of the present invention.
The terms such as " module " used in this application, " system " are intended to comprise the entity relevant with computing machine, such as but not limited to hardware, firmware, combination thereof, software or executory software.For example, module can be, but be not limited in: the thread of the process of moving on the processor, processor, object, executable program, execution, program and/or computing machine.For instance, the application program of moving on the computing equipment and this computing equipment can be modules.One or more modules can be positioned at an executory process and/or thread, and module also can be on the computing machine and/or be distributed between two or more the computing machines.
In the technical scheme of the present invention, three pins of main frame for control single chip computer user program online upgrading have been saved, but increase in the FLASH program storage burning sign is arranged, after powering at single-chip microcomputer, the indication single-chip microcomputer is carried out IAP program or user program; And, in the user program of single-chip microcomputer operation, increase the function of the burning instruction that a reception and processing host send: after receiving the burning instruction that main frame sends, the burning sign is revised as the value of indication single-chip microcomputer execution IAP program after, single-chip microcomputer resets; Single-chip microcomputer is carried out the IAP program according to burning sign after resetting, obtain the user program of new edition from main frame, realizes the online upgrading of user program.In this process, main frame needn't be controlled upgrading to the single-chip microcomputer user program by the hardware pin, but by the software mode that sends the burning instruction control that realizes upgrading; Thereby saved the pin resource of single-chip microcomputer, namely reduced taking the hardware resource of single-chip microcomputer.
Describe the technical scheme of the embodiment of the invention in detail below in conjunction with accompanying drawing.The user program online upgrade system of the single-chip microcomputer that the embodiment of the invention provides as shown in Figure 2, comprising: main frame 201, single-chip microcomputer 202, non-volatile program storage 203.
Wherein, non-volatile program storage 203 specifically can be the FLASH device.
Be connected with all purpose communication bus between main frame 201 and the single-chip microcomputer 202, such as universal serial bus: IIC(Inter-Integrated Circuit, mutual integrated circuit) or SPI(Serial Peripheral Interface, Serial Peripheral Interface (SPI)) bus, perhaps parallel bus etc.Main frame 201 specifically can be computing machine, CPU(Central Processing Unit, central processing unit), microprocessor etc.
After single-chip microcomputer 202 powers on or resets, carry out first the Boot(boot), the flow process of carrying out this program is shown in Figure 3, comprises the steps:
S301: single-chip microcomputer 202 powers on or resets;
S302: single-chip microcomputer 202 is carried out the Boot program, the burning sign in the reading non-volatile program storage 203.
Non-volatile program storage 203 is divided into a plurality of (Block) usually, and single-chip microcomputer is when carrying out burning to it, and when namely single-chip microcomputer was to non-volatile program storage 203 data writing, normally monoblock operated.Burning identifies in certain specific that can be written in the non-volatile program storage 203, for example, burning identifies in last piece that is stored in the non-volatile program storage 203, and this piece is exclusively used in storage burning sign, do not store out of Memory, in order to avoid the mistake of burning sign is write; For ease of describing, the piece that this paper will be exclusively used in storage burning sign is called the burning home block.
Single-chip microcomputer 202 is carried out the Boot program, reads the burning sign from the burning home block of non-volatile program storage 203.
S303: the numerical value of judging the burning sign; If burning is designated numerical value A(the first numerical value), execution in step S304 then jumps to the entrance of IAP program; If burning is designated numerical value B(second value), execution in step S305 then jumps to the entrance of user program.
Numerical value A in this step and numerical value B are predefined, such as, can set numerical value A, numerical value B is respectively 0xFFFFFFFF, 0x00000000.The burning of reading when single-chip microcomputer 202 is designated 0xFFFFFFFF, then jumps to the entrance of IAP program, begins to carry out the IAP program; If the burning that single-chip microcomputer 202 reads is designated 0x00000000, then jump to the entrance of user program, begin to carry out user program.
S304: single-chip microcomputer 202 jumps to the entrance of the IAP program in the non-volatile program storage, operation IAP program.
S305: single-chip microcomputer 202 jumps to the entrance of the user program in the non-volatile program storage, the run user program.
When single-chip microcomputer 202 run user program, if main frame 201 need to be upgraded to the user program in the non-volatile program storage 203, then concrete upgrade method flow process as shown in Figure 4, comprises the steps:
S401: single-chip microcomputer 202 run user programs.
S402: main frame 201 sends the burning instruction to single-chip microcomputer 202.
In this step, main frame 201 sends the burning instruction by communication bus to single-chip microcomputer 202.Main frame 201 and single-chip microcomputer 202 can be arranged the instruction that a cover is used for the user program online upgrading in advance, can comprise in these instructions:
The burning instruction is carried out the burning operation in order to main frame 201 indication single-chip microcomputers 202;
Write data command, write particular data in order in the non-volatile program storage 203 specific of main frame 201 indication single-chip microcomputers 202;
Feedback command is in order to the result of single-chip microcomputer 202 to main frame 201 feedback data writings.
S403: after single-chip microcomputer 202 receives the burning instruction, after the modification burning is designated numerical value A, carry out warm reset.
Particularly, the user program of single-chip microcomputer operation has the function that receives instruction and data from main frame 201 usually, and in the user program of single-chip microcomputer of the present invention 202 operations except comprising common applied function module, also comprise a burning command reception processing module.
The user program of single-chip microcomputer 202 operations calls this burning command reception processing module after the instruction that receives main frame 201 transmissions, if it is the burning instruction that burning command reception processing module identifies the instruction of reception, then carry out: revise burning and be designated numerical value A, this single-chip microcomputer is carried out warm reset.
S404: single-chip microcomputer 202 is restarted after resetting;
S405: single-chip microcomputer 202 is carried out the IAP program according to the burning sign.
Particularly, single-chip microcomputer 202 re-executes the Boot program after restarting; Carry out the idiographic flow of Boot program and in above-mentioned step shown in Figure 3, introduced, repeat no more herein;
Because the burning sign is revised as numerical value A before, therefore, in the process of carrying out the Boot program, single-chip microcomputer 202 jumps to the entrance of IAP program after judging that burning is designated numerical value A, begin to carry out the IAP program.
S406: single-chip microcomputer 202 is carried out the IAP program, receives the upgrade version user program that sends from main frame 201 and is written to non-volatile program storage 203, carries out the upgrading of user program.
Particularly, main frame 201 can be waited for the time period of one section setting after sending the burning instruction, such as waiting for 1s, at this moment between in the section single-chip microcomputer 202 finish and restart, moved the IAP program; Afterwards, main frame 201 is with the New Consumers program, and namely the binary file of upgrade version user program is burnt to the upgrade version user program in the non-volatile program storage 203 by single-chip microcomputer 202 by sending a plurality of data commands of writing to single-chip microcomputer 202:
Single-chip microcomputer 202 is carried out the IAP programs, and IAP program Receiving Host 201 sends writes data command, according to writing in the relevant block in the user program area that data command is written to the binary file that receives non-volatile program storage 203 of receiving.Generally speaking, the upgrade version user program is written in the user program area of non-volatile program storage 203, in order to override original user program.That is to say, after the described IAP program of single-chip microcomputer 202 operations, the binary file that main frame 201 is sent is written to the user program area in the non-volatile program storage 203, as the user program of upgrade version the user program in the non-volatile program storage 203 is carried out online upgrading.
Preferably, receiving in the IAP of single-chip microcomputer 202 program and also can carry out verification to it according to its check bit after writing data command; If check results is correct, then according to the data command of writing that receives the data that receive is written in the corresponding piece in the non-volatile program storage 203, and returns to main frame 201 and to receive correct feedback command; If the check results mistake is then returned to main frame 201 and is received wrong feedback command.Main frame 201 is receiving the data command of writing that sends before will resending after receiving wrong feedback command.
If main frame 201 sends when writing data command to single-chip microcomputer 202 after sending the burning instruction, single-chip microcomputer 202 is not also restarted, or go back off-duty IAP program, then main frame 201 will not receive the feedback command that single-chip microcomputer 202 returns in setting-up time section (such as 10ms), therefore, main frame 201 can resend the data command of writing that sends before, receives correct feedback command until backward its of single-chip microcomputer 202 operation IAP programs returns.
S407: main frame 201 sends in order to indication and numerical value B is written to the data command of writing in the burning sign of burning home block, and for ease of describing, this is write data command herein and is called and writes the instruction of burning sign.
Main frame 201 is write the instruction of burning sign by transmission, as the sign that finishes this time user program escalation process; Be that main frame 201 is finished transmission upgrade version user program behind single-chip microcomputer 202, write the instruction of burning sign to single-chip microcomputer 202 transmissions, single-chip microcomputer 202 is write the instruction of burning sign numerical value B is written in the burning sign in the non-volatile program storage 203 according to described: single-chip microcomputer 202 is write the instruction of burning sign according to what receive, data are write burning home block in the non-volatile program storage 203, in the data that are written to the burning home block, the data that are written to place, burning home position are numerical value B.
S408: single-chip microcomputer 202 identifies instruction according to the burning of writing that receives, and the sign of the burning in the burning home block is revised as numerical value B.
Particularly, the IAP program of single-chip microcomputer 202 is write the instruction of burning sign according to what receive, and data are write burning home block in the non-volatile program storage 203, and the sign of the burning in the burning home block is revised as numerical value B.
S409: single-chip microcomputer 202 jumps to the entrance of the user program of non-volatile program storage 203, begins to carry out the upgrade version user program that newly writes.
Because will receiving, single-chip microcomputer 202 writes the instruction of burning sign, as the sign that finishes this time user program escalation process; Therefore, the IAP program of single-chip microcomputer 202 is identifying instruction according to writing burning, after burning in burning home block sign is revised as numerical value B, no longer receive from main frame 201 and write data command, but jump to the porch of the user program area of non-volatile program storage 203, begin to carry out the upgrade version user program that newly writes.
As can be seen from the above, for the complete rear single-chip microcomputer of upgrading at user program can be carried out the New Consumers program, main frame need to be after transmission upgrade version user program be complete, and control single chip computer is written as numerical value B with the burning sign.
In addition, in order to guarantee the lasting upgrading of user program, the upgrade version user program that writes in each escalation process also all has aforesaid burning command reception processing module, whether and to call burning command reception processing module when receiving the instruction that main frame sends be the burning instruction in order to identification, if respective handling is then carried out in the burning instruction; That is to say, carry out the user program of upgrade version at single-chip microcomputer after, in the user program operation process of upgrade version, if single-chip microcomputer receives the burning instruction that main frame sends, after then changing described burning and being designated numerical value A, carry out warm reset.After resetting, single-chip microcomputer is according to the online upgrading that carries out user program for the burning sign of numerical value A, and detailed process step as shown in Figure 3 above is described, repeats no more herein; Thereby realized the lasting upgrading of user program.
Therefore, among the present invention except needs are provided with burning sign in non-volatile program storage 203, main frame also needs to carry out corresponding burning flow process to be revised: namely main frame 201 need to send the burning instruction before carrying out the user program upgrading, after the transmission of upgrade version user program is complete, the burning sign is written as numerical value B; And, the function that the user program that moves in the single-chip microcomputer also needs to have identification and processes the burning instruction: after receiving the burning instruction, the burning sign is written as numerical value A, carries out warm reset.
In the technical scheme that the embodiment of the invention provides, owing to increase the burning sign is arranged in non-volatile program storage, after powering at single-chip microcomputer, the indication single-chip microcomputer is carried out IAP program or user program; And, in the user program of single-chip microcomputer operation, increase the function of the burning instruction of a reception and processing host transmission: after receiving the burning instruction of main frame transmission, after the burning sign being revised as the value (numerical value B) of indication single-chip microcomputer execution IAP program, single-chip microcomputer resets; Single-chip microcomputer is carried out the IAP program according to the burning sign after resetting, obtain the upgrade version user program from main frame, realizes the online upgrading of user program.In this process, main frame needn't be controlled upgrading to the single-chip microcomputer user program by the hardware pin, but by the software mode that sends the burning instruction control that realizes upgrading; Thereby saved the pin resource of single-chip microcomputer, namely reduced taking the hardware resource of single-chip microcomputer.
Further, main frame user program is carried out online upgrading complete after, main frame also control single chip computer is revised as the value (numerical value A) that the indication single-chip microcomputer is carried out user program with the burning sign, so that single-chip microcomputer is after the user program online upgrading is complete, power at every turn or reset after can automatically perform user program.
One of ordinary skill in the art will appreciate that all or part of step that realizes in above-described embodiment method is to come the relevant hardware of instruction to finish by program, this program can be stored in the computer read/write memory medium, as: ROM/RAM, magnetic disc, CD etc.
The above only is preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (10)

1. user program online upgrading method comprises:
After described single-chip microcomputer powers on or resets, the burning sign in the reading non-volatile program storage;
If described burning is designated numerical value A, then move the IAP program in the described non-volatile program storage, the user program in the described non-volatile program storage is carried out online upgrading;
If described burning is designated numerical value B, then move the user program in the described non-volatile program storage; In operation during described user program, if receive the burning instruction, after then changing described burning and being designated numerical value A, carry out warm reset.
2. the method for claim 1 is characterized in that, the IAP program in the described non-volatile program storage of described operation is carried out online upgrading to the user program in the described non-volatile program storage and specifically comprised:
After described single-chip microcomputer moves described IAP program, write data command if receive, then according to the data command of writing that receives the binary file that receives is written in the user program area of described non-volatile program storage, as the user program of upgrade version the user program in the described non-volatile program storage is carried out online upgrading.
3. method as claimed in claim 2 is characterized in that, after described single-chip microcomputer moves described IAP program, also comprises:
Write the instruction of burning sign if described single-chip microcomputer receives, then write the instruction of burning sign numerical value B is written in the burning sign in the non-volatile program storage according to described; Afterwards,
Jump to the porch of the user program area of described non-volatile program storage, begin to carry out the user program of described upgrade version.
4. method as claimed in claim 2 or claim 3 is characterized in that, described receive write data command after, also comprise:
Described single-chip microcomputer carries out verification according to the check bit in the write data instruction to the write data instruction; If the check results mistake is then returned and is received wrong feedback command; And
The described data command of writing according to receiving is specially the user program area that the binary file that receives is written to described non-volatile program storage:
If check results is correct, then according to the data command of writing that receives the binary file that receives is written to the user program area of described non-volatile program storage, and returns the correct feedback command of reception.
5. method as claimed in claim 4 is characterized in that, behind the user program of the described upgrade version of described execution, also comprises:
In the user program operation process of described upgrade version, if described single-chip microcomputer receives described burning instruction, after then changing described burning and being designated numerical value A, carry out warm reset.
6. user program online upgrade system comprises:
Single-chip microcomputer is used for powering on or the burning of the rear reading non-volatile program storage that resets identifies; If described burning is designated numerical value B, then move the user program in the described non-volatile program storage;
Main frame is used for sending the burning instruction to described single-chip microcomputer;
Described single-chip microcomputer is in operation during described user program, if receive described burning instruction, after then changing described burning and being designated numerical value A, carries out warm reset; The burning sign of the numerical value A that the rear basis that resets reads is moved the IAP program in the described non-volatile program storage;
Described main frame sends the upgrade version user program to described single-chip microcomputer;
Described single-chip microcomputer writes the upgrade version user program that receives in the user program area of described non-volatile program storage, carries out the online upgrading of user program.
7. system as claimed in claim 6 is characterized in that, described main frame sends the upgrade version user program to described single-chip microcomputer and is specially:
Described main frame is write data command with the binary file of described upgrade version user program by at least one and is sent to described single-chip microcomputer.
8. system as claimed in claim 7 is characterized in that,
Described main frame also for after complete to described single-chip microcomputer transmission upgrade version user program, is write the instruction of burning sign to described single-chip microcomputer transmission; And
Described single-chip microcomputer also is used for writing the instruction of burning sign according to what receive, and numerical value B is written in the burning sign in the non-volatile program storage; Afterwards, jump to the porch of the user program area of described non-volatile program storage, begin to carry out the user program of described upgrade version.
9. such as claim 7 or 8 described systems, it is characterized in that,
Described single-chip microcomputer also is used for according to the check bit of writing data command that receives the data command of writing that receives being carried out verification; If the check results mistake is then returned to described main frame and is received wrong feedback command; And
Described main frame resends and writes data command behind the feedback command that receives the reception mistake that described single-chip microcomputer returns.
10. system as claimed in claim 9 is characterized in that,
Described single-chip microcomputer also is used for behind the user program of carrying out described upgrade version, in the user program operation process of described upgrade version, if described single-chip microcomputer receives described burning instruction, after then changing described burning and being designated numerical value A, carries out warm reset.
CN201210428285.XA 2012-10-31 2012-10-31 User program online upgrade system and upgrade method Active CN102945173B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210428285.XA CN102945173B (en) 2012-10-31 2012-10-31 User program online upgrade system and upgrade method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210428285.XA CN102945173B (en) 2012-10-31 2012-10-31 User program online upgrade system and upgrade method

Publications (2)

Publication Number Publication Date
CN102945173A true CN102945173A (en) 2013-02-27
CN102945173B CN102945173B (en) 2016-06-29

Family

ID=47728122

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210428285.XA Active CN102945173B (en) 2012-10-31 2012-10-31 User program online upgrade system and upgrade method

Country Status (1)

Country Link
CN (1) CN102945173B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103246536A (en) * 2013-04-28 2013-08-14 常州南京大学高新技术研究院 Method for wirelessly upgrading firmware of instrumented positioning system
CN103294513A (en) * 2013-06-25 2013-09-11 龙迅半导体科技(合肥)有限公司 Software upgrading method and device
CN104156237A (en) * 2014-07-23 2014-11-19 武汉精测电子技术股份有限公司 Online single-chip microcomputer upgrading method
CN104423984A (en) * 2013-08-29 2015-03-18 比亚迪股份有限公司 Online upgrading method and online upgrading system
CN104461668A (en) * 2015-01-04 2015-03-25 上海雷尼威尔技术有限公司 User program upgrading method and system based on LWIP protocol stack
CN105183501A (en) * 2015-08-10 2015-12-23 珠海格力电器股份有限公司 Method for preventing errors in online program writing
WO2016127835A1 (en) * 2015-02-11 2016-08-18 深圳配天智能技术研究院有限公司 Single chip microcomputer and online programming method therefor
CN107729040A (en) * 2017-09-28 2018-02-23 郑州云海信息技术有限公司 A kind of IAP method and system of single-chip microcomputer
CN107861745A (en) * 2017-11-30 2018-03-30 厦门科华恒盛股份有限公司 A kind of application program online upgrading method, apparatus, equipment and storage medium
CN108920165A (en) * 2018-07-12 2018-11-30 北京行易道科技有限公司 Update method, device and the embedded device of software program
CN110262349A (en) * 2019-06-28 2019-09-20 中国航空工业集团公司雷华电子技术研究所 A kind of the remote online programmed method and system of C8051F series monolithic
CN110955439A (en) * 2019-12-16 2020-04-03 深圳市思天极创教育科技有限公司 Method and device for burning chip by Bluetooth based on mobile terminal
CN112527087A (en) * 2020-12-24 2021-03-19 上海宗镕电器有限公司 Hardware circuit structure of USB upgrading product firmware program
CN113553087A (en) * 2021-07-16 2021-10-26 湖北三江航天红峰控制有限公司 Singlechip program online upgrading method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101021794A (en) * 2006-05-25 2007-08-22 杭州晟元芯片技术有限公司 Program bootstrap method after chip power-on
CN101231594A (en) * 2007-01-22 2008-07-30 华为技术有限公司 System self-lifting method and apparatus
CN101271396A (en) * 2008-04-15 2008-09-24 威盛电子股份有限公司 Electronic device and method for on-line updating firmware
CN101557583A (en) * 2009-03-19 2009-10-14 珠海银邮光电技术发展股份有限公司 Remote-updating and version-switching method of repeater equipment embedded software
CN101667133A (en) * 2009-09-30 2010-03-10 威盛电子股份有限公司 Method for updating firmware and chip updating firmware by using same
CN101770384A (en) * 2010-01-18 2010-07-07 深圳市航盛电子股份有限公司 Car audio system and software upgrading method thereof
CN101950253A (en) * 2010-08-12 2011-01-19 深圳市共进电子有限公司 Method for upgrading optical module firmware in optical network unit by utilizing WEB webpage interface
CN102622253A (en) * 2012-03-09 2012-08-01 瑞斯康达科技发展股份有限公司 Singlechip and method for upgrading singlechip on line

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101021794A (en) * 2006-05-25 2007-08-22 杭州晟元芯片技术有限公司 Program bootstrap method after chip power-on
CN101231594A (en) * 2007-01-22 2008-07-30 华为技术有限公司 System self-lifting method and apparatus
CN101271396A (en) * 2008-04-15 2008-09-24 威盛电子股份有限公司 Electronic device and method for on-line updating firmware
CN101557583A (en) * 2009-03-19 2009-10-14 珠海银邮光电技术发展股份有限公司 Remote-updating and version-switching method of repeater equipment embedded software
CN101667133A (en) * 2009-09-30 2010-03-10 威盛电子股份有限公司 Method for updating firmware and chip updating firmware by using same
CN101770384A (en) * 2010-01-18 2010-07-07 深圳市航盛电子股份有限公司 Car audio system and software upgrading method thereof
CN101950253A (en) * 2010-08-12 2011-01-19 深圳市共进电子有限公司 Method for upgrading optical module firmware in optical network unit by utilizing WEB webpage interface
CN102622253A (en) * 2012-03-09 2012-08-01 瑞斯康达科技发展股份有限公司 Singlechip and method for upgrading singlechip on line

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
姜晓梅等: "基于ARM的IAP在线及远程升级技术", 《计算机应用》 *

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103246536B (en) * 2013-04-28 2016-01-06 常州南京大学高新技术研究院 The wireless firmware upgrade method of thing connection positioning system
CN103246536A (en) * 2013-04-28 2013-08-14 常州南京大学高新技术研究院 Method for wirelessly upgrading firmware of instrumented positioning system
CN103294513A (en) * 2013-06-25 2013-09-11 龙迅半导体科技(合肥)有限公司 Software upgrading method and device
CN104423984A (en) * 2013-08-29 2015-03-18 比亚迪股份有限公司 Online upgrading method and online upgrading system
CN104156237B (en) * 2014-07-23 2018-03-09 武汉精测电子集团股份有限公司 The online upgrading method of single-chip microcomputer
CN104156237A (en) * 2014-07-23 2014-11-19 武汉精测电子技术股份有限公司 Online single-chip microcomputer upgrading method
CN104461668A (en) * 2015-01-04 2015-03-25 上海雷尼威尔技术有限公司 User program upgrading method and system based on LWIP protocol stack
WO2016127835A1 (en) * 2015-02-11 2016-08-18 深圳配天智能技术研究院有限公司 Single chip microcomputer and online programming method therefor
CN105183501A (en) * 2015-08-10 2015-12-23 珠海格力电器股份有限公司 Method for preventing errors in online program writing
CN107729040A (en) * 2017-09-28 2018-02-23 郑州云海信息技术有限公司 A kind of IAP method and system of single-chip microcomputer
CN107861745A (en) * 2017-11-30 2018-03-30 厦门科华恒盛股份有限公司 A kind of application program online upgrading method, apparatus, equipment and storage medium
CN108920165A (en) * 2018-07-12 2018-11-30 北京行易道科技有限公司 Update method, device and the embedded device of software program
CN110262349A (en) * 2019-06-28 2019-09-20 中国航空工业集团公司雷华电子技术研究所 A kind of the remote online programmed method and system of C8051F series monolithic
CN110955439A (en) * 2019-12-16 2020-04-03 深圳市思天极创教育科技有限公司 Method and device for burning chip by Bluetooth based on mobile terminal
CN112527087A (en) * 2020-12-24 2021-03-19 上海宗镕电器有限公司 Hardware circuit structure of USB upgrading product firmware program
CN112527087B (en) * 2020-12-24 2022-05-06 上海宗镕电器有限公司 Hardware circuit structure of USB upgrading product firmware program
CN113553087A (en) * 2021-07-16 2021-10-26 湖北三江航天红峰控制有限公司 Singlechip program online upgrading method and device

Also Published As

Publication number Publication date
CN102945173B (en) 2016-06-29

Similar Documents

Publication Publication Date Title
CN102945173B (en) User program online upgrade system and upgrade method
CN104579719B (en) A kind of upgrade method and system, host computer and optical module of firmware
US10514930B2 (en) Setting a startup parameter and controlling startup of a mainboard
CN109358882B (en) Method and device for upgrading firmware of television terminal
US8136108B2 (en) Updating firmware with multiple processors
CN109358887B (en) On-line upgrading method, device and system for single chip microcomputer program
US20060010282A1 (en) Method and apparatus to boot a system by monitoring an operating status of a NAND flash memory
CN106569833B (en) DSP program online upgrading method with two-stage BOOT
CN101634960A (en) Method for revising BIOS parameter and regenerating checksum
CN104572387A (en) Method and device for debugging terminal in engineering mode
WO2021136200A1 (en) Bootloader loading method, storage medium, and embedded terminal
CN105760191A (en) Embedded system equipment programming mass production method
CN102279763A (en) Method for optimizing boot read-only memory (BOOTROM)
US20100030922A1 (en) Computer peripheral device implemented as optic storage device or/and removable disk by software emulation and implementing method thereof
EP3190514A1 (en) Boot on-line upgrading apparatus and method
CN107315607B (en) Drive self-adaptation loading system
CN104428751A (en) Program data updating method and equipment
CN109582332B (en) System upgrading method and device for Internet camera
CN114138295A (en) Method, device and system for upgrading application program firmware of electronic equipment
CN108153548A (en) A kind of EMMC firmware upgrade methods and device
US9223697B2 (en) Computer reprogramming method, data storage medium and motor vehicle computer
WO2017121077A1 (en) Method and device for switching between two boot files
KR20150072963A (en) Multisystem, and method of booting the same
CN108052337A (en) A kind of firmware upgrade method and device of eMMC production tools
CN115934114A (en) Software firmware online programming method and device and computer readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant