Skip to main content
Senior III
Nov 2, 2026 2:12 PM UTC
Solved

Reset does not happen after flashing

In one of my hardware i am facing the following intermittent behavior, after flashing using debugger, the control does not come to the starting point after main (Hal_init() function), it gets stuck up in assembly code, there is a micro reset button in STM32Cube Ide in debugging mode, when i click that it comes to the starting point after main. Once i remove the debugger and start testing, similar behavior is observed when i do power on and off, sometimes the code executes normally but sometimes the code does not reset, i need to do several power on / off sequences. Is it software or hardware problem? How do i correct it?

STuser2Best answer
Senior III
Nov 3, 2026 10:12 AM UTC

Yes i have set the values  

nSWBOOT0 - Unchecked 
nBOOT0 - Checked

 

8 replies

mƎALLEm
ST Technical Moderator
Nov 2, 2026 2:17 PM UTC

Hello,

In one of my hardware

What do you mean by that? you have several boards with the same hardware but you have an issue with only one bord?

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
STuser2Author
Senior III
Nov 2, 2026 2:30 PM UTC

Sorry no i have only one board, i was saying i used ST hardware before but i have never faced such issue.

TDK
Nov 2, 2026 2:33 PM UTC

It sounds like your BOOT0 pin is floating. It should be pulled down to execute user code. See AN2606 for details.

A screenshot of when it’s “stuck in assembly code” would confirm. Or a schematic.

"If you feel a post has answered your question, please click ""Accept as Solution""."
STuser2Author
Senior III
Nov 2, 2026 2:48 PM UTC

I have configured the boot pin PB8 as output, i have to update option bytes i suppose, what should i write into option bytes, which tool i have to use?   

 

Senior
Nov 3, 2026 9:25 AM UTC

Use STCubeProgrammer to set opiton Bytes 

STuser2AuthorBest answer
Senior III
Nov 3, 2026 10:12 AM UTC

Yes i have set the values  

nSWBOOT0 - Unchecked 
nBOOT0 - Checked

 

Shirley.Ye
ST Employee
Nov 3, 2026 9:10 AM UTC

when you say “ it gets stuck up in assembly code”, could you please check if the assembly code address and function? which function hangs?   

STuser2Author
Senior III
Nov 3, 2026 9:53 AM UTC

I handed over the hardware to the customer for testing, the issue reported, once i receive it i can update after testing.