2026-03-26 4:06 AM - edited 2026-03-26 4:37 AM
What could be the reason that configuring in CubeIDE SWV as enabled the MCU on debug flashes and stops responding? Flashing works fine both ways, SWO is connected.
Time elapsed during verifying operation: 00:00:00.082
Download verified successfully
Target is not responding, retrying...
Shutting down...
Failed to read registers from target
Error: Failed to set breakpoint at address: 0x80005c0.
Error: Failed to set more breakpoints
Failed to read all registers from target
External target MCU is STM32L412. STLink is upgraded to the latest version.
Since flashing works, SWD is connected properly.
MCU is configured as trace asynchronous Sw and there are no reconfiguration of SWD pins.
Solved! Go to Solution.
2026-03-26 6:23 AM
The STLink receives power from 5V USB and the target from a power supply. Grounds are connected and flashing the target works with or without power sense pin.
Just now tested with L0538-DISCO and external printf works. CubeProgrammer correctly sees 3.3V line, meaning the STLink mcu on nucleo (F1 series chip) is partially damaged, as it can debug the internal L4 mcu correctly with ITM, but can't do external mcu ITM debugging (not sure why would that even work, as the SWD lines trace to the same pins). At least it semi works...
2026-03-26 5:21 AM
As detailed in your other post, this may be related to using CN5 pin 1 as power. You should provide power through some other means.
Solved: NUCLEO L4 ST-LINK flashing external board - STMicroelectronics Community
2026-03-26 6:23 AM
The STLink receives power from 5V USB and the target from a power supply. Grounds are connected and flashing the target works with or without power sense pin.
Just now tested with L0538-DISCO and external printf works. CubeProgrammer correctly sees 3.3V line, meaning the STLink mcu on nucleo (F1 series chip) is partially damaged, as it can debug the internal L4 mcu correctly with ITM, but can't do external mcu ITM debugging (not sure why would that even work, as the SWD lines trace to the same pins). At least it semi works...