I have set the Independent Watchdog Timer of STM32L152 to a reset period of 28 seconds but it resets MCU in a small fraction of a second. My code is in below:
IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable); IWDG_SetPrescaler(IWDG_Prescaler_256); IWDG_SetReload(0xFFF); IWDG_Enable();
In datasheet it says that IWDT operates with 37KHz clock, so with a prescalar of 256 the reset time should be: 0xFFF/(37000/256)=28 seconds
I did a mistake, above code is okay, it works as predicted.