Skip to main content
Visitor II
February 1, 2022
Question

NRST reset

  • February 1, 2022
  • 2 replies
  • 1074 views

i am using nucleo-f429zzi. there is reset button (B2) is connected to NRST in mcu. Is it possible to use program to detect this button is clicked? Actually, I would like to stop some digital i/o when user presses this button to reset the system. It is better to use interrupt, anybody knows any method to do it?

    This topic has been closed for replies.

    2 replies

    Graduate II
    February 1, 2022

    It basically a non-maskable interrupt that resets the chip. You can't read the state of the pin, or out-run the signal to do anything.

    It is not a GPIO, and isn't connected via the EXTI system.

    NRST is considered bidirectional, the core can generate this, say via a Watchdog, or voltage threshold for brown-out conditions, or you can pull it low externally.

    You should NOT drive it high externally with a push-pull driver, as this will prevent it resetting properly.

    Super User
    February 1, 2022

    NRST is a dedicated pin, which cannot be reasssigned. So, pulling it low will immediately reset. But, after the MCU reboots, you can check the reset reason in the RCC_CSR register and execute some specific code if you detect a pin reset.

    Alternatively, you may program the blue user button for EXTI interrupt and execute a software reset at the end of the interrupt handler.

    hth

    KnarfB