cancel
Showing results for 
Search instead for 
Did you mean: 

MCU goes to STANDBY after bootup - how to program it again?

JPetr.2
Associate II

Hello,

I was trying to configure Internal Wakeup Timer to wake up the STM32L062K8Ux MCU from standby.

I did a mistake (really dumb one) and I dit not placed any delay into the code so after bootup the MCU goes directly into standby mode. Because there is no delay, I do not have any time to connect the programmer again and change the code. In the standby mode the SWD interface seems to be disconnected.

When I was programming the MCU via STM32 Cube Programmer I used the Software reset mode only. The Hardware reset mode is not working in my case. (I do not know why)

Is there are way how to connect and reprogram the MCU please? Or it is unfixible and I need to replace it?

Also, I still does not understand why the code is not working. Could you also give a hint what is wrong there please?

Thanks in advance!

Jiri

4 REPLIES 4

Select Connect Under Reset with NRST wired, or strap BOOT0 HIGH​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
JPetr.2
Associate II

Thank you for quick answer.

I'm using the Cube Programmer v2.5.0 and ST Link V3. The NRST is wired but the connect under reset never worked in my case. I was using the Mode - Normal which was functional

When Mode - Under reset is selected, I see that NRST is pulled down, but I still get Error: No STM32 target found! I know that the wiring is ok because the MCU reboots - the NRST pin wake up the MCU, it sends me a message via UART but then it goes back to standby.

B00T0 is tied to GND on PCB. It is not accessible.

TDK
Guru

Maybe the chip is shutting down the debug port since it goes to standby so quickly. Possibly holding NRST low will also get you connected in some combination of normal/hot plug/connect under reset settings.

If that doesn't work, I would look at getting BOOT0 pulled up. I know you said it's not accessible, but typically where there's a will, there's a way.

If you feel a post has answered your question, please click "Accept as Solution".
JPetr.2
Associate II

I have found this issue: https://community.st.com/s/question/0D50X0000BIzI00SQF/stlink-v3-is-not-working-with-connect-under-reset

I switched from ST Link V3 to ST Link V2 and with this debugger the connection under reset works and I can change the SW. Thank you for your help anyway. I started to worry that I will need to really cut to the board to pull BOOT0 high.