This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LC4357: Using Fapi_AutoEccGeneration with Fapi_issueProgrammingCommand() seems to generate ECC data based on 0xFFFFFFFF, not what I programmed in

Part Number: TMS570LC4357

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.

  • The proper ECC for the values 0x11111111, 0x2222222 at address 0x300000 is 0x09. That just happens to be the same ECC value for 0xFFFFFFFF, 0xFFFFFFFF at that location. Remember you are encoding 1.8e19 values into 256 values. There is a lot of aliasing. Try changing one bit such as 0x11111110, 0x22222222. The ECC for that data at address 0x300000 is 0xEA.
  • Thanks. I had just randomly picked out some values without thinking too much about it. I changed a few values and voila the data changed.