Support / Knowledge Base / ConnectCore NAND Flash has bad blocks, how to get rid of them?

ConnectCore NAND Flash has bad blocks, how to get rid of them?

Bad Blocks are inherent to Nand Flash. Once a block become bad, it is useless forever, you cannot get rid of it.
These are maintained in Flash using a Bad Blocks Table(BBT) and bad blocks marking functionality.

->>What is Nand Flash
Bad blocks can be generated in Nand Flash at the time of flash manufacturing or during write cycles.
Once a block became bad, filesystem will mark it as bad in BBT and ignore that block forever from reading/writing cycles, so that the application will not try accessing these blocks .
So if a module has bad blocks increase that particular partition size so that there is enough space for application use.

Online forums may recommend use of command called 'nand scrub', which will erase 'bad' markings from BBT and if any application tries to read/write that block application will fail and result is unpredictable.
Bad block status on a module can be checked using 'nand bad' command in uboot environment.

->> What is UnCorrectable RS-ECC Error?
An 'Uncorrectable ECC error' is are warnings printed while accessing a nand block that could not be corrected by hardware forward error correction. In most cases the block will be marked as bad. The number of bad blocks found using 'nand bad' command should match those printed by the kernel at boot time.
If uboot tries to access these bad blocks warning messages are printed.

->>How Digi Embedded Linux and uboot shipped along handles bad blocks on Digi modules?
Digi kernel do not use a BBT stored in flash like usual Linux kernels.
It has a modified linux kernel which always scan the device(inspecting OOB) and keep the BBT in memory.
If uboot finds a bad block it is marked as such on the OOB area.

->>Out-of-the-Box Digi module have N number of bad blocks, what to do?
Most flash chip manufactures will specify the maximum possible count of bad blocks on a fresh chip, and it differs from one manufacturer to other. As a thumb rule 2.5% - 5% of bad blocks from the total could be considered as normal on a fresh Digi module. It is advised to check with Digi Support and confirm the maximum bad blocks specified by flash chip installed on Digi module.

If module has bad blocks, expand partitions and use, or if you have clarifications contact Digi Support.
A related kbase article :- The operating system (Linux, WinCE, or NET+OS) does not boot on a ConnectCore module with NAND flash, but the same images are booting on another module with the same part number

Last updated: Oct 05, 2017

Recently Viewed Articles

No recently viewed articles
Contact a Digi expert and get started today! Contact Us