X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=apps%2FIPBaseStation%2FReset.h;h=0cebfde42a742c41ea492d39a983f1d2111ff459;hb=391a8bf5861d4ee6074ad09164651abe4dc06671;hp=59951ef3da739e95f66337177852517a69e56bee;hpb=a29780e6ea58dcba37fe982931b23021003a16d4;p=tinyos-2.x.git diff --git a/apps/IPBaseStation/Reset.h b/apps/IPBaseStation/Reset.h index 59951ef3..0cebfde4 100644 --- a/apps/IPBaseStation/Reset.h +++ b/apps/IPBaseStation/Reset.h @@ -44,14 +44,23 @@ void resetMote() { -#if defined(PLATFORM_MICA) || defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT) || defined(PLATFORM_MICAZ) +#if defined(PLATFORM_MICA) || defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT) || defined(PLATFORM_MICAZ) || defined(PLATFORM_IRIS) cli(); wdt_enable(0); while (1) { __asm__ __volatile__("nop" "\n\t" ::); } -#elif defined(PLATFORM_TELOS) || defined(PLATFORM_TELOSB) || defined(PLATFORM_EPIC) +#elif defined(PLATFORM_TELOS) || defined(PLATFORM_TELOSB) || defined(PLATFORM_EPIC) || defined(PLATFORM_SHIMMER) || defined(PLATFORM_SHIMMER2) || defined(PLATFORM_SPAN) WDTCTL = 0; +#elif defined(PLATFORM_MULLE) + PRCR.BIT.PRC0 = 1; // Turn off protection on CM registers. + PRCR.BIT.PRC1 = 1; // Turn off protection on PM registers. + CM0.BIT.CM0_6 = 1; + PM1.BIT.PM1_2 = 1; // Reset on WDT underflow. + WDTS = 1; // Start watchdog timer. + PRCR.BIT.PRC0 = 0; // Turn on protection on CM registers. + PRCR.BIT.PRC1 = 0; // Turn on protection on PM registers. + while (1); // Wait for underflow in the watchdog timer. #else #error "Reset.h not defined/supported for your platform, aborting..." #endif