AnsweredAssumed Answered

Issue with ptp hardware timestamp imx6

Question asked by khaleel shaik on Dec 14, 2018

Hi 

 

I'm trying to sync the clock b/w 2 imx6dl boards with hardware and software time stamping. I have followed the below link and able to sync the clock with software time stamping.

The Linux PTP Project 

With ethtool, i can see that it supports both software and hardware timestamp

root@phyboard-mira-imx6-7:~# ethtool -T eth0
Time stamping parameters for eth0:
Capabilities:
hardware-transmit (SOF_TIMESTAMPING_TX_HARDWARE)
software-transmit (SOF_TIMESTAMPING_TX_SOFTWARE)
hardware-receive (SOF_TIMESTAMPING_RX_HARDWARE)
software-receive (SOF_TIMESTAMPING_RX_SOFTWARE)
software-system-clock (SOF_TIMESTAMPING_SOFTWARE)
hardware-raw-clock (SOF_TIMESTAMPING_RAW_HARDWARE)
PTP Hardware Clock: 0
Hardware Transmit Timestamp Modes:
off (HWTSTAMP_TX_OFF)
on (HWTSTAMP_TX_ON)
Hardware Receive Filter Modes:
none (HWTSTAMP_FILTER_NONE)
all (HWTSTAMP_FILTER_ALL)

 

Below is the slaves output with software time stamp

root@phyboard-mira-imx6-7:~# ptp4l -i eth0 -S -s -m
ptp4l[726.639]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[726.641]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[727.116]: port 1: new foreign master 9840bb.fffe.39baf7-1
ptp4l[727.118]: port 1: new foreign master 502df4.fffe.0b5840-1
ptp4l[731.116]: selected best master clock 9840bb.fffe.39baf7
ptp4l[731.116]: foreign master not using PTP timescale
ptp4l[731.117]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE
ptp4l[731.118]: selected best master clock 502df4.fffe.0b5840
ptp4l[731.118]: foreign master not using PTP timescale
ptp4l[733.118]: master offset -17883708630450 s0 freq -37532 path delay 59668
ptp4l[734.118]: master offset -17883708586248 s0 freq -37532 path delay 59668
ptp4l[735.118]: master offset -17883708545313 s0 freq -37532 path delay 52602
ptp4l[736.118]: master offset -17883708512346 s0 freq -37532 path delay 55504
ptp4l[737.118]: master offset -17883708478827 s0 freq -37532 path delay 54187
ptp4l[738.118]: master offset -17883708445625 s0 freq -37532 path delay 54187
ptp4l[739.119]: master offset -17883708410979 s0 freq -37532 path delay 56078
ptp4l[740.119]: master offset -17883708370443 s0 freq -37532 path delay 56078
ptp4l[741.119]: master offset -17883708350767 s0 freq -37532 path delay 55269
ptp4l[742.119]: master offset -17883708311806 s0 freq -37532 path delay 55843
ptp4l[743.119]: master offset -17883708277008 s0 freq -37532 path delay 54246
ptp4l[744.119]: master offset -17883708233138 s0 freq -37532 path delay 54246
ptp4l[745.119]: master offset -17883708174601 s0 freq -37532 path delay 54246
ptp4l[746.119]: master offset -17883708163066 s0 freq -37532 path delay 54246
ptp4l[747.120]: master offset -17883708118787 s0 freq -37532 path delay 55171
ptp4l[748.120]: master offset -17883708097060 s0 freq -37532 path delay 56978
ptp4l[749.120]: master offset -17883708060857 s1 freq -1936 path delay 56978
ptp4l[750.120]: master offset -5123 s2 freq -2453 path delay 56978
ptp4l[750.120]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED
ptp4l[751.120]: master offset 993 s2 freq -1841 path delay 56978
ptp4l[752.120]: master offset -7894 s2 freq -2737 path delay 57711
ptp4l[753.120]: master offset -6826 s2 freq -2637 path delay 57711
ptp4l[754.120]: master offset -4274 s2 freq -2386 path delay 58463

 

But with hardware time stamp, i'm not able to sync the clock 

 

root@phyboard-mira-imx6-7:~# ptp4l -i eth0 -s -m
ptp4l[1084.333]: selected /dev/ptp0 as PTP clock
ptp4l[1084.336]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[1084.337]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[1085.822]: port 1: new foreign master 502df4.fffe.0b5840-1
ptp4l[1089.823]: selected best master clock 502df4.fffe.0b5840
ptp4l[1089.823]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE
ptp4l[1091.822]: master offset -17881927778001 s0 freq +0 path delay 0
ptp4l[1092.822]: master offset -17881927778001 s0 freq +0 path delay 0
ptp4l[1093.823]: master offset -17881927778001 s0 freq +0 path delay 0
ptp4l[1094.823]: master offset -17881927778001 s0 freq +0 path delay 0
ptp4l[1095.823]: master offset -17881927778001 s0 freq +0 path delay 0
ptp4l[1096.823]: master offset -17881927778001 s0 freq +0 path delay 0
ptp4l[1097.823]: master offset -17881927778001 s0 freq +0 path delay 0
ptp4l[1098.823]: master offset -17881927778001 s0 freq +0 path delay 0
ptp4l[1099.823]: master offset -17881927778001 s0 freq +0 path delay 0
ptp4l[1100.823]: master offset -17881927778001 s0 freq +0 path delay 0
ptp4l[1101.823]: master offset -17881927778001 s0 freq +0 path delay 0


Is any additional configurations needed for hardware timestamp?

 

Regards

khaleel

Outcomes