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.

TMS320F280025: Issue programing the DCSM OTP

Part Number: TMS320F280025
Other Parts Discussed in Thread: UNIFLASH

Hi, experts.

CCS: Version: 11.1.0.00011

UniFlash: Version: 8.1.0.4135

I am having the following issue. I need to flash the MCU using the generated .hex (Note that using any other file format is out of discussion)

A bit of background in the project:

We are partitioning the Program Memory in three according to our needs and CCS does not provide a way to make it possible. A portion of flash is allocated for a launcher that launches a valid App and the other two portions allocate space for the actual App which could reside in any of the APP partitions.

Now, with that being said we need to include the DCSM OTP values for Zone 1 in the hex file so that once we flash the MCU it keeps those values and we don't hove to do that manually which in production is very inconvenient.

I have tried to flash the MCU through UniFlash but it does not work when I am using a file that includes the portion of memory of the DCSM OTP. A hex file without this content works fine but without the DCSM settings the MCU doesn't work since it does not boot from flash by default.

The following is the start of our .hex file

:020000040007F3
:20800000FFFF1FFFFFFFFFFFFFFF1FFFFFFFFFFFFFFF1FFFFFFFFFFFFFFF5AFFFFFF5AFF6A
:20801000FFFFFB7FFFFF7FFFFFFF4BFFFFFF3FFFFFFF9FFFFFFF0FFFFF03FFFFFFFFFFFF34
:020000040008F2
:2000000000480784000000000000000000000000D00600C8081C8F05D22E86A940C4FFED98
:2000100000F876228F05D20E18C4FFFD761A02177640C6798F45D2088F05D232CCC500037C
:2000200088A9CCC4000280A9AAA90EA8FF5A92AB900327A992A7CAA688A92BAAA9A90FA61C
:20003000611276228F05D20E18C4FFFE761A020C7640C679AAA99000910376480719020B63

The first three lines correspond to the DCMS OTP Zone 1 address (0x78000) and without the DCSM settings the MCU doesn't work since it does not boot from flash by default.

The following are the DCSM setting:

These settings are the same that can be seen in the portions of the hex file.

Before I tried to flash the MCU for the first time I read the memory getting the following result:

Flashing fails as I will show hereafter but I read the memory again getting the following:

So the part of the values on the DCSM address were changed but the flashing process broke for a reason I don't know.

These are the errors I am getting while trying to flash using UniFlash in different attempts:

As I mention before If I use a hex file that doesn't have the content for the DCSM (first three lines in our case) flashing the MCU with UniFlash works but those setting are necessary so that MCU boots from Flash. In the past I have use the .out file which seems to flash the MCU with the right DCSM setting form the asm and cmd file that I have in the project but this doesn't work for us because we have more than one app allocated in different portions of the Flash. So to fix that I have to re-flash the MCU with a hex file that contains Launcher and App but us I mentioned that is very inconvenient for production sake.

So, my question is how can I include the right settings of the DCSM OTP Zone1 in my hex file so that it works with UniFlash? What I am missing?

I truly appreciate any help.

  • Hi Wilson,

    We will be able to review and get back to you early next week on this.

    Thanks and regards,

    Vamsi

  • Hi Wilson,

    I am looping in our security team - they may suggest to use the security tool.

    Thanks and regards,

    Vamsi

  • Hi Wilson,

    If flash programming only works when you do not include the DCSM portion, it's possible that your hex value contains DCSM values that would attempt to program 0s to 1s, or change values in OTP that have already been programmed. The USER OTP is programmed in 64 bit blocks and each block can only be programmed once. So if you have already programmed any values in USER OTP, you must continue programming these values to their current value.

    Another possibility is that if you have programmed any of your CSM passwords, the USER OTP will become secure/locked after device reset, and you will not be able to program any USER OTP values unless you have unlocked the corresponding Zone (Zone 1 or Zone 2). In the On-Chip Flash tool embedded into CCS, there is a check box to reset the device before programming the flash, however I am unaware if this option exists in UniFlash.

    Can you verify the following:

    1) The values in USER OTP being programmed by your hex value are not updating any locations that you have already programmed, or attempting to program any bits that are currently 0 to 1.

    2) You have not programmed any CSM passwords OR you've unlocked Zone 1 before programming and are not resetting the device before programming.

    Thank you,

    Luke

  • I have manage to include the OTP data in the hex file successfully. Thanks for your reply though.