[time-nuts] x86 CPU Timekeeping and clock generation

Magnus Danielson magnus at rubidium.se
Thu Jan 7 00:31:00 UTC 2021


Tom,

Consider that the RTC clock will be operating of a battery when no power
is applied. For the power used, it's actually quite impressively good.

Then, the other clocks is selected for various other properties, but
even with quality brands, we would consider them very cheap and of
dubious quality. This remains a fact of life.

It is actually despite that which things like NTP works fairly well.
There is additional hurdles in scheduling, operating systems, and stuff
of of that sort which creates additional challenges.

Improving clock to "Stratum 3" / SEC quality 4.6 ppm clocks (typically a
TCXO today) would not offset price too much for quality gear, but be a
significant step better. I will however not hold my breath to see TCXO
and OCXO options to computer clocks. I would be very happy if it would
take 5 MHz or 10 MHz external reference. Toss in a PPS input and it's
fantastic. We end up to frankenstein that, or build dedicated hardware.
For the commercial side, we do build our hardware. It's fun work.

Cheers,
Magnus

On 2021-01-07 01:06, Tom Holmes wrote:
> Thanks to Chris, Magnus, and Trent for clearing
> things up. Never would have expected going to the
> effort of putting in a cheap clock, only to use it
> very little. 
>
> Who knows what evil lurks in the minds of
> engineers? And I am one!
>
> Tom Holmes, N8ZM
>
> -----Original Message-----
> From: time-nuts <time-nuts-bounces at lists.febo.com>
> On Behalf Of Trent Piepho
> Sent: Wednesday, January 06, 2021 6:36 PM
> To: Discussion of precise time and frequency
> measurement <time-nuts at lists.febo.com>
> Subject: Re: [time-nuts] x86 CPU Timekeeping and
> clock generation
>
> On Wed, Jan 6, 2021 at 6:26 AM Tom Holmes
> <tholmes at woh.rr.com> wrote:
>> Am I missing something or maybe I don't
> understand
>> the situation , but I am under the impression
> that
>> the RTC has it's own battery and crystal
> unrelated
>> to the processor clock. Seems like in that case,
>> the 24 MHz won't have any effect on the
>> timekeeping drift.
> It was like that, but the days of external RTC
> chips, e.g. from
> Dallas, are largely over.  PC now have it
> integrated into the chipset.
> Though it still has a power source and 32.768kHz
> xtal of its own.
>
> In the embedded SoC world of phones, Raspberry
> PIs, and the OP's
> Tinkerboard, there would virtually always be an
> RTC available in the
> SoC with the CPU, or in the PMIC, or in both.
> This would usually have
> its own 32.768kHz xtal, but often there is an
> option to reduce the BoM
> and use an internal RC oscillator instead of an
> external xtal or clock
> signal, at greatly reduced accuracy.
>
> The 32k xtal isn't for timekeeping accuracy, but
> for power savings.
> In the lowest power modes the main PLLs will be
> shut down.  Certain
> parts of the SoC will still be able to run using
> the 32kHz clock
> domain and a low power output from the PMIC.
>
> Linux doesn't use the RTC as the system clock.
> During boot, the
> kernel will usually set the system time from the
> RTC, and then the RTC
> doesn't get used much, if at all.  There is a mode
> where the system
> time is periodically copied back into the RTC,
> which can be enabled
> with NTP.  And software like chrony has the
> ability to manage the RTC
> and keep it in sync more intelligently, though I
> don't think any
> distro uses this by default.
>
> There are a number of sources that Linux can use
> as the system clock.
> An on x86 system, it would usually be tsc, hpet,
> and acpi_pm.  On an
> ARM board, arch_sys_counter.  The kernel
> subsystems for RTCs and for
> clocksources are totally separate and the RTC,
> e.g. rtc-cmos, isn't a
> clocksource.
>
> Using adjtimex, it's possible to see what the
> current kernel
> parameters are for clock adjustment.  The
> frequency adjustment would
> need to be zero.
>
> _______________________________________________
> time-nuts mailing list -- time-nuts at lists.febo.com
> To unsubscribe, go to
> http://lists.febo.com/mailman/listinfo/time-nuts_l
> ists.febo.com
> and follow the instructions there.
>
>
>
> _______________________________________________
> time-nuts mailing list -- time-nuts at lists.febo.com
> To unsubscribe, go to http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
> and follow the instructions there.




More information about the Time-nuts_lists.febo.com mailing list