The use of ptp4l has some issues.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

The use of ptp4l has some issues.

1,020 Views
rqyang
Contributor I

Hi

     I am using the S32G274ARDB2 board with the BSP33 kernel. Currently, I am facing an issue while using ptp4l for time synchronization.

I first checked the capabilities of eth0. It can be observed that eth0 is using hardware timestamping from /dev/ptp0.

rqyang_0-1692868400876.png

When I connect two boards and try to perform hardware time synchronization using the following command, I am unable to sync the hardware time of the other board to the local hardware time of the S32G board.

ptp4l -m -q -P -H -2 -i eth0 --step_threshold=0.00002 -l 6

rqyang_1-1692868654755.png

 

Then I tried using "phc2sys" to synchronize the hardware time to the system time. I used the following command:  (failed again)

phc2sys -c /dev/ptp0 -s CLOCK_REALTIME -O 0 -q --step_threshold=0.00002 -m

rqyang_2-1692868754076.png

 

After running our hardware timestamping tool, we noticed that the hardware timestamp on the S32G board remained unchanged. For more details, please refer to the log. (Our tool adds 3600 seconds to the timestamp after running it to verify if it can be written to the hardware timestamp.)

 

Therefore, I believe that the reason for the failed time synchronization is that the hardware time recorded in /dev/ptp0 does not change on its own. Is this the reason? If so, what methods can I use to synchronize the hardware clock?

 

 

 

 

0 Kudos
Reply
1 Reply

971 Views
rqyang
Contributor I

hello,

       Can experts help me?

0 Kudos
Reply