Hi Nicole, I agree with Eric that it is rather unlikely that there is a problem with the timers in TinyOS. Just to get the most obvious question out of the way: I'd assume you have two timer objects ("components new TimerMilliC() as MilliTimer; components new TimerMilliC() as Timer3;")? Otherwise there might be a confusion between timers.
You already seem to have debugging code in your program. If you run your application in the simulator, do you get this error? If so, it should be fairly easy to debug the code by inserting more debug statements to verify that the code really does what you expect. For instance I would add a dbg() statement before every call to start or stop a timer and another dbg() statement in the timer tasks. dbg() statements are much more verbose than LEDs. If you cannot reproduce the error in the simulator, you might want to consider using the printf library to get debugging messages from the motes directly (via serial cable): http://docs.tinyos.net/index.php/The_TinyOS_printf_Library Cheers, Urs Eric Decker wrote: > I've been through the timer code in TinyOS2 pretty throughly. It is very > low likelihood (via normal code execution, I am discounting a random memory > writer) that a timer can fire before it is started. There is a control cell > in the timer structure *"isrunning"* that has to be set for the fire signal > to happen. This can only get set if the timer is started. Now if this bit > is getting set through some other mechanism (like a run away) then all bets > are off. > >>From tos/lib/timer/VirtualizeTimerC.nc. > > typedef struct > { > uint32_t t0; > uint32_t dt; > bool isoneshot : 1; > bool isrunning : 1; > bool _reserved : 6; > } Timer_t; > > > > On Mon, May 19, 2008 at 11:06 AM, Paul Stickney <[EMAIL PROTECTED]> wrote: > >> I do not have a solid answer, but some things you may want to consider >> looking at: >> -Maybe you are calling it with a smaller timeout than you suspect or >> earlier than expected >> -The LED might be turned on by other code (internal or external) _______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help