Skip to main content
Associate III
January 14, 2026
Solved

nucleo's stlink not working while mcu sleeps

  • January 14, 2026
  • 2 replies
  • 206 views

Greetings, 

I know how to solve it , but I do want to reseach on this issue. I use a nucleo's stlink (nucleo F070RB) to program a stm32g030k8tx. 

However, the target is only detected and, therefore programmed, when the external mcu is not on standby mode. 

Could it be becasue I do not use the NRST on the SWD? I just use Software Reset, instead. 

 

Thanks. 

 

 

Best answer by Andrew Neil

As @Peter BENSCH said, the debug (including programming) is not accessible when the CPU is asleep.

See this recent post (for a different STM32, but the principle is the same).

 

AndrewNeil_0-1768406056611.png

https://www.st.com/resource/en/reference_manual/rm0454-stm32g0x0-advanced-armbased-32bit-mcus-stmicroelectronics.pdf#page=973

via: https://www.st.com/en/microcontrollers-microprocessors/stm32g030k8.html#documentation

This is what the 'Debug in low power modes' CubeIDE setting does:

AndrewNeil_2-1768406329237.png

2 replies

Peter BENSCH
Technical Moderator
January 14, 2026

If the target is in sleep mode, it can only be brought out of this state by resetting it. Therefore, NRST must be connected and the debugger must be set to ‘Connect under Reset’.

Regards
/Peter

Andrew Neil
Andrew NeilBest answer
Super User
January 14, 2026

As @Peter BENSCH said, the debug (including programming) is not accessible when the CPU is asleep.

See this recent post (for a different STM32, but the principle is the same).

 

AndrewNeil_0-1768406056611.png

https://www.st.com/resource/en/reference_manual/rm0454-stm32g0x0-advanced-armbased-32bit-mcus-stmicroelectronics.pdf#page=973

via: https://www.st.com/en/microcontrollers-microprocessors/stm32g030k8.html#documentation

This is what the 'Debug in low power modes' CubeIDE setting does:

AndrewNeil_2-1768406329237.png

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.