>
> Hi folks,
>
> I'm trying to change the CCA threshold of the CC2420 on a TelosB mote. The
> way I change it is to write the RSSI.CCA_THR value by inserting the
> following line, as denoted by >>, into the CC2420ControP.nc file:
>
> async event void InterruptCCA.fired() {
> ...
> call IOCFG1.write(0);
> writeId();
> >> call RSSI.write( 0xc0 << CC2420_RSSI_CCA_THR);
> call CSN.set();
> call CSN.clr();
> //position 2
> ...
> }
>
> It seems that the position of the RSSI.write statement is critical. Putting
> it earlier or later in the radio start process will corrupt the radio
> startup process (and no startDone event will be generated). I understand
> that RSSI write has to follow IOCFG1.write(0) since setting I0FG1 to 0
> returns CCA pin to its normal state, but why will the radio start fail if I
> put it to position 2? Thank you.
>
>
> Best regards,
> -- Wenjie Zeng
>

Hi Wenjie,

CSN is used for selecting the CC2420 chip. CSN should be pulled down
(CSN.clr()) before accessing SPI, and pulled up (CSN.set()) after all of the
operations are done. What should be paid attention to is that RAM access
must be terminated by setting CSn high. The behavior of CSN is well
described in CC2420 Data Sheet.

Andong Zhan
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to