On Monday 25 June 2007 01:27:29 pm roberto pagliari wrote:
> Hi All,
> I know from cc2420 datasheet that during the transmission of a packet the
> fsd pin must be kept high. Two questions regarding the sendPacket function:
>
> 1) where the sfd is set high

The radio chip itself drives the state of the sfd pin.

>
> 2) why the use of TOSH_uwait(450) instead of      while
> (TOSH_READ_CC_SFD_PIN()){};    only?

I'm speculating here.  Maybe to deal with error conditions.  With the code as 
shown, if sfd is never asserted by the radio for some reason, the code won't 
get hung up.  This is TinyOS-1.x code, right?  The code in TinyOS-2.x works 
quite a bit differently WRT to handling of SFD.

>
>
>   void sendPacket() {
>     uint8_t status;
>
>     call HPLChipcon.cmd(CC2420_STXONCCA);
>
>     status = call HPLChipcon.cmd(CC2420_SNOP);
>
>     if ((status >> CC2420_TX_ACTIVE) & 0x01) {
>
>       TOSH_uwait(450);           // ~ 400 usec delay until SFD goes high!!!
>       while (TOSH_READ_CC_SFD_PIN()){};  // wait until SFD pin goes low
>       atomic stateRadio = POST_TX_STATE;
>
>       // other code lines
>
>
> thanks
>
> Bob
>
>
> !DSPAM:46801d3d192571410093335!


_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to