I am successful in (experimentally) erasing then flashing, but I noticed that the ECC flash data for a given region of varied data appears to be identical to that generated by the linker (TI recommended vfill, ecc section, etc.), which is that of all Fs. I understood the ECC calculation is based on address and data.
fapiStatus = Fapi_issueProgrammingCommand( (uint32_t *) startProgAddr, (uint8_t *) pData, (uint8_t) bytes, (uint8_t *) 0, (uint8_t) 0, Fapi_AutoEccGeneration);
startProgAddr = 0x300000
pData = 0x8000e3b (stack based var)
bytes = 16
User flash 0x300000 shows: 0x11111111 0x22222222 0x33333333 0x44444444
ECC flash 0xf0460000 shows: 0x0997FFFF
Linker generated S-record shows: S325F046000009979806851B148A801E118F0C929D038F111E80039D920C069897098A141B85B4
Same 0x0997! I've flashed larger regions with same results. 0x300000 is a 64-bit boundary. I have also tried pointing the ECC buffer to the same address as the flash data, same results.
What am I missing?
Thanks.