2019-09-09 01:41 PM
Hi,
Looks like I cannot get the wd over a ~22 seconds watch time .
I would like the watchdog to bark every 60 seconds or more.
The 303 header file specify the reload max 0xFFF and as well the window,
though they are 32bit values .
Also the max prescaler is IWDG_PRESCALER_256.
How do I get over 24 seconds barrier. I tought that this would work.
extern SystemCoreClock // is 80Mhz
Prescaller = 256.
Seconds = 60;
then
uint32_t reload = seconds * (SystemCoreClock / 256);
hiwdg.Instance = IWDG;
hiwdg.Init.Window = reload-1;
hiwdg.Init.Prescaler = IWDG_PRESCALER_256;
hiwdg.Init.Reload = reload;
2019-09-09 02:48 PM
Watchdog count is only 12-bit, the variable is likely 32-bit to keep the ARM alignment straight.
Thought the IWDG clocking from the 40 KHz, not the SystemClock, so maximal about 26 seconds