[Tinyos-help] A clock problem trouble me for a long time
Michael Schippling
schip at santafe.edu
Tue Jan 16 11:54:44 PST 2007
Well, that's an interesting question...
I think your output is from the simulator?
I haven't really checked, but I also haven't noticed
a big difference in time-between-interrupts on mica2's
using TimerC, and since the sim is not timing using
interrupts I'd not be surprised to see your divergence.
On the 3ms thing...I see a note in TimerM:
* This implementation assumes that DEFAULT_SCALE is 3.
But I have no idea to what it refers as I can't find
"DEFAULT_SCALE" used anywhere else. I have run a 1ms Timer
on mica2's, but the same code didn't work on micaz's and I
never investigated, so that might have something to do with it.
Anyway, your original message said you wanted a 3ms timer...?
MS
roy liu ^-^ wrote:
> schip,
> I have tried in the Blink app.The result showed that the clock frequence changed during the silulation. As below:
>
> : CLOCK: event handled for mote 0 at 0:0:14.80509050 (15624 ticks).
> interval to 4 @ 0:0:14.80509050
> : CLOCK: event handled for mote 0 at 0:0:14.80899650 (15624 ticks).
> interval to 4 @ 0:0:14.80899650
> : CLOCK: event handled for mote 0 at 0:0:14.81290250 (15624 ticks).
> interval to 0 @ 0:0:14.81290250
> : CLOCK: event handled for mote 0 at 0:0:15.06288650 (999936 ticks)
> interval to 4 @ 0:0:15.06288650
> : CLOCK: event handled for mote 0 at 0:0:15.06679250 (15624 ticks).
> interval to 4 @ 0:0:15.06679250
> : CLOCK: event handled for mote 0 at 0:0:15.07069850 (15624 ticks).
>
> As the author said in TimerM that TimerM cannot support continuous timers that fire faster than every 3 ticks (3ms).
> Does that mean I have no choice but to update to tinyos2.0 version? ohh,I am so depressed.
>
> ------------------
> roy liu ^-^
> 2007-01-16
>
> -------------------------------------------------------------
> From:Michael Schippling
> Data:2007-01-15 05:16:07
> To:roy liu ^-^
> Copy:tinyos-help
> Subject:Re: [Tinyos-help] A clock problem trouble me for a long time
>
> If that's 3 MILLI-sec you should be able to use the standard
> TimerC interface/code as is done in the Oscilloscope demo app.
> MS
>
> roy liu ^-^ wrote:
>> hi,everyone
>> I want to implement a timer fired every 3ms.Someone suggest me to use Timermillic,but it is implemented in the tinyos2.0 and my version is 1.1.15.
>> Is it possible for me to achieve my project without updating?
>> thx a lot
>>
>> BestRegards
>> roy liu ^-^
>> 2007-01-14
>>
>> _______________________________________________
>> Tinyos-help mailing list
>> Tinyos-help at Millennium.Berkeley.EDU
>> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
More information about the Tinyos-help
mailing list