Bad Block Handling When formatting Nand flash

Hi all,

When formatting the nand flash , Where the Bad Block information was stored and How the bad block information was preserved? Please clarify

my query

Thanks

Reply to
psjkumar
Loading thread data ...

My understanding is the bad block information is stored in the sideband data, as well as the ECC to correct bad bits. So it's spread throughout the nand flash.

-Dave

--
David Ashley                http://www.xdr.com/dash
Embedded linux, device drivers, system architecture
Reply to
David Ashley

As per my understanding the Bad Block information for Samsung is stored in the first and second page of every erase block.

During low-level formatting operation, this information must be preserved? How this was handled?

Reply to
psjkumar

I don't think the chip erase wipes that information out. Is there a chip erase? It's been a while. If you erase sector by sector in your software, you've got to check the block/sector hasn't been marked bad from the factory before you touch it. If it was marked bad at the factory, leave it alone.

My knowledge of this comes from the u-boot project, which supports large nand flash devices with ECC + bad block marking. You could pull down the latest source there from git and look at the code, I think it's like cmd_nand.c.

I'm not sure but I don't think it deals with the situation of sectors going bad through normal use. The assumption is that with ECC even if a bit here or there goes bad, the data can still be read/written reliably. If there was a catastrophic failure of the memory, say 4 bits that just can't be written in a sector, it would break it (I think).

-Dave

--
David Ashley                http://www.xdr.com/dash
Embedded linux, device drivers, system architecture
Reply to
David Ashley

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.