2015-07-30 01:33 PM
I have the following issue with the IWDG:
I initialized the IWDG with the sequence IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable); IWDG_SetPrescaler(IWDG_Prescaler_32); IWDG_SetReload(0x0FF0); IWDG_ReloadCounter(); IWDG_Enable(); which will cause a timeout after 4 seconds, and then I reset the counter periodically with IWDG_ReloadCounter(); which writes 0xAAAA to the key register. However, the watchdog always resets the system after 4 seconds, as if the call to IWDG_ReloadCounter() never took place (the debugger tells otherwise). What could be the issue?2015-07-30 05:20 PM
And what if you do it outside the debugger, sending a character out a USART each time immediately after you call IWDG_ReloadCounter();
2015-07-30 05:53 PM
The watchdog also resets if I do not run the program with the debugger. It is old code, which I ported to the STM32F407, and there the watchdog timer (different code obviously) never resets, though it is a 1.6s timeout.