jclark / pc-ptp-ntp-guide

Guide to precision network time synchronization on PC hardware
19 stars 1 forks source link

ts2phc configuration file should include pin_index #1

Closed 652436962 closed 6 months ago

652436962 commented 10 months ago

Why don’t you need to specify sdp?

cat /etc/linuxptp/ts2phc-generic.cfg

[global] ts2phc.extts_polarity both ts2phc.pulsewidth 100000000 leapfile /usr/share/zoneinfo/leap-seconds.list step_threshold 0.1

ts2phc.nmea_serialport /dev/ttyS9

ts2phc.nmea_baudrate 9600

logging_level 7

[enp1s0]

jclark commented 10 months ago

You mean ts2phc.pin_index, right? It defaults to zero, which is often right, but I agree it would be helpful to put it in the configuration file. Thanks for the suggestion!

652436962 commented 10 months ago

”> You mean ts2phc.pin_index, right? It defaults to zero, which is often right, but I agree it would be helpful to put it in the configuration file. Thanks for the suggestion!” You mean ts2phc.pin_index, right? yes I started the task based on your documentation and official documentation, but after a while there will be a value of a few microseconds. Is this normal?

image image

image

jclark commented 10 months ago

Is there a switch between the GM and the client?

652436962 commented 10 months ago

Is there a switch between the GM and the client?

no

jclark commented 10 months ago

That doesn't sound normal.

I don't understand what ts2phc_slave is doing,

652436962 commented 10 months ago

That doesn't sound normal.

  • What is your hardware configuration (GM, client, GPS)?
  • What are you measuring? What is showing a value of a few microseconds?

I don't understand what ts2phc_slave is doing,

os : buildroot

gm is rockchip3568 inter i210 gprmc + pps .

ts2phc_slave output 1pps

between gm 1pps and ptp client have a value of a few microseconds

jclark commented 10 months ago

Sorry, I don't understand. Please explain your setup in much more detail.

I still don't understand why you are using ts2phc_slave. Why aren't you getting the PPS from the GM using PHC periodic output on the SDP of the i210?

652436962 commented 10 months ago

Sorry, I don't understand. Please explain your setup in much more detail.

I still don't understand why you are using ts2phc_slave. Why aren't you getting the PPS from the GM using PHC periodic output on the SDP of the i210?

The two devices are synchronized using ptp, and the slave device outputs 1pps through ts2phc

jclark commented 10 months ago

I am not going to be able to help unless you give me much, more detail.

652436962 commented 10 months ago

I am not going to be able to help unless you give me much, more detail.

  • config files
  • command lines
  • logs
  • hardware used for the client
  • hardware used for the GM in detail; I don't know what "rockchip3568 inter i210 gprmc + pps" means

Why aren't you getting the PPS from the GM using PHC periodic output on the SDP of the i210? How to set this up specifically?

arm64 chip : rk3568

ts2phc_slave [global] use_syslog 0 verbose 1 logging_level 6 ts2phc.pulsewidth 100000000 [enp1s0] ts2phc.channel 0

ts2phc.extts_polarity both ts2phc.pin_index 1

jclark commented 10 months ago

You set it up like this:

https://github.com/jclark/rpi-cm4-ptp-guide/blob/main/measure.md#enable-pps-output

However with the i210, you cannot specify the -w argument. It always defaults to 50% duty cycle.

652436962 commented 10 months ago

You set it up like this:

https://github.com/jclark/rpi-cm4-ptp-guide/blob/main/measure.md#enable-pps-output

However with the i210, you cannot specify the -w argument. It always defaults to 50% duty cycle.

I tested it, testptp cannot output on my platform

jclark commented 10 months ago

You're saying:

  1. you have an i210
  2. you have SDPs
  3. external timestamping works
  4. periodic output doesn't work

That seems very strange. I can't think of any reason why that could be the case.

What does phc_ctl enp1s0 say?

652436962 commented 10 months ago

You're saying:

  1. you have an i210
  2. you have SDPs
  3. external timestamping works
  4. periodic output doesn't work

That seems very strange. I can't think of any reason why that could be the case.

What does phc_ctl enp1s0 say?

I think it's a switch problem. I removed the switch and it doesn't seem to have this problem. I still need to test it.

652436962 commented 10 months ago

image image

I tested and found that after about 26393 seconds, the difference between the pps of his server and the client became larger and larger.

jclark commented 10 months ago

What happens after that?

My guess is that ts2phc got confused: it's not very robust. I suggest you start to investigate the problem by looking at the logs for ts2phc.

652436962 commented 10 months ago

What happens after that?

My guess is that ts2phc got confused: it's not very robust. I suggest you start to investigate the problem by looking at the logs for ts2phc.

image It shows this, there is no pps deviation data anymore

jclark commented 10 months ago

"poll returns zero" means that ts2phc isn't receiving PPS events.

"clearing Tx timestamp bug" suggests you have a kernel/driver problem (I guess a problem with igb driver on your ARM system).

jclark commented 10 months ago

What kernel are you using? Is the i210 on a separate PCIe card or is it on the board?

652436962 commented 10 months ago

What kernel are you using? Is the i210 on a separate PCIe card or is it on the board?

kernel 5.10 pcie2.0 rockchip rk3568(arm64)

jclark commented 10 months ago

This isn't going to be straightforward to fix.

I suggest first trying a newer kernel. I believe 6.1 is available or coming soon for the rk3568. Another thing to try is to figure out whether this a arm64 problem or whether it's specific to rk3568.

What board do you have?

652436962 commented 10 months ago

This isn't going to be straightforward to fix.

I suggest first trying a newer kernel. I believe 6.1 is available or coming soon for the rk3568. Another thing to try is to figure out whether this a arm64 problem or whether it's specific to rk3568.

What board do you have?

itop-3568, a board by a small company

652436962 commented 9 months ago

ts2phc[481.201]: config item (null).free_running is 0 ts2phc[481.201]: PPS sink enp1s0 has ptp index 0 ts2phc[481.201]: UTC-TAI offset not set in system! Trying to revert to leapfile ts2phc[481.201]: config item (null).leapfile is '/usr/share/zoneinfo/leap-seconds.list' ts2phc[481.823]: UTC time is past leap second table expiry date ts2phc[481.823]: source ts not valid ts2phc[481.823]: UTC time is past leap second table expiry date ts2phc[481.823]: source ts not valid ts2phc[481.923]: UTC time is past leap second table expiry date ts2phc[481.923]: source ts not valid ts2phc[481.923]: UTC time is past leap second table expiry date ts2phc[481.923]: source ts not valid ts2phc[482.823]: UTC time is past leap second table expiry date ts2phc[482.823]: source ts not valid ts2phc[482.824]: UTC time is past leap second table expiry datets2phc[481.201]: config item (null).free_running is 0 ts2phc[481.201]: PPS sink enp1s0 has ptp index 0 ts2phc[481.201]: UTC-TAI offset not set in system! Trying to revert to leapfile ts2phc[481.201]: config item (null).leapfile is '/usr/share/zoneinfo/leap-seconds.list' ts2phc[481.823]: UTC time is past leap second table expiry date ts2phc[481.823]: source ts not valid ts2phc[481.823]: UTC time is past leap second table expiry date ts2phc[481.823]: source ts not valid ts2phc[481.923]: UTC time is past leap second table expiry date ts2phc[481.923]: source ts not valid ts2phc[481.923]: UTC time is past leap second table expiry date ts2phc[481.923]: source ts not valid ts2phc[482.823]: UTC time is past leap second table expiry date ts2phc[482.823]: source ts not valid ts2phc[482.824]: UTC time is past leap second table expiry date

hello , why is that? I ran ts2phc according to the previous settings, and this appeared:

jclark commented 9 months ago

This means /usr/share/zoneinfo/leap-seconds.list is out of date. You can update the relevant distro package. Or download an updated one from

https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list

652436962 commented 9 months ago

This means is out of date. You can update the relevant distro package. Or download an updated one from/usr/share/zoneinfo/leap-seconds.list

https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list

ok thanks

652436962 commented 9 months ago

This means is out of date. You can update the relevant distro package. Or download an updated one from/usr/share/zoneinfo/leap-seconds.list

https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list

In which directory are the logs generated by ts2phc located? Can I set the path?

jclark commented 9 months ago

ts2phc logs using syslog.

652436962 commented 9 months ago

ts2phc logs using syslog.

thank you