2026-01-14 4:33 AM
Hello! I am using an STM32U545 and VS Code for programming. I am experiencing the following issue: I am working with STOP mode, and once the MCU enters this state, I can no longer reprogram it. When using STM32CubeIDE, I did not encounter this problem (I believe this is related to the connect-under-reset feature, which VS Code seems to lack when programming).
Is there anything I can do to avoid this issue, other than using STM32CubeProgrammer to erase the memory or adding a delay at the start of the program to give myself time to program the device after a manual reset?
2026-01-14 5:04 AM
@Decebalus wrote:When using STM32CubeIDE, I did not encounter this problem (I believe this is related to the connect-under-reset feature, which VS Code seems to lack when programming).
Indeed: the debug is not accessible during Stop:
via: https://www.st.com/en/microcontrollers-microprocessors/stm32u535cb.html#documentation
Also, it's common to disable the debug pins (to save power) during low-power modes.
So you need to wake-up out of STOP before you can do anything with the debugger. A reset achieves this.
@Decebalus wrote:adding a delay at the start of the program to give myself time to program the device after a manual reset?
That can be useful.
As the above screenshot says, There are also "emulation" options which allow the debug to remain active during low-power modes, but I don't know how you'd access them from VSCode. And, of course, you don't achieve the low power with these enabled!