CN101241473B - Firmware erasing method and device - Google Patents

Firmware erasing method and device Download PDF

Info

Publication number
CN101241473B
CN101241473B CN2007100007886A CN200710000788A CN101241473B CN 101241473 B CN101241473 B CN 101241473B CN 2007100007886 A CN2007100007886 A CN 2007100007886A CN 200710000788 A CN200710000788 A CN 200710000788A CN 101241473 B CN101241473 B CN 101241473B
Authority
CN
China
Prior art keywords
wipe
wiping
erasing
type
piece
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.)
Active
Application number
CN2007100007886A
Other languages
Chinese (zh)
Other versions
CN101241473A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN2007100007886A priority Critical patent/CN101241473B/en
Publication of CN101241473A publication Critical patent/CN101241473A/en
Application granted granted Critical
Publication of CN101241473B publication Critical patent/CN101241473B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The present invention provides a firmware erasing method, including the first step, analyzing erasing command, acquiring carrying information in the erasing command; the second step, determining the erasing type according to the erasing type marker information in the relative information, wherein, the erasing type is one of the following: full wafer erasion, block erasion, erasing according to address; the third step, processing corresponding erasing process according to the erasing type determined in the second step; the fourth step, computing and collecting relative flash value, backing feed erasing feedback command to computer. In addition, the invention also provides a firmware erasing device. Using the invention smartly, effectively processes different erasing operation according to different needs, suitable for update mobile terminal product etc.

Description

Firmware erasing method and device
Technical field
The present invention relates to the communications field, and especially, relate to a kind of firmware erasing method and device.
Background technology
Now, the portable terminal product is constantly to diversified, multi-functional, high capacity development.Therefore, in the production run of portable terminal product, also need compatible more flash chip to deal with different needs, because the storage organization dividing mode difference of different flash chips, and the customized demand of different operators also is diversified, so, the upgrading of portable terminal product has been proposed more demand.Update mobile terminal software is the key factor of production cycle and supply of material pressure aspect how flexible and efficiently.
At present, the interface erase scheme that platform provider provides has two kinds: a kind of is to distribute according to the actual physical structure of chip, with Block is that unit is wiped, in the method, offer the upper strata wipe interface and the Flash physical arrangement is closely related, therefore the Flash physical arrangement of hardware must be known in the upper strata, but owing to chip sample diversified in specifications between the producer, so brought bigger compatibling problem; Another kind of scheme is the mode that adopts sheet to wipe, and with the interface that provides full wafer to wipe, the advantage of this scheme is that the physical arrangement that does not need to consider Flash is divided, but can not satisfy the demand of non-entire flash coverage mode upgrading.
At present, also do not propose and the irrelevant chip form of wiping that can realize firmware upgrade flexibly simultaneously again of Flash physical arrangement.
Summary of the invention
In order to solve the different and inefficient problem of upgrading in the space wiping, keep in the end product flash software upgrading in the correlation technique, for this reason, fundamental purpose of the present invention is to provide a kind of extendible, firmware erasing mechanism flexibly.
To achieve these goals, according to one embodiment of present invention, provide a kind of firmware erasing method.
This method may further comprise the steps: first step, resolve erasing instruction, and obtain the relevant information of carrying in the erasing instruction; Second step is determined the type of wiping according to the type code information of wiping in the relevant information, and wherein, the type of wiping is any in following: full wafer is wiped, piece is wiped, wipe according to the address; And third step, wipe processing accordingly according to the type of in second step, determining of wiping.
Wherein, relevant information comprises one or more in the following information: wipe initial address message (IAM), wipe termination address information, wipe type code information.
And above-mentioned third step further may further comprise the steps: steps A: determining to wipe type is that bottom data is handled and used the sheet erasing instruction to carry out erase operation under the full wafer situation of wiping; Step B: determining to wipe type is that bottom data is handled and used the piece erasing instruction to carry out erase operation under the piece situation of wiping; Step C: determining to wipe type under the situation of wiping according to the address, according to the sequence number of wiping the piece that initial address message (IAM)/wipe termination address information calculations needs wipe, bottom data is handled and is used the piece erasing instruction to carry out erase operation then.
Wherein, after having carried out step B, determine whether to have wiped all pieces, and do not wipe under the situation of all pieces, re-execute step B, up to having wiped all pieces definite.
In addition, erasing instruction comprises following field: instruction head, feedback marks, wipe start address, wipe termination address, instruct tail.
And this method further may further comprise the steps: the 4th step, calculate and collect corresponding flash value, and wipe feedback command to the computing machine feedback.Wherein, wipe feedback command and comprise following field: instruction head, erasing instruction, start address, end address, wipe type code, instruct tail.
According to another embodiment of the present invention, provide a kind of firmware erasing device.
This device comprises: the erasing instruction parsing module, be used for obtaining the relevant information that erasing instruction is carried, and wherein, relevant information comprises one or more in the following information: wipe initial address message (IAM), wipe termination address information, wipe type code information; Wipe the type determination module, be connected to the erasing instruction parsing module, be used for determining the type of wiping according to the type code information of wiping of relevant information, wherein, the type of wiping is any in following: full wafer is wiped, piece is wiped, wipe according to the address; And wipe processing module, and be connected to and wipe the type determination module, be used for according to wiping processing accordingly wiping the type of wiping that the type determination module determines.
Wherein, wipe that processing module carries out wipe to handle comprises: to determine to wipe type be under the full wafer situation of wiping wiping the type determination module, and the bottom data of wiping processing module is handled and used the sheet erasing instruction to carry out erase operation; To determine to wipe type be under the piece situation of wiping wiping the type determination module, and the bottom data of wiping processing module is handled and used the piece erasing instruction to carry out erase operation; And determine to wipe type under the situation of wiping wiping the type determination module according to the address, wipe processing module according to the sequence number of wiping the piece that initial address message (IAM)/wipe termination address information calculations needs wipe, bottom data is handled and is used the piece erasing instruction to carry out erase operation then.
And, wipe processing module having carried out after piece wipes, determine whether to have wiped all pieces, and do not wipe under the situation of all pieces determining, re-execute piece and wipe, up to having wiped all pieces.
By technique scheme of the present invention, can be under the prerequisite that does not change physical connection between existing computing machine and the terminal, utilize flexibly, have the erasing instruction of parameter, before flash writes, carry out different erase operations according to different demands, be applicable to a large amount of upgradings that portable terminal product etc. is carried out.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, do not constitute improper qualification of the present invention.In the accompanying drawings:
Fig. 1 is the process flow diagram of the firmware erasing method of the method according to this invention embodiment;
Fig. 2 is the synoptic diagram according to the erasing instruction structure of the embodiment of the invention;
Fig. 3 is the structural representation of wiping feedback command according to the embodiment of the invention;
Fig. 4 is the process flow diagram of judging according to erase mode in the firmware erasing method of the inventive method embodiment: and
Fig. 5 is the block diagram according to the firmware erasing device of apparatus of the present invention embodiment.
Embodiment
Embodiments of the invention are described below with reference to accompanying drawings.
Method embodiment
Method embodiment of the present invention is described at first with reference to the accompanying drawings.
In method embodiment of the present invention, provide a kind of firmware erasing method.
As shown in Figure 1, this method may further comprise the steps: step S102, resolve erasing instruction, and obtain the relevant information of carrying in the erasing instruction; Step S104 determines the type of wiping according to the type code information of wiping in the relevant information, and wherein, the type of wiping is any in following: full wafer is wiped, piece is wiped, wipe according to the address; Step S106 wipes processing accordingly according to the type of determining of wiping in second step; And step S 108, calculate and collect corresponding flash value, wipe feedback command to the computing machine feedback.
As shown in Figure 2, erasing instruction comprises following field: instruction head, feedback marks, wipe start address, wipe termination address, instruct tail.The relevant information of carrying in the erasing instruction comprises one or more in the following information: wipe initial address message (IAM), wipe termination address information, wipe type code information.Wherein, the pairing value of different erase mode can be set in wiping type identification information, for example, Flag=0 be set wipe corresponding to full wafer, Flag=1 wipes corresponding to piece, and Flag=0xFF is corresponding to wiping (see figure 4) according to the address.
As shown in Figure 3, wipe feedback command and comprise following field: instruction head, erasing instruction, start address, end address, wipe type code, instruct tail.
As shown in Figure 4, above-mentioned steps S106 further may further comprise the steps: steps A is that bottom data is handled and used the sheet erasing instruction to carry out erase operation under the full wafer situation of wiping determining to wipe type; Step B is that bottom data is handled and used the piece erasing instruction to carry out erase operation under the piece situation of wiping determining to wipe type; Step C is determining to wipe type under the situation of wiping according to the address, and according to the sequence number of wiping the piece that initial address message (IAM)/wipe termination address information calculations needs wipe, bottom data is handled and used the piece erasing instruction to carry out erase operation then.
Wherein, after having carried out step B, determine whether to have wiped all pieces, and do not wipe under the situation of all pieces, re-execute step B, up to having wiped all pieces definite.In addition, in the step B of Fig. 4, also need the piece of wiping is identified, whether this this piece of sign expression is wiped successfully.In step S403, calculate and collect corresponding flash information, erasing instruction feedback data packet so that order structure shown in Figure 3 is formed to computing machine feedback information needed, comprises start address, the end address of wiping the space and wipes information such as feeding back END instruction in the information.
Device embodiment
In device embodiment of the present invention, provide a kind of firmware erasing device 500.
As shown in Figure 5, this device comprises: erasing instruction parsing module 502, be used for obtaining the relevant information that erasing instruction is carried, wherein, relevant information comprises one or more in the following information: wipe initial address message (IAM), wipe termination address information, wipe type code information; Wipe type determination module 504, be connected to erasing instruction parsing module 502, be used for determining the type of wiping according to the type code information of wiping of relevant information that wherein, the type of wiping is any in following: full wafer is wiped, piece is wiped, wipe according to the address; And wipe processing module 506, and be connected to and wipe type determination module 504, be used for according to wiping processing accordingly wiping the types of wiping that type determination module 504 determines.
Wherein, wipe that processing module 506 carries out wipe to handle comprises: to determine to wipe type be under the full wafer situation of wiping wiping type determination module 504, and the bottom data of wiping processing module 506 is handled and used the sheet erasing instruction to carry out erase operation; To determine to wipe type be under the piece situation of wiping wiping type determination module 504, and the bottom data of wiping processing module 506 is handled and used the piece erasing instruction to carry out erase operation; And determine to wipe type under the situation of wiping wiping type determination module 404 according to the address, wipe processing module 406 according to the sequence number of wiping the piece that initial address message (IAM)/wipe termination address information calculations needs wipe, bottom data is handled and is used the piece erasing instruction to carry out erase operation then.
And, wipe processing module 506 having carried out after piece wipes, determine whether to have wiped all pieces, and do not wipe under the situation of all pieces determining, re-execute piece and wipe, up to having wiped all pieces.
By top description as can be seen, compare the firmware erasing technology in the correlation technique, the present invention adopts the erasing instruction with parameter, can be before firmware upgrade select that the flash full wafer is wiped, piece is wiped or operation such as wipe according to address realm according to different demands, piece after wiping is carried out mark, and give computing machine with the flash information feedback, adapting to the needs of different types of terminals upgrading, and satisfy the demand data that handle on the upper strata.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (9)

1. a firmware erasing method is characterized in that, may further comprise the steps:
First step is resolved erasing instruction, obtains the relevant information of carrying in the described erasing instruction, and wherein, described relevant information comprises one or more in the following information: wipe initial address message (IAM), wipe termination address information, wipe type code information;
Second step is determined the type of wiping according to the type code information of wiping in the described relevant information, and wherein, described type of wiping is any in following: full wafer is wiped, piece is wiped, wipe according to the address; And
Third step is wiped processing accordingly according to the type of determining of wiping in described second step.
2. firmware erasing method according to claim 1 is characterized in that, described third step further may further comprise the steps:
Steps A: determining to wipe type is that bottom data is handled and used the sheet erasing instruction to carry out erase operation under the full wafer situation of wiping;
Step B: determining to wipe type is that bottom data is handled and used the piece erasing instruction to carry out erase operation under the piece situation of wiping;
Step C: determining to wipe type under the situation of wiping according to the address, according to described sequence number of wiping the piece that initial address message (IAM)/wipe termination address information calculations needs wipe, bottom data is handled and is used the piece erasing instruction to carry out erase operation then.
3. firmware erasing method according to claim 2 is characterized in that, after having carried out described step B, determine whether to have wiped all pieces, and do not wipe under the situation of all pieces definite, re-execute described step B, up to having wiped all pieces.
4. firmware erasing method according to claim 1 is characterized in that, described erasing instruction comprises following field: instruction head, feedback marks, wipe start address, wipe termination address, instruct tail.
5. firmware erasing method according to claim 1 is characterized in that, further may further comprise the steps:
Corresponding flash value is calculated and collected to the 4th step, wipes feedback command to the computing machine feedback.
6. firmware erasing method according to claim 5 is characterized in that, the described feedback command of wiping comprises following field: instruction head, erasing instruction, start address, end address, wipe type code, instruct tail.
7. a firmware erasing device is characterized in that, comprising:
The erasing instruction parsing module is used for obtaining the relevant information that erasing instruction is carried, and wherein, relevant information comprises one or more in the following information: wipe initial address message (IAM), wipe termination address information, wipe type code information;
Wipe the type determination module, be connected to described erasing instruction parsing module, be used for determining the type of wiping according to the type code information of wiping of described relevant information that wherein, described type of wiping is any in following: full wafer is wiped, piece is wiped, wipe according to the address; And
Wipe processing module, be connected to the described type determination module of wiping, be used for according to wiping processing accordingly in the described definite type of wiping of type determination module of wiping.
8. firmware erasing device according to claim 7 is characterized in that, described wipe that processing module carries out wipe to handle and comprise:
Wipe the type determination module to determine to wipe type be that the described bottom data of wiping processing module is handled and used the sheet erasing instruction to carry out erase operation under the full wafer situation of wiping described;
Wipe the type determination module to determine to wipe type be that the described bottom data of wiping processing module is handled and used the piece erasing instruction to carry out erase operation under the piece situation of wiping described;
Determine to wipe type under the situation of wiping at the described type determination module of wiping according to the address, the described processing module of wiping is according to described sequence number of wiping the piece that initial address message (IAM)/wipe termination address information calculations needs wipe, and bottom data is handled and used the piece erasing instruction to carry out erase operation then.
9. firmware erasing device according to claim 8 is characterized in that, the described processing module of wiping is being carried out after piece wipes, determine whether to have wiped all pieces, and do not wipe under the situation of all pieces definite, re-execute piece and wipe, up to having wiped all pieces.
CN2007100007886A 2007-02-09 2007-02-09 Firmware erasing method and device Active CN101241473B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2007100007886A CN101241473B (en) 2007-02-09 2007-02-09 Firmware erasing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007100007886A CN101241473B (en) 2007-02-09 2007-02-09 Firmware erasing method and device

Publications (2)

Publication Number Publication Date
CN101241473A CN101241473A (en) 2008-08-13
CN101241473B true CN101241473B (en) 2010-09-08

Family

ID=39933014

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2007100007886A Active CN101241473B (en) 2007-02-09 2007-02-09 Firmware erasing method and device

Country Status (1)

Country Link
CN (1) CN101241473B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6748482B1 (en) * 2000-09-27 2004-06-08 Intel Corporation Multiple non-contiguous block erase in flash memory
CN1694184A (en) * 2004-05-07 2005-11-09 三星电子株式会社 Non-volatile semiconductor memory device and multi-block erase method thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6748482B1 (en) * 2000-09-27 2004-06-08 Intel Corporation Multiple non-contiguous block erase in flash memory
CN1694184A (en) * 2004-05-07 2005-11-09 三星电子株式会社 Non-volatile semiconductor memory device and multi-block erase method thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
张勇.C/C++语言硬件程序设计—基于TMS320C5000系列DSP 1.西安电子科技大学出版社,2003,全文. *
郭隆健,尤一鸣.对MC68HC908内Flash在线编程的一种方法.单片机与嵌入式***应用 12.2006,(12),1-3. *

Also Published As

Publication number Publication date
CN101241473A (en) 2008-08-13

Similar Documents

Publication Publication Date Title
CN101593157B (en) Bad block management (BBM) method and device for Nand Flash
JP4851855B2 (en) Work results collection system
CN101840317A (en) Device and method for automatically configuring print driver
CN104991872A (en) Method and apparatus for implementing driving of intelligent device on peripheral device
CN103208056B (en) Based on medicine traceability system and the medicine retroactive method thereof of trajectory track
CN108170476A (en) A kind of method and system for recording server B ios release information
CN101246440B (en) Java card system rubbish recovering method
CN107832041A (en) Thematic page animation method, apparatus, equipment and readable storage medium storing program for executing
CN108874414A (en) Method for upgrading software, device, readable storage medium storing program for executing and television equipment
CN101241473B (en) Firmware erasing method and device
CN106997296B (en) Equipment identification matching method and network equipment
CN106156173A (en) Cheating identification method and device and terminal
CN104994459A (en) Terminal digital power amplifier configuration method and device
CN102541639A (en) CPU (Central Processing Unit) card data processing method, CPU card data processing system and CPU card
CN103412759A (en) Production data recovery method and terminal
CN104133743A (en) Method and device for burning file into EMMC (Embedded MultiMedia Card)
CN1975701B (en) Master machine driving external equipment method and system
CN107423075A (en) The register method and user terminal of driving
CN102632023A (en) Dispensing process for LED (light-emitting diode) encapsulation
CN102053571A (en) Data acquisition method of information acquisition terminal
CN103336241A (en) Method and system for testing Modem module on embedded PCBA (Printed Circuit Board Assembly)
CN109597639A (en) A kind of method for upgrading software, device, equipment and medium
CN101296448B (en) A kind of upgrade method of terminal software and device
CN103955386A (en) Method and device for upgrading storage equipment firmware
CN105915975B (en) The asynchronous control system and method for LED screen content are updated with mobile device

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