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)