From 7081440eff3bcb963112385f3e3d4ca9ff2a3dd2 Mon Sep 17 00:00:00 2001 From: Ian Martin Date: Fri, 25 Apr 2014 16:22:43 -0400 Subject: [PATCH] CC2538: Add WATCHDOG_CONF_ENABLE to optionally disable the watchdog timer. --- cpu/cc2538/dev/watchdog.c | 1 + platform/cc2538dk/contiki-conf.h | 10 ++++++++++ platform/cc2538dk/contiki-main.c | 2 ++ 3 files changed, 13 insertions(+) diff --git a/cpu/cc2538/dev/watchdog.c b/cpu/cc2538/dev/watchdog.c index 7d446e74e..985f0f633 100644 --- a/cpu/cc2538/dev/watchdog.c +++ b/cpu/cc2538/dev/watchdog.c @@ -87,6 +87,7 @@ void watchdog_reboot(void) { INTERRUPTS_DISABLE(); + watchdog_start(); /* just in case the WDT hasn't been started yet */ while(1); } /** diff --git a/platform/cc2538dk/contiki-conf.h b/platform/cc2538dk/contiki-conf.h index 2d87e222c..018f0ccb3 100644 --- a/platform/cc2538dk/contiki-conf.h +++ b/platform/cc2538dk/contiki-conf.h @@ -50,6 +50,16 @@ typedef uint32_t rtimer_clock_t; #endif /** @} */ /*---------------------------------------------------------------------------*/ +/** + * \name Watchdog Timer configuration + * + * @{ + */ +#ifndef WATCHDOG_CONF_ENABLE +#define WATCHDOG_CONF_ENABLE 1 /**