Re: [Yaffs] Bad eraseblocks and NAND / ECC layouts

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Rong Shen
Date:  
To: Noah Fontes
CC: yaffs
Subject: Re: [Yaffs] Bad eraseblocks and NAND / ECC layouts
Hi,

...
> The blocks aren't random; they're always the same value. The problem is
> that I can't remember whether they occurred prior to my attempting to
> mount the device incorrectly. The chip itself was only a few months old
> at the time. Do these look like "authentic" bad blocks? Or is this
> corruption due to the mismatch I described earlier?


They seem to be a little more than usually, BUT I believe it's still
within the range, i.e. the maximum number of bad blocks, if you are
unsure, checkout the manufacture datasheet.

I'm not quite sure about the errors you said 'after init', they seem
to be uncorrectable ECC errors to me, which, assuming your ECC layout
is correct, means there are more bad blocks not been marked as bad.

>
> I found a thread[1] that suggests that wiping the flash completely would
> fix the problem if it were the latter. Is this worth trying, or should I
> just live with the errors?


Wiping out the flash completely will also wipe out the bad block
marks. If you are lucky, the next time you touch those bad blocks,
they can be detected and marked as bad, if not, as depending on the
pattern you write to flash, errors may not turn up immediately, and
you might be end up with losing data etc etc.

I've been thinking a solution for this kind of problems, i.e.
incorrect/missing bad blocks marks. I think we could do something like
that,

1. completely wipe the flash, data and spare area
2. (optional) a read scan of the chip to identify all the blocks
containing one or more 0s (or ECC errors), and mark them as bad
3. write certain patterns to the flash (e.g. 0x00, 0xff, 0x5a, 0xa5
for byte orientated chip, one pattern for each round), and read back,
if there's any mismatch or ECC errors for any block, mark it as bad.
4. erase the remaining good blocks to be ready for use.

It should be straight forward to implement, and would be able to
identify most if not all the bad blocks. Give it a go if you are
interested:)




>
> Any advice is most appreciated.
>
> Thanks and regards,
>
> Noah
>
> [1]:
> http://lists.aleph1.co.uk/lurker/message/20050607.085302.0f9d2926.en.html
>
> - --
> Noah Fontes
> Cynigram
> http://www.cynigram.com/
> Phone: +1 919 349 9826
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkofG/sACgkQhitK+HuUQJTPXgCfVY0AuN7lHVdjLug+4SFTCUJA
> bDQAoIwlWQrkFyA1kXqdFWgWc/FqhZKL
> =yhdN
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> yaffs mailing list
>
> http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
>


--
Rong