Difference: WatchDog (1 vs. 2)

Revision 22021-12-25 - PeterSchmid

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
%DASHBOARD{ section="banner"
Line: 6 to 6
  title="Watchdog" titlestyle="color:#F00000;" }%
Changed:
<
<
Intro
>
>
Intro
 For serious real time systems you need a watchdog to detect and recover from malfunctions e.g. deadlocks. STM32 MCUs have two of them: independent watchdog (IWDG) and window watchdog (WWDG). I prefer the WWDG because it has a time window (as the name implies) and an interrupt just before the watchdog is going to bite. Window means that the feeding time has to be in a time window (interval), to feed to early is harmful too. The early wakeup interrupt can be used to bring the system into a save state or log something before the CPU is going into reset.
Changed:
<
<
I create a thread only to kicking (regularly feed) the watchdog. This thread has the second lowest priority (just higher than the idle thread), if any task does not want to give up control, the watchdog thread does not get any more CPU time and cannot feed the watchdog and the watchdog bites.
>
>
There is a thread only for kicking (regularly feed) the watchdog. This thread has the second lowest priority (just higher than the idle thread), if any task does not want to give up control, the watchdog thread does not get any more CPU time and cannot feed the watchdog and the watchdog will bite after the timeout.
 
Changed:
<
<
Contents
>
>
Contents
 

Revision 12021-12-25 - PeterSchmid

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="WebHome"
Watchdog
Intro
For serious real time systems you need a watchdog to detect and recover from malfunctions e.g. deadlocks. STM32 MCUs have two of them: independent watchdog (IWDG) and window watchdog (WWDG). I prefer the WWDG because it has a time window (as the name implies) and an interrupt just before the watchdog is going to bite. Window means that the feeding time has to be in a time window (interval), to feed to early is harmful too. The early wakeup interrupt can be used to bring the system into a save state or log something before the CPU is going into reset.

I create a thread only to kicking (regularly feed) the watchdog. This thread has the second lowest priority (just higher than the idle thread), if any task does not want to give up control, the watchdog thread does not get any more CPU time and cannot feed the watchdog and the watchdog bites.

How to use

How to Create a Thread

-- Peter Schmid - 2021-12-25

Creative Commons License
This work by Peter Schmid is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback