Atmel AT91SAM9 Application Note

Text of Atmel AT91SAM9 Application Note

NAND Flash Support in AT91SAM9

Microcontrollers 1. Scope The purpose of this application note is to introduce the NAND Flash technology and to describe how to interface NAND Flash memory to Atmel® AT91SAM9 ARM® Thumb®- based Microcontrollers that do not feature a NAND Flash Controller. The NAND Flash logic is driven by the Static Memory Controller on the NCS3 address space. Sample code is provided the associated zip file, Basic NAND Source Code.zip; the

NAND Flash vs. NOR Flash

The most important item for memories is the cost per bit which depends on memory cell area per bit. The cell area of NAND Flash is smaller than that of NOR Flash, making the NAND Flash more cost effective than NOR Flash. The first significant difference between NAND and NOR Flash is the hardware interface. 2.2.1 Hardware Interface NOR Flash has a fully memory-mapped random access int

NAND Flash typically contains blocks that contain errors and cannot be used. A check must be

done by software to list and maintain a table of bad blocks. Data integrity is achieved by using hardware or software techniques, such as ECC, that check and correct bad data. 2.2.3 Performances Further differences between NOR and NAND Flash can be found in read/write performances. Table 2-1 shows random access time for

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 b

Important Note: Any intentional erasure of the original invalid block information is prohibited.

3.3 ECC NAND devices are subject to data failures that occur during device operation. To ensure data read/write integrity, system error-checking and correction (ECC) algorithms must be imple- mented. Depending on the AT91 product, the ECC algorithm must be calculated by software or can be generated by the embedded ha

Address (ALE = 1, CLE = 0)

Addresses are written to the address register on the rising edge of WE# when: • CE# and CLE are low • ALE is high Addresses are input on I/O[7:0] only. For devices with a x16 interface, I/O[15:8] must be written with zeros when issuing an address. Generally all five ADDRESS cycles are written to the device. 4.5 Data (ALE = 0, CLE = 0) Data is written to the data register on the

AT91 EBI NandFlash Logic

The NAND Flash logic is driven by the Static Memory Controller (SMC) on the NCS3 address space. Programming the CS3A field in the EBI_CSA Register in the Bus Matrix User Interface to the appropriate value enables the NAND Flash logic. For details on this register, refer to the Bus Matrix User Interface section in the product datasheet. Access to an external NAND Flash device is then m

Atmel Microcontrollers Owners Instructions: