From 9e7a4bdd535cc04589bf904c9af9404f9a8b1720 Mon Sep 17 00:00:00 2001 From: andreaskoepke Date: Wed, 24 Jan 2007 19:40:27 +0000 Subject: [PATCH] looks like Cory's continous DcoCalib fix also fixes our problem --- tos/chips/tda5250/mac/CsmaMacC.nc | 3 --- tos/chips/tda5250/mac/CsmaMacP.nc | 6 ------ tos/chips/tda5250/mac/RedMacC.nc | 10 ++++------ tos/chips/tda5250/mac/RedMacP.nc | 17 ++--------------- 4 files changed, 6 insertions(+), 30 deletions(-) diff --git a/tos/chips/tda5250/mac/CsmaMacC.nc b/tos/chips/tda5250/mac/CsmaMacC.nc index 7445c712..499f3b78 100644 --- a/tos/chips/tda5250/mac/CsmaMacC.nc +++ b/tos/chips/tda5250/mac/CsmaMacC.nc @@ -59,7 +59,6 @@ implementation { RssiFixedThresholdCMC as Cca, new Alarm32khz16C() as Timer, new TimerMilliC() as ReRxTimer, - McuSleepC, RandomLfsrC #ifdef MAC_DEBUG ,PlatformLedsC @@ -67,8 +66,6 @@ implementation { ; MainC.SoftwareInit -> CsmaMacP; - - McuSleepC.McuPowerOverride -> CsmaMacP; SplitControl = CsmaMacP; diff --git a/tos/chips/tda5250/mac/CsmaMacP.nc b/tos/chips/tda5250/mac/CsmaMacP.nc index 28de9141..495837b9 100644 --- a/tos/chips/tda5250/mac/CsmaMacP.nc +++ b/tos/chips/tda5250/mac/CsmaMacP.nc @@ -50,7 +50,6 @@ module CsmaMacP { interface MacSend; interface MacReceive; interface Packet; - interface McuPowerOverride; } uses { interface StdControl as CcaStdControl; @@ -1012,11 +1011,6 @@ implementation // we don't care about urgent Resource requestes async event void RadioResourceRequested.immediateRequested() {} - - /** prevent MCU from going into a too low power mode */ - async command mcu_power_t McuPowerOverride.lowestState() { - return MSP430_POWER_LPM1; - } } diff --git a/tos/chips/tda5250/mac/RedMacC.nc b/tos/chips/tda5250/mac/RedMacC.nc index f3beede0..0a03aa56 100644 --- a/tos/chips/tda5250/mac/RedMacC.nc +++ b/tos/chips/tda5250/mac/RedMacC.nc @@ -57,11 +57,10 @@ implementation { components MainC, RedMacP, RssiFixedThresholdCMC as Cca, - new Alarm32khzC() as Timer, - new Alarm32khzC() as SampleTimer, + new Alarm32khz16C() as Timer, + new Alarm32khz16C() as SampleTimer, RandomLfsrC, - McuSleepC, - Counter32khzC; + Counter32khz16C as Counter; components ActiveMessageAddressC; RedMacP.amAddress -> ActiveMessageAddressC; @@ -69,7 +68,6 @@ implementation { MainC.SoftwareInit -> RedMacP; SplitControl = RedMacP; - McuSleepC.McuPowerOverride -> RedMacP; MacSend = RedMacP; MacReceive = RedMacP; Tda5250Control = RedMacP; @@ -95,7 +93,7 @@ implementation { RedMacP.Timer -> Timer; RedMacP.SampleTimer -> SampleTimer; - RedMacP.Counter32khz16 -> Counter32khzC.Counter32khz16; + RedMacP.Counter32khz16 -> Counter; /* components PlatformLedsC; RedMacP.Led0 -> PlatformLedsC.Led0; diff --git a/tos/chips/tda5250/mac/RedMacP.nc b/tos/chips/tda5250/mac/RedMacP.nc index 1a8600f7..8d31b8de 100644 --- a/tos/chips/tda5250/mac/RedMacP.nc +++ b/tos/chips/tda5250/mac/RedMacP.nc @@ -51,7 +51,6 @@ module RedMacP { interface SleepTime; interface Teamgeist; interface ChannelCongestion; - interface McuPowerOverride; } uses { interface StdControl as CcaStdControl; @@ -194,8 +193,8 @@ implementation SUB_FOOTER_TIME=2*BYTE_TIME, // 2 bytes crc 38400 kBit/s with 4b6b encoding MAX_TIME_VALUE=0xFFFFFFFF, MAXTIMERVALUE=0xFFFF, // helps to compute backoff - //DEFAULT_SLEEP_TIME=3250, - DEFAULT_SLEEP_TIME=6500, + DEFAULT_SLEEP_TIME=3250, + // DEFAULT_SLEEP_TIME=6500, // DEFAULT_SLEEP_TIME=9750, DATA_DETECT_TIME=17, RX_SETUP_TIME=111, // time to set up receiver @@ -1313,17 +1312,5 @@ implementation async event void RadioModes.TimerModeDone() {} async event void RadioModes.SelfPollingModeDone() {} async event void RadioModes.PWDDDInterrupt() {} - - /** prevent MCU from going into a too low power mode */ - async command mcu_power_t McuPowerOverride.lowestState() { - mcu_power_t mp; - if(macState != SLEEP) { - mp = MSP430_POWER_LPM1; - } - else { - mp = MSP430_POWER_LPM3; - } - return mp; - } } -- 2.39.2