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.

TMS320F280025C: DCSM - Test configuration without locking the microcontroller

Part Number: TMS320F280025C
Other Parts Discussed in Thread: UNIFLASH

Hi,

I'm in the process of protecting a TMS320F280025C from unauthorized access to FLASH and RAM.

My bootloader is in the flash sections 0-2 and the app in the flash sections 3-15. I want the bootloader to be protected for

execute only and the bootloader should be able to erase the application and reprogram it.

Now there is this application note about DCSM: https://www.ti.com/lit/an/spracp8a/spracp8a.pdf?ts=1656879106556

When I then use the example project, I can configure the settings, but it looks like, that when I will flash a program containing 

the settings, I will never be able to change the DCSM header again on the same microcontroller, right? So how can I debug this?

My settings:

Edit:

Ok, I could make it work now by only using the option ZONE1 Per LINKPOINTER and make everything Secured by this  Zone. I can then only flash via UNILINK, since I need to unlock.

There came up several questions about DCSM and security, hopefully you can answer me these questions:

  • Can I somehow make the JTAG on the Eval Boards unlock the board before flashing, such that I can still debug and flash it in CCS when I use DCSM
  • When I have a bootloader and I configured the DCSM as above, do I also need to add this in the application or is it enough to have this in the bootloader application alone, since anyway the whole FLASH and RAM is protected?
  • How safe is my application with just the above settings? Do I need to remove the boot configuration over SCI?
  • When I protect everything as above with zone1 only and I want to write to the flash, to I need to call DCSM_unlockZone1CSM()? On the app it looks like DCSM_unlockZone1CSM() will always return unlocked (also with a wrong password), but I can only access the controller over UNIFLASH with the correct password.
  • Hi,

    Can I somehow make the JTAG on the Eval Boards unlock the board before flashing, such that I can still debug and flash it in CCS when I use DCSM

    Yes, you should be able to unlock the CSM to be able to connect to CCS and perform flash program/erase operation. If you only want to unlock JTAG then you need to unlock ECSL (by entering 64bit LSB of of password into KEY0 and KEY1 register) and then use the BOOTLOADER code to do the flash operation.

    When I have a bootloader and I configured the DCSM as above, do I also need to add this in the application or is it enough to have this in the bootloader application alone, since anyway the whole FLASH and RAM is protected?

    You only need it in BOOTLOADER.

    How safe is my application with just the above settings? Do I need to remove the boot configuration over SCI?

    It's always good to add extra layer of safety so yes, it may be good to block any peripheral boot.

    When I protect everything as above with zone1 only and I want to write to the flash, to I need to call DCSM_unlockZone1CSM()? On the app it looks like DCSM_unlockZone1CSM() will always return unlocked (also with a wrong password), but I can only access the controller over UNIFLASH with the correct password.

    You should be able to program flash by running the flash API from zone1. You don't have to unlock the zone for that. If you want to change the security setting in USER OTP then you'll need to unlock the zone using the function.