How does the Error Correction Code(ECC) for FLASH memory work?
Hi! all experts in Community ST,
I have been working on the embedded flash memory of STM32G474RE and the whole programming process of the flash memory has been successful.
However, I do not understand how the Error Correction Code works.
Referring to the reference manual,
8-bit ECC code is calculated and added per double word(64 bits).
If I interpreted correctly,
when 64-bit or 8 bytes data is programmed at some address, the 8-bit ECC code is calculated automatically and is stored in flash memory, following the data. Is it correct?
Here is the memory map of my test case:
Data: 0x1111111122222222
Addr: 0x0807F808
As you can see, the data has been successfully stored in the designated address but I can't find where the ECC is.
It is quite confusing for me.
If I want to store new data after the data which I already write, should I leave 8-bit for the ECC Code? or should I just write right after where the previous data ends?
I think I am not on the right track :'(
Where the ECC Code stores in the flash memory?
Please help me out and thank you in advanced!
