[Tinyos-host-mote-wg] Re: [Tinyos-2.0wg] mica2 timer / problems @
32kHz
Robert Szewczyk
szewczyk at eecs.berkeley.edu
Mon Aug 22 05:47:31 PDT 2005
Looking at the timer in 1.x it appears that it sets the maximum tick interval to 230.
I could not make it work reliably with anything over 250. There was something weird going on with wakeup from power save mode when running w. external xtal (4ms warmup time). I don't know if that also happened with the internal RC oscillator (60us wakeup or so); it might make sense to try it with the short wakeup. The old timer that did use (or handle) overflow at all, I believe the new Alarm/Timer mechanism does use compare and overflow timers correctly; with these I would expect the timer system to work.
Rob
----- Original Message -----
From: David Gay <dgay42 at gmail.com>
Date: Friday, August 19, 2005 8:42 pm
Subject: Re: [Tinyos-2.0wg] mica2 timer / problems @ 32kHz
> 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