Hi Daniel,

Thank you for your explanation. I did refer to the CC2420 datasheet when
looking at the code, but I still do not understand the remaining two issues
of CC2420ReceiveP. Can you help understand them as well? Thanks.

On Tue, Aug 30, 2011 at 3:32 AM, Daniel Minder <[email protected]>wrote:

> Hi Xiaohui,
>
> I strongly suggest that you read the CC2420 chip manual available from
> Texas Instruments. TinyOS' CC2420 implementation can only be understood
> when you know the hardware.
>
> >   status = m_cca ? call STXONCCA.strobe() : call STXON.strobe();
> >   if ( !( status & CC2420_STATUS_TX_ACTIVE ) ) {
> >     //why check status twice? congestion means after strobe STXON or
> > STXONCCA, packet is not sent, am I right? Under what condition will
> > congestion happen?
>
> CC2420 outputs the status byte WHILE the STXON(CCA) command is received.
> Therefore, it cannot turn on the transmitter and set the corresponding
> bit in the status byte before the complete command was received. So,
> usually you need the second query for the status byte. The TX_ACTIVE bit
> is only on in the first status byte if the transmitter was already on.
>
> >    //What does this command do?
> >     call CaptureSFD.captureFallingEdge();
>
> It tells the ATmega128 to issue the next interrupt (and thus call
> CaptureSFD.captured()) when SFD goes from high to low ("falling edge").
> In general, SFD goes high when the SFD byte was sent/received and goes
> low again when the complete MAC protocol data unit was sent/received.
>
> >    //What does this command do and what does its return value mean?
> >         if ( call SFD.get() ) {
>
> It queries if the SFD pin is high or low. Meaning s.a.
>
> > 3.
> > What does the boolean variable /m_receiving/ represent? Whether the SFD
> > is caused by packet reception or transmission?
>
> Mainly, m_state controls the meaning of the SFD pin. But if we are not
> in sending state (S_SFD, S_EFD) m_receiving tells us if we are currently
> receiving a packet.
>
> >         //what is ack turn-around here and why do we have to wait even
> > channel is clear?
>
> When a msg is received the receiver may send back an ACK. But the switch
> from RX to TX mode takes some time, and in this time the channel is
> free. So, if we would start immediately we would destroy an ACK.
> Therefore, we wait a little bit longer.
>
> Best,
> Daniel
>
> --
> Daniel Minder
> University of Duisburg-Essen, Networked Embedded Systems
> Bismarckstr. 90, 47057 Duisburg, Germany
> Skype: d.minder
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



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

Reply via email to