This provides a basic Watchdog service, and includes a startup detection to determine if the reset was caused by the WD.

Dependents:   A_CANAdapter LeonardoMbos AVC_2012 RT_CAN ... more

Using this Watchdog Class

#include "Watchdog.h"

Watchdog wd;

...
void main() {
   if (wd.WatchdogCausedReset())
       pc.printf("Watchdog caused reset.\r\n");
      
   wd.Configure(3.0);       // sets the timeout interval
   for (;;) {
        wd.Service();       // kick the dog before the timeout
        // do other work
   }
}

Files at this revision

API Documentation at this revision

Comitter:
WiredHome
Date:
Sat Oct 11 17:28:07 2014 +0000
Parent:
3:5959d3d35221
Child:
5:2dad2a78ffbd
Commit message:
Documentation updates only.

Changed in this revision

Watchdog.h Show annotated file Show diff for this revision Revisions of this file
--- a/Watchdog.h	Sat Oct 04 17:58:04 2014 +0000
+++ b/Watchdog.h	Sat Oct 11 17:28:07 2014 +0000
@@ -70,7 +70,7 @@
     ///     ...
     /// @endcode
     ///
-    /// @param timeout in seconds, as a floating point number
+    /// @param[in] timeout in seconds, as a floating point number
     /// @returns none
     ///
     void Configure(float timeout);