Hello everyone, I have some issues with the watchdogs and possibly the scheduling of the kernel.
I am not sure if this is a bug, or if I am miss-using something... I am working on an STM32F427, and I am using the independent watchdog timer. I have enabled the watchdog automonitor using a timer (WATCHDOG_AUTOMONITOR_BY_TIMER). Generally it works correctly. At one point in my application, there are some writes to the MCU Flash memory. There are multiple calls (5-6) to the write functions, so writing all these data takes quite some time. During these writes, the hardware watchdog (IWDG) expires, and restarts the system. As far as I can tell the kernel watchdog (timer) never fires. So, the auto-monitor stops working. This seems a bit odd to me, for two reasons: 1. I couldn't find anywhere in the progmem driver anything that disables interrupts. I think that the kernel should tick properly during the Flash writes. 2. Even if for some reason the kernel is locked during the write, I would expect a reschedule when the write finishes. As said, there are 5-6 calls, so between these calls shouldn't the kernel check for other tasks ready to run? And of course check for any watchdogs ready to run and thus also run the auto-monitor? Do I understand anything wrong? In any case, what is the proper way to overcome this issue? Thank you!