Kennel
A data acquisition system uses two FreeRTOS tasks: an application task that reads sensors, and a watchdog kicker that feeds the IWDG. The watchdog task is supposed to run at the lowest priority so it only gets CPU time when the application is idle. If the app task ever hangs, the kicker starves and the IWDG resets the MCU automatically.
A colleague wrote the starter code but the watchdog never fires properly. The system either resets unexpectedly or the IWDG registers never get configured. Find and fix all the bugs.
When everything works, the watchdog kicker gets CPU time during each 50ms application delay: every sensor reading line is followed by two WDG:OK lines from the kicker, and after three sensor cycles the run ends with DONE. The print statements are already in the starter code — the bugs are in configuration and task setup.
The IWDG should be configured for approximately 1 second timeout (prescaler /32, reload 1000). The watchdog task must run at lower priority than the application task.