[time-nuts] Cheap jitter measurements

Tom Van Baak tvb at LeapSecond.com
Tue Apr 10 10:09:22 EDT 2018


Dan,

I wrote a PC-based time-stamping counter (TSC) tool that uses a serial port and QueryPerformanceCounter:

www.leapsecond.com/tools/pctsc.exe (Win32)
www.leapsecond.com/tools/pctsc.c (source)

Give it a try.

/tvb

----- Original Message ----- 
From: "Dan Kemppainen" <dan at irtelemetrics.com>
To: <time-nuts at febo.com>
Sent: Tuesday, April 10, 2018 6:59 AM
Subject: Re: [time-nuts] Cheap jitter measurements


Hi,

Don't know how good they are, but there are two functions in the 
kernel32 lib in windows that are related to a cpu performance counter, 
QueryPerformanceCounter and QueryPerformanceFrequency. (Maybe Linux has 
similar?)

Anyway, on most systems the frequency reported is the raw cpu clock. 
(Couple of Ghz Range numbers, My current system is reporting 3,320,458 
Hz, windows7.) Supposedly these are low latency functions. It may not 
offer a perfect solution, but at least it gives you 'low latency' access 
to a high speed counter.

Maybe it's possible to timestamp incoming PPS pulses with this (assuming 
they're triggering an interrupt), and learn something neat.

Some of this is subject to change with windows versions:

https://msdn.microsoft.com/en-us/library/windows/desktop/dn553408(v=vs.85).aspx

Dan




On 4/10/2018 8:01 AM, time-nuts-request at febo.com wrote:
> kb8tq at n1k.org  said:
>> The kernel clock comes from the CPU clock. That CPU clock is phase locked to
>> a crystal. If you have a CPU that is driven by a VCXO that is a*very*
>> unusual CPU board.  The crystal runs at an arbitrary frequency. That gives
>> you edges that are unlikely to happen ���right on the second���.
> I was assuming the CPU clock was fast enough that reading a cycle-count
> register and converting to ns would be within a ns which is the resolution of
> the clock.
> 
> That's obviously not true for low end SOC type setups.  A Pi-1 runs at 700
> MHz.  The Pi 3 is up to 1.4 GHz.
> 
> 
_______________________________________________
time-nuts mailing list -- time-nuts at febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.




More information about the time-nuts mailing list