Introduction to basic concepts of NAND FLash and basic concepts of nandflash

Source: Internet
Author: User

Introduction to basic concepts of NAND FLash and basic concepts of nandflash

I. Pin Introduction

Pin name

Pin Function

CLE

Command lock function

ALE

Address lock function

/CE

Chip enabling

/RE

Read enabling

/WE

Write enable

/WP

Write Protection

R/B

Ready/busy output signal

Vcc

Power Supply

Vss

Location

N. C

Not connected

IO0 ~ IO7

Transmit data, commands, and addresses


1. commands, addresses, and data are transmitted through eight I/O Ports. when writing commands, addresses, and data, WE and CE signals must be lowered at the same time. data is locked by NAND Flash on the rising edge of the WE signal. 4. command lock signal CLE and address lock signal ALE are used to distinguish, lock command or address 5. on the rising edge of CLE, the command is locked. 6. on the rising edge of ALE, the address is locked



Ii. Storage Organization

1. the NAND chip contains die, plane, block, and page 2. chip refers to the chip. an encapsulated chip is a chip 3. die is a small square on a wafer. Several die may be encapsulated in a chip. Due to different flash technologies and different technologies, the concept of die is generated. Mono Die is a common concept, a Die, B die, etc. a chip contains N die 4. plane is the smallest unit for NAND to operate based on commands such as read, write, and erase.

A plane is a storage matrix that contains several blocks.

5. Block is the minimum erasure unit of NANDFlash. A Block contains several pages. 6. The Page is the minimum read/write unit of NANDFlash. A Page contains several bytes.

OOB/Spare Area

Each page has a corresponding area called SpareArea ). In Linux, it is generally called OOB (Out of Band ).

Data Reading and writing are relatively prone to errors. To ensure data correctness, a corresponding detection and correction mechanism is required. This mechanism is called ECC/EDC, so redundant areas are designed, the check value used to store data.

OOB reads and writes are completed along with page operations.

OOB has the following functions:

✔ Indicates whether the block is a bad block.

►Store ECC data

►Store some data related to the file system. For example, jaffs2 will use these spaces to store some specific information, while the yaffs2 file system will store a lot of information related to its own file system in oob.


The storage structure of a 16 gb nand is roughly as follows:



A 16 GB NANDFlash requires a 34-bit address, while the I/O port of the transmission address is 8-bit. Therefore, it requires five loops to transmit address information.




Bad Block in NAND Flash

In Nand Flash, one Block contains one or more digits, which is called Bad Block. The stability of Bad blocks cannot be guaranteed.

That is to say, you cannot guarantee that the data you write is correct or that the data you write is correct. Reading is not necessarily correct. The corresponding normal block, certainly

It is normal to write and read data.

There are two types of Bad blocks:

(1) There are bad blocks at the factory:

One is that when you leave the factory, that is, the new Nand Flash you have bought can contain Bad blocks. This type of bad block is known as factory (masked) bad block or initial bad/invalid block, which will be marked before the factory is released,

It is marked as a bad block.

(2) Bad blocks generated during use:

The second type is generated during the use process. Because the use process takes a long time, an error occurs when the block is erased. This indicates that the block is broken.

It must be found during the running of the program and marked as bad blocks. The location of the tag. This type of block is called worn-out.

Bad block. That is, a broken block is used.


Implementation Mechanism of SLC and MLC

NANDFlash can be divided into SLC and MLC Based on the voltage levels of the internal storage data unit, that is, whether one-bit data or multiple-digit data is stored in a single memory unit.

►Slc (Single Level Cell)

A single storage unit only stores 1 bit, indicating 1 or 0.

For Nand Flash write 1, it is to control ExternalGate to charge, so that there is enough storage charge, exceeding the threshold Vth, it indicates 1.

For write 0, it is to discharge it, the charge is reduced to less than Vth, it indicates 0

►Mlc (Multi Level Cell)

It corresponds to SLC, that is, a single storage unit can store multiple places, such as two or four places. The implementation mechanism is to control the internal charge

Is divided into multiple thresholds to store different data.

A single storage unit can store 2-bit data, called 2 to the power of 4 LevelCell




Basic Nand flash knowledge

Introduction to the principles of nand flash [] Fisrt part:
The different NOR flash formats of NAND flash and NOR flash adopt bit-based read/write. Because it has an sram interface and has enough pins to address it, it can easily access every byte inside it. NAND flash uses complex I/O ports to access data. Eight pins are used to transmit control, address, and data information. The read and write units of NAND are bytes pages, and the write units are 32 pages.
● NOR reads faster than NAND.
● NAND writes much faster than NOR.
● NAND's 4 Ms erasure speed is far faster than NOR's 5s.
● Most write operations require erasure first.
● NAND has fewer erased units and fewer erased circuits.
Running code on the NOR device does not require any software support. When performing the same operation on the NAND device, the driver is usually needed, that is, the memory technology driver (MTD ), the NAND and NOR devices require MTD for write and erase operations.
--------- Excerpted from the widely spread "differences between NAND and NOR flash" Second part:
NAND Flash structure and driver analysis I. physical composition of NAND flash
Data in NAND Flash is stored in the memory cell in bit mode. Generally, only one bit can be stored in a cell. These cells, in 8 or 16 units, are connected to bit line to form the so-called byte (x8)/word (x16), which is the location width of the NAND Device. These lines will then form pages. (NAND Flash has multiple structures. The NAND Flash I use is K9F1208. The following content is for Samsung's K9F1208U0M ), each page contains 528 Bytes (512 Bytes (Main Area) + 16 Bytes (Spare Area). Each 32 pages forms a Block (32 * 528B ). Determine the number of blocks on a piece of flash as needed. The Samsung k9f1208U0M I use has 4096 blocks, so the total capacity is 4096*(32 * 528B) = 66 MB, but 2 MB is used to save additional data such as the ECC verification code, therefore, the actual usage is 64 MB.
NAND flash reads and writes data on pages, and erased data on blocks. In this way, three types of addresses can be formed:
Column Address: Starting Address of the Register. convert it to the Column Address in Chinese. the Address is 8 characters lower.
Page Address: Page Address
Block Address: Block Address
For NAND Flash, the address and command can only be transmitted on I/O [], and the data width is 8 bits. 2. Representation of NAND Flash addresses
The 512byte must be expressed in 9bit. For the 528byte series NAND, The 512byte is divided into 1st half Page Register and 2nd half Page Register. The access is selected by the address pointer command, A [] is the so-called column address. It is not required for erasure. why? Because it is erased in blocks. 32 pages must be expressed in 5 bits, occupying A [], that is, the relative address of the page in the block. A8 is used to set 1st half page or 2nd half page of 512byte. 0 indicates 1st and 1 indicates 2nd. The Block address is expressed by BITs above a14.
For example, 64 MB (512 Mb) NAND flash (actually because spare area exists, it is larger than this value), a total of 4096 blocks, so 12 bits are required to represent, that is ...... remaining full text>
 
Bad zone definition and capacity definition for NAND flash

4G referred to by the manufacturer refers to 4 000 000 000 bytes, which are calculated in 1000 hexadecimal notation, while the computer is calculated in 1024 hexadecimal notation, therefore, the theoretical capacity of 4 gb nand Flash is 4 000 000 000/1024/1024/1024 = 3.72529 GB. The space occupied by the Mp4 system software and the space occupied by the file system are deducted, and the remaining 3.54G available space is normal.
You don't have to worry about bad areas in Flash. All Flash files have bad zones. Flash can be used normally as long as the starting address is not bad. If the storage area is damaged, it will be replaced by itself without the user's participation.
For Flash with other capacities, the corresponding theoretical capacity can be calculated based on the same algorithm.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.