Hi Sorin Stan,
I obtained internal information about ECC checksum algorithm from test engineers. Unfortunately my calculated ECC values didn’t fits to description in AN4505 Safety Considerations S12G-Family.
So, I tested it on hardware and I discover that patterns in AN4505 are probably wrong because they produce double bit ECC error instead of single bit ECC error. I will report it.
Therefore I choose test&try method and I could offer combination of patters for single and double bit ECC error.
Single bit ECC error will be signalized when we write 0xFFFF FFF4 followed by 0xFFFF FF2F.
Double bit ECC error will be signalized when we write 0xFFFF FFF4 followed by 0xFFFF FFF0.
Anyway, ECC state machine test is well covered by during final test in MCU production. So, it is not necessary test whole flash by this approach. For self testing of ECC state machine once per time at one sector it is possible to use.
Additionally you can use hardware feature for testing ECC error routines (FCNFG_ FSFD, FCNFG_ FDFD). In that case, you don’t need stress flash by cumulative writes…
I hope it helps you.
Have a great day,
RadekS
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------