Re: [chrony-users] Newbie Help Needed

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


Bill, all,

there are 2.6 kernels and there are 2.6 kernels. That major.minor version spans several years. I can assure you that in the 2.6.10 source tree, there is no directory drivers/pps/.

This is not a commercial product no, it is for scientific research. My clock is a Chip Scale Atomic Clock by a company called Symmetricom.

Currently my PPS driver is a Linux driver that I wrote. All I do when the PPS interrupt fires is grab Linux system time and pass it back to a user space program via a character device named /dev/csacpps.

My intent was that that program would also ready the serial line for the CSAC's 'time counter since epoch', using a simple select+read+read main loop, and place the two 'votes' for the correct current time (current time meaning that instant when the CSAC's pps fired) in a SHM segment that chronyc would read, and from there chrony would use adjtimex to manipulate my system clock parameters so that, for a short time at least, the system time would 'tick' at the same rate as the CSAC.

Like I said, I am not at all clued in to how one keeps a software clock in sync with help from a device with much higher accuracy.

Stuart



On 01/03/2018 06:09 PM, Bill Unruh wrote:


William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
UBC, Vancouver,BC _|_ Program in Cosmology |____ unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1 ____|____ and Gravity ______|_ www.theory.physics.ubc.ca/

On Wed, 3 Jan 2018, Stuart Maclean wrote:

I am essentially re-asking a question I posted to this list in early
2016 but never got a response I could understand, let alone implement.

My system is a legacy Linux 2.6.10 embedded system.  There is no
/dev/pps* support in that kernel.

2.6 kernels certainly have pps support in the sense that modules for those kernels can be loaded which read serial or GPIO lines and drive /dev/pps* from
that.

Look for modules kernel/drivers/pps/*



In my system there is no Internet access. I have a GPS device and a high
quality reference clock, call it C.  At power up, I can sync C from the
GPS.  GPS then goes away, my system is underwater for hours/days.

I am not sure what you mean by a "reference clock". What is it?

Clock C outputs a 'seconds-since-the-epoch string', call it S, if/when I
send it a 'request for time'.  This two-ways comms is via serial

Serial communication is very slow. You basically cannot get better than
millisecond accuracy from a serial query.

(rs232). The transmission of S by C happens when C's next PPS signal
fires. That PPS signal is also available to me as a GPIO pin which is
configured to produce a system interrupt.

OK, you do have pps. Is the driver for that your own homegrown driver or is a
linux driver (like the pps-gpio module)?



I also have a cheap timer crystal, 32Khz, that serves as the default
'Linux system clock'.  It is wildly inaccurate, and will slow
dramatically as my local water temperature changes (deeper water, lower
temperature).  C is temperature compensated.

Yes, it would, although "wildly inaccurate is perhaps a bad overstatement. How
about giving actual figures? Ie I might expect the change in rate of the
crystal to be in the PPM range.



As you can imagine, I want to keep my Linux system time in line with,
i.e. disciplined from. my reference clock C.

Can chronyc do this?  Do I have the appropriate set up for this to work?

Of course it can. You just need an appropriate driver to feed the time to a
shared memory segment (shm).

I must admit that all the talk of 'ref clocks' and 'locking' confuses
me no end.  I have NO idea what my .conf file would look like.

Is this a commercial project? Ie, are you developing a device which you are
wanting to sell? Is that why you are as coy as you are?


Any help very gratefully appreciated.  Apologies for the sparse details.

The sparser the details the worse the help will be.

Stuart


--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.




--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject. For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/