hwclock accuracy

James Cameron quozl at laptop.org
Thu Jan 20 03:03:37 EST 2011

On Thu, Jan 20, 2011 at 06:36:14PM +1100, Sridhar Dhanapalan wrote:
> What is the accuracy of the hwclock on XOs?

By accuracy I presume you mean stability over time, or the amount of
error between the clock and actual time.  If you mean something else,
ignore the following explanation.

The XO-1.5 real-time clock is part of the VX855 chip.  Attached to it is
a 32768 Hz tuning fork crystal.  When the system is off, the clock is
powered by the tiny rechargable coil cell type battery on the main
board.  The clock battery is kept charged by one of the internal power

The accuracy will be mainly determined by the crystal and the

I don't have the specifications for the crystal here.  I guess the
accuracy should be around six parts per million, which is within half a
second per day.  To measure accuracy you must measure the error between
the clock time and a more accurate source, over a long period of time,
such as a day or a week.

What are you observations regarding accuracy?

> Can we assume that it will keep good time over an XO's five-year
> lifespan?

Yes, for a certain measure of good.

We expect that you will synchronise the clock regularly, and this is
supposed to be done in the presence of the OLPC school server.  If you
are not using a school server, then I imagine you should add a periodic
ntpdate invokation, followed by a hwclock --systohc.  Doing this on
network connection might be best.

Most computer real-time clocks are built with similar assumptions.

> We have some XO-1.5s that have their hwclocks off by 10-20 minutes.
> Would this likely be due to a fault at the factory (e.g. not setting
> the time before shipping them), or did they skew over time?

This is due to the factory not setting them to a synchronised time
source.  I've observed that.  Not unexpected.

Skew over time is possible, but you would need to measure it, not just
assume it.  At six parts per million, I'd expect a ten minute drift to
take a few years.

James Cameron

More information about the Devel mailing list