On Tuesday 16 January 2007 10:24, Miguel Pereira wrote: > I have a simple question. I need to have a "Global Time" to control some > tasks. That time needs to be ON on boot and never stop. Needs to be > something like interface LocalTime. I already tried to use LocalTime but I > do not have success. Which module provide LocalTime? The module > CounterToLocalTimeC provide LocalTime but use interface Counter, and module > TransformCounterC provides counter but uses counter too.
I'm still coming up to speed on timers, so please take this information with a grain of salt. The answer might depend on your uC and what resolution you want. A grep on $TOSROOT/tos shows that the mica platform's HilTimerMilliC provides the LocalTime interface with millisecond accuracy. It appears the pxa27x chip also offers a millisecond-resolution LocalTime (CounterMilliC). msp430 offers CounterMilli32C that you could probably wrap with CounterToLocalTimeC. I wanted a second-resolution 32-bit local time for msp430, so I implemented a small component that uses a timer/compare to trigger an async event to the component once per second. The event increments a static variable, which is then returned upon calls to LocalTime.get(). _______________________________________________ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help