STM32F4: WWDG interrupt fires as soon as it's enabled
You have to clear both IWDG_SR.EWIF and NVIC pending flag for IWDG interrupt before enabling it:

WWDG-&gt;SR = 0;
NVIC_ClearPendingIRQ(WWDG_IRQn);
NVIC_EnableIRQ(WWDG_IRQn);