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.

TMS570 Production Code Protection

Other Parts Discussed in Thread: SEGGER, UNIFLASH, TMS570LS0332

Hi.

I would like to know whether there are possibilities to protect the code on the TMS570 MCUs? And if there are then how it can be done? The code protection that I am talking about basically concerns the code read-back once the devices flash is programmed. We would like to prevent the read-back of the code. For example our current systems implement code protection in a way where after the firmware is programmed and verified the read-back is prevented by reading out all 0x00 values. However, new programming of the memory is still possible (meaning it is not permanently locked). Does TMS570 offer similar functionality? We require this to protect our firmware against unauthorized copying. 

We will program the MCU via JTAG connector and are planning to use Segger Flasher PRO device for the task.

  • Ringolds.

    The TMS570 family provides a way to lock JTAG access.
    When this mechanism is set, the part cannot be debugged and code cannot be accessed unless an 128bits key is provided prior to connect to the device.

    By default, all parts are unlock, so you can debug and program your device at will.

    Once a part is locked, this 128bits key will have to be provided. The part will re-lock itself on a power on reset.

    There is no way to unlock permanently a part that has been locked once.

    The module used for this purpose is AJSM.

    A special command line tools is necessary to un-lock the part with the correct key before being able to connect to the part for debug or re-flashing.

    As far a I know, this unlock utility only works with XDS100v2, XDS560 and XDS560V2. J-link is not supported.

  • Thank you for the answer. Do you have any additional documentation that you could provide about the functionality of the AJSM module? Maybe even an example (like uniflash config file or similar)?

  • Ringolds.

    The AJSM is described in the Datasheet.
    Which device are you using?
  • MCU is: TMS570LS0332APZQQ1

    Yes I see that there is 1 page briefly describing it in the datasheet. However, from that I do understand the concepts of how it works, but I am not really sure how to use it with the programmers (meaning how to correctly configure programmers it to use the feature).
  • Ringolds,

    Can you have a look at the following thread?
    e2e.ti.com/.../393114

    There is an example of CCS project to program the AJSM default key to lock the device.

    Once again, in order to temporarily unlock the device it is mandatory to know the key that has been programmed.
    If not, the part is locked and cannot be recovered.
  • I looked into the thread. And skimmed through pretty much everything that I could find on the forum about the AJSM. I think I have gotten a pretty good picture of how to use it. However, as far as I understand there is no "official" software available of how to unlock it after that. That said, I see that in many posts TI was able to provide a software that does such thing on individual basis to customers after request. Would you be able to provide me with the software?

    I have Blackhawk USB100v2 available (I also have the possibility to purchase XDS560 if necessary). I would not feel comfortable trying to modify the OTP before i have a sure way to unlock it as i do not want to "brick" our development devices.

    Also what is the value of the standard visible 128-bit unlock code for TMS570LS0332?
  • I've send you a friend request.

    If you have an XDS100v2 it will be enough to unlock the device.
    I will not recommend to lock you development board. As I explained, once it is locked, you will have to use the unlock utility and provide the valid key each time you want to debug or re-program your development board.
  • I have accepted your request.

    Yes. I am aware of that.