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.

TMS320F28P650DK: Proper way to reset dual CPU debug session

Part Number: TMS320F28P650DK
Other Parts Discussed in Thread: C2000WARE

Tool/software:

We've been having trouble resetting our TMS320F28P650DK during a debug session in the new CCS (v20.1.1.8__1.7.1). I cannot find a combination of CPU/System reset selections for the CPUs that will properly reset the whole system as if it had been a normal power-on sequence. Documentation seems to suggest "System Reset" as it will reset peripherals, but it almost always results in the message below being written repeatedly to the Debug Output View.

C28xx_CPU2: Trouble Reading Register RPC: (Error -1137 @ 0x13) Device is held in reset. Take the device out of reset, and retry the operation. (Emulation package 20.1.0.3429) 

Sometimes it will appear to reset properly without the message above, but when we select "Continue All", CPU2 will repeatedly halt execution at a random spot as if a breakpoint was there. The only way to restore proper functionality is restarting the debug session and loading firmware again. What is the proper way to reset the system?

  • Hi Derrick,

    In which order are you performing the System Reset in? Are you making sure to do it for both cores? That should be the correct process to reset the CPU but I'll need to test this on my side as well. By the way, we have a new update of CCS, v20.2 which should have debug improvements

    Regards,

    Peter

  • I've tried it with both cores, and it doesn't matter which order. I've also tried mixing it with the CPU reset command, and doing it in different orders, but our whole team still gets the error message from my original post. And attempting to continue from that state causes CPU2 to halt on a seemingly random place in our code where there is no breakpoint.

    I'll try updating CCS tonight.

  • Hi Derrick,

    Can you let me know what your debug environment looks like? Are you making use of CLI from CCS v20? I just tested this, when directly using the Restart from the CCS IDE interface, I haven't had any issues with it returning back to the start of main using the green icon. Then when pressing resume, it starts from main as normal. This is tested on the example blinky LED example from our C2000WARE SDK

    Regards,

    Peter

  • That works, but not what we want. We want a full MCU reset where peripherals are also reset to their default values. According to the documentation here (7.4.2. Debug View), it doesn't do that:

    • Restart: Issues a restart when either symbols or a program is loaded to the target device. A Restart simply re-positions the PC register to the entry point (typically _c_int00 or the reset vector).
  • Hi Derrick,

    I see what you are saying. You can do a full MCU reset by right clicking the core and then going to Reset > CPU Reset. You should be able to follow the below steps to reset both MCUs as if you had done the inital program load.

    1. CPU Reset CPU1

    2. CPU Reset CPU2

    3. Restart CPU1 (return to main)

    4. Continue CPU1 (start the MCU)

    5. Restart CPU2

    6. Continue CPU2

    I tried this on my version of CCS and it should allow you to restart the program

    Regards,

    Peter