measuring the accuracy of 1588v2 protocol
Started by 5 years ago●2 replies●latest reply 5 years ago●96 viewsI have a laptop (Aser Aspire E 15 E15-571G-57YT; Ubuntu Bionic Beaver) with ptp4l server running on it. I also have PH8700 SOM (BeagleBone Black like PCB) with custom linux image (built with buildroot). And I have ptp4l client running on it. I have the following questions... What time does exactly ptp4l adjusting? How can I get it in kernel space (Does getnstimeofday() read the very same timestamp, that ptp4l is adjusting)? Also how can I check if PH8700 SOM <----> Aser Aspire E 15 E15-571G-57YT adjustment use hardware timestamping (1588v2)? Is Aser Aspire E 15 E15-571G-57YT laptop's NIC even capable of that feature? And the last question how can I measure the actual accuracy of 1588v2 (or at least 1588v1) time adjustment on my PH8700 module? Thanks a lot!
Well, the question about checking the hardware timestamping capability is clarified. You need to use "ethtool -T enp2s0f1" (enp2s0f1 is the ethernet interface name) command. It shows the information about hardware timestamping capability... So, what about ather questions? Measuring 1588 accuracy seems to be pretty complex task, can't find the solution for this... Can somebody help me?
The second question is clarified as well. ptp4l is adjusting some reference clock (maybe from some hardware timer) with simple PID loop and then syncs it by means of phc2sys with system time (which is a structure mantained by linux kernel using clocksource). So, getnstimeofday() reads the very same timestamp that ptp client is adjusting, I've checked it with simple kernel module witch uses getnstimeofday() on my PH8700 SoM and with date +%s%N command on my laptop, the time seems to be the same (at least seconds). The only question that has left is how to measure the accuracy of synchronization with nanosecond exactness?