Thanks Eric for the help :)

I will look into why the motes are failing!

Kartik

--- On Thu, 9/23/10, Eric Decker <[email protected]> wrote:

From: Eric Decker <[email protected]>
Subject: Re: [Tinyos-help] How many timers can a program have
To: "Kartik Siddhabathula" <[email protected]>
Cc: "TinyoS help" <[email protected]>
Date: Thursday, September 23, 2010, 9:13 PM

The current timer implementation has space for 256 timers.

I have been through the timer code pretty extensively and nothing comes to mind 
about why
it would stop working after around 5 mins.

The way the timers work is there is a sync level task called UpdateTimersTask 
which looks at all active timers and programs the hardware to interrupt in the 
future.


The timer h/w (called an alarm) trips and causes a task to get posted.  This 
task scans the timer list looking for expired timers.  Any expired timer is 
then fired.

So what can go wrong.

1) interrupts off?  For example on the telosb (or other msp430 varient) there 
is the GIE bit in the status register.  If this is

    off then the timer h/w  can't interrupt.

2) If something is keeping the timer tasks from running.  Not very likely.   
Most everything runs as a task in tinyos and if the timer task was getting 
posted and the main task loop were running then it is guaranteed that the timer 
task will run eventually.


3) A task has gone infinite and this prevents any other task from running.

4) the timer in question is not active.  Is it a periodic or a oneshot?  If a 
oneshot is it getting rearmed?


Basically you will have to dig into the system state at the point of failure 
and figure out what is going on.  It is extremely hard to do that on a mailing 
list.


hope that helps.

eric


On Thu, Sep 23, 2010 at 9:41 AM, Kartik Siddhabathula 
<[email protected]> wrote:


Hi All,

Am using tinyos-2.x and telosb motes. How many timers can I have in my program 
without having a problem. 

Last time I had 6 timers and motes used to stop working after around 5 minutes.

Thanks in advance,

Kartik



      
_______________________________________________

Tinyos-help mailing list

[email protected]

https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help




-- 
Eric B. Decker
Senior (over 50 :-) Researcher






      
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to