Development notes-NAND Flash bad block management

Source: Internet
Author: User
1) Why is there a bad block? Because the NAND flash process cannot guarantee the reliability of the memory array in its lifecycle, bad blocks are generated during NAND production and use. The bad block feature is that when the block is programmed/erased, some bits cannot be pulled up, which may cause errors during page program and block erase operations, the corresponding bit of Status Register. 2) classification of Bad blocks in general, Bad blocks can be divided into two categories (1) Inherent Bad blocks are the bad blocks generated during the production process, generally, the original chip manufacturer will mark the 6th bytes of the spare area on the first page of the bad partition as not equal to 0xff at the factory. (2) Use bad blocks. This is used in NAND Flash. If the block erase or page program is incorrect, the block can be processed as a bad block, in this case, you need to mark the bad block. To be consistent with the inherent bad block information, mark the 6th bytes of the spare area of the first page of the new bad block as a non-0xff value. 3) according to the above descriptions, we can understand that the bad block information has been reflected in the spare area when NAND Flash was released. Therefore, if a block is erased, check whether the 6th bytes in the spare area are 0xff. If yes, it indicates that this is a good block and can be erased. If it is not 0xff, it cannot be erased. Of course, this process may make a mistake-"Kill pseudo-Bad blocks", because the operating process of the chip may cause NAND operation errors due to occasional factors such as voltage instability. However, in order to ensure data reliability and simplify software design, we must pursue the principle of "killing one thousand by mistake and never letting us go" by "Chairman Jiang. 4) Supplement (1) it is necessary to explain the Bad blocks found due to page program errors. If an error occurs when programming a page of a block, mark this block as a bad block, first, we need to back up the content in other good pages to another empty Good block, and then mark this block as a bad block. Of course, this may lead to "mistaken killing". One remedy is to erase the block after backing up the page. If the block erase has an error, it proves that this block is a real bad block, so you don't hesitate to stamp it! (2) Someone may ask why the sixth byte of spare area should be used as the bad block mark. This is the default convention of the NAND Flash manufacturer. You can see that Samsung, toshba, and STMicroelectronics use this Byte as the bad block mark. (Repost and reference the famous source and author)

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.