The TimerMilliC in RFA1 is connected to the 62500Hz Symbol Counter which is
not a power of 2. You need to multiply 5120 by 62500 and multiply it by
65535 which should give you 4883 after rounding.

Ugo

On 6 July 2017 at 10:18, Elena Chervakova <elena.chervak...@imms.de> wrote:

> Hi all.
> We work on some experiments with TinyOS timers on RFA1 and RFR2 platforms.
> In
> both cases, there is a significant time deviation from the set timer
> interval
> and the actual time.
>
> To analyze the behaviour, we set a timer to 5 seconds using the TimerMilliC
> component by calling:
>
> call Timer.startPeriodic( 5120 );
>
> for this we have a constant error of 0.25 seconds per timer event. This
> results
> in a deviation of 0.5 seconds per 10 seconds which is too much for our
> application.
>
> The deviation was measured by toggling a GPIO pin at each timer.fired
> event:
>
> event void Timer0.fired() {
>     call Leds.led0Toggle();
> }
>
> and measuring the resulting signal via a scope. The behaviour happens with
> the
> default TinyOS implementation of atm128rfa1 (tos/chips/atm128rfa1/timer) on
> multiple platforms among them the ucmini. All show the same offset. In
> contrast
> the same test with atmega1281-module result error <0.01s per 10s.
>
> Do you have any idea what might cause this behaviour?
>
> Best regards,
> Elena
>
>
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to