X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fchips%2Fmsp430%2FMcuSleepC.nc;h=57c6d393aaefcb522c22cc0738cb56df82d14e24;hb=e9bfab607e051bae6afb47b44892ce37541d1b44;hp=77a638da0a73cbfc1eb532ecffda2080e7a3807f;hpb=ac25baa53ea15fbbd2a322e91a0d4d2cf9525e3c;p=tinyos-2.x.git diff --git a/tos/chips/msp430/McuSleepC.nc b/tos/chips/msp430/McuSleepC.nc index 77a638da..57c6d393 100644 --- a/tos/chips/msp430/McuSleepC.nc +++ b/tos/chips/msp430/McuSleepC.nc @@ -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) || @@ -78,13 +78,13 @@ implementation { #endif #ifdef __MSP430_HAS_I2C__ // registers end in "nr" to prevent nesC race condition detection - || ((U0CTLnr & I2CEN) && (I2CTCTLnr & SSEL1) && + || ((U0CTLnr & I2CEN) && (I2CTCTLnr & SSEL1) && (I2CDCTLnr & I2CBUSY) && (U0CTLnr & SYNC) && (U0CTLnr & I2C)) #endif ) pState = MSP430_POWER_LPM1; -#ifdef __MSP430_HAS_ADC12 +#ifdef __MSP430_HAS_ADC12__ // ADC12 check, pre-condition: pState != MSP430_POWER_ACTIVE if (ADC12CTL0 & ADC12ON){ if (ADC12CTL1 & ADC12SSEL_2){