compare-clock-sources.pl (system time, gps, pcf50633 rtc, calypso rtc)

Joerg Reisenweber joerg at openmoko.org
Tue May 26 13:46:19 CEST 2009


Am Mo  25. Mai 2009 schrieb Timo Juhani Lindfors:
> Hi,
> 
> http://iki.fi/lindi/openmoko/compare-clock-sources.pl
> 
> 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
> 
> http://iki.fi/lindi/openmoko/clock.log
> 
> shows[1] that:
> 
> 1) pcf50633 rtc gains one second every 16300 seconds.

Seems to be a reasonable accuracy.


> 2) calypso rtc did not gain or lose any seconds during this test period

Calypso is "gauging" its oscillators and adjusting to GSM reference, so this 
is no surprise as long as you were registered all the time, preferably to 
same BTS.


> 3) system time is fairly stable after I did "adjtimex --tick 9999
>    --freq 3419747" which corresponds gaining one second every 20912
>    seconds

That's nice to hear, as system time often seeing massive skew during high 
kernel load (IO, other interrupts that make sysclock miss ticks). Also the 
correction factor might fluctuate due to temp changes etc, much more than RTC 
does.

> 
> Are there any other time sources on freerunner that could be
> used/tested? S3C has an RTC but according to larsc it is not
> connected:
> 
> < 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

correct. From schematics you can tell XTIRTC, XTORTC is NC.


> 
> 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.

hwclock itself does this monitoring of drift. So no reason not to use it, 
according to the guidelines in manpage.

cheers
jOERG
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.openmoko.org/pipermail/openmoko-kernel/attachments/20090526/6007cbc2/attachment.pgp 


More information about the openmoko-kernel mailing list