Dear Janos, There is a strange behaviour I am experiencing with AlarmMicro16C. From the tinyos general documentation, it is pretty clear that start command starts the timer from current time to dt, now since we know that AlarmMicro16C can has a maximum 65535 value so if one intend to give this value i.e. start(65535), logically it should run uptil 65535 ticks, but the catch I saw in the implementation is something different, there it is something like call Msp430Compare.setEvent( now+remaining ); which means that if "now" is even 1, now+remaining time will overshot the uint16_t limit so it will reset the timer to 1. This all means that dt can not be greater than 65535-now, otherwise now+remaining will become greater than 65535 limit and the new alarm value would be the overflow value rather the "remaining" value.
So According to my understanding, dt should mean that how long you want the timer/alarm should run, it should not have any dependency over the current time. Is my understanding correct, and if soo, how this current implementation can be changed to compensate for the desire behaviour? Regards, Wasif! On Tue, Sep 25, 2012 at 5:05 PM, Janos Sallai <[email protected]>wrote: > Wasif: > > tos/chips/msp430/timer/AlarmMicro16C.nc is what you're looking for. > Please note that the us counter is driven by the DCO, which stops when > the MCU goes to sleep. You will have to prevent the MCU from sleeping > by implementing McuPowerOverride.lowestState(). > > Janos > > On Tue, Sep 25, 2012 at 2:37 AM, wasif masood <[email protected]> wrote: > > > > Thanks Eric, I have been through a alot of these posts. So far, I think, > the > > solution I am looking for, is not answered in any of them. Either there > > isTMicro packet timestamping being discussed or the TMicro counters are > > explained just to track the time elasped between two events. But I am > > interested in an Alarm, of TMicro, cable of signaling interrupts > > periodically, with the granurality of 1 us. So far, the closet I got is > > Alarm32Khz, where I tick ~ 30us, is there any way to wire the Alarm to > get a > > granurality of 1us per Tick FOR TELOSB only? > > > > > > On Tue, Sep 25, 2012 at 12:53 AM, Eric Decker <[email protected]> wrote: > >> > >> > >> You want Tmicro. > >> > >> Search via > >> http://www.mail-archive.com/[email protected]/ for > tmicro. > >> > >> This topic has been discussed previously. > >> > >> > >> > >> On Mon, Sep 24, 2012 at 5:39 AM, wasif masood <[email protected]> > wrote: > >>> > >>> > >>> > >>> Hi All, > >>> > >>> A quick question, is there a timer with granularity of 1us. more than > >>> Alarm<T32khz, uint32_t>, where I tick~30us? for Telosb. > >>> > >>> VG, > >>> Wasif Masood > >>> > >>> > >>> _______________________________________________ > >>> Tinyos-help mailing list > >>> [email protected] > >>> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > >> > >> > >> > >> > >> -- > >> Eric B. Decker > >> Senior (over 50 :-) Researcher > >> > >> > > > > > > > > -- > > Wasif Masood > > > > > > _______________________________________________ > > Tinyos-help mailing list > > [email protected] > > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > -- Wasif Masood
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
