This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Reset problem with stm32f4

Hello,

My board consists of stm32f427 and I have a strange problem.
Calling NVIC_SystemReset() causes CPU to hang. This happens only on some boards.

I could overcome the problem in one of the following:

  1. Add a HAL_Delay(100) before calling NVIC_SystemReset()
  2. Change code in NVIC_SystemReset() as follows:
       SCB->AIRCR = ((0x5FA << SCB_AIRCR_VECTKEY_Pos) |
                                 (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) |
                                 SCB_AIRCR_SYSRESETREQ_Msk
    |
                                 SCB_AIRCR_VECTCLRACTIVE_Msk | SCB_AIRCR_VECTRESET_Msk)
     
     These 2 additional bits cause CPU to reset, although they are meant to be used only for debug 
  3.  Of course system will reset if I use the IWDG.

I read in forums that others encountered this problem but in my case it looks different:

  • NRST pin has a pulldown 0.1uF.  NRST is not pulled up. As shown below in figure
  • BOOT0 is connected to ground. 

Could anyone please explain:
Why NVIC_SystemReset() does not work on some boards?
How solutions 1 and 2 bypass the problem?

Thank you,

Ari