compare-clock-sources.pl (system time, gps, pcf50633 rtc, calypso rtc)
Timo Juhani Lindfors
timo.lindfors at iki.fi
Mon May 25 18:03:19 CEST 2009
is a simple program to compare different clock sources on
freerunner. It reads NMEA data from stdin. When it detects a new
second it logs the values of all clock sources. The resulting log file
1) pcf50633 rtc gains one second every 16300 seconds.
2) calypso rtc did not gain or lose any seconds during this test period
3) system time is fairly stable after I did "adjtimex --tick 9999
--freq 3419747" which corresponds gaining one second every 20912
Are there any other time sources on freerunner that could be
used/tested? S3C has an RTC but according to larsc it is not
< larsc> +hm the s3c rtc is running way to fast
< larsc> +lindi-: hm, looks as if the rtc is not connected to a oscilator. so it's not usable
Also, is there some existing program that could read time from
pcf50633 rtc, compensate for the drift and write the result to system
time? hwclock --adjust --hctosys wants to write the adjusted value
back to rtc. I don't want to do this since it makes long-term
monitoring of the RTC drifting difficult.
 I used the following gnuplot commands to plot this:
set xdata time
set timefmt "%s"
plot "clock.log" using 1:($2 - $1) title "sys", '' using 1:($3 - $1) title "pcf", '' using 1:($4 - $1) title "calypso"
More information about the openmoko-kernel