cancel
Showing results for 
Search instead for 
Did you mean: 

Very Long Reset with NVIC_SystemReset();

MPoul.2
Associate II

Hello,

I work on a project using SPI to communicate Data acquired and processed with Motion FX. When an incomming signal is received, i want to reset my STM32 MCU with a software reset. However, when i do so using NVIC_SystemReset(), the spi communication can't be turned on before at least 15-20 seconds have passed. Would you know why does it behave this way?

Thank you for your help

14 REPLIES 14
Erasing flash takes a while. A full chip erase takes 15-20 seconds. Perhaps the call to HAL_FLASHEx_Erase is taking this long.
If you feel a post has answered your question, please click "Accept as Solution".

I understand what you mean but here i erase at most one page ( I only store up to 32 bytes). I remember having the same issue with a renesas chip, after reseting, the uart or bluetooth would take a long time to work again, (20 seconds again). However the program would still work in background...

ONadr.1
Senior III

When you have free IO pin, you can define it as output with open colecter, set begin level to Hi, and wired it to reset pin. Then you can do HW reset by set this pin to Low. You can see, if this kind of reset behave the same way as reset core or differently.

Thanks, I will try it.

Shirley.Ye
ST Employee

The NVIC_SystemReset is very short, you can toggle a gpio to check the delay before NVIC_SystemReset and at the first line of main().