[Tinyos-host-mote-wg] Re: [Tinyos-2.0wg] mica2 timer / problems @ 32kHz

David Gay dgay42 at gmail.com
Fri Aug 19 20:42:34 PDT 2005


On 8/19/05, Phil Levis <pal at cs.berkeley.edu> wrote:
> On Fri, 2005-08-19 at 17:22, David Gay wrote:
> > While testing the prerelease, I found that the radio no longer
> > appeared to work with any reliability... Further investigation
> > suggested the problem was with timers, and much further investigation
> > suggests that the atmega128 loses timer0 overflow interrupts when the
> > timer0 compare register is 254 or 255 (at least when it's running w/o
> > a divider).
> >
> > Question 1: has anyone else seen effects like this with the atmega128
> > timer0? Or is some other mysterious bug causing the problem? (note
> > that just avoiding 254 or 255 doesn't seem to quite make problems go
> > away, though I could at least get a regular 1Hz blink when the radio
> > was enabled...)
> >
> > Question 2: the problem can be (apparently, at least) alleviated by
> > using a 4kHz basic clock rate (i.e., divide by 8). Is this a practical
> > solution? (i.e., will it work for micaz?)
> >
> > Question 3: the easiest fix for the prerelease would seem to be to
> > remove the 32kHz timer, and just run timer0 at 1kHz. Comments?
> >
> > I'll try and create a more isolated test case Monday.
> 
> 
> I know that when Rob first wrote the timer (for GDI), he had 240 as the
> maximum overflow value...

Rings a bell. And I think the 1.x timer currently stops at around 200?
Rob, any comments?

David

_______________________________________________
Tinyos-2.0wg mailing list
Tinyos-2.0wg at Mail.Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-2.0wg


More information about the Tinyos-host-mote-wg mailing list