cancel
Showing results for 
Search instead for 
Did you mean: 

NVIC_SystemReset() hangs

Lu�s Magalh�es
Associate II

Hi there,

I've been working with a BT module and trying to use one of its pins to set the boot mode of the STM32F746IGT. I've set the pin HIGH and then issue the NVIC_SystemReset(), but nothing happens after that. I have a blue LED that is suppost to light up at the start of the program, and the LED just doesn't light up. Power cycling the module starts it again.

What could be causing the NVIC_SystemReset() to be hanging ?

Best regards,

Luís

6 REPLIES 6

The external NRST pin cannot be driven high via a push-pull driver

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Lu�s Magalh�es
Associate II

So the NRST pin should be left floating ? Won't that lead to some reset events occasionally ?

Tomas DRESLER
Senior II

No, because there is weak pull-up inside STM32. You are allowed only open-drain configuration on pins driving NRST signal, because NVIC_SystemReset and all other internal reset sources rely on NRST going low.

Lu�s Magalh�es
Associate II

Thank you, removing the pull-up resistor made the NVIC_SystemReset() routine to work. One question though: if BOOT0 is low and you set the definitions that if BOOT0 is low, it will go to bootloader mode, issuing a NVIC_SystemReset() will allow you to enter bootloader mode or will it just run the application again ?

I didn't say it needed to float, I said it must not be DRIVEN high, by some external circuitry. ​

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Lu�s Magalh�es
Associate II

Thank you all for the great help. And in case anyone is wondering, you can set the BOOT0 pin to the desired level and if you use NVIC_SystemReset() you will enter the bootloader mode. Great for firmware OTA upgrades.