[Tinyos-host-mote-wg] Re: [Tinyos-2.0wg] TinyOS Telecon Notes 8/31/05

Joe Polastre joe at polastre.com
Fri Sep 2 17:08:56 PDT 2005


I still don't understand your position on this matter.  You don't have
to calibrate to 8MHz; you can calibrate to a value that make sense on
all platforms.   As for the accuracy, both you and I use the msp430
for the UART without problem, why do you feel that you cannot
calibrate the internal oscillator on the Atmel?  Atmel pretty much
spells out for you (better than that, they provide you code) for
calibrating the oscillator...

http://www.atmel.com/dyn/resources/prod_documents/doc2563.pdf

Why shouldn't we assume that all Atmel platforms use the internal
oscillator at X MHz?  We have already decided that all MSP430
platforms use the DCO at 4MHz.  Generality isn't necessary if 99.9999%
of the uses are with the same frequency.

The obvious solution is to use the same clock setting for all Atmel
platforms, which is what we do for the MSP430 (Eyes slightly changes
SMCLK, but nothing that is significant).  I still have not heard a
good reason to use the external oscillator.  Why would you not switch
to the internal oscillator (other than the fact that you pay money to
put it on the board)?

I find it surprising that the Atmel calibration was last used in
TinyOS for the Intel IDF demo in 2001.

Regardless, I don't use the Atmel so do as you will.  I'm just trying
to provide some help to make everyone's lives easier and cover the
majority of the use cases.  I'm sure the folks that are looking at
cross-platform execution would find it beneficial to have a standard
Atmel frequency.

-Joe

On 9/2/05, mturon at xbow.com <mturon at xbow.com> wrote:
> 
> The external oscillator is available for users who are concerned with UART
> reliability -- with it they can achieve 100%.  With 8MHz, maximum
> reliability of the ATmega128 UART is 99.8%.  Therefore, use of the internal
> osc is not practical for *everything*, but it is mandatory for low power.
> 
> I think it is important that we think this through for Timers -- we need a
> way to specify at init time the source clock of the chips/MCU, because we
> cannot assume it is always the same.  The BusyWait component should adjust
> accordingly -- most black magic is related to TOSH_uwait not working when
> clock source assumption is wrong.  Such an interface would make mica2dot
> support much easier, as the 4MHz CPU clock is the primary difference there.
> 
> Martin
> __________________________________________________
> Martin Turon  |  Crossbow Technology, Inc.
> 
> -----Original Message-----
> From: Joe Polastre [mailto:joe.polastre at gmail.com]
> Sent: Friday, September 02, 2005 3:07 AM
> To: mturon at xbow.com
> Cc: bengreenstein at gmail.com; tinyos at barnowl.org
> Subject: Re: [Tinyos-2.0wg] TinyOS Telecon Notes 8/31/05
> 
> Thanks Martin, but you didn't answer my question... Do you plan to use
> the internal oscillator for *everything*, or are you still planning on
> using the external oscillator?  If so, why?  Using the internal makes
> life easier for everyone.  Besides, if you calibrated the oscillator,
> then Jason Hill's black magic would work across platforms ;)
> 
> -Joe
> 
> On 9/1/05, mturon at xbow.com <mturon at xbow.com> wrote:
> > Hi Joe,
> >
> > The internal oscillator is default for low-power apps.  This opens up a
> > discussion on initialization of timers.
> >
> > We need to think about timer initialization and how to allow multiple
> > configurations.  Some users will want to set an MCU to a different clock
> > speed.  What API do we use to specify this?
> >
> > Martin
> > __________________________________________________
> > Martin Turon  |  Crossbow Technology, Inc.
> >
> > -----Original Message-----
> > From: Joe Polastre [mailto:joe.polastre at gmail.com]
> > Sent: Thursday, September 01, 2005 4:29 AM
> > To: Ben Greenstein
> > Cc: mturon at xbow.com; tinyos at barnowl.org
> > Subject: Re: [Tinyos-2.0wg] TinyOS Telecon Notes 8/31/05
> >
> > > Phil: I agree. It should take something like 60-80 cycles to compute
> > > the power state of the mcu. Let's consider the notion of a dirty
> > > bit. If anything changes in the power state, the dirty bit isset. The
> > > MCU goes into same state as the last time unless this bit is set. When
> > > set it recomputes. ... Is this notion something that would be usesful
> > > for eyes?
> >
> > Note about Phil's comment:
> >
> > This won't work if you're using a DMA or other such device that relies
> > on other hardware components.  It makes setting the "dirty" bit very
> > difficult.
> >
> > Besides, 60-80 cycles is at most 20us of computation.  Considering it
> > takes longer than that for the Atmel to wake up, I don't see a problem
> > doing the computation.
> >
> > Martin-- What is going to be the "default" oscillator for mica2 and
> > micaz?  Seems like using the external oscillator is like shooting
> > yourself in the foot before you even start.  Does Xbow have any plans
> > to calibrate the internal Atmel oscillator?  Is there even a reason to
> > include the external oscillator on the board?  Obviously we don't use
> > one on Telos/Tmote or Eyes, and there's at least one "micaz clone"
> > that don't have it either.
> >
> > -Joe
> >
>


_______________________________________________
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