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.

F28M35H52C: OTP memory programming problem

Part Number: F28M35H52C


Hello,

We are testing the OTP memory programming and we have the following issue.

We wanted to program OTP_EMAC_Address0 one bit a the time to verify that it can be done as described here : http://processors.wiki.ti.com/index.php/C2000_Flash_Common_Issues/FAQs#OTP_.28one_time_programmable.29_Memory.

The command used was

DSLite flash -a OTPProgram -c user_files/configs/f28m35h52c1.ccxml -l user_files/settings/generated.ufsettings

where generated.ufsettings contrains:

{"Texas Instruments XDS100v2 USB Debug Probe/Cortex_M3_0":{"FlashM3EMACID1":"FFFFFFFE","FlashVerboseMode":true},"Texas Instruments XDS100v2 USB Debug Probe/C28xx_0":{}}

This went well and we could read back the memory with correct value (bit0 = 0)

We then modified generated.ufsettings to:

{"Texas Instruments XDS100v2 USB Debug Probe/Cortex_M3_0":{"FlashM3EMACID1":"FFFFFFFC","FlashVerboseMode":true},"Texas Instruments XDS100v2 USB Debug Probe/C28xx_0":{}}

to program the next bit, but following error appeared :

error: Cortex_M3_0: Error during Flash programming (Flash algorithm returned error code). Operation cancelled.
error: Cortex_M3_0: Please make sure the memory location you are programming have not already been programmed.
error: Cortex_M3_0: Please make sure the memory location you are programming have not already been programmed.
Failed: Unknown error

Same error when trying to write to FlashM3EMACID2 (OTP_EMAC_Address1).

Why is this happening ? Is there something wrong in our DSlite command ?

Thanks for your help.

Ril

  • Hi,

    On this device Flash and OTP memory space is ECC protected. When you program something in OTP, corresponding ECC location also get programmed. If you try to re-program the same location with different value, it'll will try to program new value for ECC which may not happen because some of the bits in that location have already been programmed to '0' and OTP is "One Time Programmable".

    Basically you can not re-program the OTP locations. You need to program the full value at once.

    Hope this is clear.

    Regards,

    Vivek Singh
  • Thank you for your quick answer.

    It still seems a little vague to me.
    Could you clarify "may not happen because some of the bits" ?
    Is this specific to this particular device ?
    Why does the link in the OP doesn't apply here ?

    For example, if I write one bit in FlashM3EMACID1, is it normal that both FlashM3EMACID1 and FlashM3EMACID2 can't be written anymore, even though I didn't touch FlashM3EMACID2 ??


    Thanks again.

    Ril

    EDIT:

    I read on another forum post that these two OTP areas are userOTP locations and that they 'may' sahre a common ECC, which mean we have to program to whole area at once. Is that correct ?

    ref post: https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/332410?tisearch=e2e-sitesearch&keymatch=OTP%20memory

  • Ril,

    Any Flash or OTP fields that share a 64-bit aligned memory should be programmed at-a-time when programming ECC. Users should be more careful of this when using OTP fields since they can not be erased.

    Thanks and regards,
    Vamsi
  • I read on another forum post that these two OTP areas are userOTP locations and that they 'may' sahre a common ECC, which mean we have to program to whole area at once. Is that correct ?

    That is correct. ECC is calculated for 64bit.

    Vivek Singh

  • Thanks for the clarification.

    Ril