]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Need to toggle radio state after sync-ing in Rx mode to make changes effective.
authorjanhauer <janhauer>
Tue, 20 Oct 2009 09:21:39 +0000 (09:21 +0000)
committerjanhauer <janhauer>
Tue, 20 Oct 2009 09:21:39 +0000 (09:21 +0000)
tos/chips/cc2420_tkn154/CC2420TKN154P.nc

index fd18e72e5260950e284942fe18944b4f308b7295..d6a144b97c14a6e64a372c0b91f82b11efb31ad7 100644 (file)
@@ -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)