This isn't a direct answer to what you are asking below.

I've found that the code path for much of the msp430 timer interfaces can be
somewhat longish.   So when I've done uS timing I actually grab timestamps
directly from the h/w.    Timer A on my motes is what is running uis
jiffies.  Note I've said uis which is a binary microsecond.   (you may also
see the notation, bus, for binary micro second).    So I grab TAR directly
and use its value.   The only problem with that is when it wraps you don't
really have a way of knowing what happened.   So this technique is only
useable for events that are less then 64K uis in length.

eric

On Sat, May 21, 2011 at 5:14 PM, Xiaowei <seanwill...@gmail.com> wrote:

> Hi all,
>
> I'm doing some experiment to record the exact time when packets start
> transmission at the sending mote and being received at the receiving mote
> with telosb motes in TinyOS 2.1.0.
> These are the components and interface I'm using:
> components Msp430CounterMicroC;
> App.Counter -> Msp430CounterMicroC
> uses interface Counter<TMicro, uint16_t>;
>
> To get rid of random delay, I also disabled csma by setting:
> the default value of "ccaOn = TRUE" to "ccaOn = FALSE" in
> tinyos-2.1.0/tos/chips/cc2420/csma/CC2420CsmaP.nc
>
> At the sending mote, I called Counter.get() in sendDone event handler, and
> at the receiving mote I called Counter.get() in receive event handler. It
> seems that the time recorded is not the exact time when the packet is sent
> over the air.
>
> So I tried to use interface PacketTimeStamp<TMicro, uint16_t>, but got the
> "no match" error for the line App.PacketTimeStamp->ActiveMessageC when
> compiling the code, couldn't figure out why. Tried "include message.h in
> module file", didn't work.
>
> There's also another interface RadioTimeStamping that provides event
> transmittedSFD and receivedSFD, which satisfies my requirement. But it's
> said that RadioTimeStamping is not supported in TinyOS 2.1. I tried to use
> it by wire 'App.RadioTimeStamping->CC2420TransmitC.TimeStamp', got compile
> error "cannot find TimeStamp".
>
> I have been stuck in this problem for a while, anyone knows how to do this
> (Basically, get the time when packets actually being transmitted to the air
> and being received)?
>
> Any help is greatly appreciated.
>
> Sean
>
>
>
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Eric B. Decker
Senior (over 50 :-) Researcher
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to