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.

TMS320F28069 CSM Question

Other Parts Discussed in Thread: TMS320F28069, TMS320F28035

I have been developing code for the TMS320F28069 microcontroller I and have recently started using the CSM to secure Flash on the microcontroller. I have been having issues that I did not have on a previous project that I was involved in where we used a TMS320F28035 microcontroller. I am wondering if there are any differences in the CSM or Boot ROM of these two microcontrollers that could cause this? I appreciate you help in this matter.

  • Hi Rolf,

    CSM logic is same on both these devices.

    Can you provide some detail about the issue you are facing?

    Regards,

    Vivek Singh 

  • Hello Vivek,
    Thank you for your prompt response! Here is what I have found so far. I recently tried to enable the CSM by programming bits other than 0xFFFF to the CSM Key which secured Flash on the TMS320F28069 microcontroller. After making this change I was no longer able to connect to the microcontroller via JTAG due to errors. This issue has been mentioned in other E2E posts and I found that by changing the bootloader mode to Wait I could connect via JTAG, enter the CSM key and erase flash to unsecure the microcontroller. To prove that this behavior was cause by the code I have developed I then tried to erase all Flash sectors on the microcontroller and run just the bootloader instructions in Boot ROM. This causes the microcontroller to stop processing instructions at a fixed position in the Boot ROM with the GetMode bootloader mode that I normally use (our program starts with a branch instruction at a fixed address in Flash when loaded). Thinking that there would no longer be instructions in unsecured memory trying to access data in secured memory I programmed a CSM Key using CCS to secure the microcontroller. I was then surprised to find that JTAG still disconnects even with only instructions from Boot ROM being processed. I am wondering if there could be an instruction in Boot ROM accessing secured memory that could be causing the JTAG disconnects with the TMS320F28069 which doesn't exist with the Boot ROM of the TMS320F23035 microcontroller? I appreciate any insight that you might have.

    Regards,

    Rolf Olsen
  • Hi Rolf,

    On secure device to allow CCS connection user need to use WAIT boot mode only.

    On BOOT-ROM accessing the secure memory, can you try following -

    - Let boot rom code boot the device properly and jump to flash.

    - In flash call a function which is in un-secure RAM and have only while (1) loop in this function in un-secure RAM.

    In this case after powering-up the device try to connect to CCS and see if it works.  Also once connected issue debug reset , set the EMULATION BOOT setting to  boot from flash and hit RUN and see if CCS get disconnected.

    Regards,

    Vivek Singh  

  • Hello Vivek,
    I tried what you mentioned. I created a very simple project that does the following actions when the Boot ROM jumps to Flash. It disables the watchdog, calls a C function running from Flash that copies instructions from Flash to RAM, and then calls a function in RAM section L5 with a while(1). I also modified the GEL file by uncommenting the EMU_BOOT_FLASH() function in OnReset() so it would boot from Flash and by putting the CSM key that I am using into the Unlock_CSM() function. After I programmed this CSM key to secure the microcontroller I was able to connect with JTAG and to reset the processor in CCS without getting disconnected. So it seems the code accessing secured memory and disconnecting JTAG wasn't the Boot ROM code. Our project uses the Fast RTS library. I was wondering if the call to _c_int00 in the Fast RTS library could be causing the JTAG to disconnect?
  • Hi Rolf,

    If you are running through the _c_int00 with JTAG connected and .cinit section is mapped into FLASH then yes, that'll cause the issue for JTAG disconnection.

    To avoid such issue, user should always boot device programmed with password in WAIT boot-mode.

    Regards,

    Vivek Singh

  • Hi Rolf, let me know if you have any further queries on this.

    Regards,
    Vivek Singh