CN103092713A - Method for storing embedded code by using NAND flash - Google Patents
Method for storing embedded code by using NAND flash Download PDFInfo
- Publication number
- CN103092713A CN103092713A CN2012104422056A CN201210442205A CN103092713A CN 103092713 A CN103092713 A CN 103092713A CN 2012104422056 A CN2012104422056 A CN 2012104422056A CN 201210442205 A CN201210442205 A CN 201210442205A CN 103092713 A CN103092713 A CN 103092713A
- Authority
- CN
- China
- Prior art keywords
- code
- embedded code
- execution
- nand flash
- flash memory
- 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
Links
Images
Abstract
The invention discloses a method for storing an embedded code by using a NAND flash. The method comprises the following steps of: A, reading a code from the NAND flash memory; B, judging whether error checking and correcting (ECC) is correct or not, returning to the step A if the ECC is correct, otherwise executing a step C; and C, performing the ECC on the code, judging whether the ECC is successful or not, returning to the step A if the ECC is successful, otherwise reading the next backup code, and returning to the step B. According to the method, the NAND flash can be used for storing the embedded code, so that the storage stability of the embedded code is improved.
Description
Technical field
The present invention relates to store the method for embedded code, refer in particular to a kind of method of use and the embedded code of non-flash memory storage.
Background technology
In the prior art, nonvolatile flash memory commonly used generally can be divided into two large classes, and a class is or non-flash memory (Nor Flash), another kind of right and wrong flash memory (Nand Flash).Nor Flash wherein is parallel organization, but random access, support the local runtime of embedded code, stability is fine, and have data reading speed faster, so be generally used for storage and the data storage of the embedded code in system, perhaps be used for the application that runs without interruption, for example, cell phone etc.Nand Flash is a kind of serial structure, adopt the sequential storage mode, has higher storage density than Nor Flash, the general application that is used for large buffer memory, for example, PDA, digital camera, Digital Video, IC-card, auto-navigation system, e-book, MP3 player, solid magnetic disc driver, 2.5G/3G cell phone, video flow processing and internet data download etc.
Develop rapidly along with technology, the scale of system level chip (SOC) is also increasing, the function of flush bonding processor is also more and more stronger, and its required embedded size of code also sharply increases thereupon, therefore the also corresponding increasing of memory capacity of needed Nor Flash.But due to Nor Flash higher storage density of more difficult realization in manufacture process, so the memory capacity of Nor Flash is generally all smaller, and the manufacturing cost of large capacity NorFlash is higher, has therefore caused the total cost of whole system higher.
Compare with Nor Flash, Nand Flash easily realizes very high storage density in manufacture process, therefore have larger memory capacity, and its memory capacity is generally tens times or the hundred times of Nor Flash, and its manufacturing cost is also relatively cheap, generally is used to jumbo data storage.But, because not supporting this locality of embedded code, do not carry out NandFlash, data reading speed slow (but having writing speed faster), and the stability of Nand Flash is good not, bad piece easily occurs, causes the contents lost of storing.And if the situation that code is lost occurs in system, the stability that makes whole system is become very poor, so the method for storing embedded code with Nand Flash in prior art all exists the shortcoming of poor stability.
In summary, because the method for the embedded code of storage of the prior art has shortcoming as above, therefore how proposing the method for the embedded code of a kind of better storage, to store reliably embedded code, is the technical matters of needing solution in this area badly.
Summary of the invention
The invention provides a kind of method of use and the embedded code of non-flash memory storage, store embedded code thereby can use reliably with non-flash memory.
Technical scheme of the present invention comprises:
A kind of method of use and the embedded code of non-flash memory storage, the method comprises:
A, from non-flash memory read embedded code;
Whether B, misjudgment inspection and correction verification be correct, if correct, returns to execution in step A; Otherwise, execution in step C;
C, code is carried out the ECC error correction, judge whether success of error correction, if execution in step A is returned in success; Otherwise, read next backup code, return to execution in step B.
Wherein, also comprise before described steps A: with backup code in the piece different from non-flash memory.
Wherein, returning to execution in step A in described step C also further comprises before: wrong backup code is carried out error correction upgrade.
Wherein, reading next backup code in described step C also further comprises before:
Judge whether current code is last backup code, if so, reports an error, process ends; Otherwise, continue execution in step C.
In summary, the invention provides a kind of method of using with the embedded code of non-flash memory storage, can be with storing embedded code with non-flash memory, thus improve the stability of embedded code storage.
Description of drawings
Fig. 1 is the process flow diagram that uses the method for the embedded code of Nand Flash storage in the embodiment of the present invention.
Embodiment
For making the purpose, technical solutions and advantages of the present invention express clearlyer, the present invention is further described in more detail below in conjunction with drawings and the specific embodiments.
Embodiments of the invention provide the method for a kind of use with the embedded code of non-flash memory storage.Figure 1 shows that in the embodiment of the present invention process flow diagram that uses with the method for the embedded code of non-flash memory storage, as shown in Figure 1, use the method with the embedded code of non-flash memory storage to comprise step as described below in embodiments of the invention:
In this step, after processor starts, if when this processor need to upgrade embedded code in buffer memory, it will read required embedded code from Nand Flash.
In this step, need to carry out the ECC verification to the above-mentioned embedded code that is read, and judge whether the ECC verification is correct.Described ECC is a kind of instruction error correcting technique, and this technology can not only detect the long numeric data mistake in embedded code, can also refer to simultaneously make wrong numerical digit and corrects.
Before carrying out above-mentioned steps 101~108, need in the different piece in Nand Flash, same section embedded code to be backed up in advance, the number of backup code can be decided as the case may be, can be two backup code, can be also a plurality of backup code, and each backup code have the ECC code.When processor reads certain section embedded code in Nand Flash, need first carry out the ECC verification to the embedded code of this section.If check results is correct, will the embedded code storage of this section in the buffer memory of processor, wait for being read into processor; If the check results mistake represents that some mistake has appearred in the embedded code of this section, at this moment, can carry out the ECC error correction to the embedded code that above-mentioned mistake occurs.If error correction success, with the embedded code storage after error correction in the buffer memory of processor, wait for being read into processor, and with the corresponding backup code of the embedded code of this section in the embedded code coverage Nand Flash after above-mentioned error correction; If there is ECC mistake that can not error correction, Nand Flash will read other backup code of the embedded code of this section, and repeat above-mentioned step, until the most correct embedded code storage in the buffer memory of processor, is used corresponding backup code in correct embedded code coverage Nand Flash simultaneously.
In Nand Flash, although it is higher to occur the likelihood ratio of random error in certain piece, but the associated errors between piece and piece seldom appears, therefore if with the embedded code of each section of required storage several backup code of storage in different piece in NandFlash, when mistake appears in certain section in certain piece embedded code, can obtain correct embedded code by reading in other pieces corresponding backup code, thereby greatly improve Systems balanth.
In sum, embodiments of the invention provide a kind of method of using with the embedded code of non-flash memory storage, therefore can be with storing embedded code with non-flash memory, thus improve the stability of embedded code storage.
The above is only preferred embodiment of the present invention, is not for limiting protection scope of the present invention.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.
Claims (4)
1. the method for a use and the embedded code of non-flash memory storage, is characterized in that, the method comprises:
A, from non-flash memory read embedded code;
Whether B, misjudgment inspection and correction verification be correct, if correct, returns to execution in step A; Otherwise, execution in step C;
C, code is carried out the ECC error correction, judge whether success of error correction, if execution in step A is returned in success; Otherwise, read next backup code, return to execution in step B.
2. method according to claim 1, is characterized in that, also comprises before described steps A: with backup code in the piece different from non-flash memory.
3. method according to claim 1, is characterized in that, returns to execution in step A in described step C and also further comprise before: wrong backup code is carried out error correction upgrade.
4. method according to claim 1, is characterized in that, reads next backup code in described step C and also further comprise before:
Judge whether current code is last backup code, if so, reports an error, process ends; Otherwise, continue execution in step C.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2012104422056A CN103092713A (en) | 2012-11-07 | 2012-11-07 | Method for storing embedded code by using NAND flash |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2012104422056A CN103092713A (en) | 2012-11-07 | 2012-11-07 | Method for storing embedded code by using NAND flash |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103092713A true CN103092713A (en) | 2013-05-08 |
Family
ID=48205320
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2012104422056A Pending CN103092713A (en) | 2012-11-07 | 2012-11-07 | Method for storing embedded code by using NAND flash |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103092713A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107203436A (en) * | 2017-05-25 | 2017-09-26 | 郑州云海信息技术有限公司 | A kind of method and apparatus of Nand Flash datas verification |
CN109885342A (en) * | 2019-02-25 | 2019-06-14 | 深圳警翼智能科技股份有限公司 | A kind of system program restorative procedure of law-enforcing recorder |
CN111324291A (en) * | 2018-12-14 | 2020-06-23 | 北京兆易创新科技股份有限公司 | Memory device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101086715A (en) * | 2007-07-23 | 2007-12-12 | 北京中星微电子有限公司 | Method and device for reading CPU code |
CN102200937A (en) * | 2011-05-31 | 2011-09-28 | 深圳创维-Rgb电子有限公司 | Method, device and television system for reading data in not-and (NAND) flash memory |
CN102323907A (en) * | 2011-08-19 | 2012-01-18 | 长安大学 | Method for embedded ARM (advanced RISC machines) processor to store and delete NANDFLASH data |
US20120254699A1 (en) * | 2011-04-01 | 2012-10-04 | Ruby Paul D | Dynamic read channel calibration for non-volatile memory devices |
-
2012
- 2012-11-07 CN CN2012104422056A patent/CN103092713A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101086715A (en) * | 2007-07-23 | 2007-12-12 | 北京中星微电子有限公司 | Method and device for reading CPU code |
US20120254699A1 (en) * | 2011-04-01 | 2012-10-04 | Ruby Paul D | Dynamic read channel calibration for non-volatile memory devices |
CN102200937A (en) * | 2011-05-31 | 2011-09-28 | 深圳创维-Rgb电子有限公司 | Method, device and television system for reading data in not-and (NAND) flash memory |
CN102323907A (en) * | 2011-08-19 | 2012-01-18 | 长安大学 | Method for embedded ARM (advanced RISC machines) processor to store and delete NANDFLASH data |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107203436A (en) * | 2017-05-25 | 2017-09-26 | 郑州云海信息技术有限公司 | A kind of method and apparatus of Nand Flash datas verification |
CN107203436B (en) * | 2017-05-25 | 2021-04-06 | 郑州云海信息技术有限公司 | Method and device for data verification of Nand Flash |
CN111324291A (en) * | 2018-12-14 | 2020-06-23 | 北京兆易创新科技股份有限公司 | Memory device |
CN111324291B (en) * | 2018-12-14 | 2024-02-20 | 兆易创新科技集团股份有限公司 | Memory device |
CN109885342A (en) * | 2019-02-25 | 2019-06-14 | 深圳警翼智能科技股份有限公司 | A kind of system program restorative procedure of law-enforcing recorder |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107506257B (en) | Error checking, correcting and decoding method and device | |
US10068661B2 (en) | Post package repair (PPR) data in non-volatile memory | |
CN101427323B (en) | System and method for reading non-volatile computer memory | |
CN102117234B (en) | Method for recovering original software by mobile terminal in software upgrading failure | |
EP2294510B1 (en) | Method and apparatus for error correction according to erase counts of a solid-state memory | |
US10891185B2 (en) | Error counters on a memory device | |
US8996936B2 (en) | Enhanced error correction in memory devices | |
US8799555B2 (en) | Boot data storage schemes for electronic devices | |
CN102279776B (en) | Error checking and correcting ability testing method and device | |
CN106910528B (en) | Optimization method and device for data inspection of solid state disk | |
CN105808371A (en) | Data backup and recovery method, control chip and storage device | |
KR101337812B1 (en) | Memory buffer having accessible information after a program-fail | |
CN102750191A (en) | Method for initiating a refresh operation in a solid-state nonvolatile memory device | |
US20140082264A1 (en) | Nand flash storage chip checking method and device | |
CN103678030A (en) | Multi-system equipment start system and method thereof | |
CN104424040A (en) | Method for accessing storage unit in flash memory and device using the same | |
CN102200937A (en) | Method, device and television system for reading data in not-and (NAND) flash memory | |
CN104063477A (en) | Processing method and processing device for startup abnormalities of embedded system | |
CN103218271B (en) | A kind of data error-correcting method and device | |
US20120297115A1 (en) | Program code loading and accessing method, memory controller, and memory storage apparatus | |
CN100549971C (en) | A kind of method and device that reads the CPU code | |
US8966344B2 (en) | Data protecting method, memory controller and memory storage device | |
CN105005453A (en) | Bad block management system for satellite-based NAND FLASH solid memory | |
CN102890645A (en) | Memory storage device, memory controller and data writing method | |
CN103092713A (en) | Method for storing embedded code by using NAND flash |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20130508 |