background image

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

®

 devices.

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 Management”

.

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.

AT91 ARM 
Thumb 
Microcontrollers

Application Note

 6320B–ATARM–05-Nov-07

Содержание AT91 ARM Series

Страница 1: ...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 lifetim...

Страница 2: ...in Section 2 1 Internal Array Architecture NAND flash devices contain a certain percentage of invalid blocks at the end of the production process Invalid blocks are defined as blocks that contain one...

Страница 3: ...Half Word 7thHalf Word 8thHalf Word BI LSN1 LSN0 LSN2 Reserved Reserved Reserved Reserved Reserved Reserved Reserved ECC0 ECC1 ECC2 S ECC0 S ECC1 Cell Array 512 Bytes Cell Array 512 Bytes Cell Array 5...

Страница 4: ...8 bit devices or sixth half word 16 bit devices in the spare area of Small Page devices Manufacturers make sure that every invalid block has non FFh 8 bit devices or non FFFFh 16 bit devices data in...

Страница 5: ...e bit correction per 512 1024 2048 4096 8 or 16 bit words Of the 32 ECC bits 26 bits are for line parity and 6 bits are for column parity They are generated according to the schemes shown in Figure 4...

Страница 6: ...ARM 05 Nov 07 Application Note Figure 4 2 Parity Generation for 512 1024 2048 4096 16 bit Words 1st word 2nd word 3rd word 4th word Page size 3 th word Page size 2 th word Page size 1 th word Page siz...

Страница 7: ...vice type is performed to NAND Flash or the SmartMedia device The ECC is refreshed at each write access of the page until the last byte or half word of the main area is written Once the whole main are...

Страница 8: ...CLE 0 the ECC controller ignores any other command which is performed to the NAND Flash or the SmartMedia device The ECC controller performs error detection automatically by applying an XOR operation...

Страница 9: ...d Sequence without Random Read Spare Area Main Area Size I Ox Address Read Command 1 Read Command 2 Address Cycles ECC Controller Reset Data Accesses Main Area Read Accesses Accesses allowing ECC calc...

Страница 10: ...ytes ECC for 512 bytes of data per page The AT91SAM ECC controller manages ECC as 4 bytes ECC for 512 1024 2048 4096 bytes of data per page Since the ECC offset in the spare area and the number of ECC...

Страница 11: ...05 Nov 07 Application Note 7 Revision History Doc Rev Comments Change Request Ref 6320A First issue 6320B Figure 4 3 and Figure 4 4 updated Section 3 2 Spare Area Assignment updated sentence refering...

Страница 12: ...ELATING TO ITS PRODUCTS INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTY OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE OR NON INFRINGEMENT IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT INDIR...

Отзывы: