2024-09-30 12:24 AM
I have configured the watchdog for the maximum duration possible, i.e, 1.7 sec.
void watchdog_init(void)
{
CLK_ICKCR |= CLK_ICKR_LSION;
IWDG_KR = 0x55;
IWDG_PR = 6;
IWDG_RLR = 0xFF;
IWDG_KR = 0xCC;
}
But it seems to be resetting in around 26 - 28 ms. I have also checked this timing with an oscilloscope by toggling a led.