From 347d6b32e2b1526b0a88d7bcd06da5d68633918b Mon Sep 17 00:00:00 2001 From: jwhui Date: Wed, 17 Jan 2007 05:14:18 +0000 Subject: [PATCH] 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. --- tos/chips/cc2420/CC2420ControlP.nc | 4 ++++ 1 file changed, 4 insertions(+) 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(); -- 2.39.2