NandFlash memory is composed of multiple blocks, and each block is composed of multiple pages. The size of a page is generally 2K+64Bytes or 512+16Bytes. Page is the basic unit of reading and programming, and the basic unit of erasing is Block.
Figure 1 NAND Flash storage results
The page of NAND Flash contains two fields: Main Area and Spare Area. There are 512*8 (or 256*16) or 2048*8 (or 1024*16) bits in the "Main Area" There are 16*8 (or 8*16) or 64*8 (or 32*16) bits in the "spare area", so that each page has a total of 528*8 (264*16) or 2112*8 (or 1056 *16) One place. The spare area is a reserved area used to mark bad blocks and store the value of ECC, so only the "main area" is available to users.
Figure 1 is the structure diagram of MT29F2G08AxB, its reading and programming are based on Page as the basic unit, so its Cache Register and Data Register are both the specifications of a Page. The special feature of NandFlash is the page structure. It is divided into two parts: data area and spare area. The data area and spare area correspond to each other in the form of pages. Therefore, the data flow of reading and programming also needs to be organized according to the structure of the page. And decomposition.
The data area of the MT29F2G08AxB chip shown in Figure 1 is 2048 bytes, and the spare area is 64 bytes. In practical applications, the spare area is generally used for error detection and correction in the data area.
NAND flash may contain invalid blocks when it leaves the factory, and other invalid blocks may also appear during use. An invalid block is a block containing one or more bad bits. Each chip is tested and erased before leaving the factory, and bad blocks are marked. It is prohibited to erase or program the bad blocks marked at the factory. Therefore, in application and programming, it is necessary to be able to identify and process bad blocks. The first piece of NandFlash is guaranteed to be available.
In addition, Micron NandFlash has an OTP area of 10 pages. This area cannot be erased and can only be programmed once, and if it is protected, even programming 1 to 0 is prohibited.
Because the NAND Flash process cannot guarantee the reliability of the NAND Memory Array during its life cycle, bad blocks will be generated during the production and use of NAND. Therefore, in order to distinguish between good blocks and bad blocks, NandFlash chip manufacturers will mark non-FFh to indicate bad blocks in an address in the spare area at the factory.
It’s important not to erase the bad block mark
The factory has tested Nand in a wide temperature and wide voltage range; some blocks marked as bad by the factory may still work under certain temperature or voltage conditions, but may fail in the future. If the bad block information is erased, it cannot be recovered.
Transfer from: Zhiyuan Electronics
Preview mobile cloud website