stm32f4 using NVIC_SystemReset() fails to reset
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-03 5:06 AM
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:
- Add a HAL_Delay(100) before calling NVIC_SystemReset()
- 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
- 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 could the delay of 100 msec or setting system control register bypass the problem?
Thank you,
Ari
- Labels:
-
STM32F4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-03 9:06 AM
Only thing I can guess is if there's some flash operation still ongoing that is affecting things.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-03 9:21 AM
All very odd, don't have an explanation here.
Did you stop something else just prior to doing the reset? Flash Write or Erase? Turn off a PWM?
Is the capacitor really 100nF (0.1uF) and not something much larger?
Up vote any posts that you find helpful, it shows what's working..

- « Previous
-
- 1
- 2
- Next »