Hi TI,
I am trying to read and write from flash, and wish to use ECC functionality to detect data corruption.
I am using mspm0_sdk_1_00_01_03, dl_flashctl.h.
could someone please check the understanding?:
1. to write a 64-bit word with ECC into flash, i shall call
DL_FlashCTL_unprotectSector, and then call
DL_FlashCTL_programMemoryFromRAM64WithECCGenerated, which allow me to write a 64bit data, into a flash address. The function also generate a ECC for me, then write it into the ECC memory.
2. to read a 64-bit word, and ensure there is no memory corruption, i shall
readback the data from flash using pointer, and then call
DL_FlashCTL_readVerifyFromRAM64WithECCGenerated. The function generate a ECC base on the data input(readback value), and compare the ECC and readback value against what is in flash memory. the function return true if everything matches. and return false if something is wrong.
3. hardware generation of the ECC code is by default enabled. Is there a way to check/configure this?
4. programming of the ECC code is by default disabled, but it is enabled whenever the above 2 functions are called
Thank you very much!