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.

TMS320F280021: error while writing to OTP with Fapi_issueProgrammingCommand()

Part Number: TMS320F280021
Other Parts Discussed in Thread: UNIFLASH

Hallo,

I try to write 64 bit into the OTP with my bootloader, but I get a error in the FMSTAT check.

The area that I want to write is located at 0x7800C - 0x7800F. I checked it with the UniFlash, there it looks like it is empty (all FF). After the programming I read FMSTAT, and the bits 4 and 5 are set.

According to INVDAT[5] I try to rewrite a zero back to one, but in the readout everything looks fine. Could this problem be caused because the area was already programmed with 0xff, and now the ECC bits are written? I got the board from our customer, so I don't know exactly what was already done with it.

For the programming I used the following function call:  

oReturnCheck = Fapi_issueProgrammingCommand((uint32*) u32Index /* 0x7800c*/,
                                                    payload,  /*pointer to the data I want to write*/
                                                    4, 0, 0, /* write 64 bit at once, calculate ECC automatically */
                                                    Fapi_AutoEccGeneration);

I tried to write to other addresses, there it was working fine.