4
6255B–ATARM–26-Jun-09
Application Note
NAND is available in large capacities and is the lowest cost Flash memory available today.
NAND is used in virtually all removable cards for cost/density reasons: USB Cards, Memory
Stick, MMC Multimedia Card, SD Secure Digital, CF Compact Flash.
3. Bad Block Management and Error Corrected Code (ECC)
3.1
Definition of “Bad Block”
By default, NAND devices contain invalid blocks which have one or more invalid bits.
Furthermore, since the first memory block (physical block address 00h) in NAND devices is
guaranteed to be free of defects (up to 1,000 PROGRAM/ERASE cycles), the first 8 Kb of Flash
memory can safely be used for system bootstrapping functions.
3.2
Software Considerations
To avoid writing to and reading from bad memory blocks, system software must create a map of
invalid memory blocks. If the application code executes from RAM rather than Flash memory,
system software bad-block mapping is only necessary at boot time and during Flash storage
updates.
All device locations are erased (FFh for X8, FFFFh for X16) except locations where the invalid
block information is written prior to shipping. The invalid block status is defined by the 1st byte
(X8 device) or 1st word (X16 device) in the spare area.
The 1st or 2nd page of every invalid block has non-FFh(X8) or non-FFFFh(X16) data at the col-
umn address of 2048 (X8 device) or 1024 (X16 device). Since the invalid block information is
also erasable in most cases, it is impossible to recover the information once it has been erased.
Therefore, the system must be able to recognize the invalid block(s) based on the original invalid
block information and create the invalid block table via the flow chart in
.
Figure 3-1.
Bad Block Recognition Flow Chart