[U-Boot] NAND flash - bad blocks

Dimitar Penev dpn at switchfin.org
Fri Jan 11 09:46:06 CET 2013


Hi Scott,

>On 01/10/2013 01:56:30 AM, Dimitar Penev wrote:
>> Hello,
>>
>> First of all sorry if this question was already answered here.
>>
>> We are sourcing some K9F8G08U0M-PIB0 NAND flash devices.
>> On the first erase in uboot 2011.09 I got bunch of mostly consecutive 
>> bad blocks.
>> According to the datasheet we should get not more then 80 bad blocks  for 
>> our chip
>> but I get something like 240 bad blocks for most of the NAND chips.
>>
>> I seems to be able to fix this using the following procedure:
>
>Call your NAND vendor and complain?
>

Well we did but we didn't got something from them which could explain what 
we observe.

>After making sure that there's nothing wrong with your NAND driver or 
>controller that causes the OOB to be read incorrectly.

We are using nand_plat driver provide by ADI without any customization.

>Did you do anything to the NAND chip prior to this "first erase"?  In 
>particular,  did you write to the OOB?

For boards coming out of the assembly house:
I load uboot in SPI flash, boot from SPI and get the NAND chip recognized 
properly.
On 'nand erase.chip' command I get bunch of bad blocks.
So I guess we haven't even touched OOB before 'nand erase'

Assuming the components are OK the only possible explanation could be 
overheating
of the chips in the assembly house. Does anybody get something similar?

>
>> In uboot
>> uboot>nand scrub.chip
>>
>> In uboot
>> uboot>nand erase.chip clean
>> at this point I get usually 1,2 bad blocks which looks normal to me.
>
>You're not fixing anything -- you're wiping out all bad block  information. 
>Those "1,2 bad blocks" are not actually bad blocks, but  are the bad block 
>table which appears "bad" to reserve it.  These  should be at the end of 
>flash.  Or, possibly, they're blocks that  happen to be damaged in a way 
>that prevents the bad block marker from  becoming 0xff.

Oh Really?
What about 'nandtest -m' in Linux ? I was hoping it does a check of the 
erase blocks.

>
>> In Linux we have few mtd partitions on this NAND chip.
>> Unmount all of them and for all of them :
>> linux>nandtest -m /dev/mtdx
>> Usually this doesn't add any new badblocks on top of what I get on  nand 
>> erase in uboot,
>> but I really haven't tested that much device to say.
>>
>> After this procedure the NAND flash seems to work fine.
>> Do you think this is reliable way?
>
>No.

Thanks Scott.
Is there any procedure to analyze the nand flash for bad blocks?

>
>-Scott
Best Regards
Dimitar 



More information about the U-Boot mailing list