Showing results for 
Search instead for 
Did you mean: 

How can I check how IWDG works?


Good afternoon.To control the maintenance of the temperature regime in the information display unit, we use a board with the STM32F05R8 controller. To improve the reliability of work, we have included the IWDG module in the program. We used the standard recommendations from ST, including the following functions in the program: / * Check if the system has resumed from IWDG reset */


/* Configure the IWDG */


/* Refresh IWDG down-counter to default v*/


But we have a problem. After enabling these functions, the controller restarts after the start, and the program does not perform a standard time cycle. But if you remove the WDG_SW attribute in the programmer (STM32CubeProgrammer), program Option bytes, then return the WDG_SW attribute and program Option bytes again, the problem disappears and the device begins to correctly execute the program cycle. We can't figure out which WDG we are using Hardware watchdog or Software watchdog. How can I check how IWDG works?

Sincerely, Alexander.

Associate III


I think you should read the reference manual. There are usually two watchdogs, IWDG and WWDG.

I have only used IWDG before and have no experience with WWDG.

As a simple answer from me on how watchdog works,

  • if the watchdog counter not reloaded, the microcontroller will be rebooted
  • the watchdog counter must be reloaded periodically before the counter reaches 0 (or 0x40 for WWDG IIRC)

I am not familiar with the option byte, so I could not comment on that.