Other Parts Discussed in Thread: MSPM0C1104,
Tool/software:
We are currently working on the charger project in which we are using the MSPM0C1104 and MSPM0G3507 microcontrollers. We have encountered an irregular issue related to debugging stability that we would like your insights on.
Problem Statement:
The target board is intermittently entering and exiting debug mode. In many instances, we are unable to maintain a stable debug session. However, when the code is flashed onto the board without entering debug mode, the application seems to run as expected.
One specific observation is that when the PA0 pin of the MSPM0C1104 is toggled, the reset line is also being pulled low. Interestingly, if we run a minimal project that only toggles PA0, we are able to enter and stay in debug mode without issues.
To investigate further, we changed the functionality from PA0 to PA25. However, the issue still persists, indicating that the root cause may not be isolated to the specific GPIO pin.
Below is the snapshot of the error log during a failed debug session:
CORTEX_M0P: GEL Output: Memory Map Initialization Complete
CORTEX_M0P: NONMAIN CRC validation is not supported for MSPM0C1xx/MSPS003Fx. Exercise caution when erasing/programming NON-MAIN.
CORTEX_M0P: AutoRun: Target not run as breakpoint could not be set: Error enabling this function: There is no AET resource to support this job.
CORTEX_M0P: Can't Run Target CPU: (Error -1001 @ 0x0) Requested operation is not supported on this device. (Emulation package 20.0.0.3178)
CORTEX_M0P: JTAG Communication Error: (Error -615 @ 0x0) The target failed to see a correctly formatted SWD header. The connection to the target may be unreliable. Try lowering the TCLK setting before trying again. (Emulation package 20.0.0.3178)
CORTEX_M0P: Failed to remove the debug state from the target before disconnecting. There may still be breakpoint op-codes embedded in program memory. It is recommended that you reset the emulator before you connect and reload your program before you continue debugging.
In the below snapshot pa0reset. png, the the reset line is pulled down when the pa0 is toggled
Additional Observations:
-
The issue does not occur consistently. In some cases, we are able to debug and run the program without problems.
-
When the debug mode fails, PA0 activity appears to correlate with the reset line behavior.
-
Changing the pin from PA0 to PA25 does not resolve the issue.
-
Debugging with a minimal project that only toggles PA0 works as expected.
Current Status:
The root cause is yet to be identified. Given the irregular nature and the possible interaction between GPIO toggling and the reset line, we suspect a hardware-related interference or configuration issue but would appreciate your guidance on this.