Skip to main content
Vlaty.1
Associate III
August 9, 2021
Question

How can I check how IWDG works?

  • August 9, 2021
  • 1 reply
  • 1355 views

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 */

Check_IWDG_Reset();

/* Configure the IWDG */

Configure_IWDG();

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

LL_IWDG_ReloadCounter(IWDG);

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.

This topic has been closed for replies.

1 reply

AbidSulaiman
Associate II
August 9, 2021

Hi,

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.

Regards