[Tinyos-help] Fwd: Regarding tmote sky sampling rate
Michael Schippling
schip at santafe.edu
Mon Nov 3 13:58:05 PST 2008
I don't entirely understand the issue,
nor exactly why a 1Mhz clock can't fire after 1024 ticks...
but I probably don't really care at this time.
The little annoyance I have "around this" is that in T1.1.7
a 1ms Timer setting seemed to work fine on a mica2, but when
I tried to upgrade my code it didn't work because the 3ms
limit had been (silently to my sleepy attention span) instituted.
It wasn't until I started debugging on a micaz that I actually
looked at the source file and found the "well documented in
the code" limitation, which doesn't actually say _why_...
All water under the sinkhole now.
MS
Philip Levis wrote:
>
> On Nov 3, 2008, at 1:25 PM, Michael Schippling wrote:
>
>> Lets put this on the help list to keep a record....
>>
>> The Intelligent Designers kind of arbitrarily limited the
>> Timer driven sampling to a 3ms period on micas, although using
>> Timer2<TMilli> on the tmotes I have used 2ms (presumably even
>> 1ms works...). If you want to get to .5ms you'll have to look
>> into the HighFrequencySampling example or dig into the
>> aforementioned "ADC prescalar" and free-running the converter.
>
> It's not arbitrary. It's because the underlying clock is running at
> 1MHz, and the way the timer interrupts work in the atmega128 you can't
> ask for something in 1-2 clock ticks and expect to reliably get an
> interrupt. There was a big discussion on this on -devel back in 2004.
> Here's a link to the threads:
>
> https://www.millennium.berkeley.edu/pipermail/tinyos-devel/2004-August/thread.html
>
>
> Phil
--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew
More information about the Tinyos-help
mailing list