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.

TMS320F28388D: Writing OTP Memory with Flash Settings

Part Number: TMS320F28388D
Other Parts Discussed in Thread: SYSCONFIG

Hi,

Programming an OTP memory requires caution. 

So I want to get approval before writing to this zone. Excuse my questions.

--

I think there are several ways to writing OTP Memory. (with sysconfig, with Flash Settings, with code snippets which are mentioned Application reports SPRACN1)

Now, I have question about "Flash Settings"  method.

In CCS, there is a place that have OTP- GPREG Registers shown at the "Project Properties -> Debug -> Flash Settings" window.

I wonder that :

      

Are these settings enough to writing OTP memory ? 


Do we need to add a separate code for writing OTP ?

Thanks,

best regards.

  • Hi Mehmet,

    Are you only trying to configure your boot settings? If so then writing to these fields alone via the On-Chip Flash tool is enough to configure them. However you must specify all 4 fields before programming since each field can only be programmed once, and they are all programmed simultaneously when using the On-Chip flash tool. Let me know if you have any further questions.

    Thank you,

    Luke

  • Hi Luke,

    Thank you for your reply.

    Yes, I just want to change boot settings.

    --

    I will use one boot mode select pin (0x0F - GPIO15).

    So BOOTPINCONFIG Bit Fields (Z2-GPREG1) 0x5AFFFF0F

    I am plannig to use Flash Boot (0x03 - BOOT_DEF0) and SCI Boot (0x01 BOOT_DEF1) modes.

    So BOOTDEF Bit Fields for Low (Z2-GPREG3) 0xFFFF0103, for High (Z2-GPREG4) 0xFFFFFFFF .

    But I don't know how to use Z2-GPREG2 field. What should I write to this field ?

    --

    You said that "each field can only be programmed once". For this reason, I am planning to write Zone 1 first. If something went wrong, I could use Zone 2. 
    Because of Zone 2 higher priority than Zone 1***, the value that Zone 1 have will be ignored. 

    Am I thinking correctly about this?

    ***According to TRM page 706 ( SPRUII0E ): 
    "It is recommended to use Z1-BOOTPINCONFIG first and then if OTP configurations need to be altered, switch to using Z2-BOOTPINCONFIG."

    Best regards,

    Mehmet.

  • Hi Mehmet,

    Z2-GPREGx should be written to in the same manner as Z1-GPREGx. You are correct that writing to Z2-GPREG will override the Z1-GPREG settings.

    Let me know if you have any further questions.

    Thank you,

    Luke

  • Hi Luke,

    Thanks for your reply again.

    In fact, I know that Z2 is written same manner with Z1.

    But I wanted to ask that what should I write to the Zx-GPREG2 field.

    But I find the answer. TRM Page 719 explain this issue.

    I think I could write 0x5AFFFF3F to the Zx-GPREG2 fields.

     

    Thanks,

    Best regards

    --Mehmet

  • Hi Mehmet,

    Glad you were able to resolve this issue, I will close this thread.

    Thank you,

    Luke