Hello! I try to estimate as far as is necessary to perform CRC 8 in XC167. I've read about ECC (Error Correction Code) which is used when Flash accessing. So, every 64-bit data of flash refers to 8-bit ECC which automatically formed with Hamming codes when programming flash. Is it right? This corrects only single-bit errors. When double-bit error occured it trigger an Access Fault trap. User's manual recommends to reprogram (refresh) wordline with single-bit error to prevent possible double-bit error. I think it is not suitable in real-time application when unit is in operation.
I have next questions:
1. Does the ECC sufficient to provide normal operation? Does CRC needed when ECC already work?
2. How to identify double-bit error and identify Access Fault trap and then process it to indicate fault condition? (continuously check FSR or what else?) Maybe there are examples of code correction in real application in systems with a very long service life.
3. Maybe there are common guidelines to check proper functionality of XC167CI?
Thanks for any advice!
What you do in an embedded system when you get a trap depends very much on the nature of your system. For a safety critical system you would usually have some failsafe halted state, and you should enter that state. If the processor has a user interface, or is part of a network, it should report the occurance of the trap because a system with flash double bit errors will need to be replaced.