cancel
Showing results for 
Search instead for 
Did you mean: 

RESET PROBLEMS WITH STM32G474RET6

AlexHalf
Associate III

Hello

I am new with using STM MCU's (STM32G474RET6) and encounter very strange reset behavior.

In my application reset of the MCU can be done in 3 different ways. 

1. Hardware reset - by pressing on button.

2. Software reset - by executing NVIC_SystemReset() function.

3. By swapping from bank 2 to bank 1 in dual bank mode.

Currently I have problem only at bank's 2 image (reset of image burned to bank 1 done good in all 3 mentioned ways).

Also, the reset problem seems to be somehow depended on firmware (bank 2 image) compilations. Sometimes after compilation (with even minor changes in firmware) it is working fine.  

The problem is that after performing reset (by example pressing on button) MCU seems to be stacked or doing something and not enters even a main (while 1) loop where I am toggling indication led for test. I must press again - second time on the reset button in order to release an MCU.

'Debug As' function not working - it fails on execute MI command.

Any idea what the problem can be and how I can debug it.

Thank you very much.

 

Alex

1 ACCEPTED SOLUTION

Accepted Solutions
AlexHalf
Associate III

I think I found the problem. 

The nSWBOOT0 in options byte was checked and as I am not using boot0 pin (PB8) MCU wasn't booting from flash.

Now I rechecked this bit and currently reset sequence seems to be fine.

Alex

View solution in original post

1 REPLY 1
AlexHalf
Associate III

I think I found the problem. 

The nSWBOOT0 in options byte was checked and as I am not using boot0 pin (PB8) MCU wasn't booting from flash.

Now I rechecked this bit and currently reset sequence seems to be fine.

Alex