From: jwhui Date: Wed, 17 Jan 2007 05:14:18 +0000 (+0000) Subject: Bug fix for problem noted by David Moss. The radio does not switch X-Git-Tag: tinyos/2.0.1~229 X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=commitdiff_plain;h=347d6b32e2b1526b0a88d7bcd06da5d68633918b;p=tinyos-2.x.git Bug fix for problem noted by David Moss. The radio does not switch frequencies until either (i) transmitting a packet or (ii) turning off then on receive mode. The fix is to turn off then on receive mode. --- diff --git a/tos/chips/cc2420/CC2420ControlP.nc b/tos/chips/cc2420/CC2420ControlP.nc index 639fc9c1..38464cb4 100644 --- a/tos/chips/cc2420/CC2420ControlP.nc +++ b/tos/chips/cc2420/CC2420ControlP.nc @@ -266,10 +266,14 @@ implementation { } call CSN.clr(); + call SRFOFF.strobe(); call FSCTRL.write( ( 1 << CC2420_FSCTRL_LOCK_THR ) | ( ( (channel - 11)*5+357 ) << CC2420_FSCTRL_FREQ ) ); call PANID.write( 0, (uint8_t*)id, sizeof( id ) ); call CSN.set(); + call CSN.clr(); + call SRXON.strobe(); + call CSN.set(); call SyncResource.release(); post syncDone_task();