Open danielcompton opened 6 years ago
The Watch Dog Timer in the STM32F205 is only 12 bits with an 8 bit prescaler. See https://www.st.com/resource/en/datasheet/stm32f205rb.pdf
"3.20.4 Independent watchdog The independent watchdog is based on a 12-bit downcounter and 8-bit prescaler. It is clocked from an independent 32 kHz internal RC and as it operates independently from the main clock, "
so
iwdg_init(IWDG_PRE_128, 11500000); // does not make sense
While idwg.h shows:
void iwdg_init(iwdg_prescaler prescaler, uint16 reload)
only the lower 12 bits of the 16-bit reload value are used.
The longest WDT delay is
iwdg_init(IWDG_PRE_256, 0xfff);
This gives a time out of 1/32kHz 256 4095 or about 32.8 seconds.
This is just a tracking issue to follow along for https://forums.adafruit.com/viewtopic.php?f=57&t=114903. As best as I could tell it still hasn't been resolved, although there is a workaround provided of using a watchdog timer to reset the board if it hangs. More info on watchdog timers at http://librambutan.readthedocs.io/en/latest/libmaple/api/iwdg.html.