From 32690ec48927dd7b2355cfc5e9a40ad5cf1dba0c Mon Sep 17 00:00:00 2001 From: janhauer Date: Tue, 20 Oct 2009 09:21:39 +0000 Subject: [PATCH] Need to toggle radio state after sync-ing in Rx mode to make changes effective. --- tos/chips/cc2420_tkn154/CC2420TKN154P.nc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tos/chips/cc2420_tkn154/CC2420TKN154P.nc b/tos/chips/cc2420_tkn154/CC2420TKN154P.nc index fd18e72e..d6a144b9 100644 --- a/tos/chips/cc2420_tkn154/CC2420TKN154P.nc +++ b/tos/chips/cc2420_tkn154/CC2420TKN154P.nc @@ -283,7 +283,12 @@ module CC2420TKN154P task void configSyncTask() { if (call SpiResource.immediateRequest() == SUCCESS) { - call CC2420Config.sync(); /* put PIB changes into operation */ + call CC2420Config.sync(); + if (m_state == S_RECEIVING) { + // need to toggle radio state to make changes effective now + call CC2420Power.rfOff(); + call CC2420Power.rxOn(); + } call SpiResource.release(); } else post configSyncTask(); // spin (should be short time, until packet is received) -- 2.39.2