Hi folks,

Certain values of CCA threshold values crashes the radio if the threshold is
changed during the radio start process. I've tried two ways of changing the
CCA threshold of CC2420 on a TelosB mote: changing it during the radio start
process or after. To change it during the radio start process, I modified
the CC2420ControlP.nc and add the following line in the command *
CC2420Power.startOscillator()*:

            call InterruptCCA.enableRisingEdge();
            call SXOSCON.strobe();
         >> call RSSI.write(CCA_THR);
            call IOCFG0.write( ( 1 << CC2420_IOCFG0_FIFOP_POLARITY ) |
                    ( 127 << CC2420_IOCFG0_FIFOP_THR ) );

However, it seems that the value of CCA_THR is critical for the correctness
of radio. The default value of CCA threshold is -32 as specified by the
datasheet (and verified by reading from the RSSI register). Since the
RSSI.CCA_THR is a signed 8-bit parameter, it should theorectically accept
values from -128 to 127. However, when I tried values around -45 or lower,
the radio would end up in a corrupted state and cannot be started or stopped
afterwards. Any value that is greater than -45 will not corrucpt the radio
state.

This behavior changed when I modified the threshold value after the radio *
startDone()* event. There I followed the *CC2420Config.sync()* semantics,
changing the threshold value by first requesting the SPI resource and then
modifying the value in the *granted()* event.

However, I would like to change the threshold value during the radio start
process because this incurs a much shorter delay before the radio can do
carrier sense. Can anyone please explain this behavior and maybe suggest a
better way of changing the threshold value during radio start up? Thank you.

Best regards,
-- Wenjie Zeng
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to