[Tinyos Core WG] T2 Mica* Timers

Philip Levis pal at cs.stanford.edu
Sun Feb 4 09:49:56 PST 2007


On Feb 2, 2007, at 12:16 PM, David Moss wrote:

> We're seeing lots of issues with the reliability of AVR timers.   
> Has anybody else been working on testing timers on mica* mote  
> types?  They just don't seem to work as reliably as they did in  
> TinyOS 1.x.
>
> If we set a one-shot timer very often, eventually timers fire at  
> inappropriate times.  "Often" for us means setting several one-shot  
> timers on each send or receive from the radio - and we're blasting  
> packets in and out.  Eventually the timers must say "I give up" and  
> fire immediately, at the wrong time.  I think this may also be  
> related to the intermittent micaz CC2420 SPI-bus lockup problem -  
> it's very possible a timer fires inappropriately and disables the  
> SPI bus in CC2420TransmitP.
>
> This issue has been so intermittent and destructive that we've  
> removed timers completely from all areas of our micaz applications  
> (except the lazy radio duty cycling timer) and replaced them with  
> our own custom timer library.  This library simply implements the  
> Timer interface and uses spinning tasks to increment a value, and  
> when the value gets above whatever threshold was set to begin with,  
> this "timer" hack fires.  Of course, it's not accurate at all time- 
> wise, but we aren't worried about that when we use it.  The goal  
> was to prevent the timer from firing prematurely.
>
> Does anybody have time to look into this?  It's difficult to  
> reproduce, but the problem is certainly there.

Hm. TOSSIM simulates the atmega128 timer stack down to the HPL. Have  
you tried recreating the problem in simulation? I've found that this  
actually works pretty well; I was able to find a timer bug in  
MultihopOscilloscope this way.

Or is this an Alarm problem?

Phil


More information about the Tinyos-2.0wg mailing list