Hi Nicole, Unfortunately I have very little time right now, otherwise I would have asked you to send me the code so that I can investigate this problem directly.
Just another idea: Maybe the timer value you're using is too big to handle. I vaguely seem to remember somebody saying that you cannot use the whole range of the uint16_t timeout argument. You could try a substantially smaller timeout value (2^15 or even 2^14) and then use a counter to only trigger the execution of your original code every other or every 4th time. If this doesn't help I really would install printf to get more detailed debugging messages. Cheers, Urs Nicole Neureiter wrote: > Hi, > > I have two timer objects in my configuration file and I used TOSSIM first on > my > code to see if it was running. With TOSSIM I didn't have any problems. They > appeared when I put my code on the motes. I use the leds to debug on the motes > and have one led for each timer. I toggle the Leds. After my optinion the led > for the periodic timer should go on first and the other led for the other > timer > should go on after that, while the first one should go off then. Meaning the > leds should not be on together. Unfortunately they are on together. > > Nicole > >> 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