[Tinyos-help] Time counting

Cory Sharp cory at moteiv.com
Wed Jan 3 14:26:48 PST 2007


The timer system in TinyOS does not guarantee any particular accuracy, only
that "accuracy MUST remain reasonable", probably something like +/-10% of
the declared units.  This is for various reasons including but not limited
to temperature, voltage, and manufacturing variations that affect hardware
clocks, particular features or lack thereof offered by a microcontroller or
its hardware platform, and timer computation choices within TinyOS.

Probably the time units are actually 1024 ticks per second not 1000.  Even
so, as listed above, there are many reasons why it may not be for your
particular platform in general or given its current environmental and
electrical conditions.

If you need more accuracy, it is best that you incorporate a time
synchronization protocol into your application.

Best,
Cory

On 1/3/07, Michael Newman <mnewman at dragonnorth.com> wrote:
>
>  I have a complex application with a half dozen timers. One of the timers
> is used to count a clock once per second. The timer is set up with a call
> that looks like this:
>
>         call TimerClock.start(TIMER_REPEAT,1000);
>
> The timer is never stopped or changed.
>
> I count a variable in the TimerClock.fired event. I expect this variable
> to reflect the number of seconds since the node has booted. What I observe
> is that the counter counts faster than the actual number of elapsed seconds.
>
> Given other activities and the possibility of interrupts being off for
> some periods I do not expect the timer to fire at an exact interval, what I
> do expect is that the frequency of the timer will be exact with some jitter
> to the individual firing events. I also expect the timer to never fire
> early.
>
> Has anyone verified that timers actually fire on an exact interval and
> that time is neither lost nor gained?
>
>
>
>  ------------------------------
>
> Michael Newman
>
> Dragonnorth Group
>
> 319 Dean Rd.
> Brookline, MA 02445
>
> Cell: 617 821-4608
> Home: 617 566-7975
> Fax: 617 566-7975
>
> www.dragonnorth.com
>
> mnewman at dragonnorth.com
>
>
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20070103/10d0b45c/attachment.htm


More information about the Tinyos-help mailing list