Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW
Diff: Watchdog.h
- Revision:
- 62:4b59c1eb429f
- Parent:
- 40:1324da35afd4
- Child:
- 63:4820a4460f00
diff -r 42cbfc02e0e0 -r 4b59c1eb429f Watchdog.h
--- a/Watchdog.h Sat Nov 22 02:35:11 2014 +0000
+++ b/Watchdog.h Thu Nov 27 03:12:32 2014 +0000
@@ -3,6 +3,8 @@
#define WDFAILSAFE (1200u)
+//#define DEBUG
+
// Adapted from Simon's Watchdog code from
// http://mbed.org/forum/mbed/topic/508/
namespace Watchdog {
@@ -18,6 +20,9 @@
// Load timeout value in watchdog timer and enable
inline
void kick(const float s) {
+#ifdef DEBUG
+ printf("WDkick s=[%g] \r\n",s);
+#endif
LPC_WDT->WDCLKSEL = 0x1; // Set CLK src to PCLK
// WD has a fixed /4 prescaler, PCLK default is /4
static const float clk = static_cast<float>(SystemCoreClock / 16);