Getting started with WDG

Revision as of 11:25, 15 November 2022 by Registered User
Under construction.png Coming soon

This article explains what WDOG is and how to use it through examples

1. Introduction of WDOG

WDOG stands for Watch DOG. The main goal of this IP is to detect and resolve malfunctions due to software failures. The principle is to refresh periodically the WDG, if the timer isn't refreshed, a system reset is generated. Also, the WDG act as a protection because it avoid to stay stuck in a particular stage of processing that it performs. The configuration using option bytes can launch the WDG by hardware or software. Once start, it cannot be disabled.

2. WDOG type

There are two types of WDOG :

2.1. WWDG : Window WatchDoG

  • WWDG is clocked by the APB1 peripheral clock.

Application benefits :

2.2. IWDG : Independent WatchDoG

Application benefits : One of the main benefits for applications is its ability to run independently from the main clock. This is possible thanks to a 32kHz low speed internal RC oscillator (LSI) which clocked the IWDG. And the IWDG counter can be frozen during Standby or Stop mode.

3. Configure WWDOG with LED indication

3.1. Definition

3.2. Objective

  • In this project, you will learn how to setup WWDG in STM32CubeIDE
  • How to Generate Code in STM32CubeIDE and use HAL functions
  • Create simple application to test WWDG

3.3. How

  • Configure WWDG in STM32CubeIDE and Generate Code
  • Learn how to activate and refresh WWDG
  • Add into the project the HAL_Delay function and HAL_GPIO_Toggle function
  • Verify the correct functionality on toggling LED

3.4. Create the project in CSTM32ubeIDE

4. Configure IWDOG with LED indication

4.1. Objective

  • In this project, you will learn how to setup IWDG in STM32CubeIDE
  • How to Generate Code in STM32CubeIDE and use HAL functions
  • Create simple application to test IWDG

4.2. How

  • Configure IWDG in STM32CubeIDE and Generate Code
  • Learn how to activate and refresh IWDG
  • Add into the project the HAL_Delay function and HAL_GPIO_Toggle function
  • Verify the correct functionality on toggling LED

4.3. Create the project in CSTM32ubeIDE

5. Conclusion

Keep in mind this :



[[category:Getting_started_with_STM32_system_peripherals | 15]]