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.

MSPM0G3507: DHCSR register corruption

Part Number: MSPM0G3507


I'm implementing OpenOCD support for the MSPM0. I can flash and erase the device, but get a confusing issue when attempting debug.

OpenOCD performs its usual init routine, then starts polling.

For the first few hundred milliseconds, DHCSR acts as expected, with a polled value of 0x1000001, a.k.a. C_DEBUGEN and S_RETIRE_ST bits set - the processor is running, and executing instructions.

This matches what I see, as my example blinky LED program is blinking the onboard LED.

However, after between 200 and 800ms, I start to read back 0x20207FF8 instead, which happens to be the end of the stack, and the first 4 bytes in memory:

Does the MSPM0 implement any extensions to the "standard" ARMv6-M debug protocol? Do I need an additional keepalive mechanism? Or has the MSPM0 uncovered a bug in OpenOCD's SWD protocol?

My example program does not enter SLEEP or SHUTDOWN states, so the SWD interface should remain alive for the entire debug session.

Re-initting OpenOCD fixes DHCSR reads, but only for the few hundred ms before it breaks again.