New! View global litigation for patent families

US8069396B2 - Storage device for refreshing data pages of flash memory based on error correction code and method for the same - Google Patents

Storage device for refreshing data pages of flash memory based on error correction code and method for the same Download PDF

Info

Publication number
US8069396B2
US8069396B2 US12197839 US19783908A US8069396B2 US 8069396 B2 US8069396 B2 US 8069396B2 US 12197839 US12197839 US 12197839 US 19783908 A US19783908 A US 19783908A US 8069396 B2 US8069396 B2 US 8069396B2
Authority
US
Grant status
Grant
Patent type
Prior art keywords
page
ecc
data
area
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active, expires
Application number
US12197839
Other versions
US20100011276A1 (en )
Inventor
Ju-peng Chen
Chih-Jung Lin
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.)
Genesys Logic Inc
Original Assignee
Genesys Logic Inc
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
Grant date

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRICAL DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • G06F11/1068Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices in sector programmable memories, e.g. flash disk
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • G11C16/34Determination of programming status, e.g. threshold voltage, overprogramming or underprogramming, retention
    • G11C16/349Arrangements for evaluating degradation, retention or wearout, e.g. by counting erase cycles
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/70Masking faults in memories by using spares or by reconfiguring
    • G11C29/78Masking faults in memories by using spares or by reconfiguring using programmable devices
    • G11C29/80Masking faults in memories by using spares or by reconfiguring using programmable devices with improved layout
    • G11C29/816Masking faults in memories by using spares or by reconfiguring using programmable devices with improved layout for an application-specific layout
    • G11C29/82Masking faults in memories by using spares or by reconfiguring using programmable devices with improved layout for an application-specific layout for EEPROMs
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/04Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
    • G11C2029/0411Online error correction

Abstract

A storage device for refreshing pages of a flash memory comprises a flash memory, an ECC detector and a controller. The flash memory has a plurality of pages, and each page comprises a data area for storing data and a spare area for storing error correction code (ECC) corresponding to the data. The ECC detector is used to get the number of error bits of each page. The controller coupled to the ECC detector is used for storing data and ECC in a first page to a second page when a number of used bytes of the ECC stored in a spare area of the first page exceeds a first predetermined value. A number of used bytes of the ECC stored in a spare area of the second page is less than the first predetermined value. The second page is a blank page.

Description

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a storage device having a flash memory and related method, and more particularly, to a storage device and related method capable of refreshing data pages of the flash memory based on error correction code.

2. Description of the Related Art

Flash Memory, a non-volatile memory, may keep the previously written stored data upon shutdown. In contrast to other storage media, e.g. hard disks, soft disks, magnetic tapes and so on, the flash memory has advantages of small volume, light weight, vibration-proof, low power consumption, and no mechanical movement delay in data access; therefore, are widely use for as storage media in consumer electronic devices, embedded systems, or portable computers.

There are two kinds of flash memory: one is an NOR flash memory and the other is an NAND flash memory. An NOR flash memory is characteristically of low driving voltage, fast access speed, high stability, and are widely applied in portable electrical devices and communication devices such as Personal Computers (PCs), mobile phones, personal digital assistances (PDAs), and set-top boxes (STBs). An NAND flash memory is specifically designed as data storage media, for example, a Secure Digital (SD) memory card, a Compact Flash (CF) card, a Memory Stick (MS) card. The NAND flash memory contains a plurality of blocks, each block having a plurality of pages and each page dividing into data area and spare area. The data area may have 2048 bytes used for storing data. The spare area may have 64 bytes used for storing error correction code (ECC) as well as other software information, such as wear-leveling or logical-to-physical block-mapping information. NAND flash memory requires ECC to ensure data integrity. ECC can be used in any device that may be susceptible to data errors.

However, the flash memory may fail to change data update-in-place, that is, prior to writing data into a non-blank page, erasing a block including the non-blank page is required. In general, erasing a block takes as much time as 10-20 times greater than writing into a page. If a size of written data is over an assigned block, the filled pages in the assigned block may have to be removed to other blocks, and then erasing the assigned block is performed.

Furthermore, flash memory blocks may fail to be accessed when in excess of one million times of erasures before the block is considered to be worn out. This is because the number of erasure times for a block is close to one million times that charge within the floating gate may be insufficient due to current leakage of realized capacitor, thereby resulting in data loss of the flash memory cell, and even a failure of access to the flash memory. In other words, if a block is erased over a limited times, that block may be unable to be accessed.

Owing to a life-cycle limitation of the flash memory, how to correctly access data before the block is worn out is an important task. A conventional way is to detect a number of written times of all pages, and then to write data into a least-used page. Nevertheless, a most-used page is not essential to be worn out in the next access time, conversely, a less-used is possibly to be worn out in the next access time. In other words, the conventional way to select a page to be written relying on the number of access time is not perfect.

SUMMARY OF THE INVENTION

It is therefore an object of the present invention to provide a storage device and related method capable of refreshing data pages of the flash memory based on error correction code, to solve existing prior problem.

In brief, the claimed invention provides a storage device for refreshing pages of a flash memory comprises a flash memory, an ECC detector and a controller. The flash memory has a plurality of pages, and each page comprises a data area for storing a data and a spare area for storing error correction code (ECC) corresponding to the data. The ECC detector is used to get the number of error bits of each page. The controller coupled to the ECC detector is used for storing data and ECC in a first page to a second page when a number of used bytes of the ECC stored in a spare area of the first page exceed a first predetermined value.

According to present invention, the storage device further comprises a buffer for storing the data and the ECC read out from the plurality of pages. The buffer is a first-in first-out buffer.

According to present invention, the controller is used for marking a third page as worn-out when a number of used bytes of the ECC stored in a spare area of the third page exceeds a second predetermined vale.

According to the present invention, a method for refreshing pages of a flash memory is provided. The flash memory has a plurality of pages, and each page comprises a data area for storing data and a spare area for storing error correction code (ECC) corresponding to the data. The method comprises the steps of counting a number of used bytes of the ECC stored in the spare area of each page, and storing data and ECC in a first page to a second page when a number of used bytes of the ECC stored in a spare area of the first page exceeds a first predetermined value. A number of used bytes of the ECC stored in a spare area of the second page are less than the first predetermined value.

The present invention will be described with reference to the accompanying drawings, which show exemplary embodiments of the present invention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a block diagram of a storage device according to a preferred embodiment of the present invention.

FIG. 2 shows a schematic diagram of the flash memory of the storage device.

FIG. 3 is a flowchart of refreshing pages of the flash memory according to the present invention.

DETAILED DESCRIPTION OF THE INVENTION

Pleaser refer to FIG. 1 and FIG. 2. FIG. 1 Illustrates a block diagram of a storage device 10 according to a preferred embodiment of the present invention, and FIG. 2 shows a schematic diagram of the flash memory 20 of the storage device 10. The storage device 10 comprises a flash memory 20, an ECC detector 30, a controller 40, and a buffer 50. The flash memory 100 which may be a NAND flash memory is divided as a plurality of blocks 22, and each block 22 comprises a plurality of pages. Each page is divided into a data area 26 and a spare area 28. The data area 26 which may have 2048 bytes is used for storing data. The spare area 28 which may have 64 bytes is used for storing error correction code (ECC) as well as other software information, such as wear-leveling or logical-to-physical block-mapping information. The flash memory 20 requires ECC to ensure data integrity. In general, a 512-bytes data area 26 corresponds to a 16-bytes spare area. The more damaged bytes in the data area 26, the more bytes of ECC stored in the spare area 28. The buffer 50 is a first-in first-out buffer. During a programming operation, the ECC is generated based on the data stored in the data area 26. The ECC for the data area 26 is then written to the corresponding spare area 28. When the data is read out from the flash memory 30, the ECC is also read out, and the data and the ECC are sequentially stored in buffer 50. The ECC detector 30 performs a reverse operation to check that the data is correct. It is possible for the ECC algorithm to correct data errors. The number of data errors that can be corrected depends on the correction strength of the algorithm used. ECC may be generated by using simple Hamming codes, or Reed-Solomon codes or BCH codes.

Please refer to FIG. 1 in conjunction to FIG. 3. FIG. 3 is a flowchart of refreshing pages of the flash memory according to the present invention. The method comprises following steps:

  • Step 300: Start.
  • Step 302: Count a number of used bytes of the ECC stored in the spare area 28 of each page.
  • Step 304: Determine whether the number of used bytes of the ECC stored in the spare area 28 of page 24 exceeds a first predetermined value. If it is, go to Step 304, if not, go to Step 308.
  • Step 306: Determine whether a number of used bytes of the ECC stored in the spare area 28 of page 24 exceeds a second predetermined value. If it is, go to Step 310, if not, go to Step 306.
  • Step 308: Mark the page as “worn-out”.
  • Step 310: Store data and ECC of the page 24 to another usable page.
  • Step 312: Finish.

When the storage device 10 receives a read request, the controller 40 will read data in assigned pages 24 based on the read request. Afterwards, the data and ECC in the assigned pages will be read out and sequentially stored into the buffer 50. The data is then decoded as correct and desired data by the ECC detector 30 with corresponding ECC. In the meantime, the ECC detector 30 counts a number of used bytes of the ECC stored in the spare area 28 of each page 24 (Step 302). In general, a 512-bytes data, area 26 corresponds to a 16-bytes spare area 28. That the number of used bytes of the ECC stored in the spare area 28 of a first page 24 exceeds a first predetermined value indicates too many error bytes are stored in the first page 24 (Step 304), i.e. the first page has higher possibility to become a worn-out page. In this embodiment, the first predetermined value may be but not limit to 4 bytes. Then, the controller 40 can write the data and ECC in the first page into another usable second page in which a number of used bytes of the ECC stored in a spare area 28 is less than the first page. Preferably, the second page is a blank page (Step 310). If the number of used bytes of the ECC stored in the spare area 28 of a first page 24 is less than the first predetermined value, the first page 24 is normal and far from a risky of worn-out, and allows to store data and ECC.

If a number of used bytes of the ECC stored in the spare area 28 of a first page 24 exceeds a third predetermined value exceeds the second predetermined value and the first predetermined value, it indicates the third page 24 complies a benchmark of worn-out. The controller 40 will mark the third page as “worn-out”, and data will not store in to the third page any more.

In contrast to prior art, the present inventive storage device refresh the pages of the flash memory based on a number of used bytes of the ECC stored in the spare area of a page. The more bytes that are used of the ECC, the more error bytes that will be in the data, as well as the higher possibility of the page is to be worn-out. Consequently, the present inventive storage device and method are more reliable to refresh page than the convention way is based on a number of access times.

While the present invention has been described in connection with what is considered the most practical and preferred embodiments, it is understood that this invention is not limited to the disclosed embodiments but is intended to cover various arrangements made without departing from the scope of the broadest interpretation of the append claims.

Claims (12)

1. A storage device for refreshing pages of a flash memory comprising:
a flash memory having a plurality of pages, each page comprising a data area for storing data and a spare area for storing error correction code (ECC) corresponding to the data;
an ECC detector, for counting a number of used bytes of the ECC stored in the spare area of each page; and
a controller coupled to the ECC detector, for storing data and ECC in a first page to a second page when a number of used bytes of the ECC stored in a spare area of the first page exceeds a first predetermined value, wherein a number of used bytes of the ECC stored in a spare area of the second page is less than the first predetermined value.
2. The storage device as claimed in claim 1, wherein the flash memory is an NAND flash memory.
3. The storage device as claimed in claim 1, further comprising a buffer for storing the data and the ECC read out from the plurality of pages.
4. The storage device as claimed in claim 3, wherein the buffer is a first-in first-out buffer.
5. The storage device as claimed in claim 1, wherein the controller is used for marking a third page as worn-out when a number of used bytes of the ECC stored in a spare area of the third page exceeds a second predetermined vale.
6. The storage device as claimed in claim 5, wherein the first predetermined value is less than the second predetermined value.
7. The storage device as claimed in claim 1, wherein the second page is a blank page.
8. A method for refreshing pages of a flash memory, the flash memory having a plurality of pages, each page comprising a data area for storing data and a spare area for storing error correction code (ECC) corresponding to the data, the method comprising:
counting a number of used bytes of the ECC stored in the spare area of each page; and
storing data and ECC in a first page to a second page when a number of used bytes of the ECC stored in a spare area of the first page exceeds a first predetermined value,
wherein a number of used bytes of the ECC stored in a spare area of the second page is less than the first predetermined value.
9. The method as claimed in claim 8, wherein the flash memory is an NAND flash memory.
10. The method as claimed in claim 8, further comprising:
marking a third page as worn-out when a number of used bytes of the ECC stored in a spare area of the third page exceeds a second predetermined vale.
11. The method as claimed in claim 10, wherein the first predetermined value is less than the second predetermined value.
12. The method as claimed in claim 8, wherein the second page is a blank page.
US12197839 2008-07-11 2008-08-25 Storage device for refreshing data pages of flash memory based on error correction code and method for the same Active 2030-09-29 US8069396B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
TW97126212 2008-07-11
TW97126212A 2008-07-11
TW097126212 2008-07-11

Publications (2)

Publication Number Publication Date
US20100011276A1 true US20100011276A1 (en) 2010-01-14
US8069396B2 true US8069396B2 (en) 2011-11-29

Family

ID=41506198

Family Applications (1)

Application Number Title Priority Date Filing Date
US12197839 Active 2030-09-29 US8069396B2 (en) 2008-07-11 2008-08-25 Storage device for refreshing data pages of flash memory based on error correction code and method for the same

Country Status (2)

Country Link
US (1) US8069396B2 (en)
JP (1) JP2010020756A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110029808A1 (en) * 2009-07-29 2011-02-03 Stec, Inc. System and method of wear-leveling in flash storage
US8453021B2 (en) 2009-07-29 2013-05-28 Stec, Inc. Wear leveling in solid-state device
US9251119B2 (en) 2012-01-23 2016-02-02 Q-Up Enterprises LLC System for the exchange of optically-encoded information
US9356777B2 (en) 2012-01-23 2016-05-31 Q-Up Technologies Llc Secure communications system for direct transfer between mobile device

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8555143B2 (en) * 2008-12-22 2013-10-08 Industrial Technology Research Institute Flash memory controller and the method thereof
KR101666987B1 (en) * 2010-04-20 2016-10-17 삼성전자주식회사 Memory system and operating method thereof
US8756474B2 (en) * 2011-03-21 2014-06-17 Denso International America, Inc. Method for initiating a refresh operation in a solid-state nonvolatile memory device
US8902653B2 (en) 2011-08-12 2014-12-02 Micron Technology, Inc. Memory devices and configuration methods for a memory device
KR20140031556A (en) * 2012-09-04 2014-03-13 삼성전자주식회사 Flash memory system including flash memory and detecting method of abnormal wordline thereof
CN104133731A (en) * 2014-08-06 2014-11-05 曙光信息产业(北京)有限公司 Method and system for correcting data

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030135793A1 (en) * 2002-01-16 2003-07-17 Sandisk Corporation Method and apparatus for dynamic degradation detection
US7096406B2 (en) * 2001-08-23 2006-08-22 Spansion Llc Memory controller for multilevel cell memory
US20070245068A1 (en) * 2006-04-13 2007-10-18 Emilio Yero Cycle count storage methods
US20090089485A1 (en) * 2007-09-27 2009-04-02 Phison Electronics Corp. Wear leveling method and controller using the same
US7559004B1 (en) * 2003-10-01 2009-07-07 Sandisk Corporation Dynamic redundant area configuration in a non-volatile memory system
US20090222627A1 (en) * 2008-02-29 2009-09-03 Denali Software, Inc. Method and apparatus for high speed cache flushing in a non-volatile memory
US20100262890A1 (en) * 2007-07-09 2010-10-14 William Henry Radke Error correction for memory

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4287631B2 (en) * 2002-09-06 2009-07-01 株式会社日立コミュニケーションテクノロジー Storage device
JP2004152194A (en) * 2002-10-31 2004-05-27 Ricoh Co Ltd Memory data protection method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7096406B2 (en) * 2001-08-23 2006-08-22 Spansion Llc Memory controller for multilevel cell memory
US20030135793A1 (en) * 2002-01-16 2003-07-17 Sandisk Corporation Method and apparatus for dynamic degradation detection
US7559004B1 (en) * 2003-10-01 2009-07-07 Sandisk Corporation Dynamic redundant area configuration in a non-volatile memory system
US20070245068A1 (en) * 2006-04-13 2007-10-18 Emilio Yero Cycle count storage methods
US20100262890A1 (en) * 2007-07-09 2010-10-14 William Henry Radke Error correction for memory
US7996727B2 (en) * 2007-07-09 2011-08-09 Micron Technology, Inc. Error correction for memory
US20090089485A1 (en) * 2007-09-27 2009-04-02 Phison Electronics Corp. Wear leveling method and controller using the same
US20090222627A1 (en) * 2008-02-29 2009-09-03 Denali Software, Inc. Method and apparatus for high speed cache flushing in a non-volatile memory

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110029808A1 (en) * 2009-07-29 2011-02-03 Stec, Inc. System and method of wear-leveling in flash storage
US8266481B2 (en) * 2009-07-29 2012-09-11 Stec, Inc. System and method of wear-leveling in flash storage
US8453021B2 (en) 2009-07-29 2013-05-28 Stec, Inc. Wear leveling in solid-state device
US8713381B2 (en) 2009-07-29 2014-04-29 Stec, Inc. Systems and methods of using dynamic data for wear leveling in solid-state devices
US9251119B2 (en) 2012-01-23 2016-02-02 Q-Up Enterprises LLC System for the exchange of optically-encoded information
US9356777B2 (en) 2012-01-23 2016-05-31 Q-Up Technologies Llc Secure communications system for direct transfer between mobile device

Also Published As

Publication number Publication date Type
JP2010020756A (en) 2010-01-28 application
US20100011276A1 (en) 2010-01-14 application

Similar Documents

Publication Publication Date Title
US7810017B2 (en) Variable sector-count ECC
US8578242B1 (en) Data storage device employing seed array for data path protection
US20130111298A1 (en) Systems and methods for obtaining and using nonvolatile memory health information
US20110209028A1 (en) Codeword remapping schemes for non-volatile memories
US8046645B2 (en) Bad block identifying method for flash memory, storage system, and controller thereof
US20120236658A1 (en) Systems and methods for refreshing non-volatile memory
US20120311402A1 (en) Data reading method, memory controller, and memory storage device
US20130060994A1 (en) Non-volatile memory management system with time measure mechanism and method of operation thereof
US20100131697A1 (en) Methods for tag-grouping of blocks in storage devices
US20140101371A1 (en) Systems and methods for nonvolatile memory performance throttling
US20110191649A1 (en) Solid state drive and method of controlling an error thereof
US20090193174A1 (en) Read disturbance management in a non-volatile memory system
US20090327804A1 (en) Wear leveling in flash storage devices
US20120240012A1 (en) Apparatus and method for multi-mode operation of a flash memory device
US20110239088A1 (en) Non-regular parity distribution detection via metadata tag
US20100107021A1 (en) Semiconductor memory device
US20090193058A1 (en) System and method for providing copyback data integrity in a non-volatile memory system
US20090089484A1 (en) Data protection method for power failure and controller using the same
US20040083334A1 (en) Method and apparatus for managing the integrity of data in non-volatile memory system
US20120272123A1 (en) Data writing method, memory controller and memory storage apparatus
US20090172254A1 (en) Method for preventing read-disturb happened in non-volatile memory and controller thereof
US7765426B2 (en) Emerging bad block detection
US20110066899A1 (en) Nonvolatile memory system and related method of performing erase refresh operation
US20090172256A1 (en) Data writing method for flash memory, and flash memory controller and storage device thereof
US20100161881A1 (en) Memory system

Legal Events

Date Code Title Description
AS Assignment

Owner name: GENESYS LOGIC, INC., TAIWAN

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:CHEN, JU-PENG;LIN, CHIH-JUNG;REEL/FRAME:021437/0142

Effective date: 20080720

FPAY Fee payment

Year of fee payment: 4