At startup, I set the watchdog timer to 8 seconds.IWDG->KR = IWDG_KEY_ENABLE;
IWDG->KR = IWDG_KEY_WRITE_ACCESS_ENABLE;
IWDG->PR = IWDG_PRESCALER_64; // 8 s
IWDG->KR = IWDG_KEY_WRITE_ACCESS_DISABLE;Further, in the interrupt, when the button is pressed...