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.

TMS320F28335: TMS320F28335 User OTP(One-time programmable) area

Part Number: TMS320F28335


Hello,

tms320f28335 0x3F 0400 ~ 0x3F 0800 User OTP area has 2KB. 

If I program about 1 KB space once in the OTP area, I wonder if the remaining 1 KB area can not be used.

Is it appropriate to program this area using the Flash API?

I wonder if there is no way to rewrite this area if it is an area that can not be rewritten once it is written.

Regards,

Han

  • Han,
    Looking at both the DS and the Errata, all 2KB of User OTP is available to be programmed by the user. Also, the Flash API is used to program the OTP, it will accept these addresses for programmation like normal flash.

    The only restriction, as you mention, is that this is One Time Programmable. Just to clarify this is not the same as one time write-able; that is if there are erased bits(kept as "1") these can always be programmed to a "0". The difference in OTP and Flash is that OTP cannot be erased once programmed.

    So, if you are placing code in this region, then it is likely that those words cannot be written to or programmed again. However, if you are keeping a counter or some type of progressive data then you could potentially program each 16 bit word 16 times, assuming you were only programming 1 bit at a time from a 1(erased state) to a 0(programmed state).

    Best,
    Matthew
  • Thanks for the reply, Matthew

    There is a part that I do not understand.

    I understand that an OTP can not be erased once it is programmed.
    But,

    [ Just to clarify this is not the same as one time write-able; These are always programmed to a "0" ]

    So, if you are placing code in this region, then it is likely that [those words] cannot be written to or programmed again. However, [if you are keeping a counter or some type of progressive data then you could potentially program each 16 bit word 16 times, assuming you were only programming 1 bit at a time from a 1(erased state) to a 0(programmed state).]


    I do not understand this part. Can you explain in more detail?(blue color)

    I want you to explain this board more easily for beginners.

    Regards,

    Han

  • Han,
    Sure, I'd be happy to explain.

    Let's look at one 16-bit word in OTP.

    For a new device from TI, the contents of this word would be in the erased state, which corresponds to a data value of 0xFFFF

    Now, let's assume you were using this location as a log of how many times there was an event in your system. Once there is an event we will program 1 bit of the 16-bit word, and in this case programming a bit means to change it from a "1" to a "0".

    So after programming 1 bit(will use the LSB), the data at this location will now read 0xFFFE

    Even though we have now written to the OTP location, there are still 15 bits in the erased state, that could be programmed to a "0" if we want.

    So, if the event occurs again we would program the next LSB and the data would then be 0xFFFC.

    We can continue doing this until all bits are programmed, at which time the data would be 0x0000.

    Since this is OTP, the one thing we CANNOT do is erase the word to go from a 0x0000 to 0xFFFF.

    Changing what we use the OTP for, instead of data we place executable code in this region, this is likely a one time only option, since it would be highly unlikely a new instruction's opcode would only be programming bits that are still erased and not needed to erase bits that are already programmed.

    Let me know if this helps clarify the question.

    Best,
    Matthew
  • Matthew,
    Thanks for the friendly explanation.
    Your explanation made me understand enough. Thanks again
    have a good weekend.

    Regards,
    Han