AN1819 APPLICATION NOTE Bad Block Management in Single Level Cell NAND Flash Memories



Similar documents
AN974 APPLICATION NOTE

AN820 APPLICATION NOTE INPUT/OUTPUT PROTECTION FOR AUTOMOTIVE COMPUTER

AN886 APPLICATION NOTE

SPC5-FLASHER. Flash management tool for SPC56xx family. Description. Features

AN2146 APPLICATION NOTE

AN438 APPLICATION NOTE SAFETY PRECAUTIONS FOR DEVELOPMENT TOOL TRIAC + MICROCONTROLLER

Single LNB supply and control IC DiSEqC 1.X compliant with EXTM based on the LNBH29 in a QFN16 (4x4) Description

UM0109 USER MANUAL. Public Transport Ticketing Demo

AN3332 Application note

How To Write To An Eeprom Memory On A Flash Memory On An Iphone Or Ipro Memory On Microsoft Flash Memory (Eeprom) On A Microsoft Microsoft Powerbook (Ai) 2.2.2

AN3354 Application note

TN0023 Technical note

HCF4001B QUAD 2-INPUT NOR GATE

BD241A BD241C. NPN power transistors. Features. Applications. Description. NPN transistors. Audio, general purpose switching and amplifier transistors

AN2389 Application note

HCF4010B HEX BUFFER/CONVERTER (NON INVERTING)

AN2604 Application note

BD238. Low voltage PNP power transistor. Features. Applications. Description. Low saturation voltage PNP transistor

AN4108 Application note

SPC5-CRYP-LIB. SPC5 Software Cryptography Library. Description. Features. SHA-512 Random engine based on DRBG-AES-128

AN3998 Application note

EN: This Datasheet is presented by the m anufacturer. Please v isit our website for pricing and availability at ore.hu.

AN1826 APPLICATION NOTE TRANSIENT PROTECTION SOLUTIONS: Transil diode versus Varistor

AN1754 APPLICATION NOTE

ULN2801A, ULN2802A, ULN2803A, ULN2804A

UM1676 User manual. Getting started with.net Micro Framework on the STM32F429 Discovery kit. Introduction

ST High voltage fast-switching NPN power transistor. Features. Applications. Description

DDSL01. Secondary protection for DSL lines. Features. Description

AN4156 Application note

TDA2822 DUAL POWER AMPLIFIER SUPPLY VOLTAGE DOWN TO 3 V LOW CROSSOVER DISTORSION LOW QUIESCENT CURRENT BRIDGE OR STEREO CONFIGURATION

M24LRxx/CR95HF application software installation guide

EVL185W-LEDTV. 185 W power supply with PFC and standby supply for LED TV based on the L6564, L6599A and Viper27L. Features.

2STBN15D100. Low voltage NPN power Darlington transistor. Features. Application. Description

HCF4056B BCD TO 7 SEGMENT DECODER /DRIVER WITH STROBED LATCH FUNCTION

BD135 - BD136 BD139 - BD140

AN2680 Application note

TDA CHANNEL VOLUME CONTROLLER 1 FEATURES 2 DESCRIPTION. Figure 1. Package

AN2557 Application note

HCF4081B QUAD 2 INPUT AND GATE

AN3270 Application note

AN3265 Application note

Table 1. Absolute maximum ratings (T amb = 25 C) Symbol Parameter Value Unit. ISO C = 330 pf, R = 330 Ω : Contact discharge Air discharge

HCF4070B QUAD EXCLUSIVE OR GATE

Description. Table 1. Device summary. Order code Temperature range Package Packaging Marking

LM337. Three-terminal adjustable negative voltage regulators. Features. Description

L4940 series VERY LOW DROP 1.5 A REGULATORS

UM1790 User manual. Getting started with STM32L053 discovery kit software development tools. Introduction

UM1727 User manual. Getting started with STM32 Nucleo board software development tools. Introduction

Description. Table 1. Device summary

AN3155 Application note

STEVAL-IEG001V2. Smart real-time vehicle tracking system. Features

AN2760 Application note

AN3110 Application note

UM1680 User manual. Getting started with STM32F429 Discovery software development tools. Introduction

ST19NP18-TPM-I2C. Trusted Platform Module (TPM) with I²C Interface. Features

HCF4028B BCD TO DECIMAL DECODER

AN3990 Application note

STW34NB20 N-CHANNEL 200V Ω - 34A TO-247 PowerMESH MOSFET

UM1613 User manual. 16-pin smartcard interface ST8034P demonstration board. Introduction

Getting started with DfuSe USB device firmware upgrade STMicroelectronics extension

LM833 LOW NOISE DUAL OPERATIONAL AMPLIFIER

AN2824 Application note

ULN2001, ULN2002 ULN2003, ULN2004

AN3353 Application note

STTH1R04-Y. Automotive ultrafast recovery diode. Features. Description

BUX48/48A BUV48A/V48AFI

AN2866 Application note

Description. IO and RF AGC. ASIC controller and power management. Carrier recovery loop. GPIO switch matrix. Lock indicator and monitoring DVBS2 FEC

AN4128 Application note

ST202 5V POWERED MULTI-CHANNEL RS-232 DRIVERS AND RECEIVERS

L78MxxAB L78MxxAC. Precision 500 ma regulators. Features. Description

AN2703 Application note

LM134-LM234-LM334. Three terminal adjustable current sources. Features. Description

UM0985 User manual. Developing your STM32VLDISCOVERY application using the IAR Embedded Workbench software. Introduction

STW20NM50 N-CHANNEL Tjmax Ω - 20ATO-247 MDmesh MOSFET

Description SO-8. series. Furthermore, in the 8-pin configuration Very low-dropout voltage (0.2 V typ.)

LF00AB/C SERIES VERY LOW DROP VOLTAGE REGULATORS WITH INHIBIT

Description. Table 1. Device summary. Order codes. TO-220 (single gauge) TO-220 (double gauge) D²PAK (tape and reel) TO-220FP

STP62NS04Z N-CHANNEL CLAMPED 12.5mΩ - 62A TO-220 FULLY PROTECTED MESH OVERLAY MOSFET

AN4368 Application note

BTB04-600SL STANDARD 4A TRIAC MAIN FEATURES

BZW50. Transil, transient voltage surge suppressor (TVS) Features. Description

Report on Government Information Requests

ESDLIN1524BJ. Transil, transient voltage surge suppressor diode for ESD protection. Features. Description SOD323

TDA W CAR RADIO AUDIO AMPLIFIER

ETP01-xx21. Protection for Ethernet lines. Features. Description. Applications. Benefits. Complies with the following standards

Foreign Taxes Paid and Foreign Source Income INTECH Global Income Managed Volatility Fund

Obsolete Product(s) - Obsolete Product(s)

BTA40, BTA41 and BTB41 Series

ADJUSTABLE VOLTAGE AND CURRENT REGULATOR

UA741. General-purpose single operational amplifier. Features. Applications. Description. N DIP8 (plastic package)

AN3252 Application note

DSL01-xxxSC5. Secondary protection for DSL lines. Features. Description. Applications. Benefits. Complies with the following standards

AN ISOLATED GATE DRIVE FOR POWER MOSFETs AND IGBTs

AN3211 Application note

Programming NAND devices

TDA4605 CONTROL CIRCUIT FOR SWITCH MODE POWER SUPPLIES USING MOS TRANSISTORS

STGW40NC60V N-CHANNEL 50A - 600V - TO-247 Very Fast PowerMESH IGBT

Order code Temperature range Package Packaging

L6234. Three phase motor driver. Features. Description

Transcription:

APPLICATION NOTE Bad Block Management in Single Level Cell NAND Flash Memories This Application Note explains how to recognize factory generated Bad Blocks, and to manage Bad Blocks that develop during the lifetime of the NAND Flash device. INTRODUCTION Bad Blocks are blocks that contain one or more invalid bits whose reliability is not guaranteed. Bad Blocks may be present when the device is shipped, or may develop during the lifetime of the device. Devices with Bad Blocks have the same quality level and the same AC and DC characteristics as devices where all the blocks are valid. A Bad Block does not affect the performance of valid blocks because it is isolated from the bit line and common source line by a select transistor. Bad Block Management, Block Replacement and the Error Correction Code software are necessary to manage the error bits in NAND Flash devices. ST provides this software in modules in the Hardware Adaptation Layer (HAL) which manages the hardware functions of the NAND Flash (see Figure 1. and refer to Application notes AN1820, AN1823). This Application Note covers ST Small Page (NANDxxx-A) and Large Page NAND Flash memories (NANDxxx-B). Refer to the datasheets for the full list of root part numbers and for further information on the devices (see REFERENCES section). January 2006 1/7

TABLE OF CONTENTS INTRODUCTION................................................................... 1 Figure 1. Software Tool Chain..................................................... 3 RECOGNIZING BAD BLOCKS....................................................... 3 Figure 2. Bad Block Management Flowchart.......................................... 4 BLOCK REPLACEMENT............................................................ 4 Skip Block Method............................................................. 4 Reserve Block Method.......................................................... 5 Figure 3. Reserved Block Method................................................... 5 CONCLUSION..................................................................... 6 REFERENCES.................................................................... 6 REVISION HISTORY................................................................ 6 2/7

Figure 1. Software Tool Chain Operating System File System Flash Translation Layer FTL Interface Garbage Collection Wear Leveling Hardware Adaptation Layer LLD ECC BBM NAND Flash Device ai09267 RECOGNIZING BAD BLOCKS The devices are supplied with all the locations inside valid blocks erased (FFh). The Bad Block Information is written prior to shipping. For Small Page (528 Byte/256 Word Page) NANDxxx-A devices, any block where the 6th Byte/ 1st Word in the spare area of the 1st page does not contain FFh is a Bad Block. For Large Page (2112 Byte/1056 Word Page) NANDxxx-B devices, any block, where the 1st and 6th Bytes, or 1st Word, in the spare area of the 1st page, does not contain FFh, is a Bad Block. The Bad Block Information must be read before any erase is attempted, because the Bad Block information is erasable and cannot be recovered once erased. It is highly recommended not to erase the original Bad Block information. To allow the system to recognize the Bad Blocks based on the original information, it is recommended to implement the Bad Block Management algorithm shown in Figure 2. The Bad Block Table is created by reading all the spare areas in the NAND Flash memory. The Bad Block recognition methods that build the Bad Block table without using the original Bad Block information provided in the spare areas of the memory are not equally effective. The invalid blocks are detected at the factory during the testing process which involves severe environmental conditions and program/erase cycles as well as proprietary test modes. The failures that affect invalid blocks may not all be recognized if methods different from those implemented in the factory are used. Once created, the Bad Block table is saved to a good block so that on rebooting the NAND Flash memory, the Bad Block Table is loaded into RAM. The blocks contained in the Bad Block Table are not addressable. So, if the Flash Translation Layer addresses one of the Bad Blocks, the Bad Block Management software redirects it to a good block. 3/7

Figure 2. Bad Block Management Flowchart START Block Address = Block 0 Increment Block Address Data = FFh? YES NO Update Bad Block table Last block? YES NO END AI07588C BLOCK REPLACEMENT During the lifetime of the NAND device additional Bad Blocks may develop. The NAND devices have a Status Register that indicates whether an operation is successful or not. Additional Bad Blocks are identified when attempts to program or erase give errors in the Status Register. As the failure of a page program operation does not affect the data in other pages in the same block, the block can be replaced by re-programming the current data and copying the rest of the replaced block to an available valid block. Blocks can be marked as bad and new blocks allocated using two general methods. Skip Block Method In the Skip Block method the algorithm creates the Bad Block Table and when the target address corresponds to a Bad Block address, the data is stored in the next good block, skipping the Bad Block. When a Bad Block is generated during the lifetime of the NAND Flash device, it s data is also stored in the next good block. In this case, the information that indicates which good block corresponds to each developed Bad Block, also has to be stored in the NAND Flash device. If the Flash Translation Layer writes the logical sector using the Linked List method (see AN1820) it will not mark the whole block as bad, but only skip the bad page. With this method the Flash Translation Layer writes the logical sector to a new physical block, marking the old page invalid (and not the entire block). 4/7

Reserve Block Method In the Reserve Block method, the Bad Block Table is created in the same manner as described in Figure 2.. In this method Bad Blocks are not skipped but replaced by good blocks by re-directing the Flash Translation Layer to a known good block. For that purpose, the Bad Block Management software creates two areas in the NAND Flash: the User Addressable Block Area and the Reserved Block Area as shown in Figure 3.. The Flash Translation Layer can use the User Addressable Block Area to store data whereas the Reserved Block Area is only used for Bad Block replacement and to save the Bad Block Table that also keeps track of the re-mapped developed Bad Blocks. To define these two areas, it is necessary to determine the start address and the size of the Reserved Area. The size may either be given by the user, or imposed by the Bad Block Management software (as stated in the NANDxxx-A, 528 Byte/ 264 Word Page and NANDxxx-B, 2112 Byte/1056 Word page datasheets, for ST NAND Flash devices, the Reserved Area size is equal to 2%). For example in the 512Mb, 528 Byte page NAND Flash device, the User Addressable Block Area is 4016 blocks and the Reserved Block Area is from block 4017 to block 4096. Each time the Flash Translation Layer Writes a logical sector, it calculates the physical address of the block to which it will write. Then, before the Flash Translation Layer starts writing, the Bad Block Management software checks whether the block is bad or not. If it is bad, it returns the address of the good block to which the sector is re-mapped. If the block becomes bad during the NAND Flash lifetime, the Bad Block Management software re-maps the Bad Block, and copies the data it contains to the block that will replace it. The Bad Block management is completely transparent to the Flash Translation Layer. For the FTL, it is as if the data are written to the same address. Figure 3. Reserved Block Method User Addressable Block Area Reserved Block Area ai09272 5/7

CONCLUSION To detect factory produced Bad Blocks, and manage any Bad Blocks that may develop over the lifetime of a NAND Flash device, ST recommends to use the Bad Block Management module implemented in the Hardware Adaptation Layer software provided by ST. By using this software, the data contained in a Bad Block are not lost, but are recovered and saved in a good block. REFERENCES NAND128-A, NAND256-A, NAND512-A, NAND01G-A, 528 Byte/ 264 Word Page datasheet NAND512-B, NAND01G-B, NAND02G-B, NAND04G-B, NAND08G-B, 2112Byte/1056 Word Page datasheet AN1820 How to Use the FTL and HAL Software Modules to Manage Data in Single Level Cell NAND Flash Memories AN1821 Garbage Collection in Single Level Cell NAND Flash Memories AN1822 Wear Leveling in Single Level Cell NAND Flash Memories AN1823 Error Correction Code in Single Level Cell NAND Flash Memories REVISION HISTORY Table 1. Document Revision History Date Version Revision Details 19-May-2004 1.0 First issue. 13-Dec-2004 2.0 The application note also applies to the NANDxxx-B Family of Single Level Cell NAND Flash memories (see Table 1., Product List). RECOGNIZING BAD BLOCKS and BLOCK REPLACEMENT sections revised. 16-Jan-2006 3 Product list removed. 6/7

If you have any questions or suggestions concerning the matters raised in this document, please refer to the MPG request support web page: http://www.st.com/askmemory Information furnished is believed to be accurate and reliable. However, STMicroelectronics assumes no responsibility for the consequences of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. No license is granted by implication or otherwise under any patent or patent rights of STMicroelectronics. Specifications mentioned in this publication are subject to change without notice. This publication supersedes and replaces all information previously supplied. STMicroelectronics products are not authorized for use as critical components in life support devices or systems without express written approval of STMicroelectronics. The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners 2004 STMicroelectronics - All rights reserved STMicroelectronics group of companies Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan - Malaysia - Malta - Morocco - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America www.st.com 7/7