Download Print this page
Atmel AT91 ARM Series Application Note

Atmel AT91 ARM Series Application Note

Thumb microcontrollers

Advertisement

Quick Links

Using the ECC Controller on AT91SAM9260/9263
and AT91SAM7SE Microcontrollers
1. Scope
The purpose of this document is to explain how to use the Error Corrected Code
(ECC) Controller embedded in the AT91SAM9260/9263 and AT91SAM7SE family of
®
®
ARM
Thumb
-based microcontrollers. The ECC controller performs 2-bit data error
identification and single-bit correction to maintain integrity of data stored in NAND
®
Flash and SmartMedia
2. NAND Flash Device Overview
2.1
Internal Array Architecture
The NAND Flash array is organized in a series of blocks which are divided in several
pages. Data is stored either in byte (8 bits) or half-word (16 bits) format depending on
the device type. Each page consists of a main area for storing data and a spare area
(physically similar) typically used for data error identification and correction, wear lev-
elling, etc...
One particularity of NAND Flash devices is that they may contain a percentage of
invalid blocks in the memory array. Before delivering the chip, these blocks are identi-
fied and marked as "Invalid Blocks" in the first or second page of each block. The
existence of bad blocks does not affect the good ones because each block is indepen-
dent and individually isolated from the bit lines by block select transistors.
Because NAND Flash devices have a finite lifetime (approximately 100 000
write/erase cycles), additional invalid blocks may develop while being used. Storing
data requires bad-block management and data error identification and correction.
Refer to
Section 3. "Invalid Block
2.2
Basic Operation Principle
NAND Flash operations are fully controlled through a multiplexed I/O interface and
additional control signals. Commands, addresses and data are transferred through
the external input/output bus (8-bit or 16-bit) to the dedicated internal registers. In 16-
bit devices, commands, addresses and data use the lower 8 bits (7 - 0), the upper 8
bits are only used during data-transfer cycles.
Read and program operations are performed on a per page basis whereas erase
operations are performed on a block basis. To read or write from NAND Flash, a com-
mand sequence is issued to select a block and a page. After this selection, the entire
page can be read or written.
The command sequence normally consists of a Command Latch Cycle, an Address
Latch Cycle and a Data Cycle — either read or write.
devices.
Management".
AT91 ARM
Thumb
Microcontrollers
Application Note
6320B–ATARM–05-Nov-07

Advertisement

loading
Need help?

Need help?

Do you have a question about the AT91 ARM Series and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Atmel AT91 ARM Series

  • Page 1 Using the ECC Controller on AT91SAM9260/9263 and AT91SAM7SE Microcontrollers 1. Scope AT91 ARM The purpose of this document is to explain how to use the Error Corrected Code (ECC) Controller embedded in the AT91SAM9260/9263 and AT91SAM7SE family of Thumb ® ®...
  • Page 2 The waveforms shown in Figure 2-1 depict the successive accesses: Command Latch, Address Latch and Data Output. Notice that no command can be sent to the NAND Flash during t due to it’s busy-state period. Figure 2-1. Page READ Operation I/Ox Address (5 cycles) Command...
  • Page 3 Application Note Figure 3-1. Small Page 8-bit Device Organization Cell Array SpareCell Array 512 Bytes 16 Bytes LSN0 LSN1 LSN2 Reserved Reserved ECC0 ECC1 ECC2 S-ECC0 S-ECC1 Reserved Reserved Reserved Reserved Reserved Figure 3-2. Small Page 16-bit Device Organization Cell Array SpareCell Array 256 Half Words 8 Half Words...
  • Page 4 Invalid Block Identification Before shipping, every NAND Flash device is tested with specific test patterns under different voltage and temperature conditions in order to identify memory locations containing errors. When errors are detected, the block to which the invalid memory location belongs is marked as an “Invalid Block”.
  • Page 5: Error Detection And Correction

    Application Note 4. Error Detection and Correction NAND Flash/SmartMedia devices contain by default invalid blocks which have one or more invalid bits. Over the NAND Flash/SmartMedia lifetime, additional invalid blocks may occur which can be detected/corrected by ECC code. To ensure data read/write integrity, system error checking and correction (ECC) algorithms should be implemented.
  • Page 6 Figure 4-2. Parity Generation for 512/1024/2048/4096 16-bit Words Application Note 6320B–ATARM–05-Nov-07...
  • Page 7 Application Note ECC Controller Preliminary Requirements In order to calculate ECC properly during write/read and read processes, the following con- straints must be respected: • at least 1 Hold time must be programmed in the RWHOLD field of the SMC_CSRx register (only AT91SAM7SE family is concerned) •...
  • Page 8 Figure 4-4. ECC Calculation During Page Write Sequence with Random Write Spare Area ECC Controller Start of ECC ECC Result Reset Calculation Ready in and Locked Main Area Size Address I/Ox Address n th Write Address cycles Random Column Address Write Command 1 Write...
  • Page 9 Application Note 4.3.2.3 ECC Error The ECCERR field in the ECC Status Register (ECC_SR) is set. An error has been detected in the ECC code stored in the Spare area of the device. The position of the corrupted bit can be found by applying an XOR operation between the ECC Parity and the ECC NParity codes previ- ously stored in the spare area of the device.
  • Page 10: Software Example

    ECC by software when using a high-level file system. 6. Software Example A software example managing Bad Block Information and ECC error detection for Large Page Devices can be downloaded from the Atmel web site via the following link: http://atmel.com/dyn/resources/prod_documents/an-nand_flash_sam7se_software_example.zip Application Note...
  • Page 11: Revision History

    Application Note 7. Revision History Change Doc. Rev Comments Request Ref. 6320A First issue Figure 4-3 Figure 4-4 updated, 6320B 4440 Section 3.2 ”Spare Area Assignment”, updated sentence refering to figures. 6320B–ATARM–05-Nov-07...
  • Page 12 Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN ATMEL’S TERMS AND CONDI- TIONS OF SALE LOCATED ON ATMEL’S WEB SITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY...

This manual is also suitable for:

At91sam9263At91sam9260At91sam7se