首页 > 其他分享 >testptp

testptp

时间:2024-07-03 23:10:00浏览次数:1  
标签:PHC dev seconds time test testptp ptp

Test the PTP Physical Hardware Clock functionality using the "phc_ctl" (a
part of "linuxptp").

The test contains three sub-tests:
  * "settime" test
  * "adjtime" test
  * "adjfreq" test

"settime" test:
  * set the PHC time to 0 seconds.
  * wait for 120.5 seconds.
  * check if PHC time equal to 120.XX seconds.

"adjtime" test:
  * set the PHC time to 0 seconds.
  * adjust the time by 10 seconds.
  * check if PHC time equal to 10.XX seconds.

"adjfreq" test:
  * adjust the PHC frequency to be 1% faster.
  * set the PHC time to 0 seconds.
  * wait for 100.5 seconds.
  * check if PHC time equal to 101.XX seconds.

Usage:
  $ ./phc.sh /dev/ptp<X>

  It is possible to run a subset of the tests, for example:
    * To run only the "settime" test:
      $ TESTS="settime" ./phc.sh /dev/ptp<X>

 



ptp_dev=`ethtool -T enp66s0f1 | awk '/PTP Hardware Clock:/ {print $4}'` && testptp -d /dev/ptp$ptp_dev -L 0,1

 

 Set PPS-in read external time stamp events:

ptp_dev=`ethtool -T enp66s0f1 | awk '/PTP Hardware Clock:/ {print $4}'` && testptp -d /dev/ptp$ptp_dev -e 1000

 

 标志“-e<number>”读取指定数量的外部时间戳事件。<number> 设置为 -1 可让 testptp 无限读取时间戳。

 ts2PHC 和 testptp 都以文件描述符的形式读取 PPS 消息,不能一起运行。Testptp 仍可用于引脚配置或启用 pps 输出。

 

在 clx-zeus-18 (GM) 上设置 PPS-out

 

 在 PPS 输出端生成周期性信号

 

 ts2phc“是linuxptp软件包中的一个应用程序,ts2phc将PTP硬件时钟(PHC)同步到外部时间戳信号。单个源可用于将时间分配给一个或多个PHC设备。

 

标签:PHC,dev,seconds,time,test,testptp,ptp
From: https://www.cnblogs.com/a280723148/p/18282696

相关文章