In theory, you could change the channel without turning off receive mode.
However, then you would have to prepare for some edge cases, which would
make the source code of the driver more complicated.

For example, what if you don't issue an SRFOFF, and a packet preamble comes
in after *writeFsctrl() *is called, but before the frequency register is
set. The packet will clearly not be receivced, because the frequency change
will take place in the middle of receiving the packet. It's hard to tell by
reading the cc2420 datasheet what happens to the radio state machine in
this case (page 43), and how the FIFO, FIFOP and SFD pins would behave.

To sum it up, I guess it's safer to put the radio in IDLE state before
changing the channel frequency. I do the same in the cc2420x stack. I don't
think there's a performance penalty in doing that. The radio is deaf for 12
symbol periods after changing the channel either way -- there's no way you
to get around that. It's just physics. That's how PLLs behave.

Janos


On Sun, Mar 3, 2013 at 5:17 PM, Xiaohui Liu <[email protected]> wrote:

> Hi everyone,
>
> In CC2420 stack, channel switch can done through *
> CC2420ControlP$CC2420Config$setChannel() *and then* **
> CC2420ControlP$CC2420Config$sync()**, *which goes to the following event:
>  * event void SyncResource.granted() {
> ** call CSN.clr();
> * * call SRFOFF.strobe();
> * * writeFsctrl();
> * * writeMdmctrl0();
> ** writeId();
> * * call CSN.set();
> * * call CSN.clr();
> * * call SRXON.strobe();
> * * call CSN.set();
> ** call SyncResource.release();
> ** post syncDone();
> * * }*
> Can anyone please give me some hint why SRFOFF and SRXON strobes are
> necessary here? Thanks.
> --
> -Xiaohui Liu
> TelosB
> TinyOS 2.1.2
> www.cs.wayne.edu/xliu/
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to