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.

TMS320F28069M: Supporting CAN or SPI bootmodes from accessing OTP memory

Part Number: TMS320F28069M
Other Parts Discussed in Thread: UNIFLASH

Dear Support:

I am ramping up on the Piccolo bootloader (i.e., F28069M) and am confused on how to support SPI or CAN boot mode.  From my understanding, this is done using the GetMode method (i.e. Mode 3) which assumes you can write a specific value to the OTP BMODE location of 0x3D7BFE in OTP memory.  But I don't see any details on what utilities are used to write anything into OTP memory of the chip.  Can you tell me how this is done?  Is there some utility to do this or am I missing something on how to do this?  Please advise.

Thanks,
Tim

  • Tim

    Uniflash / CCS plugin tools can be used to program OTP. It is not any different from programming flash.

    Best regards
    Chris
  • Hey Chris:

    Thanks for your response.  Still a little confused.  I am very familiar with Uniflash, but I typically use it to transfer files to on-board or on-chip FLASH on our LPs.  There is a way to use Uniflash to just write to one location in OTP memory of the F28069M?   And I assume since it is OTP, once I do this, I can't change it anymore.  Once written to, I will have to remove the chip from the board and put down a new chip if I want to change the value at this location in OTP memory - is that correct?

    Thanks,
    Tim

  • Tim

    My apologizes. There doesn't look to be dedicated fields for these boot values for F28069. On newer devices, there are fields as part of the tools to just program the boot OTP regions. As part of the application, you'll need to assignment a variable or data to memory region in the linker command file.

    Ex:
    .sect "myvalue"
    .long 0x2b7e1516

    Linker:
    myvalue : > FLASH_OTP, page = 0

    Yes, that's correct you can only program it once.

    Best regards
    Chris
  • Hey Chris:

    Thanks for your reply. As for setting the bootloader up for CAN, I need to do the following:

    Data OTP Address
    0x005A => 0x3D7BFB (OTP KEY)
    0x0007 => 0x3D7BFE (OTP BMODE)

    I assume the value you provided earlier (0x2b7e1516) was just some random number you were using as an example. If I setup the linker .cmd file as you indicated, CCS is smart enough to go through whatever special operations are required to write to OTP memory? I was assuming I had to do something special to write to OTP memory.

    And once I do this 1 time, I need to comment this out of the linker .cmd file on further downloads since it will try to write to this OTP section again and it will fail. Is that correct?

    Thanks,
    Tim
  • Tim

    Programming OTP is the same programming flash. Yes, that was just a random number but the data/address values you showed look correct.
    That's right, I believe CCS would give an error if already programmed. Either way, you should comment it out after programming.

    Best regards
    Chris
  • Hey Chris:

    Ok, I think I understand now, but that's scary. ( :-0 I trash my board if I screw this up. Would much preferred this to have been FLASH and not OTP. I reckon there was a good reason for this - maybe that's why we make these launchpads so cheap. :-)

    Thanks,
    Tim