2026-03-16 6:36 PM - last edited on 2026-03-26 3:48 AM by KDJEM.1
Hi,
I’m using a NUCLEO-144 (STM32H563ZIT6) development board with only the board USB STLINK-V3EC port connected. TRACE and DEBUG are enabled with Serial Wire in the configuration file, and printf is routed through ITM:
int _write(int file, char *ptr, int len) {
for (int i = 0; i < len; i++) {
ITM_SendChar((*ptr++));
}
return len;
}
SWV is enabled in the debug configuration, the core clock is 250 MHz, and the SWV window (port 0) shows output correctly in STM32CubeIDE.
When I switch to an external ST-LINK/V2 and connect
NRST#15 / SWDIO#7 / SWCLK#9 / GND#20 / TARGET VCC#1 / VDD3.3 V#19, programming and debugging work, but the SWV window shows nothing in the STM32CubeIDE.
The reason for using ST-LINK/V2 for SWV debugging is that on our product’s onboard MCU, only VDD, NRST, SWDIO, SWCLK, and GND are exposed.
Could anyone explain why SWV output does not appear with ST-LINK/V2?
Thanks.
Solved! Go to Solution.
2026-03-17 11:51 PM - edited 2026-03-18 12:24 AM
It turns out that the ST-LINK pin short needs to be removed from the power source select jumper JP2 on NUCELO-144. After removing it, the SWV output works correctly when STLINKV/2 SWO is connected to CN12-Pin #31.
2026-03-17 6:18 AM - edited 2026-03-17 6:21 AM
Hi @JuiHung
On the 20‑pin JTAG/SWD header of ST‑LINK/V2, SWO is pin 13. Check user manual.
On nucleo board, SWO should be on the MCU pin mapped to PB3.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2026-03-17 7:33 AM
Have you checked that the onboard ST-Link is disconnected (particularly from SWO) when you're using the external ST-Link ?
2026-03-17 7:04 PM - edited 2026-03-17 7:04 PM
It didn’t disconnect, but I didn’t connect SWO. I will check by connecting it to the board to see if I can get the output.
Thanks.
2026-03-17 7:21 PM - edited 2026-03-17 7:29 PM
Hi FBL,
Thanks for the reply.
I have reconfigured the DEBUG mode from Serial Wire to Trace Asynchronous SW, which enables PB3 and regenerated the code.
I first tested with the USB ST-LINK port on the NUCLEO-144 board, and ITM_SendChar worked via SWV in STM32CubeIDE. Then I switched to ST-LINK/V2 and added an extra connection between Pin #13 on ST-LINK/V2 and PB3 on CN12-Pin #31 or CN7-Pin#15 on Nucleo-144 board, but the SWV output still does not show.
Is there anything I might be missing?
Thanks.
2026-03-17 11:51 PM - edited 2026-03-18 12:24 AM
It turns out that the ST-LINK pin short needs to be removed from the power source select jumper JP2 on NUCELO-144. After removing it, the SWV output works correctly when STLINKV/2 SWO is connected to CN12-Pin #31.
2026-03-18 4:05 AM
@JuiHung wrote:but the SWV output still does not show.
So you need to un-mark that post as the solution - because it does not solve the problem!
Then please mark the solution on the post which did solve it (not this one!)