32F417, Cube IDE.
I am using the IWDG watchdog in two possible modes.
One is whether it is set to 1.6 secs (this is to emulate an old Maxim watchdog chip I used for many years) and the retriggered from a 1kHz ISR. Obviously this is not the best way to use a wdg but is better than nothing.
The other is retriggered from application code.
Currently I am testing the 1st one.
I have written quite a bit of code around an RTOS and one of the tasks is processing GPS data arriving at 38k on a serial port. If the wdg is enabled, this task gets stuck, but very rarely. Sometimes in minutes, but usually it runs for some hours. A know a part of this task is still running because it is flashing an LED indicating incoming data. The rest of the task is somehow not running properly, but it is hard to debug because as soon as a breakpoint is hit, the wdog resets the CPU (after 1.6 secs).
After days of messing around, I am speculating that somehow the iwdg is messing with some other CPU feature, perhaps one of the timers. My code uses a lot of timers for packet timeouts, for example.
Putting this in (in the code generated by the ST code generator) makes it work fine, by skipping the iwdg setup
The reload code is this
Has anyone got any bright ideas on how to debug this?
Are there any known issues with the IWDG?
What I could try is to use the IWDG properly and put code in the right places in my RTOS task to retrigger the watchdog
But that will just hide the problem, which will manifest itself by periodic restarts.