Question
SWV ITM Breaks Debugger
We have a new design using the STM32G474 and are having some weird issues with the SWV utility. Current setup:
- STM32Cube IDE
- ST-Link V2-ISOL Debugger using SWCLK, SWDIO, and SWO
- SWD connection to micro with 33 ohm termination resistors
- SWO was wired manually using a jumper wire and a 33 ohm resistor (not on original schematic)
- SWV enabled in IDE
- Enabled Trace Asynchronous SW in IOC file
- Using 144 MHz as Core clock in debug config for SWV and in the SysClock on IOC
- Enabled ITM Port 0
- Overrode __io_putchar in main
Here’s what we are seeing:
- Printf works and outputs under MOST circumstances, skips initial character for some reason
- Pausing execution and resuming no longer works
- Setting breakpoints during execution no longer works
- Resetting the micro using the debugger reset no longer works
- Disabling the ITM Port 0 and stopping the trace seems to recover the debug functions above
- SWV is still enabled in the configuration and IOC file
- Printf is still called but the ITM_PutChar is commented out
