CN100476757C - Method for recovering flash memory - Google Patents

Method for recovering flash memory Download PDF

Info

Publication number
CN100476757C
CN100476757C CNB2006101061239A CN200610106123A CN100476757C CN 100476757 C CN100476757 C CN 100476757C CN B2006101061239 A CNB2006101061239 A CN B2006101061239A CN 200610106123 A CN200610106123 A CN 200610106123A CN 100476757 C CN100476757 C CN 100476757C
Authority
CN
China
Prior art keywords
flash memory
bad block
storage unit
bad
recovery method
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.)
Expired - Fee Related
Application number
CNB2006101061239A
Other languages
Chinese (zh)
Other versions
CN101110058A (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.)
Lvzhihuiliu Technology BVI
Original Assignee
何纯淳
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 何纯淳 filed Critical 何纯淳
Priority to CNB2006101061239A priority Critical patent/CN100476757C/en
Publication of CN101110058A publication Critical patent/CN101110058A/en
Application granted granted Critical
Publication of CN100476757C publication Critical patent/CN100476757C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The utility model discloses a flash memory recovery method, which re-plan the capacity of the cell, so that the bad sectors are centralized planned in the same cell which is labeled as the useless cell. Check whether the bad sectors of each cell in the flash memory exceed the limited quantity of the pre-set bad sector inside the flash memory. If the limited quantity thereof is surpassed, the cell shall be re-distributed. The cell with the over dispersed bad sectors shall be divided into a new cell which shall be deleted. In the process of the recovery method, the bad sectors exceeding the frequency of the reusable restriction shall be cleaned so as to prolong the service life of the flash memory, so that the flash memory device can be reused though the read/write function is unavailable previously.

Description

The recovery method of flash memory
Technical field
The present invention relates to the recovery method of a kind of flash memory (Flash Memory), particularly a kind of recovery method that the bad block of storage unit in the flash memory (Cell) is reformed.
Background technology
The storage unit of flash memory is an elementary cell (Cell), within it between the grid and raceway groove of the metal-oxide semiconductor (MOS) of portion (MOS), has only one deck gate oxide (gateoxide), again one deck floating gates (floating gate) that increased than traditional more.Because this one deck floating gate is arranged, make flash memory can work in three kinds of patterns: to write, read, wipe.When negatron was injected into floating gate, this elementary cell just was written as 0 from numeral 1, and after negatron was removed, this elementary cell was equivalent to become 1, the action that is equivalent to store from 0.
Flash memory technology can be divided into single stage unit (Single Level Cell on carrying out, SLC) with multi-level unit (Multi Level Cell, MLC), multi-level unit has than single stage unit Duos one times storage density, therefore multi-level unit and single stage unit product have high power capacity more, more compact and reduce the advantage of the cost of every megabyte by contrast.
Yet the electric charge-discharge characteristic of flash memory makes its read-write number of times that restriction physically be arranged, and have only 10000 times repetitive read-write number of times in each unit of multi-level unit, and single stage unit can have 100000 times repetitive read-write number of times.In the flash memory of high power capacity multi-level unit, because it has only 10000 times read-write heads meeting, the unit will soon be denoted as bad block with it because of it surpasses erasable number of times.Flash memory can increase day by day because of bad block, reduces the serviceable life of flash memory.A kind of recovery method of needs is put the bad block in the flash memory, the term of life that prolongs flash memory in order.
Summary of the invention
The objective of the invention is to propose a kind of recovery method of flash memory, the bad block that surpasses reusable limited number of times in the flash memory is put in order, the flash memory device that originally can't read and write can be reused, prolong the term of life of flash memory.
The recovery method of flash memory of the present invention comprises the distribution situation of bad block in the scanning flash memory, checks whether the bad block quantity in the flash memory limits to a number or amount above the bad block that is located at the flash memory internal firmware; Again plan the capacity of storage unit, and with the bad block centralized planning in same storage unit, the storage unit (that is to say this storage unit is denoted as useless storage unit) that the deletion bad block is concentrated; Maybe will redistribute the storage unit of flash memory, be a new storage unit with the dividing elements of bad block dense distribution, with this storage unit deletion; Memory bad block distributing position is stored in the flash memory; The reformatting flash memory writes flash memory with universal serial bus configuration data, Main Boot Record and file allocation table.
According to an aspect of the present invention, provide a kind of recovery method of flash memory, comprised the following steps: to scan the distribution situation of bad block in the flash memory; Check whether bad block quantity limits to a number or amount above a bad block that defaults in this flash memory internal firmware in this flash memory; When bad block quantity in this flash memory limits to a number or amount above this bad block that defaults in this flash memory internal firmware, redistribute the block in several storage unit of this flash memory, and the bad block in these several storage unit is divided in the new storage unit, to form the storage unit of a bad block dense distribution; The storage unit of this bad block dense distribution is denoted as the storage unit that does not re-use; The distributing position of record bad block, and be stored in this flash memory; And this flash memory of reformatting, universal serial bus configuration data, Main Boot Record and file allocation table are write this flash memory.
According to a further aspect in the invention, provide a kind of recovery method of flash memory, comprised the following steps: to scan the distribution situation of bad block in the flash memory; Check that the bad block whether bad block quantity in this flash memory surpasses the internal firmware that defaults in this flash memory limits to a number or amount; If surpassing this bad block, the bad block quantity in this flash memory limits to a number or amount, again plan the number of blocks of at least one storage unit, and at least one new storage unit, this at least one new storage unit forms the storage unit of at least one bad block dense distribution with the bad block centralized planning; The storage unit of this at least one bad block dense distribution is denoted as the storage unit that does not re-use; The distributing position of record bad block is stored in this flash memory; And format this flash memory, universal serial bus configuration data, Main Boot Record and file allocation table are write flash memory.
Description of drawings
In order to allow aforementioned and other feature of the present invention and advantage understand by more obvious quilt, the preferred embodiments of the present invention cited below particularly, and in conjunction with the accompanying drawings, elaborate.
Fig. 1 is the workflow diagram of the first embodiment of the present invention.
Fig. 2 is the workflow diagram of the second embodiment of the present invention.
Fig. 3 is the block diagram of the memory block of deletion bad block dense distribution in the flash memory of the present invention.
Fig. 4 is a block diagram of planning again in the embodiment of the invention that block distributes in the storage unit.
Fig. 5 is a block diagram of planning the storage unit capacity in the embodiment of the invention again.
Fig. 6 is the workflow diagram of third embodiment of the invention.
To be third embodiment of the invention set the block diagram that the bad block of each storage unit limits to a number or amount with dynamical fashion to Fig. 7.
Embodiment
Because the electric charge-discharge characteristic of flash memory, make its read-write number of times that restriction physically be arranged.To the read-write of a flash memory block, manufacturer can realize the counting of read-write number of times at internal firmware, reaches the high reps of read-write appointment, will demarcate unit for not re-using to that block.So flash memory might shorten the serviceable life of flash memory under extremely frequent use.The present invention provides a kind of recovery method for flash memory, and the position record of bad block is reformed.Before carrying out recovery method, need determine that the data in flash memory have been temporary in the extra storage medium (for example hard disc of computer or portable electron device), can in the recovery method process, not lose to guarantee the data in the flash memory.The embodiment of this recovery method is as follows.
Fig. 1 is the workflow diagram of first embodiment of the invention.
As shown in Figure 1, at first, the distribution situation of bad block in the step 101 scanning flash memory; Behind the completing steps 101, step 102 checks whether the bad block quantity in flash memory surpasses the bad block that is located at the flash memory internal firmware and limit to a number or amount, and advances to step 103; If surpassing the bad block that is located at the flash memory internal firmware, the bad block quantity in flash memory limits to a number or amount, to there be bad block to surpass 85% storage unit deletion (that is to say this storage unit is denoted as the storage unit that does not re-use) in step 103, advance to step 104, if the bad block of this storage unit distributes and do not limit to a number or amount above bad block in step 102, advance to step 106; In step 104, reexamine the distribution situation of bad block, check again whether the bad block quantity in flash memory limits to a number or amount above the bad block that is located at the flash memory internal firmware, limit to a number or amount if the bad block quantity in flash memory still surpasses the bad block that is located at the flash memory internal firmware, advance to step 105; Redistribute the storage unit of flash memory in step 105, bad block is concentrated be divided into a new storage unit, repeating step 103 surpasses bad block the deletion of the block sum 85% of storage unit; If the bad block of this storage unit distributes and do not limit to a number or amount above bad block in step 102, advance to step 106; The distributing position of record bad block is stored in the flash memory in step 106, advances to step 107; In step 107, the reformatting flash memory writes flash memory with USB (universal serial bus) (USB) configuration data, Main Boot Record (MBR) and file allocation table (FAT).
Fig. 2 is the workflow diagram of second embodiment of the invention.
As shown in Figure 2, the distribution situation of bad block in the step 201 scanning flash memory; Behind the completing steps 201, check that in step 202 whether the bad block quantity in the flash memory limits to a number or amount above the bad block that is located at the flash memory internal firmware, advances to step 203; If surpassing the bad block that is located at the flash memory internal firmware, the bad block quantity in the flash memory limits to a number or amount, again plan the capacity of storage unit in step 203, bad block is concentrated on same storage unit, advance to step 204, do not limit to a number or amount if the bad block quantity in the flash memory has to surpass the bad block that is located at the flash memory internal firmware, advance to step 207; In step 204, bad block is surpassed the zone deletion (that is to say this storage unit is denoted as useless storage unit) of the block sum 85% of storage unit, advance to step 205; In step 205, reexamine the distribution situation of bad block, check again whether the bad block quantity in flash memory limits to a number or amount above the bad block that is located at the flash memory internal firmware, limit to a number or amount if the bad block quantity in flash memory still surpasses the bad block that is located at the flash memory internal firmware, advance to step 206; Redistribute the storage unit of flash memory in step 206, bad block is concentrated be divided into a new storage unit, repeating step 204 is with the element deletion of bad block above the block sum 85% of storage unit; If the bad block of this storage unit distributes and do not limit to a number or amount above bad block in step 205, advance to step 207; In step 207, will write down the bad block distributing position, be stored in the flash memory; In step 208, the reformatting flash memory writes flash memory with universal serial bus configuration data, Main Boot Record and file allocation table.
Fig. 3 introduces block diagram how to delete the storage unit of bad block dense distribution in the flash memory of the present invention in detail.
As shown in Figure 3, at first scan the distribution situation of bad block in the flash memory, first flash memory 301 has 5 bad blocks, second flash memory 302 has 10 bad blocks, the 3rd flash memory 303 has 4 bad blocks, the 4th flash memory 304 has 12 bad blocks, and manufacturer to be located at the bad block quantity of flash memory internal firmware restriction be 8; In the 3rd storage unit of second flash memory 302, in six blocks of this storage unit five bad blocks are arranged, meet the state that has bad block to surpass the block sum 85% in memory zone, with this storage unit deletion, same in the 3rd storage unit of the 4th flash memory 304, in 6 blocks of this storage unit 5 bad blocks are arranged, with this storage unit deletion, therefore after carrying out recovery method, the bad block of second flash memory 302 only has 5, the bad block of the 4th flash memory 304 only has 7, and both all are lower than 8 of the bad block quantity of flash memory internal firmware restriction.By the above, the capacity of second flash memory 302 and the 4th flash memory 304 can diminish because of recovery method, but the process of process recovery method, the term of life that can prolong flash memory; Only need to sacrifice a small amount of cost, can reach the function that increases the service life with the raising fiduciary level.
Fig. 4 introduces the block diagram of planning again in the embodiment of the invention that bad block distributes in the storage unit, flash memory 40 has first storage unit 401, second storage unit 402, the 3rd storage unit 403 and the 4th storage unit 404, it is capable and B is capable that first storage unit 401 is divided into A, it is capable and D is capable that second storage unit 402 is divided into C, it is capable and F is capable that the 3rd storage unit 403 is divided into E, and the 4th storage unit 404 to divide into G capable and H is capable, this flash memory 40 always has 10 bad blocks, and as can be known by figure, the densely distributed district of E behavior bad block of and three storage unit 403 capable at the D of second storage unit 402, when planning storage unit again, this two row is divided in same storage unit, again after planning storage unit, first storage unit, 401 districts are that A is capable and B is capable, second storage unit, 402 districts are that C is capable and F is capable, the 3rd storage unit 403 districts are that D is capable and E is capable, and the 4th storage unit 404 to divide into G capable and H is capable, by figure as can be known, the 3rd storage unit 403 is the bad block concentrated area, the 3rd storage unit is deleted, the bad block of this flash memory 40 is increasing the service life and the function that improves fiduciary level through only remaining 5 after the process of recovery method, can reaching equally.
Fig. 5 introduces the block diagram of planning the memory field capacity in the embodiment of the invention again.According to Fig. 5, this flash memory 50 has first storage unit 501, second storage unit 502, the 3rd storage unit 503 and the 4th storage unit 504, it is capable and B is capable that first storage unit 501 is divided into A, it is capable and D is capable that second storage unit 502 is divided into C, it is capable and F is capable that the 3rd storage unit 503 is divided into E, and the 4th storage unit 504 to divide into G capable and H is capable, this flash memory 50 always has 10 bad blocks, selection is capable with the D of second storage unit, the E of the 3rd storage unit is capable, the F of the 3rd storage unit G capable and storage unit is capable when planning the storage unit amount of capacity again, this four lines is divided in same storage unit, through after planning the storage unit amount of capacity again, form the first new storage unit 505 and second storage unit 506, again many bad blocks are concentrated second storage unit, 506 deletions that distribute, the bad block of this flash memory 50 is increasing the service life and the function that improves fiduciary level through only remaining 2 after the process of recovery method, can reaching equally.
Fig. 6 is the workflow diagram of third embodiment of the invention.
As shown in Figure 6, the distribution situation of bad block in the step 601 scanning flash memory; Behind the completing steps 601, check the bad block that whether has in the flash memory in step 602; Do not limit to a number or amount if the bad block in the flash memory surpasses the bad block of internal firmware, advance to step 603, the bad block that will not change the flash memory internal firmware in step 603 limits to a number or amount; In step 602, if surpassing the bad block of internal firmware, the bad block in the flash memory limits to a number or amount, advance to step 604, the bad block that bad block in the flash memory is surpassed internal firmware limits to a number or amount and resets, and the bad block of setting each storage unit in a dynamic way limits to a number or amount, and it is stored in the internal firmware of flash memory, advance to step 605; In step 605, the reformatting flash memory writes flash memory with universal serial bus configuration data, Main Boot Record and file allocation table.
Fig. 7 introduces third embodiment of the invention to set the block diagram that the bad block of each storage unit limits to a number or amount with dynamical fashion.
As shown in Figure 7, limit to a number or amount, can set with an equation at the bad block of setting each storage unit with dynamical fashion of Fig. 6 explanation; First storage unit 7011 with first flash memory 701 is an example, the bad block of supposing first flash memory, 701 internal firmwares limits to a number or amount and is X=20, the quantity the Y=0 whether storage unit of bad block existence is arranged in first flash memory 701, bad block sum Z=5 at first flash memory 701, first storage unit 7011 W=2 bad block arranged, the bad block restriction of dynamically setting this storage unit with equation is ((X-Y*2)/Z) * W=((20-0*2)/5) * 2=8 of F=, equation can be limited to 8 on these first storage unit, 7011 receivable bad blocks thus, it is 4 that the bad block that in like manner can obtain second storage unit 7012 limits to a number or amount, the bad block quantity of the 3rd storage unit 7013 is 4, the bad block quantity of the 4th storage unit 7014 is 4, and total bad block of this first flash memory 701 limits to a number or amount and is 8+4+4+4=20.First storage unit 7021, second area 7022, the 3rd storage unit 7023 and the 4th storage unit 7024 receivable bad block upper limits of utilizing identical equation can obtain at second flash memory 702 are respectively 8,2,2 and 8.
The number of blocks of number of blocks in the above-described embodiments, storage area quantity, storage unit, bad block quantity, bad block distribution proportion or to limit to a number or amount at the bad block of flash memory internal firmware only be an example, can allow those skilled in the art understand easily, these quantity can be according to the settings of the amount of capacity of flash memory or different vendor and are different, do not limit to usable range of the present invention at this.
Flash memory of the present invention can be one to be the flash memory at interface with the universal serial bus; Or this flash memory is used in general on the market CF (compact flash), MMC (multimedia card), MSC (memory stick card), SMC (smart media card) or SD flash memories such as (smart cards).This flash memory can be single level cell flash memory, multi-level unit flash memory or nand flash memory or NOR flash memory, can utilize recovery method of the present invention to reach and increase the service life and the function that improves fiduciary level.
Explanation described above and diagram, be for the ease of illustrating technology contents of the present invention and technological means, the part of disclosed preferred embodiment, not thereby limit its scope, those skilled in the art should be by the concrete open possible variation of making of the present invention.All local modification at technological means of the present invention, device, change, or the equivalent substitution of assembly, displacement should not break away from the spirit and the scope of invention of the present invention, and its scope will be defined by the scope of following claim.

Claims (6)

1, a kind of recovery method of flash memory comprises the following steps:
Scan the distribution situation of bad block in the flash memory;
Check whether bad block quantity limits to a number or amount above a bad block that defaults in this flash memory internal firmware in this flash memory;
When bad block quantity in this flash memory limits to a number or amount above this bad block that defaults in this flash memory internal firmware, redistribute the block in several storage unit of this flash memory, and the bad block in these several storage unit is divided in the new storage unit, to form the storage unit of a bad block dense distribution;
The storage unit of this bad block dense distribution is denoted as the storage unit that does not re-use;
The distributing position of record bad block, and be stored in this flash memory; And
This flash memory of reformatting writes this flash memory with universal serial bus configuration data, Main Boot Record and file allocation table.
2, recovery method according to claim 1, this flash memory are one of following kind: NAND type flash memory, NOR type flash memory, single level cell flash memory, multi-level unit flash memory.
3, recovery method according to claim 1, the state of this bad block dense distribution are the block sums 85% that bad block surpasses storage unit.
4, a kind of recovery method of flash memory comprises the following steps:
Scan the distribution situation of bad block in the flash memory;
Check that the bad block whether bad block quantity in this flash memory surpasses the internal firmware that defaults in this flash memory limits to a number or amount;
If surpassing this bad block, the bad block quantity in this flash memory limits to a number or amount, again plan the number of blocks of at least one storage unit, and at least one new storage unit, this at least one new storage unit forms the storage unit of at least one bad block dense distribution with the bad block centralized planning; The storage unit of this at least one bad block dense distribution is denoted as the storage unit that does not re-use; The distributing position of record bad block is stored in this flash memory; And
Format this flash memory, universal serial bus configuration data, Main Boot Record and file allocation table are write flash memory.
5, recovery method according to claim 4, this flash memory are one of following kind: NAND type flash memory, NOR type flash memory, single level cell flash memory, multi-level unit flash memory.
6, recovery method according to claim 4, the state of this bad block dense distribution are the block sums 85% that bad block surpasses storage unit.
CNB2006101061239A 2006-07-20 2006-07-20 Method for recovering flash memory Expired - Fee Related CN100476757C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006101061239A CN100476757C (en) 2006-07-20 2006-07-20 Method for recovering flash memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006101061239A CN100476757C (en) 2006-07-20 2006-07-20 Method for recovering flash memory

Publications (2)

Publication Number Publication Date
CN101110058A CN101110058A (en) 2008-01-23
CN100476757C true CN100476757C (en) 2009-04-08

Family

ID=39042137

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006101061239A Expired - Fee Related CN100476757C (en) 2006-07-20 2006-07-20 Method for recovering flash memory

Country Status (1)

Country Link
CN (1) CN100476757C (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101562052B (en) * 2008-04-14 2013-02-27 深圳市朗科科技股份有限公司 Storage equipment screening device and method
CN101859604B (en) * 2009-04-10 2012-10-24 国民技术股份有限公司 Utilization method of flash memory bad block
CN103049386A (en) * 2011-10-14 2013-04-17 绿智慧流科技公司 Method for reclaiming and rebuilding memory space
CN103440207B (en) * 2013-07-31 2017-02-22 北京智谷睿拓技术服务有限公司 Caching method and caching device
CN106775496B (en) * 2013-10-23 2020-01-21 华为技术有限公司 Stored data processing method and device
CN104238961B (en) * 2014-09-11 2018-03-02 北京元心科技有限公司 The method and apparatus that safety deleting is realized on flash media
CN104484290B (en) * 2014-12-19 2018-09-28 上海斐讯数据通信技术有限公司 The operating method of Flash and the operating device of Flash
KR20180059208A (en) * 2016-11-25 2018-06-04 삼성전자주식회사 Memory controller with reclaim controller
CN109426622B (en) * 2017-08-31 2020-11-24 香港理工大学深圳研究院 Method for prolonging service life of flash memory solid-state disk and long-service-life flash memory solid-state disk

Also Published As

Publication number Publication date
CN101110058A (en) 2008-01-23

Similar Documents

Publication Publication Date Title
CN100476757C (en) Method for recovering flash memory
US9098395B2 (en) Logical block management method for a flash memory and control circuit storage system using the same
CN101288054B (en) Virtual-to-physical address translation in a flash file system
CN101320594B (en) Physical operation method of flash memory chip
CN101923448B (en) Method for reading and writing conversion layer of NAND flash memory
JP3942807B2 (en) Semiconductor memory device with block alignment function
US8874832B2 (en) AD HOC flash memory reference cells
CN103577342B (en) Method for managing data stored in flash memory and related memory device and controller
RU2001120348A (en) ACCESSORY DEVICE FOR SEMICONDUCTOR MEMORY CARD, COMPUTER-READABLE RECORDING MEDIA, METHOD OF INITIALIZATION AND SEMICONDUCTOR MEMORY CARD
CN102841851A (en) Flash memory management method and flash memory device
CN105320464B (en) Prevent method, memorizer control circuit unit and the storage device of reading interference
TWI597730B (en) Data writing method, memory control circuit unit and memory storage apparatus
US8074128B2 (en) Block management and replacement method, flash memory storage system and controller using the same
CN104636267B (en) Memory control methods, memory storage apparatus and memorizer control circuit unit
CN104765569A (en) Data write-in method, memory control circuit unit and memory storing device
CN102298543A (en) Memory management method and memory management device
CN111158579A (en) Solid state disk and data access method thereof
WO2006046425A1 (en) Nonvolatile storage device and nonvolatile storage system
CN106683701A (en) Memory management method, memory storage device and memory control circuit unit
CN102890655A (en) Memory storage device, memory controller and valid data recognition method thereof
CN105988950B (en) Storage management method, memorizer control circuit unit and memory storage apparatus
US7478271B2 (en) Method for recycling flash memory
CN102402396B (en) Combined type storage device as well as combined type storage media controller and addressing method thereof
CN103218308B (en) Buffer storage supervisory method, Memory Controller and memorizer memory devices
CN103678157B (en) Data storage device and flash memory control method thereof

Legal Events

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

Owner name: GREEN WISDOM FLOW TECHNOLOGY CO.

Free format text: FORMER OWNER: HE CHUNCHUN

Effective date: 20111021

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20111021

Address after: The Republic of Seychelles Mahe Vitoria Hai Rui Center No. 1239 mailbox

Patentee after: Lvzhihuiliu Technology BVI

Address before: Taipei City, Taiwan, China

Patentee before: He Chunchun

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090408

Termination date: 20150720

EXPY Termination of patent right or utility model