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.

TMS320F280039C-Q1: How to protect the OTP

Part Number: TMS320F280039C-Q1

Tool/software:

Hi experts: I ask this for my customer

1. One Linkpoint corresponds to a set of password, and the data in OTP can be changed from 1 to 0. Can they don’t change the linkpoint but change the original 1 to 0 to change the password? For example, original linkpoint is 0x3FFF, and the JTAGPSWDH0 is 0x4BFFFFFF; can they keep the linkpoint and change the JTAGPSWDH0 to 0x4BFFFFF1?

2. Customer want to know how to protect the OTP from being changed. The content of flash can be protected when they enable DCSM, the unsecured code can’t change the data and code of secured zone. Can unsecured code or secure code can change the data in OTP? If it can, how can they prevent this?

BRs

Shuqing

  • Hi Shuqing,

    1. Yes the customer can program the JTAG passwords with custom values without modifying the linkpointer. Note that any bit in OTP can only ever be changed from a 1 to 0. When programming OTP, you are also forced to program corresponding ECC bits automatically which also reside in OTP. Because of this, any time you program a custom value in a 64 bit or 128 bit block of OTP. You will most likely be unable to program any bits in that block again since this will likely attempt to program bits in the ECC value from a 0 to a 1.

    2. You can think of USER OTP as secure memory. Anytime the DCSM zone is locked, the USER OTP will be secured as well. The only exception is the CSMPSWD values, which will always be unsecured if PSWDLOCK is disabled.

    Thank you,

    Luke

  • When programming OTP, you are also forced to program corresponding ECC bits automatically which also reside in OTP.

    that means I need to use Fapi_issueProgrammingCommand( (uint32_t *)(0x00078014U) , &RZ1OTPJLMBuff[2], 4 ,0 ,0,Fapi_AutoEccGeneration); can use Fapi_DataOnly?

    you program a custom value in a 64 bit or 128 bit block of OTP

    that means I must program the OTP data 64bit or 128bit at a time?  If I program the OTP 32bit at a time, what will happen?

    You will most likely be unable to program any bits in that block again since this will likely attempt to program bits in the ECC value from a 0 to a 1.

    That means I will unsuccessful to change the password sometimes if I don't change the linkpoint?

    Anytime the DCSM zone is locked,

    How to understand the DCSM zone is locked, is it means we add the DCSM.asm in our project no matter what the password(I can keep the default password) or I need to change the CSM password or I need to enable the JTAGLOCK?

    BRs

    Shuiqng

  • I don't recommend using Fapi_DataOnly, you should always utilize ECC protection.

    I'm not very familiar with the capabilities of the flash API. If you're able to program 32 bits at a time this should apply to OTP as well.

    Yes that's correct.

    The CSM password value must be changed from the default for DCSM to be locked. If the DCSM password is default, the boot ROM will unlock the DCSM upon a CPU reset.

    Thank you,

    Luke