cancel
Showing results for 
Search instead for 
Did you mean: 

STM32g491KE MCU does not reset in debug mode

TMark.14
Associate III

STM32g491KE MCU does not reset in debug mode, debug session hung up right after I press Restart button.

CubeIDE 1.6.0 generated project

Segger J-Trace Pro using SWD interface

4 REPLIES 4

Anything else on the board driving the NRST pin?

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

NRST is pulled up with 4.7k resistor. Also it is connected to RESET input for PCAL6408 gpio expander, so that when MCU is reset the expander is reset too.

I also have the same setup with NRST with G473 MCU but without io expander, no problems there. Except sometimes in debug mode MCU boots up into hardfault but then I would reset it and it would start from main normally. Never had an issue with starting the firmware on actual system.

Having oscilloscope probe on the NRST I did not notice anything, the line stayed high.

Also If I have global variable that I increment in for(;;) loop, in Live Expression I can see that the variable is incrementing and not resetting. So I don't think there might be any problems with reset line.

TDK
Guru

What does "hung up" mean?

When "it boots up into hard fault", what is the source of the hard fault?

If you feel a post has answered your question, please click "Accept as Solution".
TMark.14
Associate III

ok, my bad, the boot pin is used for I2C so that is is pulled high, that is why the program did not want to start after bootup.

After modifying option bits to bootup from flash disregarding boot pin the reset function works fine.

Hung up meant that the debugger would be unresponsive, would not want o continue or exit debugging.

Anyway, we can close this question