Hi everyone,

I want to timestamp each incoming packet, whose reception time is indicated
by the SFD pin rising of CC2420. The SFD pin of CC2420 is connected to
P4.1/TB1 of MSP430F1611 as seen from the schematic. One straightforward way
is to buffer the timestamps: whenever an SFD rising edge is captured (e.g.,
by channel 1 of TimerB), store the captured timestamp in a queue. When each
packet is read out from RXFIFO, a timestamp is dequeued and associated with
it. This is actually what the default CC2420 radio driver does. There are
several problems with this approach.
(1) Before a captured timestamp is placed into the queue, another packet
arrives and triggers a SFD rising edge, overwriting the previous timestamp.
There is no timestamp for the corresponding packet. What's worse, it's
unknown which remaining timestamp corresponds to which received packet. The
mapping from the packet and timestamp is messed up.
(2) Some packets are dropped by CC2420 (e.g., fail to pass address
recognition) and not placed into RXFIFO. Nevertheless, it still generates
SFD rising edge. There is no packet for the corresponding timestamp. Again,
the mapping is messy.

Can anyone please give me some suggestion, if any, on how to overcome these
two issues and timestamp packets correctly, especially under heavy load?
I'm trying to leverage the COV bit in TBCCTL1 to see if any timestamp is
overwritten. My requirement can be relaxed not to timestamp all packets
correctly, but a fraction of them. Your help will be sincerely appreciated.

BTW, timestamping is only one small part of my protocol, which changes the
default CC2420 stack extensively, thus switching to CC2420*X* stack is not
a viable option for me.

-- 
-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

Reply via email to