Hello,

On 28/1/21 11:05, Trent Piepho wrote:
On Thu, Jan 28, 2021 at 1:34 AM Javier Herrero <[email protected]> wrote:
I have been playing lately with the M8F, but did not had a detailed look
to the 30.72MHz frequency as John did. I have used it along with a
Zynq-based board (a very unexpensive surplus EBAZ4205, that can be get
for ~10 EUR) to made an ntp server, replacing the kernel clocksource
from the ARM timer with an external timer implemented at the FPGA
running from the 30.72MHz output (multiplied inside the FPGA to 250MHz),
Would this mean any timestamps generated via
clock_gettime(CLOCK_MONOTONIC_RAW) are going to be directly derived
from the value of your FPGA timer?  Because if that is the case, then
isn't the PPS phase offset from the system clock effectively the phase
offset of the GPS to the GPS?  I.e., it's zero because the same clock
is being compared to itself?

Basically yes, the CLOCK_MONOTIC_RAW is derived from the counter, but this counter starts at zero and increases at the clock rate, so it is relative to the boot time. The 30.72MHz ciock from the M8F is disciplined to the GPS, so it is expected that the timestamps for the PPS signal from the GPS are each 250e6 counts exacty (and they are, sometimes one count more or less as far as I have looking to it). Chrony takes initailly the time from other source (e.g. a ntp server - because I have not yet implemeted to take the time from the GPS), so initially calculates an offset from the monotonic clock to the realtime clock based on the time gathered from the external server, and then uses the PPS timestamping to align the realtime clock to the PPS timestamps - as usual in any ntp/chrony based GPS ntp server. But since the oscillator is disciplined, there is no drift (at least no long term drift), so the drift calculated by chrony converges to zero, and ends applying only an offset in the conversion from the monotonic raw clock to real time. I was playing with this concept mainly to avoid the jitter and error in the SW PPS timestamping, since I had the board and the M8F at hand, and some spare time to play with (that is not very usual...).


Best regards,


Javier

--
---------------------------------------------------------------------------------
Javier Herrero
Chief Technology Officer                           EMAIL: 
[email protected]
HV Sistemas S.L.                                   PHONE:         +34 949 336 
806
Teide 4, Núcleo 1 Of. 0.1                          FAX:           +34 949 336 
792
28703 San Sebastián de los Reyes - Madrid - Spain  WEB: 
http://www.hvsistemas.com


_______________________________________________
time-nuts mailing list -- [email protected]
To unsubscribe, go to 
http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
and follow the instructions there.

Reply via email to