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: OTP for the user's code

Part Number: TMS320F280039C

Dear Champs,

I am asking this for our customer.

We are aware that F28003x OTP cannot be used for users' codes.

But is it possible to use part of flash as one-time-programming memory for users' codes?

For example, use DCSM to lock some sectors and use a special password (all 0s?) to permanently lock the sectors?

OR any possible way?

Wayne Huang

  • Wayne,

    Instruction fetches are never blocked. If GRABSECT bits for a sector programmed to 11 for both Z1 and Z2, and a CSM password is present for both zones, then the sector becomes permanently inaccessible for JTAG or program/data reads. Instruction fetches will still work, but the contents cannot be read. Note that if the sector contains any data sections (.bss/.ebss e.g.) those become inaccessible too, so this setting should never be used for data sections. Please refer to the device TRM for more details on this.

    If the intent is simply to prevent JTAG reads or program writes to the sector, normal DCSM protection (GRABSECT 01/10 depending on zone allocation) will meet this need.

    Best regards,
    Ibukun

  • Dear Ibukun,

    The user hopes the flash bock (called users' OTP) can be accessed as code or data - not only to JTAG access.

    And once it's programmed, it cannot be changed permanently.

    Do you know if we have any permanent password for DCSM?

    Like all 0s for JTAGLOCK?

  • Hello Wayne,

    Bank0 User OTP is reserved for DCSM and cannot be used by user. Bank1 and Bank2 user OTP can be used by the customer as one-time-programmable memory for code or data.

    There is no special DCSM protection for this memory, but it can never be erased once programmed.

    Best regards,
    Ibukun

  • Dear Ibukun,

    I meant is it possible to use part of flash sectors with "permanent DCSM" to emulate user's OTP?

  • Hello Wayne,

    What the DCSM can do is the following:

    • Block JTAG accesses to regions of memory
    • Prevent code running from outside the secure zone from reading or writing

    The DCSM does not block code running from inside the secure zone from writing to that zone. In other words, there is no true "OTP" mode that can be emulated by the DCSM, just read/write protection from initiators outside the zone. The only true one-time-programmable memory is the User OTP in banks 1 and 2.

    Best regards,
    Ibukun