[Yaffs] ECC handling in YAFFS2

Charles Manning manningc2 at actrix.gen.nz
Mon Nov 21 20:15:18 GMT 2005


On Tuesday 22 November 2005 01:33, Srikanth wrote:
> hello sir,
> I didn't see the ECC been used for the large page read and write in YAFFS2.
> If we see the spare area assignment standard for the large page, there are
> 12 bytes of ECC in the spare area.
> But if we compare it extended Tag structure used in YAFFS2 its not
> matching. Can you please help me out in handling ECC for large page(2k)in
> YAFFS2.

The ECC in the packed tags is just to cover the tags themselves.

In YAFFS2, it is up to the NAND interface code to provide ECC and ECC 
placement and bad block handling. This is different from YAFFS1 because it 
provides far more flexibility (eg. different NAND placement, hardware ECC 
etc).

YAFFS1 was a one-trick-pony it was designed for SmartMedia (though people 
fiddled it to do all sorts of things).

Typically, your 2k page will have 64 bytes of spare area in this you need to:
(*) Store bad block markers etc, unless you have an alternative bad block 
handling scheme.
(*) Store ECC to cover the data.
(*) Store the packedTags2 structure.

-- Charles



More information about the yaffs mailing list