I want to check the P-Flash for any single bit faults as it may good to know if this is present.
I wrote a loop to read a mis-aligned word from all 8 byte blocks in the P-Flash memory space. And then I check the FERASTAT register for SFDIF != 0.
My question arises as when I set FCNFG |= FSFD then it immediately sets the SFDIF flag bit.
I am probably doing something wrong but the data sheet is not very specific as to how to check this.
How do I do an ECC test?
Regards,
Wade
Hello Wade,
The FSFD bit is only used to simulate single-bit errors and force the flash interrupt.
Basically, If the bit is set, any flash read sets the single-bit error flag SFDIF.
If the bit is cleared, only a read that returns corrupted data sets the error flags.
Regards,
Daniel