]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/McuSleepC.nc
update to new debug if
[tinyos-2.x.git] / tos / chips / msp430 / McuSleepC.nc
index 369737c85e7533cebc1ca6c8ae44fd909b3e0724..3d47fc5d1fca9d1d04b017a2709566073024cc97 100644 (file)
@@ -64,7 +64,7 @@ implementation {
   };
     
   mcu_power_t getPowerState() {
-    mcu_power_t pState = MSP430_POWER_LPM3;
+    mcu_power_t pState = MSP430_POWER_LPM4;
     // TimerA, USART0, USART1 check
     if ((((TACCTL0 & CCIE) ||
          (TACCTL1 & CCIE) ||
@@ -114,6 +114,8 @@ implementation {
     }
     temp = msp430PowerBits[powerState] | SR_GIE;
     __asm__ __volatile__( "bis  %0, r2" : : "m" (temp) );
+    // All of memory may change at this point...
+    asm volatile ("" : : : "memory");
     __nesc_disable_interrupt();
   }