Skip to main content
Peter Gibbons
Associate II
Mar 1, 2019 4:58 PM UTC
Solved

HAL_NVIC_SystemReset() gets stuck, same with IWDG.

Hi. When I call HAL_NVIC_SystemReset(); or NVIC_SystemReset(); the system just freezes up instead of restarting. I figured forget about it and moved on to try out the watchdog, well the same thing happens. Watchdog is enabled and working fine, then I enter an infinite loop to try it and after it times out the whole chip gets stuck.

I don't know why this is :(

    This topic has been closed for replies.
    Tesla DeLorean
    Tesla DeLoreanBest answer
    Guru
    Mar 3, 2019 11:29 PM UTC

    Technically it is running the code in ROM rather than yours.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..

    4 replies

    Tesla DeLorean
    Guru
    Mar 1, 2019 7:51 PM UTC

    >>I don't know why this is

    You're actively driving NRST high externally with a push-pull driver?

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Peter Gibbons
    Associate II
    Mar 2, 2019 2:22 AM UTC

    I think what it was was BOOT0 was left floating on this particular board. I will verify and post my findings.

    Peter Gibbons
    Associate II
    Mar 3, 2019 10:25 PM UTC

    I can confirm that's what it was. If BOOT0/PH3 is tied high, then the system freezes up after the reset. If I tie it low, then the reset works perfectly fine, should have read the manual.

    Tesla DeLorean
    Tesla DeLoreanBest answer
    Guru
    Mar 3, 2019 11:29 PM UTC

    Technically it is running the code in ROM rather than yours.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..