System Management code
Dependencies: mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP
Fork of SystemManagement by
Revision 9:ada056631cac, committed 2014-10-16
- Comitter:
- martydd3
- Date:
- Thu Oct 16 15:13:49 2014 +0000
- Parent:
- 8:ecf68db484af
- Child:
- 10:db13782f05d9
- Commit message:
- Imported team watchdog timer
Changed in this revision
--- a/SysMngmt.cpp Fri Oct 10 21:46:52 2014 +0000 +++ b/SysMngmt.cpp Thu Oct 16 15:13:49 2014 +0000 @@ -15,7 +15,7 @@ #include "mbed.h" #include "rtos.h" -#include "Watchdog.cpp" +#include "Watchdog.h" #include "FanPump.h" #include "DC_DC.h" #include "PollSwitch.h"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Watchdog.lib Thu Oct 16 15:13:49 2014 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/teams/Penn-Electric-Racing/code/Watchdog/#80edf726eb04
--- a/Watchdog/Watchdog.cpp Fri Oct 10 21:46:52 2014 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-// Simon's Watchdog code from
-// http://mbed.org/forum/mbed/topic/508/
-
-#include "mbed.h"
-
-class Watchdog {
-public:
-// Load timeout value in watchdog timer and enable
- void kick(float s) {
- LPC_WDT->WDCLKSEL = 0x1; // Set CLK src to PCLK
- uint32_t clk = SystemCoreClock / 16; // WD has a fixed /4 prescaler, PCLK default is /4
- LPC_WDT->WDTC = s * (float)clk;
- LPC_WDT->WDMOD = 0x3; // Enabled and Reset
- kick();
- }
-// "kick" or "feed" the dog - reset the watchdog timer
-// by writing this required bit pattern
- void kick() {
- LPC_WDT->WDFEED = 0xAA;
- LPC_WDT->WDFEED = 0x55;
- }
-};
\ No newline at end of file
