[ntp:questions] NTP strategy for Linux embedded system?

David Wuertele dave-gnus at bfnet.com
Tue Jan 20 20:16:51 UTC 2004


I am working on a consumer electronics embedded system running Linux.
It needs accurate system time, but I'm currently seeing system clocks
lag up to about 800PPM.  This is probably because the kernel does a
very large amount of PIO and therefore misses many jiffy timer
interrupts.

I would like to tune the clock using ntpd, and here is what I have to
work with:

1.  many units are not connected to the Internet
2.  all units have a real-time clock chip that I can query using an
    I2C bus
3.  the real-time clock chip accuracy is better than the system timer,
    but it is still not as accurate as Internet NTP servers

My idea is this: Write a reference clock driver to query the real-time
clock chip.  This will be a big improvement over a free-running system
counter.  If an Internet connection is available, periodically set the
real-time clock using NTP.

Questions:

1.  Is this a good strategy?
2.  Is the SHM driver a good place to start for implementing my
    reference clock driver?
3.  Setting the RTC chip has a completely different API than setting
    the system clock.  Is there a way to easily integrate the setting
    of the RTC into my configuration?

Thanks,
Dave



More information about the questions mailing list