[Yaffs-archive] ECC for rirst and second block

Matan Ziv-Av matan@arava.co.il
Fri, 18 Jul 2003 12:13:29 +0300 (IDT)


Hello,

In the table in yaffs-0.3.html bytes 520-522 are defined as the ECC for 
the second 256 bytes part of data, and the bytes at 525 for the first 
256. But when I read the data, it appears to be the other way around. 
Did I miss anything? The yaffs code also seems to disagree with the 
document.

My (working) code for reading yaffs is:

                nand_read(i, ptr);
                yaffs_ECCCalculate(ptr, ecc);
                k=yaffs_ECCCorrect(ptr, buffer+520, ecc);
                yaffs_ECCCalculate(ptr+256, ecc);
                k=yaffs_ECCCorrect(ptr+256, buffer+525, ecc);


(Is there an archive for this mailing list? I'd hate to ask questions 
that were answered already).

-- 
Matan Ziv-Av.                         matan@svgalib.org


---------------------------------------------------------------------------------------
This mailing list is hosted by Toby Churchill open software (www.toby-churchill.org).
If mailing list membership is no longer wanted you can remove yourself from the list by 
sending an email to yaffs-request@toby-churchill.org with the text "unsubscribe" 
(without the quotes) as the subject.