PTP time synchonisation - InnoRoute/RealtimeHAT GitHub Wiki

This tutorial require minimum release r0.3 of the codebase.

Steps to do:

  • Connect your PTP test-device(needs to support 1GB/s Ethernet) to port RT0 and connect the middle port of the Real-Time-HAT to your RaspberryPI
  • The PTP process is automatically launched about 40s after boot and is listening on port RT0
  • Check the ptp status with: watch -n1 "sudo pmc -u -b 0 'GET PORT_DATA_SET' -f /usr/share/InnoRoute/ptp.conf&& sudo pmc -u -b 0 'GET TIME_STATUS_NP' -f /usr/share/InnoRoute/ptp.conf"
  • The setup was tested with InnoRoute's TrustNode, if you using other ptp-clients you might have to adapt the config file /usr/share/InnoRoute/ptp.conf.
  • For more information about linuxptp see: https://tsn.readthedocs.io/timesync.html

The expected output is something like this:

sending: GET PORT_DATA_SET
	dca632.fffe.054d2e-1 seq 0 RESPONSE MANAGEMENT PORT_DATA_SET 
		portIdentity            dca632.fffe.054d2e-1
		portState               SLAVE
		logMinDelayReqInterval  0
		peerMeanPathDelay       131
		logAnnounceInterval     0
		announceReceiptTimeout  5
		logSyncInterval         -3
		delayMechanism          2
		logMinPdelayReqInterval 0
		versionNumber           2
sending: GET TIME_STATUS_NP
	dca632.fffe.054d2e-0 seq 0 RESPONSE MANAGEMENT TIME_STATUS_NP 
		master_offset              133
		ingress_time               7367999354577
		cumulativeScaledRateOffset -0.000004567
		scaledLastGmPhaseChange    0
		gmTimeBaseIndicator        0
		lastGmPhaseChange          0x0000'0000000000000000.0000
		gmPresent                  true
		gmIdentity                 6c5c35.fffe.44833e

Expected bugs:

  • its stable now :)