In today’s widespread application of Nandflash, its high cost-performance ratio and significant programming defect rate coexist almost constantly. What characteristics of Nandflash lead to frequent programming accidents? Today, I will share a troubleshooting guide for Nandflash.
Nandflash chips are widely used in electronic products due to their high cost-performance ratio and large storage capacity. However, in this high-volume and high-quality application field, many customers suffer from batch quality issues: dedicated tools cannot meet mass production needs, and mass production tools may have a high defect rate. So how can we solve this?
The fundamental reason is that most users do not fully understand the complexity of Nandflash programming.
Users often adopt a very direct method, which is to use a functioning NandFlash chip as a master chip. After connecting to the programmer, they click the “Read” button on the programming software to completely read the data from the chip, and then find several empty chips to write the data back in. They believe this will achieve mass production, but in reality, the products produced often fail to meet quality requirements, frequently resulting in batch products that cannot boot or start properly!
1
Cause Analysis
Where does the problem lie? Before analyzing, we need to understand the basic process characteristics of Nandflash:
First, let’s look at the storage structure of NandFlash. It consists of multiple Blocks, each Block is made up of multiple Pages, and each Page contains a Main Area and a Spare Area. Secondly, NandFlash has bad blocks, as the manufacturing process cannot guarantee that the Nand’s Memory Array will maintain reliable performance throughout its lifecycle.
Therefore, bad blocks can occur during the production and usage of Nand.
1
Impact of Bad Blocks
Bad blocks affect the data storage addresses, preventing users from using the common method of reading all data from the master chip and copying it directly to other chips, which leads to the traditional copying machines being unable to mass-produce Nandflash!
Since bad blocks in NandFlash are an unavoidable issue, we need to find ways to avoid those bad blocks; the simplest, most effective, and commonly used method is: skip!
By using “skip bad blocks,” we effectively solve the bad block problem in NandFlash, safely transferring data originally written to bad blocks to the next good block!
2
Address Changes
Skipping is a common and effective method, but in reality, the fundamental problem still exists. Observant users will notice that the addresses where data is stored have also changed!
In practical applications, many users will store multiple file data simultaneously on NandFlash (such as uboot, uImage, Logo, rootfs, etc.), and allocate a certain size of storage space for each file in the NandFlash storage unit, specifying the starting physical address block for each file. If a bad block appears in a certain area, to avoid it, the data must be safely transferred to the next block, which results in the starting physical addresses of subsequent programming files also being offset. This will cause the main control MCU to be unable to accurately and completely retrieve the data of each file through fixed addresses, ultimately leading to abnormal product startup.
2
Solution Suggestions
Solution Suggestion: Partition Programming
By partitioning the programming, users can pre-set the starting block addresses for each file. Regardless of where bad blocks appear, it can ensure that the starting block addresses for each file do not change, and the data will be stored in the NandFlash storage area according to the customer’s preset plan. The main control MCU can accurately and completely read the data of each file, allowing the product to run normally!
3
Reference Solutions
The P800 series programmer from ZLG supports partitioned programming (and various partition formats), allowing users to set the starting block address and programming block length for each file according to their needs, achieving high-efficiency programming and improving the yield rate of chip programming!
Additionally, the P800 series is equipped with an independent operating system, meeting the factory’s full offline and one-click batch programming requirements.
For any questions, you can: 1. Add Xiao Z’s WeChat: zlgmcu-888 2. Call ZLG’s official technical hotline: 400-888-4005.
ZLG Introduction
Guangzhou ZhiYuan Electronics Co., Ltd. is a subsidiary of Guangzhou ZhiYuan Electronics Co., Ltd., founded by the renowned embedded system expert Professor Zhou Ligong in 2001. It is a national high-tech certified enterprise and the Engineering Technology Research and Development Center for high-end industrial control measurement instruments in Guangdong Province.
Vision: To become a leading enterprise in the industrial internet ecosystem
Using the “chip + AWorks software platform” to design high value-added modules, boards, and high-end measurement instruments, connecting to the ZWS IoT cloud through wired and wireless interfaces, achieving big data processing, and forming an industrial internet ecosystem.
Mission: To advance the process of China’s industrial internet with leading technology
Values: Professionalism and focus achieve dreams