CN106250193B - A kind of system start method and system based on nand memory - Google Patents

A kind of system start method and system based on nand memory Download PDF

Info

Publication number
CN106250193B
CN106250193B CN201610645099.XA CN201610645099A CN106250193B CN 106250193 B CN106250193 B CN 106250193B CN 201610645099 A CN201610645099 A CN 201610645099A CN 106250193 B CN106250193 B CN 106250193B
Authority
CN
China
Prior art keywords
retry
command sequence
nand memory
code
sequence parameter
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
CN201610645099.XA
Other languages
Chinese (zh)
Other versions
CN106250193A (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.)
SHANGHAI INFOTM MICROELECTRONICS CO Ltd
Original Assignee
SHANGHAI INFOTM MICROELECTRONICS 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 SHANGHAI INFOTM MICROELECTRONICS CO Ltd filed Critical SHANGHAI INFOTM MICROELECTRONICS CO Ltd
Priority to CN201610645099.XA priority Critical patent/CN106250193B/en
Publication of CN106250193A publication Critical patent/CN106250193A/en
Application granted granted Critical
Publication of CN106250193B publication Critical patent/CN106250193B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Read Only Memory (AREA)

Abstract

The invention discloses a kind of system start method and system based on nand memory, is related to nand memory field, comprising: nand memory, central processing unit, Installed System Memory;The nand memory is electrically connected with the central processing unit;The Installed System Memory is electrically connected with the central processing unit;The nand memory includes: page;The central processing unit includes: data read module;Data judgment module;Calculate correction verification module;Setup module;Starting module.The present invention is according to the ID of nand memory, by its corresponding Retry command sequence parameter backup into each page of nand memory, intrinsic chip starting code is substantially increased to the compatibility of nand memory, to solve under some usage scenarios, the case where system starting failure is carried out from nand memory is caused due to unsuitable Retry command sequence parameter.

Description

A kind of system start method and system based on nand memory
Technical field
The present invention relates to nand memory field more particularly to a kind of system start method based on nand memory and it is System.
Background technique
A kind of more commonly used storage medium of nand memory (NAND FLASH), suitable for the storage of mass data, More there is market in the frequent equipment for uploading or updating big file, such as: MP3 player, digital camera and usb driver all use Nand memory.The developing direction of nand memory technology is that chip is smaller, the read-write cycle is longer, voltage requirements are lower, these Improving will keep the application of nand memory technology more extensive.
Hardware feature based on nand memory: data relatively easy mistake in read-write, so in order to guarantee data Correctness, it is necessary to have corresponding detection and mechanism for correcting errors, this mechanism be called ECC (Error Correcting Code, Error checking and correction), nand memory can have bad data block, verify the data of reading, therefore, it is necessary to ECC with dimension Hold the integrality of data, include redundant area on each page of nand memory, the region can store ECC code and its Its picture wears grading or logic to the information of physical block mapping etc.Similarly, since the diversity of nand memory, NAND storage The ECC section highest ECC that mostly uses chip to be supported in the chip starting code of device, such as: all using 80bit ECC, And practical nand memory may it is desirable that 40bit ECC or 60bit ECC, why use highest ECC to be as far as possible for Facilitating chip starts code, and guarantees that chip can be compatible with a variety of different nand memories.
In nand memory, several data point voltage's distribiutings are possible to translate, as long as these data point voltage's distribiutings Not being superimposed can be by Read Retry pattern recovery, to guarantee correctly to read the data in nand memory. Read Retry refers to nand memory in the case where reading corrupt data while ECC can not be corrected again, inside nand memory A kind of mode for re-reading data of offer, needs to be arranged new Retry Level when re-reading data, that is, joins Voltage is examined, then reads data again with different Retry Level, different Retry Level is by different Retry parameter sequences Column setting.
It is subsequent to have no idea to modify since chip starting code is solidificated in inside chip, and nand memory is uninterrupted There is new product listing, and since the method for the Read Retry of newly formed nand memory can also change therewith, at this time core Piece, which will start new nand memory, must just corresponding mechanism, the variation of Lai Shiying nand memory.
It is most using higher ECC and general in the existing chip starting code for nand memory The mode of RetryLevel prepare more part is compatible with the nand memory with different Read Retry demands, general to reduce error Rate.
Summary of the invention
The object of the present invention is to provide a kind of system start method and system based on nand memory, can adaptively not With the Read Retry demand of nand memory, chip starting code is set preferably to be compatible with different nand memories, to solve Certainly under some usage scenarios, the case where nand memory can not being made normally to start due to no corresponding Read Retry.
Technical solution provided by the invention is as follows:
A kind of system start method based on nand memory, including Retry command sequence is joined in S10:NAND memory Several read methods, comprising steps of after step S100 is powered on, in the page that nand memory multiple parameters back up, according to core The rule of piece starting code is successively read data, if reading data success, thens follow the steps S110;The step S100 is also wrapped Include: if step S101 reads data failure, continuation reads data in next page;Wherein, the chip starts code It include: preset ECC, format and general Retry Level;The rule of the chip starting code refers to: preset ECC and lattice Formula;The parameter includes: the Retry command sequence parameter;Step S110 checks whether the data of the reading are full ff, if It is to then follow the steps S101, if it is not, thening follow the steps S120;Step S120 judges that the header data of the data of the reading is special It levies whether code is parameter attribute code, if so, the data of the reading are Retry command sequence parameter, executes step S130;Step The Retry command sequence parameter read in the page that rapid S130 backs up nand memory multiple parameters carries out crc calculating And verify, if verification is correct, the Retry command sequence parameter is saved in Installed System Memory, and execute step S210;If It verifies incorrect, then the correct Retry command sequence parameter has not been obtained, directly executes step S210;S20:NAND storage The read method of system starting code in device, comprising steps of step S210 has system starting code from nand memory burning In page, the system is successively read according to the rule that chip starts code and starts code;If the step S230 system starting Code reads failure, then the RetryLevel new according to the Retry command sequence parameter setting read in nand memory; Step S240 reads again the starting code of the system in nand memory according to the new Retry Level;Step S250 is jumped in Installed System Memory after successfully running through the system starting code in nand memory and is completed system starting.
It is further preferred that in the S10:NAND memory in the read method of Retry command sequence parameter, the step Rapid S120 further include: whether the header data condition code for judging the data of the reading is parameter attribute code, if it is not, then executing step Rapid S200;In the S20:NAND memory in the read method of system starting code, before the step S210 further include: step Rapid S200 judges whether the data of the reading are the system starting code data, if so, step S210 is continued to execute, if No, then feedback error information starts code to chip, and executes step S410;The system starting side based on nand memory Method further includes S40: chip starting code is connected to operating method when error message feedback, comprising steps of step S410 chip opens Dynamic code jumps to another starting device and carries out system starting.
It is further preferred that in the S20:NAND memory in the read method of system starting code, the step If further comprising the steps of: the step S220 system starting code data between S210 and the step S230 reads failure, judgement Whether the system starting code data can successfully be read by the preset ECC and general Retry Level, if still Failure is read, S230 is thened follow the steps, if reading successfully, thens follow the steps S250.
It is further preferred that in the S20:NAND memory in the read method of system starting code, further includes: step If the S260 system starting code can not successfully be read, the error message is fed back to chip and starts code, and executes step Rapid S410.
It is further preferred that further including S30: the method for burn-recording of the Retry command sequence parameter after system starting, including step Rapid: step S300 is successively read the Retry order sequence in Installed System Memory after system starts, according to the rule that chip starts code Column parameter thens follow the steps S310 if not reading the Retry command sequence parameter;Step S310 reads NAND storage The ID of device;Step S320 obtains the corresponding Retry command sequence parameter simultaneously according to the ID of the nand memory of reading It saves in system memory;Step S340 carries out crc calculating and school to the Retry command sequence parameter in Installed System Memory It tests, if verification is correct, when reading corrupt data in system memory, is re-read according to the Retry command sequence parameter Data then follow the steps S310 if verification is incorrect;If step S350 has read the ID of the nand memory, and obtains The corresponding Retry command sequence parameter starts the rule of code according to chip after verification is correct, just the verification Retry command sequence parameter after really, which is sequentially stored into each page of nand memory, carries out parameter backup.
It is further preferred that the S30: in the method for burn-recording of the Retry command sequence parameter after system starting, the step Rapid S320 is specifically included: step S321 obtains corresponding Retry rule according to the ID of the nand memory of reading;Step S322 converts corresponding Retry argument sequence according to preset rules for the Retry rule;Step S323 is according to Retry argument sequence sets gradually corresponding Retry Level;Step S324 converts the Retry Level to corresponding The Retry command sequence parameter of NAND controller.
It is further preferred that the S30: in the method for burn-recording of the Retry command sequence parameter after system starting, the step Between the rapid S320 and step S340 further include: step S330 calculates the first crc of the Retry command sequence parameter, and The first crc of calculating is placed on the head of the Retry command sequence parameter.
It is further preferred that the S30: in the method for burn-recording of the Retry command sequence parameter after system starting, the step The Retry command sequence parameter is carried out crc calculating and verified to specifically include in rapid S340: step S341 computing system memory In the Retry command sequence parameter the 2nd crc;Step S342 obtains the Retry command sequence in the Installed System Memory First crc on the head in parameter;First crc is compared by step S343 with the 2nd crc, if unanimously, Then verification is correct, if inconsistent, verifies incorrect.
The present invention also provides a kind of systems, comprising: nand memory, central processing unit, Installed System Memory;The NAND storage Device is electrically connected with the central processing unit;The Installed System Memory is electrically connected with the central processing unit;The nand memory packet It includes: page and is stored with parameter, and, system starts code;Wherein, the parameter includes: Retry command sequence parameter;It is described Installed System Memory, if being further used for the Retry command sequence read in the page that nand memory multiple parameters back up Parameter carries out crc verification correctly, then the Retry command sequence parameter is saved in Installed System Memory;The central processing unit Include: data read module, in the page that the nand memory multiple parameters back up, starts the rule of code according to chip It is successively read data;If reading data failure, continuation reads data in next page;And it is burnt from nand memory Record has in the page of system starting code, is successively read the system according to the rule that chip starts code and starts code;And If the system starting code reads failure, again according to the new Retry Level of the Retry command sequence parameter setting The system in secondary reading nand memory starts code;Wherein, the chip starting code includes: preset ECC, format With general Retry Level;The rule of the chip starting code includes: preset ECC and format;Data judgment module, inspection Whether the data for looking into the reading are full ff;And if the data of the reading are not full ff, further judge the reading The header data condition codes of data whether be parameter attribute code;Correction verification module is calculated, nand memory multiple parameters are backed up Page in the Retry command sequence parameter that reads carry out crc calculating and verify;Setup module, if the system starts Code reads failure, then the RetryLevel new according to the Retry command sequence parameter setting read in nand memory; Starting module is jumped in the Installed System Memory and is completed after successfully running through the system starting code in nand memory System starting.
It is further preferred that the data judgment module, if the header data condition code of the data of the reading is not ginseng When number condition code, it is further used for judging whether the data of the reading are the system starting code data;The centre Manage device further include: error feedback module feeds back the mistake letter if the data of the reading are not the system starting codes It ceases and starts code to chip;The starting module, if being further used for receiving the error message, chip starting code is jumped to Another starting device carries out system starting.
It is further preferred that the central processing unit further include: judgment module is read, if the system starts code data Failure is read, the reading judgment module judges whether successfully read by the preset ECC and general Retry Level Take the system starting code data.
It is further preferred that error feedback module, if being further used for the system starting code can not successfully read, It feeds back the error message and starts code to chip.
It is further preferred that the data read module is further used for starting code according to chip after system starting Rule be successively read the Retry command sequence parameter in Installed System Memory;And if the Retry order sequence is not read Column parameter then reads the ID of nand memory;And if the Retry command sequence parameter in Installed System Memory carries out the school crc When testing correct, when reading corrupt data in system memory, data are re-read according to the Retry command sequence parameter;Institute State central processing unit further include: parameter acquisition module, if do not read in Installed System Memory the Retry command sequence parameter or When examining incorrect to the Retry command sequence parameter progress crc in Installed System Memory, stored according to the NAND of reading The ID of device obtains the corresponding Retry command sequence parameter;The calculating correction verification module, is further used for Installed System Memory In the Retry command sequence parameter crc calculating and verify;The Installed System Memory, being further used for will be according to reading The nand memory ID obtain the corresponding Retry command sequence parameter be saved in the Installed System Memory;Institute Page is stated, if having read the ID of the nand memory, and the corresponding Retry command sequence parameter is obtained, is verifying After correct, be further used for starting the rule of code according to chip, the Retry command sequence parameter of the verification after correct according to Parameter backup is carried out in each page of secondary deposit nand memory.
It is further preferred that the parameter acquisition module specifically includes: Rule submodule, according to reading The ID of nand memory obtains corresponding Retry rule;Sequence Transformed submodule, by the Retry rule according to preset rules It is converted into corresponding Retry argument sequence;Setting submodule is set gradually corresponding according to the Retry argument sequence Retry Level;Parameter converts submodule, converts the Retry Level to the Retry order of corresponding NAND controller Sequential parameter.
It is further preferred that the calculating correction verification module, is further used for calculate the Retry command sequence parameter One crc, and the first crc of calculating is placed on the head of the Retry command sequence parameter.
It is further preferred that the calculating correction verification module includes: computational submodule, it is described in computing system memory 2nd crc of Retry command sequence parameter;Acquisition submodule obtains in the Retry command sequence parameter in the Installed System Memory Head the first crc;Submodule is examined, the first crc is compared with the 2nd crc, if unanimously, school It tests correctly, if inconsistent, verifies incorrect.
Compared with prior art, the beneficial effects of the present invention are:
1, it is stored with its Retry command sequence parameter for adapting to its own in nand memory of the invention, is reading Data (such as: system the start code) error of nand memory can not start ECC in code and general by chip When Retry Level carries out Data correction, restores, it can be set according to the Retry command sequence parameter saved in nand memory New Retry Level is set, to re-read the data in nand memory in Read Retry mode, is improved solid Some chips starting code to the compatibility of different nand memories, also reduce nand memory can not normally start it is general Rate.
2, when reading the data in nand memory, need to parse the type for the data that can just know reading to the end, Typically, since having the Retry command sequence parameter for its own model, therefore, first step meeting in nand memory First the data of reading are judged, retrieves and whether there is this Retry command sequence parameter in nand memory, if there is Words just first read this Retry command sequence parameter, are saved into Installed System Memory after verification is correct, then read again System in nand memory starts code, just new according to the Retry command sequence parameter setting read if reading error Retry Level re-reads system starting code, completes the Read Retry of data;If the data read are system startings Code then illustrates the Retry command sequence parameter for not having corresponding in nand memory, can only first read system starting generation Code after starting system, obtains its corresponding Retry command sequence parameter according to the ID of nand memory in the follow-up process Afterwards, it then backups in the page of nand memory.In this way when carrying out system starting from this nand memory next time, so that it may use This Retry command sequence parameter carries out Read Retry, improves system to the compatibility of nand memory.
3, there are preset ECC and general Retry Level in chip starting code, in the data for reading nand memory When error, can according to circumstances it be corrected by preset ECC and general Retry Level, general Retry Level here It is solidificated in chip starting code, is not to be tailored according to the ID of nand memory, therefore, newly go out for some Or the nand memory that compares unexpected winner it is useless, if read corrupt data, if can not being corrected by preset ECC, Also Read Retry can not may be carried out using general Retry Level, also can not just be read from nand memory correctly Data cause nand memory not start normally, it is understood that incompatible for nand memory.
4, by nand memory carry out system starting process in, if the data read in nand memory neither Retry command sequence parameter is also not system starting code, then illustrates that there are mistakes in operating process, also can not just deposit from NAND Reservoir carries out system starting, at this time will feedback error information give chip to start code, guarantee that chip starting code can be from Another starting device carries out system starting.
5, after system starts, it can first be read and be previously saved in system memory according to the rule that chip starts code Retry command sequence parameter, if not talking about this Retry command sequence parameter, it is right not with it in nand memory to illustrate Therefore the Retry command sequence parameter answered can read the ID of current nand memory, obtain its corresponding Retry command sequence Parameter first saves in system memory, then after calculating and verifying correctly, then is backuped to the page of nand memory In.When carrying out system starting from this nand memory next time, when the corrupt data for reading its storage again can not be by preset When ECC and general Retry Level are corrected, can mostly a kind of reading data, bearing calibration, that is, pass through this Retry order Sequential parameter carries out Read Retry, improves the compatibility of nand memory and chip starting code.
6, according to the ID of nand memory, the Retry rule obtained first, the Retry rule meeting of each nand memory It is different, it is therefore desirable to which that they are converted into the Retry argument sequence of same format according to default rule;It is converted into identical After the Retry argument sequence of rule, so that it may which corresponding Retry Level is set, due to reading data from nand memory The controller of corresponding nand memory in chip is needed to be controlled, therefore, it is necessary to be again converted to this Retry Level The Retry command sequence parameter that this controller can identify is saved;When Retry command sequence parameter is correct by verification Afterwards, when reading corrupt data, the controller of nand memory can execute this Retry command sequence parameter, be arranged new Retry Level re-reads data, completes Read Retry.
7, after system starts, again the Retry command sequence parameter in Installed System Memory can be carried out calculating its first Crc, and this first crc is placed on the head of Retry command sequence parameter, this Retry command sequence parameter is read to be subsequent When Shi Jinhang is calculated and verified, comparison basis is provided.
8, when reading Retry command sequence parameter in system memory, the Retry command sequence read can first be calculated Then this 2nd crc is compared by the 2nd crc of parameter with the first crc on the head of Retry command sequence parameter again, if Unanimously, then verification is correct;When chip starting code reads the Retry command sequence parameter in nand memory, calculated And the process verified is similarly.
System start method and system based on nand memory of the invention, it is according to the ID of nand memory, its is right The Retry command sequence parameter backup answered is into each page of nand memory, during the system startup process, if reading NAND Corrupt data in memory, and in the case where can not being corrected by preset ECC and general Retry Level, more one kind Guarantee to read the successful method of data, new using Retry command sequence parameter setting corresponding with nand memory itself Retry Level re-reads data, carries out Read Retry, substantially increases intrinsic chip starting code and deposits to NAND The compatibility of reservoir, thus solve under some usage scenarios, caused due to unsuitable Retry command sequence parameter from Nand memory carries out the case where system starting failure.
Detailed description of the invention
Below by clearly understandable mode, preferred embodiment is described with reference to the drawings, nand memory is based on to one kind System start method and above-mentioned characteristic, technical characteristic, advantage and its implementation of system be further described.
Fig. 1 is the flow chart of system start method one embodiment the present invention is based on nand memory;
Fig. 2 is that the present invention is based on the flow charts of another embodiment of the system start method of nand memory;
Fig. 3 is that the present invention is based on the flow charts of another embodiment of the system start method of nand memory;
Fig. 4 is the structural schematic diagram of present system one embodiment;
Fig. 5 is the structural schematic diagram of another embodiment of present system.
Drawing reference numeral explanation:
100.NAND memory, 110.page, 200. central processing units, 210. data read modules, the judgement of 220. data Module, 230. calculate correction verification module, 231. computational submodules, 232. acquisition submodules, 233. verification submodules, 240. setting moulds Block, 250. starting modules, 260. error feedback modules, 270. read judgment module, 280. parameter acquisition modules, and 281. rules obtain Take submodule, 282. Sequence Transformed submodules, 283. setting submodules, 284. parameters conversion submodule, 300. Installed System Memories.
Specific embodiment
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, Detailed description of the invention will be compareed below A specific embodiment of the invention.It should be evident that drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing, and obtain other embodiments.
To make simplified form, part related to the present invention is only schematically shown in each figure, they are not represented Its practical structures as product.In addition, there is identical structure or function in some figures so that simplified form is easy to understand Component only symbolically depicts one of those, or has only marked one of those.Herein, "one" is not only indicated " only this ", can also indicate the situation of " more than one ".
In one embodiment of the invention, as shown in Figure 1, a kind of system start method based on nand memory, packet The read method of Retry command sequence parameter in S10:NAND memory is included, comprising steps of after step S100 is powered on, from NAND In the page of memory multiple parameters backup, data are successively read according to the rule that chip starts code, if reading data success, Then follow the steps S110;The step S100 further include: if step S101 reads data failure, continue in next page Read data;Wherein, the chip starting code includes: preset ECC, format and general Retry Level;The chip opens The rule of dynamic code refers to: preset ECC and format;The parameter includes: the Retry command sequence parameter;Step S110 Whether the data for checking the reading are full ff, if so, S101 is thened follow the steps, if it is not, thening follow the steps S120;Step S120 Whether the header data condition code for judging the data of the reading is parameter attribute code, if so, the data of the reading are Retry command sequence parameter executes step S130;It is read in the page that step S130 backs up nand memory multiple parameters The Retry command sequence parameter carries out crc calculating and verifies, if verification is correct, the Retry command sequence parameter is protected It is stored in Installed System Memory, and executes step S210;If verification is incorrect, the correctly Retry command sequence ginseng has not been obtained Number, directly execution step S210;The read method of system starting code in S20:NAND memory, comprising steps of step S210 In the page that nand memory burning has system starting code, the system is successively read according to the rule that chip starts code Start code;If the step S230 system starting code reads failure, according to the Retry read in nand memory The new Retry Level of command sequence parameter setting;Step S240 reads again NAND according to the new Retry Level and deposits The system in reservoir starts code;Step S250 ought successfully run through the system starting code in nand memory Afterwards, it jumps in Installed System Memory and completes system starting.
Specifically, the data store organisation of nand memory is layered again are as follows: block (block), block are divided into page (page), can be with It is interpreted as 1 equipment (device)=A block (block);1 piece=B pages/row (page/row);Page 1=C byte=data area (D Byte)+redundant area (E byte), A/B/C/D/E here is reference numerals.Due to the diversity of nand memory, The quantity of block is different, and subsequent page size is caused also to be not fixed, and in order to which facilitating chip starts code, control NAND is deposited It is full that the chip starting code of reservoir mostly uses page short mode, page short mode to refer to that each page does not write, Such as the page of a 8K size, the valid data of 1K are only written, significant figure is written all in accordance with 1K in the page of same 4K, 16K etc. According to being started in this way according to chip and not needing to read the ID of NAND when code reads the data in nand memory and confirm page Size, as long as and data that successively each page reads 1K ensure that the reading of valid data.Start code according to chip Rule in format, so that it may the data this mode for being interpreted as reading 1K in each page is read in nand memory Data.
The system starting carried out from nand memory is intended to read the Retry in nand memory first after the power-up Command sequence parameter, after reading data, whether the data for first judging reading are full ff, and full ff means not read Data are not written by valid data, i.e., current page, it is therefore desirable to read again in the page quickly jumped in other block Fetch evidence, specific operating process for example: can will page jump 128 after read data again.
Although want to read at the beginning is Retry command sequence parameter, only when the data read are resolved to most Its data type is just known when afterwards, if its header data condition code is parameter attribute code, illustrates that the data read are Retry command sequence parameter;At this time, crc will be carried out to the Retry command sequence parameter of reading (CyclicRedundancy Check, cyclic redundancy check) calculates, that is, calculates the Retry order read from nand memory 2nd crc of sequential parameter, and be compared with the first crc in its head, if unanimously, verifying success, the school of this step Testing is correctness in order to guarantee the Retry command sequence parameter read, just only it correctly can guarantee later use this Retry command sequence parameter carries out successfully reading data when Read Retry.After verification is correct, this Retry can be ordered Sequential parameter is enabled to be saved in Installed System Memory, to provide the machine of Read Retry when reading corrupt data after follow-up system starting Meeting.Crc is a kind of hash function that brief fixed digit check code is generated according to data such as network packet or computer documents, main The mistake that be used to detect or verify data transmission or be likely to occur after saving.
After successfully getting correct Retry command sequence parameter, it will continue to reading and store in the nand memory System starts code, in the starting code error of the system of reading, can be entered according to the Retry command sequence parameter read ReadRetry mode is new according to the new Retry Level of the Retry command sequence parameter setting read, then with these RetryLevel attempts to re-read system starting code, since Retry command sequence parameter here is particular for working as Preceding nand memory itself and it is existing, therefore read the successful probability of data greatly improve;When successfully will be in nand memory The system starting code run through after, just jump in Installed System Memory complete system starting.
Preferably, in the S10:NAND memory in the read method of Retry command sequence parameter, the step S120 Further include: whether the header data condition code for judging the data of the reading is parameter attribute code, if it is not, thening follow the steps S200;In the S20:NAND memory in the read method of system starting code, before the step S210 further include: step S200 judges whether the data of the reading are the system starting code data, if so, step S210 is continued to execute, if It is no, then the error message is fed back to chip and starts code, and executes step S410;The system based on nand memory opens Dynamic method, further includes S40: chip starting code is connected to operating method when error message feedback, comprising steps of step S410 core Piece starting code jumps to another starting device and carries out system starting.
Specifically, the data read from nand memory at the beginning after to powering on judge, it is found that it is not Retry command sequence parameter, but when system starting code, then illustrate to be not present and this nand memory phase in nand memory The Retry command sequence parameter of adaptation skips the step of reading Retry command sequence parameter, directly reads system starting code; If it was found that the data read neither Retry command sequence parameter, nor system starts code, then illustrate that reading data occurs Mistake allows chip to start code and carries out from another starting device therefore, it is necessary to which error message is fed back to chip starting code System starting.
Preferably, in the S20:NAND memory in the read method of system starting code, the step S210 and institute Failure is read if stating and further comprising the steps of: step S220 system starting code data between step S230, judging whether can be with The system is successfully read by the preset ECC and general Retry Level and starts code data, is lost if still reading It loses, thens follow the steps S230, if reading successfully, then follow the steps S250.
Specifically, include preset ECC and general Retry Level in chip starting code, when from nand memory When middle reading data (one kind that system starting code is also data) error, preset ECC can be first passed through and be corrected, if not Row can re-read data by general Retry Level again, and preset ECC and general Retry Level are included in core Piece starts in code, and chip starting code is cured, no matter either with or without the adaptive Retry of nand memory is read Command sequence parameter all can carry out Data correction by preset ECC and general Retry Level, if reading data by this Success, then re-read data without using the Retry command sequence parameter of reading.
Preferably, in S20:NAND memory in the read method of system starting code, further includes: if step S260 is described System starting code can not successfully be read, then feed back the error message to chip and start code, and execute step S410.
Specifically, cannot guarantee that every time certain even if there is the Retry command sequence parameter for adapting to nand memory itself The data in nand memory can successfully be read.Therefore, when carrying out system starting from nand memory, if encountering can not succeed When reading the system starting code in nand memory, error message can be fed back chip and start code, received when chip starts When being fed back to error message, it can be started in time from next starting device, guarantee successfully starts up system.
Preferably, further include S30: the method for burn-recording of the Retry command sequence parameter after system starting, comprising steps of step Rapid S300 is successively read the ginseng of the Retry command sequence in Installed System Memory after system starts, according to the rule that chip starts code Number, if not reading the Retry command sequence parameter, thens follow the steps S310;Step S310 reads nand memory ID;Step S320 obtains the corresponding Retry command sequence parameter and saves according to the ID of the nand memory of reading In system memory;Step S340 carries out crc calculating to the Retry command sequence parameter in Installed System Memory and verifies, if Verification is correct, then when reading corrupt data in system memory, re-reads data according to the Retry command sequence parameter, If verification is incorrect, S310 is thened follow the steps;Step S350 starts the rule of code according to chip, the Retry order sequence Column parameter, which is sequentially stored into each page of nand memory, carries out parameter backup.
Preferably, the S30: in the method for burn-recording of the Retry command sequence parameter after system starting, the step S320 Specifically include: step S321 obtains corresponding Retry rule according to the ID of the nand memory of reading;Step S322 will The Retry rule is converted into corresponding Retry argument sequence according to preset rules;Step S323 is according to the Retry parameter Sequence sets gradually corresponding Retry Level;Step S324 converts corresponding NAND for the Retry Level and controls The Retry command sequence parameter of device.
Specifically, above-mentioned S30: the method for burn-recording of the Retry command sequence parameter after system starting is in system memory Operation, this read in the nand memory with front data (such as: Retry command sequence parameter and system starting code) when Running space it is different, therefore, after system start-up, the Retry command sequence parameter in Installed System Memory can be read again, gone forward side by side Row calculates and verification, after verification is correct, when reading corrupt data in follow-up system memory, is joined using this Retry command sequence New Retry Level is arranged to re-read data in number, improves the success rate of reading data.When not reading Installed System Memory In Retry command sequence parameter, illustrate in front read nand memory in data when do not read or do not read Get correct Retry command sequence parameter, it is therefore desirable to by Retry command sequence parameter corresponding with the ID of NADN memory It is burnt in nand memory, specific step are as follows:
The ID of nand memory in current system is read, corresponding Retry rule, each NAND are then obtained according to this ID Memory has the rule of their own, and needing to convert them to same rule just may be implemented subsequent operation;Therefore it will obtain The Retry rule taken is converted into corresponding Retry argument sequence according to preset rules, and preset rules here are art technologies The general rule of personnel, does not specifically describe herein;Then it can be set gradually according to this Retry argument sequence corresponding Retry Level reads out for follow-up data and staggers the time, and carries out Read Retry mode and lays the foundation;Why will RetryLevel be converted to the corresponding Retry command sequence parameter of NAND controller (controller of nand memory) be because Nand memory needs to be controlled read-write data by NAND controller, and therefore, it is necessary to be converted into NAND controller to know Other code (that is, Retry command sequence parameter) needs after obtaining the corresponding Retry command sequence parameter of nand memory By this Retry command sequence parameter save in system memory, for it is subsequent carry out verify basis is provided.Number in Installed System Memory It is transported in Installed System Memory according to being all chip starting code from nand memory, the rule of these data also complies with NAND and deposits Therefore rule in reservoir when reading these corrupt datas in system memory, can pass through Retry command sequence parameter pair It carries out Read Retry.
When reading the Retry command sequence parameter in Installed System Memory, needs to carry out it crc calculating and verify, because It is different with the running space after system starting before system starting, it may also malfunction in carrying data procedures, lead to loss of data The problems such as, so needing exist for again verifying the Retry command sequence parameter read, guarantee its correctness.If school It tests correctly, then when reading corrupt data in follow-up system memory, can be entered by this Retry command sequence parameter ReadRetry mode re-reads data, improves the success rate that system reads data.
It needs there are two types of situation to nand memory burning Retry command sequence parameter, one is in nand memory Inherently without Retry command sequence parameter, i.e., after system start-up, system is successively read according to the rule of chip starting code Retry command sequence parameter in memory, but do not read the Retry command sequence parameter;Another kind is in system It deposits and read the Retry command sequence parameter that Retry is successively read in Installed System Memory, if not reading the Retry Command sequence parameter, but verify in subsequent calculating checking procedure incorrect, such case is also to need to nand memory weight New burning Retry command sequence parameter.Generally speaking, it exactly have passed through the ID for searching nand memory, and obtain corresponding Retry command sequence parameter and through verification it is correct after, it is necessary to each page of nand memory store this verification it is correct after Retry command sequence parameter carry out parameter backup.
Preferably, the S30: in the method for burn-recording of the Retry command sequence parameter after system starting, the step S320 Between the step S340 further include: step S330 calculates the first crc of the Retry command sequence parameter, and calculating The first crc be placed on the head of the Retry command sequence parameter.
Preferably, the S30: in the method for burn-recording of the Retry command sequence parameter after system starting, the step S340 In to the Retry command sequence parameter carry out crc calculating and verify specifically include: the institute in step S341 computing system memory State the 2nd crc of Retry command sequence parameter;Step S342 is obtained in the Retry command sequence parameter in the Installed System Memory Head the first crc;First crc is compared by step S343 with the 2nd crc, if unanimously, verifying Correctly, if it is inconsistent, it verifies incorrect.
Specifically, when obtain the corresponding Retry command sequence parameter of ID of nand memory, need to calculate its first Crc is simultaneously placed on its head, and for subsequent progress crc calculating and verification provides comparison basis.
Crc calculating is carried out to the Retry command sequence parameter read in system memory, obtains the 2nd crc, and this 2nd crc compares with the first crc in Retry command sequence parameter head, if unanimously, verification is correct, determines current read Retry command sequence parameter be correct parameter, ensure that follow-up data read out stagger the time can have correctly RetryLevel is re-read.
In another embodiment of the present invention, as shown in Figure 2 and Figure 3, a kind of system starting side based on nand memory Method, the read method including Retry command sequence parameter in S10:NAND memory, comprising steps of after step S100 is powered on, from In the page of nand memory multiple parameters backup, data are successively read according to the rule that chip starts code, if reading data Success, thens follow the steps S110;The step S100 further include: if step S101 reads data failure, continue from next Data are read in page;Wherein, the chip starting code includes: preset ECC, format and general Retry Level;It is described The rule of chip starting code refers to: preset ECC and format;The parameter includes: the Retry command sequence parameter;Step Rapid S110 checks whether the data of the reading are full ff, if so, S101 is thened follow the steps, if it is not, thening follow the steps S120;Step Rapid S120 judges whether the header data condition code of the data of the reading is parameter attribute code, if so, the number of the reading According to for Retry command sequence parameter, step S130 is executed, if it is not, thening follow the steps S200;Step S130 is more to nand memory The Retry command sequence parameter read in the page of a parameter backup carries out crc calculating and verifies, if verification is correct, The Retry command sequence parameter is saved in Installed System Memory, and executes step S210;If verification is incorrect, have not been obtained The correct Retry command sequence parameter, directly execution step S210;The reading of system starting code in S20:NAND memory Method is taken, comprising steps of step S200 judges whether the data of the reading are the system starting code data, if so, Step S210 is continued to execute, starts code to chip if it is not, then feeding back the error message, and execute step S410;Step S210 is successively read described in the page that nand memory burning has system starting code according to the rule that chip starts code System starts code;If the step S220 system starting code data reads failure, judging whether can be by described default ECC and general Retry Level successfully read system starting code data and thened follow the steps if still reading failure S230 thens follow the steps S250 if reading successfully;If the step S230 system starting code reads failure, according to NAND The new Retry Level of the Retry command sequence parameter setting read in memory;Step S240 is according to described new Retry Level reads again the starting code of the system in nand memory;Step S250 ought be successfully by nand memory In the system starting code run through after, jump in Installed System Memory complete system starting;If the step S260 system starting Code can not successfully be read, then feed back the error message to chip and start code, and execute step S410;S30: system starting The method for burn-recording of Retry command sequence parameter afterwards, comprising steps of step S300 starts generation after system starts, according to chip The rule of code is successively read the Retry command sequence parameter in Installed System Memory, if not reading the Retry command sequence ginseng Number, thens follow the steps S310;The ID of step S310 reading nand memory;Step S320 is according to the nand memory of reading ID, obtain the corresponding Retry command sequence parameter and simultaneously save in system memory;The step S320 is specifically included: Step S321 obtains corresponding Retry rule according to the ID of the nand memory of reading;Step S322 is by the Retry Rule is converted into corresponding Retry argument sequence according to preset rules;Step S323 is according to the Retry argument sequence, successively Corresponding Retry Level is set;Step S324 converts the Retry Level to the Retry of corresponding NAND controller Command sequence parameter;Step S330 calculates the first crc of the Retry command sequence parameter, and the first crc of calculating It is placed on the head of the Retry command sequence parameter;Step S340 to the Retry command sequence parameter in Installed System Memory into Row crc is calculated and is verified, if verification is correct, when reading corrupt data in system memory, according to the Retry command sequence Parameter re-reads data, if verification is incorrect, thens follow the steps S310;To the Retry order sequence in the step S340 Column parameter carries out crc calculating and verifies to specifically include: the Retry command sequence parameter in step S341 computing system memory The 2nd crc;Step S342 obtains the first crc on the head in the Retry command sequence parameter in the Installed System Memory; First crc is compared by step S343 with the 2nd crc, if unanimously, verification is correct, if inconsistent, is verified It is incorrect;If step S350 has read the ID of the nand memory, and obtains the corresponding Retry command sequence ginseng Number starts the rule of code according to chip after verification is correct, Retry command sequence parameter of the verification after correct according to Parameter backup is carried out in each page of secondary deposit nand memory;S40: chip starting code is connected to when error message is fed back Operating method, comprising steps of step S410 chip starting code jumps to another starting device and carries out system starting.
Specifically, its own corresponding Retry command sequence parameter of burning in the nand memory, makes chip start code It can be preferably compatible with different nand memories, and without changing chip starting code, it can be well The compatible various nand memories newly gone out, enable its Read Retry to work normally, at corresponding Retry Level again Data are read, the success rate of reading data in nand memory is improved, solve to carry out system starting from nand memory certain Scene under, (there is no corresponding Retry command sequence to join in nand memory since corresponding Read Retry can not be carried out Number) and system is caused to start the case where failing.
In another embodiment of the present invention, as shown in figure 4, a kind of system, comprising: nand memory 100, centre Manage device 200, Installed System Memory 300;The nand memory 100 is electrically connected with the central processing unit 200;The Installed System Memory 300 are electrically connected with the central processing unit 200;The nand memory 100 includes: page 110, is stored with parameter, and, System starts code;Wherein, the parameter includes: Retry command sequence parameter;The Installed System Memory 300, if being further used for The Retry command sequence parameter read in the page that 100 multiple parameters of nand memory back up is carrying out crc verification just Really, then the Retry command sequence parameter is saved in Installed System Memory 300;The central processing unit 200 includes: that data are read Modulus block 210 starts the rule of code successively according to chip in the page that 100 multiple parameters of nand memory back up Read data;If reading data failure, continuation reads data in next page;And from 100 burning of nand memory In the page for having system starting code, the system is successively read according to the rule that chip starts code and starts code;And if The system starting code reads failure, then again according to the new Retry Level of the Retry command sequence parameter setting The system read in nand memory starts code;Wherein, chip starting code include: preset ECC, format and General Retry Level;The rule of the chip starting code includes: preset ECC and format;Data judgment module 220, inspection Whether the data for looking into the reading are full ff;And if the data of the reading are not full ff, further judge the reading The header data condition codes of data whether be parameter attribute code;Correction verification module 230 is calculated, it is standby to nand memory multiple parameters The Retry command sequence parameter read in the page of part carries out crc calculating and verifies;Setup module 240, if the system Start code and reads failure, then it is new according to the Retry command sequence parameter setting read in nand memory RetryLevel;Starting module 250 jumps to described after successfully running through the system starting code in nand memory System starting is completed in Installed System Memory.
Specifically, central processing unit can be understood as CPU (Central Processing Unit), it is one piece integrated Chip, chip starting code are solidificated in CPU, and CPU is electrically connected with nand memory, and nand memory is contained in CPU Controller, the data in nand memory can be read under the control of the controller of this nand memory.
It is stored with Retry command sequence parameter corresponding with its model in nand memory, reads this Retry order first Sequential parameter after verifying correctly, then reads the system starting code stored in nand memory, if system starting code is read Wrong, the CPU just Retry Level new according to this Retry command sequence parameter setting is taken out, into Read Retry mode, Data are re-read under new Retry Level.
Preferably, the data judgment module 220, if the header data condition code of the data of the reading is not parameter spy When levying code, it is further used for judging whether the data of the reading are the system starting code data;The central processing unit Further include: error feedback module 260 feeds back the mistake letter if the data of the reading are not the system starting codes It ceases and starts code to chip;The starting module, if being further used for receiving the error message, chip starting code is jumped to Another starting device carries out system starting.
Although being read specifically, wanting to read the data in nand memory at the beginning is Retry command sequence parameter The data taken need to parse the data type for just knowing it to the end, when the data of reading are system starting code datas, say It does not include its specific Retry command sequence parameter in bright nand memory, that, which is just skipped, reads Retry command sequence parameter The step of, the system in nand memory that directly reads starts code;If the data read neither Retry command sequence parameter, Nor (it is also a kind of data that system starts code itself to system starting code, therefore the meaning of it and system starting code data Justice is equivalent), then illustrate to encounter not amendable mistake in reading data procedures, needs to feed back to error message chip starting Code allows it to make corresponding operation immediately.When carrying out system starting from nand memory, if during startup, chip Starting code has received error message, will select to jump to the progress system starting of another starting device.
Preferably, the central processing unit 200 further include: judgment module 270 is read, if the system starts code data Failure is read, the reading judgment module judges whether successfully read by the preset ECC and general Retry Level Take the system starting code data.
Specifically, inherently include preset ECC and general Retry Level in chip starting code, this be in order to When encountering reading data error, it can timely be corrected or re-read data with this general Retry Level.It is general Retry Level is to be directed to most of nand memory, and possibly number can not be effectively performed for the nand memory newly gone out According to recovery, therefore, in order to improve chip starting code to the compatibility of various nand memories, its spy of burning in its page is understood Fixed Retry command sequence parameter.
Preferably, error feedback module 260, if being further used for the system starting code can not successfully read, instead It presents the error message and starts code to chip.
Specifically, mistake can be fed back after reading the corrupt data in nand memory and in the case where can not being repaired False information starts code to chip, allows it that can make subsequent operation in time.The corrupt data read in nand memory has A variety of situations, such as: the data in nand memory can not be read at the very start;Retry in nand memory can be read to order Sequential parameter is enabled, but is malfunctioned when reading system starts code, and can not correct by all means, guarantees successfully to read all Chip starting code etc., in these cases, chip starting code can all receive the error message of feedback.
Preferably, the data read module 210 is further used for starting code according to chip after system starting Rule is successively read the Retry command sequence parameter in Installed System Memory;And if the Retry command sequence is not read Parameter then reads the ID of nand memory;And if the Retry command sequence parameter in Installed System Memory carries out crc verification When correct, when reading corrupt data in system memory, data are re-read according to the Retry command sequence parameter;It is described Central processing unit 200 further include: parameter acquisition module 280, if not reading the Retry command sequence ginseng in Installed System Memory When counting or examining incorrect to the Retry command sequence parameter progress crc in Installed System Memory, according to the NAND of reading The ID of memory obtains the corresponding Retry command sequence parameter;The calculating correction verification module 230 is further used for being The Retry command sequence parameter in system memory carries out crc calculating and verifies;The Installed System Memory 300, be further used for by It is saved in the system according to the corresponding Retry command sequence parameter that the ID of the nand memory of reading is obtained In depositing;The page if having read the ID of the nand memory, and obtains the corresponding Retry command sequence parameter, After verification is correct, it is further used for starting the rule of code according to chip, the Retry command sequence of the verification after correct Parameter, which is sequentially stored into each page of nand memory, carries out parameter backup.
Specifically, will jump in Installed System Memory after reading system starting code success in nand memory and be System starting can be understood as protecting the system starting code in nand memory from system starting code is read in nand memory It is stored to Installed System Memory, is laid the foundation for the starting of subsequent system.
After system starting, the Retry command sequence parameter being previously saved in system memory can read, if successfully reading Retry command sequence parameter then can be calculated and be verified to it, and only verification is correct, just can take corrupt data in subsequent reads When with this Retry command sequence parameter re-read data.When Retry command sequence parameter is read in front from nand memory Also calculating and verification be will do it, this is the Retry command sequence ginseng completed by chip starting code, and read in Installed System Memory Number is completed by system starting code, and the running space of the two is different, and therefore, the two does not repeat.
If not reading Retry command sequence parameter in system memory, illustrate there is no it right in nand memory The Retry command sequence parameter answered obtains its corresponding Retry order sequence of ID therefore, it is necessary to read the ID of nand memory Column parameter, is then saved in Installed System Memory, for it is subsequent to the Retry command sequence parameter read in Installed System Memory into Row crc verification provides basis.
As long as having read the ID of nand memory, and corresponding Retry command sequence parameter is obtained, just illustrates that NAND is deposited It is incorrect without Retry command sequence parameter or the Retry command sequence parameter of preservation in reservoir, need burning again into correct Retry command sequence parameter;Therefore, the ID of the nand memory is being had read, and is obtaining the corresponding Retry life Sequential parameter is enabled, after verification is correct, Retry command sequence parameter of the verification after correct can be saved in each of nand memory Parameter backup is carried out in a page.
Preferably, the parameter acquisition module 280 specifically includes: Rule submodule 281, according to reading The ID of nand memory obtains corresponding Retry rule;Sequence Transformed submodule 282, by the Retry rule according to default Rule is converted into corresponding Retry argument sequence;Submodule 283 is set, according to the Retry argument sequence, is set gradually pair The Retry Level answered;Parameter converts submodule 284, converts corresponding NAND controller for the Retry Level Retry command sequence parameter.
Specifically, the rule of each nand memory is different, therefore, it is necessary to by its corresponding Retry rule according to default Rule be converted into the Retry argument sequence of same rule and set gradually corresponding then according to this Retry argument sequence Retry Level re-reads data with this Retry Level after facilitating follow-up data to read error.
Preferably, the calculating correction verification module 230 is further used for calculating the first of the Retry command sequence parameter Crc, and the first crc of calculating is placed on the head of the Retry command sequence parameter.
Preferably, the calculating correction verification module 230 includes: computational submodule 231, described in computing system memory 2nd crc of Retry command sequence parameter;Acquisition submodule 232 obtains the Retry command sequence ginseng in the Installed System Memory First crc on the head in number;Submodule 233 is examined, the first crc is compared with the 2nd crc, if one It causes, then verification is correct, if inconsistent, verifies incorrect.
Specifically, after obtaining Retry command sequence parameter its first crc can be calculated, and this first crc is placed on Head provides the foundation for subsequent check.
And Retry command sequence parameter is being carried out first to calculate its 2nd crc in checking procedure, then by the 2nd crc It is compared with the first crc, if unanimously, illustrating that the Retry command sequence parameter read is correctly, not in transmission process Middle generation mistake, can use this Retry command sequence parameter and reads out to stagger the time in follow-up data and carry out Read Retry.
In another embodiment of the present invention, as shown in figure 5, a kind of system, comprising: nand memory 100, centre Manage device 200, Installed System Memory 300;The nand memory 200 is electrically connected with the central processing unit 200;The Installed System Memory 300 are electrically connected with the central processing unit 200;The nand memory 100 includes: page 110, is stored with parameter, and, System starts code;Wherein, the parameter includes: Retry command sequence parameter;If having read the ID of the nand memory, And the corresponding Retry command sequence parameter is obtained, after verification is correct, it is further used for starting code according to chip Rule is sequentially stored into the Retry command sequence parameter of the verification after correct in each page of nand memory and is joined Number backup;The Installed System Memory 300, if be further used for from nand memory multiple parameters back up page in read described in Retry command sequence parameter carries out crc verification correctly, then the Retry command sequence parameter is saved in Installed System Memory;Into One step is for the corresponding Retry command sequence parameter obtained according to the ID of the nand memory of reading to be saved in In the Installed System Memory;The central processing unit 200 includes: data read module 210, from the nand memory multiple parameters In the page of backup, data are successively read according to the rule that chip starts code;If reading data failure, continue from next Data are read in page;And in the page that nand memory burning has system starting code, code is started according to chip Rule is successively read the system starting code;And if system starting code reads failure, according to the Retry The new Retry Level of command sequence parameter setting reads again the starting code of the system in nand memory;When being After system starting, it is further used for the Retry command sequence ginseng being successively read in Installed System Memory according to the rule that chip starts code Number;And if not reading the Retry command sequence parameter, read the ID of nand memory;And if in system When Retry command sequence parameter progress crc verification in depositing is correct, when reading corrupt data in system memory, according to The Retry command sequence parameter re-reads data;Wherein, chip starting code include: preset ECC, format and General Retry Level;The rule of the chip starting code includes: preset ECC and format;Data judgment module 220, inspection Whether the data for looking into the reading are full ff;And if the data of the reading are not full ff, further judge the reading The header data condition codes of data whether be parameter attribute code;If the header data condition code of the data of the reading is not ginseng When number condition code, it is further used for judging whether the data of the reading are the system starting code data;Calculate calibration mode Block 230 carries out crc calculating to the Retry command sequence parameter read in the page of nand memory multiple parameters backup And it verifies;It is further used for carrying out crc calculating to the Retry command sequence parameter in Installed System Memory and verifies;Further The Retry order is placed on for calculating the first crc of the Retry command sequence parameter, and the first crc of calculating The head of sequential parameter;The calculating correction verification module includes: computational submodule 231, the Retry life in computing system memory Enable the 2nd crc of sequential parameter;Acquisition submodule 232 obtains the head in the Retry command sequence parameter in the Installed System Memory First crc in portion;Submodule 233 is examined, the first crc is compared with the 2nd crc, if unanimously, school It tests correctly, if inconsistent, verifies incorrect;Setup module 240, if system starting code reads failure, basis The new Retry Level of the Retry command sequence parameter setting read in nand memory;Starting module 250, works as success After system starting code in nand memory is run through, jumps in the Installed System Memory and complete system starting;Further If for receiving the error message, chip starting code jumps to another starting device and carries out system starting;Error feedback Module 260 feeds back the error message to chip and starts generation if the data of the reading are not the system starting codes Code;If being further used for the system starting code can not successfully read, the error message is fed back to chip and starts code; Judgment module 270 is read, if system starting code data reads failure, the reading judgment module judges whether to lead to It crosses the preset ECC and general Retry Level and successfully reads the system starting code data;Parameter acquisition module 280, If not reading the Retry command sequence parameter in Installed System Memory or to the Retry command sequence in Installed System Memory When parameter progress crc examines incorrect, according to the ID of the nand memory of reading, the corresponding Retry order is obtained Sequential parameter;The parameter acquisition module 280 specifically includes: Rule submodule 281, is stored according to the NAND of reading The ID of device obtains corresponding Retry rule;Sequence Transformed submodule 282 converts the Retry rule according to preset rules For corresponding Retry argument sequence;Setting submodule 283 is set gradually corresponding according to the Retry argument sequence RetryLevel;Parameter converts submodule 284, and the Retry Level Retry for being converted into corresponding NAND controller is ordered Enable sequential parameter.
Specifically, by according to the ID of nand memory, the corresponding Retry command sequence parameter deposit NAND storage of acquisition Device, enable chip starting code be preferably compatible with a variety of different nand memories, reduce different nand memories due to The case where not having corresponding Retry command sequence parameter and can not starting, promotes using effect.
In another embodiment of the present invention, by taking the nand memory of H27UBG8T2CTR this modern times 20nm as an example, The feature of the Retry rule of this nand memory is that the Retry rule of each nand memory is stored in otp (OneTime Programmable, One Time Programmable) the inside block, need special order to read, and each nand memory Retry rule is different;Complete content is read from nand memory by the reading order of otp block first, and Correct Retry rule is obtained after examining according to exclusive or rule.
Then according to the corresponding Retry Level of this Retry Rule, then each Retry Level is converted to The Retry command sequence parameter of NAND controller simultaneously saves, and changes the address cmd fifo of NAND controller into Retry life first Enable sequential parameter save memory address, then successively called since level0 to level7 set level function into Enter Read Retry mode, since fifo has been changed to memory address, write-in fifo actually inreal in this way, but In memory, nand memory does not actually enter Read Retry mode, level7 be over after by memory fifo data meter Crc is calculated, and calls the interface of wirte page successively the inside page of Retry command sequence parameter write-in fixation, and guarantee There is the preservation of Retry command sequence parameter across the page inside block and block;Finally restoring memory fifo is normal NAND The address fifo of controller guarantees that subsequent order is normally carried out.
After chip starts code starting, Retry command sequence parameter successively is read from each page first and is verified, is passed through Afterwards, fifo data are successively restored according to the sequence of level0 to level7;Subsequent real data (such as: system starts code) It reads if it find that wrong and ECC and general Retry Level can not be corrected, just according to fifo data successively corresponding Enter Read Retry mode inside the cmd fifo of the fifo data write-in NAND controller of level, re-reads data.
It should be noted that above-described embodiment can be freely combined as needed.The above is only of the invention preferred Embodiment, it is noted that for those skilled in the art, in the premise for not departing from the principle of the invention Under, several improvements and modifications can also be made, these modifications and embellishments should also be considered as the scope of protection of the present invention.

Claims (10)

1. a kind of system start method based on nand memory, which is characterized in that ordered including Retry in S10:NAND memory The read method of sequential parameter is enabled, comprising steps of
After step S100 is powered on, from nand memory multiple parameters back up page in, according to chip start code rule according to Secondary reading data then follow the steps S110 if reading data success;
The step S100 further include:
If step S101 reads data failure, continuation reads data in next page;Wherein, the chip starts code It include: preset ECC, format and general Retry Level;The rule of the chip starting code refers to: preset ECC and lattice Formula;The parameter includes: the Retry command sequence parameter;
Step S110 checks whether the data of the reading are full ff, if so, S101 is thened follow the steps, if it is not, thening follow the steps S120;
Step S120 judges whether the header data condition code of the data of the reading is parameter attribute code, if so, the reading The data taken are Retry command sequence parameter, execute step S130;
The Retry command sequence parameter read in the page that step S130 backs up nand memory multiple parameters carries out Crc is calculated and is verified, if verification is correct, the Retry command sequence parameter is saved in Installed System Memory, and execute step S210;If verification is incorrect, the correct Retry command sequence parameter, directly execution step S210 has not been obtained;
The read method of system starting code in S20:NAND memory, comprising steps of
Step S210 starts the rule of code successively in the page that nand memory burning has system starting code, according to chip Read the system starting code;
If the step S230 system starting code reads failure, according to the Retry order read in nand memory New Retry Level is arranged in sequential parameter;
Step S240 reads again the starting code of the system in nand memory according to the new Retry Level;
Step S250 is jumped to after successfully running through the system starting code in nand memory and is completed system in Installed System Memory System starting.
2. as described in claim 1 based on the system start method of nand memory, which is characterized in that the S10:NAND is deposited In reservoir in the read method of Retry command sequence parameter, the step S120 further include:
Whether the header data condition code for judging the data of the reading is parameter attribute code, if it is not, thening follow the steps S200;
In the S20:NAND memory in the read method of system starting code, before the step S210 further include:
Step S200 judges whether the data of the reading are the system starting code data, if so, continuing to execute step S210 if it is not, then feedback error information gives chip starting code, and executes step S410;
The system start method based on nand memory, further includes S40: when chip starting code is connected to error message feedback Operating method, comprising steps of
Step S410 chip starting code jumps to another starting device and carries out system starting.
3. as described in claim 1 based on the system start method of nand memory, which is characterized in that the S20:NAND is deposited In reservoir in the read method of system starting code, further comprised the steps of: between the step S210 and the step S230
If step S220 system starting code data reads failure, judging whether can be by the preset ECC and logical The system starting code data is successfully read with Retry Level and thens follow the steps S230 if still reading failure, if reading Success is taken, S250 is thened follow the steps.
4. as claimed in claim 2 based on the system start method of nand memory, which is characterized in that the S20:NAND is deposited In reservoir in the read method of system starting code, further includes: if the step S260 system starting code can not successfully be read, It then feeds back the error message and starts code to chip, and execute step S410.
5. the system start method based on nand memory as described in claim 1-4 is any, which is characterized in that further include S30: the method for burn-recording of the Retry command sequence parameter after system starting, comprising steps of
Step S300 is successively read the Retry order in Installed System Memory after system starts, according to the rule that chip starts code Sequential parameter thens follow the steps S310 if not reading the Retry command sequence parameter;
The ID of step S310 reading nand memory;
Step S320 obtains the corresponding Retry command sequence parameter and protects according to the ID of the nand memory of reading It deposits in system memory;
Step S340 carries out crc calculating to the Retry command sequence parameter in Installed System Memory and verifies, if verification is correct, When then reading corrupt data in system memory, data are re-read according to the Retry command sequence parameter, if verifying not just Really, S310 is thened follow the steps;
If step S350 has read the ID of the nand memory, and obtains the corresponding Retry command sequence parameter, After verification is correct, start the rule of code according to chip, Retry command sequence parameter of the verification after correct is sequentially stored into Parameter backup is carried out in each page of nand memory.
6. as claimed in claim 5 based on the system start method of nand memory, which is characterized in that the S30: system opens In the method for burn-recording of Retry command sequence parameter after dynamic, the step S320 is specifically included:
Step S321 obtains corresponding Retry rule according to the ID of the nand memory of reading;
Step S322 converts corresponding Retry argument sequence according to preset rules for the Retry rule;
Step S323 sets gradually corresponding Retry Level according to the Retry argument sequence;
Step S324 converts the Retry Level to the Retry command sequence parameter of corresponding NAND controller.
7. as claimed in claim 5 based on the system start method of nand memory, which is characterized in that the S30: system opens In the method for burn-recording of Retry command sequence parameter after dynamic, between the step S320 and the step S340 further include:
Step S330 calculates the first crc of the Retry command sequence parameter, and the first crc of calculating is placed on described The head of Retry command sequence parameter.
8. as claimed in claim 7 based on the system start method of nand memory, which is characterized in that the S30: system opens In the method for burn-recording of Retry command sequence parameter after dynamic, the Retry command sequence parameter is carried out in the step S340 Crc is calculated and is verified and specifically includes:
2nd crc of the Retry command sequence parameter in step S341 computing system memory;
Step S342 obtains the first crc on the head in the Retry command sequence parameter in the Installed System Memory;
First crc is compared by step S343 with the 2nd crc, if unanimously, verification is correct, if inconsistent, It verifies incorrect.
9. a kind of system using any system start method based on nand memory of the claims 1-8, It is characterized in that, comprising:
Nand memory, central processing unit, Installed System Memory;
The nand memory is electrically connected with the central processing unit;The Installed System Memory is electrically connected with the central processing unit;
The nand memory includes:
Page is stored with parameter, and, system starts code;Wherein, the parameter includes: Retry command sequence parameter;
The Installed System Memory, if being further used for the Retry read in the page that nand memory multiple parameters back up Command sequence parameter carries out crc verification correctly, then the Retry command sequence parameter is saved in Installed System Memory;
The central processing unit includes:
Data read module starts the rule of code according to chip in the page that the nand memory multiple parameters back up It is successively read data;If reading data failure, continuation reads data in next page;And it is burnt from nand memory Record has in the page of system starting code, is successively read the system according to the rule that chip starts code and starts code;And If the system starting code reads failure, again according to the new Retry Level of the Retry command sequence parameter setting The system in secondary reading nand memory starts code;
Wherein, the chip starting code includes: preset ECC, format and general Retry Level;The chip starts generation The rule of code includes: preset ECC and format;
Data judgment module checks whether the data of the reading are full ff;And if the data of the reading are not full ff, Whether the header data condition code for then further judging the data of the reading is parameter attribute code;
Correction verification module is calculated, to the Retry command sequence parameter read in the page of nand memory multiple parameters backup It carries out crc calculating and verifies;
Setup module, if system starting code reads failure, according to the Retry order read in nand memory New Retry Level is arranged in sequential parameter;
Starting module jumps in the Installed System Memory after successfully running through the system starting code in nand memory The starting of completion system.
10. system as claimed in claim 9, it is characterised in that:
The data read module, after system starting, the rule for being further used for starting according to chip code is successively read and is Retry command sequence parameter in system memory;And if not reading the Retry command sequence parameter, read NAND The ID of memory;And if when the Retry command sequence parameter progress crc verification in Installed System Memory is correct, in system When depositing middle reading corrupt data, data are re-read according to the Retry command sequence parameter;
The central processing unit further include:
Parameter acquisition module, if not reading the Retry command sequence parameter in Installed System Memory or in Installed System Memory When the Retry command sequence parameter progress crc examines incorrect, according to the ID of the nand memory of reading, acquisition pair The Retry command sequence parameter answered;
The calculating correction verification module is further used for carrying out crc calculating to the Retry command sequence parameter in Installed System Memory And it verifies;
The Installed System Memory is further used for be obtained according to the ID of the nand memory of reading corresponding described Retry command sequence parameter is saved in the Installed System Memory;
The page if having read the ID of the nand memory, and obtains the corresponding Retry command sequence parameter, After verification is correct, it is further used for starting the rule of code according to chip, the Retry command sequence of the verification after correct Parameter, which is sequentially stored into each page of nand memory, carries out parameter backup.
CN201610645099.XA 2016-08-09 2016-08-09 A kind of system start method and system based on nand memory Active CN106250193B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610645099.XA CN106250193B (en) 2016-08-09 2016-08-09 A kind of system start method and system based on nand memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610645099.XA CN106250193B (en) 2016-08-09 2016-08-09 A kind of system start method and system based on nand memory

Publications (2)

Publication Number Publication Date
CN106250193A CN106250193A (en) 2016-12-21
CN106250193B true CN106250193B (en) 2019-08-27

Family

ID=58078432

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610645099.XA Active CN106250193B (en) 2016-08-09 2016-08-09 A kind of system start method and system based on nand memory

Country Status (1)

Country Link
CN (1) CN106250193B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI615852B (en) * 2017-01-19 2018-02-21 群聯電子股份有限公司 Memory retry-read method, memory storage device and memory control circuit unit
CN109857586A (en) * 2019-03-14 2019-06-07 康泰医学***(秦皇岛)股份有限公司 A kind of NAND FLASH data verification method and relevant apparatus
CN113626091A (en) * 2021-08-19 2021-11-09 深圳忆联信息***有限公司 Starting optimization method and device of solid state disk, computer equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996251A (en) * 2007-01-04 2007-07-11 炬力集成电路设计有限公司 Embedded system guiding method and device
CN102623066A (en) * 2012-01-19 2012-08-01 苏州希图视鼎微电子有限公司 Saving and acquisition method for solidification code parameter table

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101961318B1 (en) * 2012-09-07 2019-07-17 삼성전자주식회사 Recovery code managing method for reducing occupancy time in processor and memory system thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996251A (en) * 2007-01-04 2007-07-11 炬力集成电路设计有限公司 Embedded system guiding method and device
CN102623066A (en) * 2012-01-19 2012-08-01 苏州希图视鼎微电子有限公司 Saving and acquisition method for solidification code parameter table

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
高速大容量NAND FLASH存储***的设计与实现;李晴;《中国优秀硕士学位论文全文数据库信息科技辑》;20150731(第7期);全文 *

Also Published As

Publication number Publication date
CN106250193A (en) 2016-12-21

Similar Documents

Publication Publication Date Title
TWI343001B (en) Data preserving method and data accessing method for non-volatile memory
CN106250193B (en) A kind of system start method and system based on nand memory
JPH03198135A (en) Fault tolerant memory system and method of operating the same
US20120317340A1 (en) Memory controller and non-volatile storage device
US20080082872A1 (en) Memory controller, memory system, and data transfer method
US20130166991A1 (en) Non-Volatile Semiconductor Memory Device Using Mats with Error Detection and Correction and Methods of Managing the Same
CN111104246B (en) Method, device, computer equipment and storage medium for improving verification efficiency of error detection and correction of DRAM
CN112332902B (en) On-orbit reconstruction system and method for on-satellite autonomous control
CN111625199A (en) Method and device for improving reliability of data path of solid state disk, computer equipment and storage medium
US7308601B2 (en) Program, method and apparatus for disk array control
US20120096335A1 (en) Data processing method and semiconductor integrated circuit
KR102468721B1 (en) Memory system and mrthod of operating the same
CN113806108A (en) Retransmission method, memory controller, processor system and electronic equipment
US6539338B1 (en) Self-diagnostic testing of a network interface adapter
CN101470666B (en) Data memory method
CN114442953B (en) Data verification method, system, chip and electronic equipment
US20100169572A1 (en) Data storage method, apparatus and system for interrupted write recovery
US8448017B2 (en) Memory apparatus, memory controlling method and program
WO2021043246A1 (en) Data reading method and apparatus
US20220058086A1 (en) Raid data storage device and data storage system including the same
JP6594712B2 (en) Semiconductor memory and method for verifying semiconductor memory
US20080155193A1 (en) Staging method for disk array apparatus
CN110544504A (en) test method, system and equipment for memory ADDDC function
CN111176732A (en) Software and hardware redundancy safe starting and maintaining method based on MRAM
CN117851271A (en) Fault repairing method and server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant