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.

CCS/TMS320F28377S: Trouble Halting CPU when using DCSM

Part Number: TMS320F28377S
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

I’m using a LAUNCHXL-F28377S. My code uses a modified version of the 2837xS_Generic_FLASH_lnk.cmd and copies over functions and variables using the #pragma DATA_SECTION() and #pragma CODE_SECTION() directives. I’m also running an interrupt call at 100Khz and have about 40% of the cycle leftover after the code in the isr is run- I scoped a gpio that toggles at the beginning and end of the isr. At this point I can connect to the board and flash it normally. The board also runs after a reset.

I secured flash and ram sections by modifying the sample DCSM_Z1_ZoneSelectBlock.asm provided in the c2000ware blink_with_DCSM directory. Adding the relevant information in Project Properties > Debug > Flash Settings > Security Settings > Zone 1 section lets me program the board and browse the memory in the area that was secured but it no longer runs after a reset. What is the correct way to get it back to running after a reset? 

- After reading the technical reference manual section 2.13.3.3 (http://www.ti.com/lit/ug/spruhx5e/spruhx5e.pdf) I found that I can unsecure/secure the zones from C code. If I run csmUnlock() and then resecure it, the code runs after a reset. Is this the right way to boot from flash using dcsm? If I use this method I intermittently get cpu halting errors: 

C28xx_CPU1: Trouble Halting Target CPU: (Error -1156 @ 0x0) Device may be operating in low-power mode. Do you want to bring it out of this mode? Choose 'Yes' to force the device to wake up and retry the operation. Choose 'No' to retry the operation without waking the device. (Emulation package 7.0.48.0) 

  • Hi,

    You should be able to run the code even after securing the Flash and RAM section. You don't have to unlock and lock it. How are you unlocking the device? One thing you need to check if there is any code running from unsecure memory is accessing any data/variable from secure Flash/RAM then that would not work. You have to clearly partition your secure and non-secure code.

    You can not halt the CPU when code running from secure memory because in that case ECSL trips the JTAG connection. You should unlock the ECSL (by wrtting lower 64bit matching password in KEY0/KEY1 register) if you want to connect CCS when device is secure.

    Regards,

    Vivek Singh