9s12X - How to check for a single bit fault on P-Flash

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

9s12X - How to check for a single bit fault on P-Flash

434 Views
dastek
Contributor III

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

0 Kudos
1 Reply

338 Views
danielmartynek
NXP TechSupport
NXP TechSupport

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

0 Kudos