|
From: Gao Meitao(高. <mei...@as...> - 2022-07-06 06:30:10
|
Hi all:
I try to test ptp as slave for my evb borad, and found that it seem not work properly , as you can see from below logs
First run, it seem be out of control by ptp, after run again, thing seem work fine.
Any suggestion about this ? thanks in advance
sh-4.4# ptp4l -i eth0 -m -s
ptp4l[113.936]: selected /dev/ptp0 as PTP clock
ptp4l[113.938]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[113.938]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[113.938]: port 1: link up
ptp4l[114.611]: port 1: new foreign master 3c7c3f.fffe.52836b-1
ptp4l[118.611]: selected best master clock 3c7c3f.fffe.52836b
ptp4l[118.612]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE
ptp4l[120.924]: master offset 4892970 s0 freq +0 path delay 10137
ptp4l[121.924]: master offset 4891972 s1 freq -998 path delay 10184
ptp4l[123.925]: master offset 205043608 s2 freq +62500000 path delay -5057707
ptp4l[123.925]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED
ptp4l[124.925]: master offset 305049479 s2 freq +62500000 path delay -5057707
ptp4l[125.925]: master offset 410122852 s2 freq +62500000 path delay -10125551
ptp4l[126.925]: master offset 510000365 s2 freq +62500000 path delay -9996884
ptp4l[127.925]: master offset 614778485 s2 freq +62500000 path delay -14769127
ptp4l[128.925]: master offset 719428102 s2 freq +62500000 path delay -19412703
ptp4l[129.925]: master offset 819434760 s2 freq +62500000 path delay -19412703
ptp4l[130.925]: master offset 925152988 s2 freq +62500000 path delay -25124444
ptp4l[131.925]: master offset 1025158638 s2 freq +62500000 path delay -25124444
ptp4l[132.925]: master offset 1134366095 s2 freq +62500000 path delay -34325912
ptp4l[133.925]: master offset 1231821341 s2 freq +62500000 path delay -31775534
ptp4l[134.925]: master offset 1326115786 s2 freq +62500000 path delay -26063793
ptp4l[135.925]: master offset 1426121794 s2 freq +62500000 path delay -26063793
ptp4l[136.925]: master offset 1526127707 s2 freq +62500000 path delay -26063793
^Csh-4.4# ptp4l -i eth0 -m -s
ptp4l[138.552]: selected /dev/ptp0 as PTP clock
ptp4l[138.553]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[138.554]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[138.554]: port 1: link up
ptp4l[138.612]: port 1: new foreign master 3c7c3f.fffe.52836b-1
ptp4l[142.612]: selected best master clock 3c7c3f.fffe.52836b
ptp4l[142.612]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE
ptp4l[143.926]: master offset -4290093738 s0 freq +62500000 path delay 10104
ptp4l[144.926]: master offset -4290094645 s1 freq +62499150 path delay 10136
ptp4l[145.926]: master offset -1045 s2 freq +62498105 path delay 10136
ptp4l[145.926]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED
ptp4l[146.926]: master offset -1705 s2 freq +62497131 path delay 10136
ptp4l[147.926]: master offset -2637 s2 freq +62495688 path delay 10143
ptp4l[148.926]: master offset -3673 s2 freq +62493861 path delay 10183
ptp4l[149.926]: master offset -4483 s2 freq +62491949 path delay 10143
ptp4l[150.926]: master offset -5298 s2 freq +62489789 path delay 10183
ptp4l[151.927]: master offset -6344 s2 freq +62487153 path delay 10183
ptp4l[152.927]: master offset -7228 s2 freq +62484366 path delay 10157
ptp4l[153.927]: master offset -8000 s2 freq +62481426 path delay 10139
ptp4l[154.927]: master offset -9057 s2 freq +62477969 path delay 10180
ptp4l[155.927]: master offset -9752 s2 freq +62474557 path delay 10180
ptp4l[156.927]: master offset -10690 s2 freq +62470693 path delay 10133
ptp4l[157.927]: master offset -11519 s2 freq +62466657 path delay 10111
ptp4l[158.927]: master offset -12389 s2 freq +62462331 path delay 10111
ptp4l[159.927]: master offset -13234 s2 freq +62457770 path delay 10101
ptp4l[160.927]: master offset -14085 s2 freq +62452949 path delay 10082
ptp4l[161.927]: master offset -14991 s2 freq +62447817 path delay 10082
ptp4l[162.927]: master offset -15970 s2 freq +62442341 path delay 10101
ptp4l[163.927]: master offset -16857 s2 freq +62436663 path delay 10098
ptp4l[164.927]: master offset -17732 s2 freq +62430731 path delay 10098
ptp4l[165.927]: master offset -18523 s2 freq +62424620 path delay 10073
ptp4l[166.928]: master offset -19340 s2 freq +62418246 path delay 10080
ptp4l[167.928]: master offset -20225 s2 freq +62411559 path delay 10080
ptp4l[168.928]: master offset -21201 s2 freq +62404516 path delay 10080
|
|
From: Richard C. <ric...@gm...> - 2022-07-06 14:00:51
|
On Wed, Jul 06, 2022 at 06:07:40AM +0000, Gao Meitao(高玫涛) wrote: > Hi all: > > I try to test ptp as slave for my evb borad, and found that it seem not work properly , as you can see from below logs > First run, it seem be out of control by ptp, after run again, thing seem work fine. > > Any suggestion about this ? thanks in advance What device is that? Check the implementation of the hardware and of the device driver WRT: 1. clock control 2. time stamp generation + reporting Good luck, Richard |
|
From: Gao Meitao(高. <mei...@as...> - 2022-07-07 02:01:29
|
Hi Richard:
We use Arasan GEMAC-1588-AVB, clock control looks like simple, a fix 100M clock as input, you could change Increment Attributes Register for ethernet system timer
I think it doen't have fine freq adjustment. So this should be reason?
Register settting example
• If the Increment Value is 10 and the Increment Period is 1, a value of 10 is added to
the counter every clock. This gives a counter operating at nanosecond resolution and
counts time in terms of nanoseconds.
• If the Increment Value is 100 and the Increment Period is 1, a value of 100 is added
to the counter every clock. This gives a counter operating at 0.1 ns resolution and
counts time in terms of 0.1 ns.
Timestamping generate by hardware, be save by register, driver read tx/rx timestamp then pass them to application.
Does ptp4l has a feather that only adjust time offset not freq ?
Thans for your reply .
-----邮件原件-----
发件人: Richard Cochran [mailto:ric...@gm...]
发送时间: 2022年7月6日 22:01
收件人: Gao Meitao(高玫涛) <mei...@as...>
抄送: lin...@li...
主题: Re: [Linuxptp-users] PTP
On Wed, Jul 06, 2022 at 06:07:40AM +0000, Gao Meitao(高玫涛) wrote:
> Hi all:
>
> I try to test ptp as slave for my evb borad, and found that it seem not work properly , as you can see from below logs
> First run, it seem be out of control by ptp, after run again, thing seem work fine.
>
> Any suggestion about this ? thanks in advance
What device is that?
Check the implementation of the hardware and of the device driver WRT:
1. clock control
2. time stamp generation + reporting
Good luck,
Richard
|
|
From: Richard C. <ric...@gm...> - 2022-07-08 00:27:37
|
On Thu, Jul 07, 2022 at 01:52:32AM +0000, Gao Meitao(高玫涛) wrote: > Does ptp4l has a feather that only adjust time offset not freq ? Yes, see the man page. |
|
From: Gao Meitao(高. <mei...@as...> - 2022-07-08 03:05:29
|
Richard:
You mean free_running paremter ? I check source code of ptp, found that clock sync only use clockadj_set_freq function.
Thanks.
-----邮件原件-----
发件人: Richard Cochran [mailto:ric...@gm...]
发送时间: 2022年7月8日 8:27
收件人: Gao Meitao(高玫涛) <mei...@as...>
抄送: lin...@li...
主题: Re: 答复: [Linuxptp-users] PTP
On Thu, Jul 07, 2022 at 01:52:32AM +0000, Gao Meitao(高玫涛) wrote:
> Does ptp4l has a feather that only adjust time offset not freq ?
Yes, see the man page.
|
|
From: Maciek M. <ma...@ma...> - 2022-07-09 06:41:01
|
Nope, I think it's more about the clock_servo option. Free-running will not do anything to the clock. clock_servo The servo which is used to synchronize the local clock. Valid values are [...] "nullf" for a servo thatalways dials frequency offset zero (for use in SyncE nodes). Regards Maciek > -----Original Message----- > From: Gao Meitao(高玫涛) <mei...@as...> > Sent: Friday, July 8, 2022 5:05 AM > To: Richard Cochran <ric...@gm...> > Cc: lin...@li... > Subject: [Linuxptp-users] 答复: 答复: PTP > > Richard: > You mean free_running paremter ? I check source code of ptp, found that > clock sync only use clockadj_set_freq function. > > > Thanks. > > -----邮件原件----- > 发件人: Richard Cochran [mailto:ric...@gm...] > 发送时间: 2022年7月8日 8:27 > 收件人: Gao Meitao(高玫涛) <mei...@as...> > 抄送: lin...@li... > 主题: Re: 答复: [Linuxptp-users] PTP > > On Thu, Jul 07, 2022 at 01:52:32AM +0000, Gao Meitao(高玫涛) wrote: > > Does ptp4l has a feather that only adjust time offset not freq ? > > Yes, see the man page. > > _______________________________________________ > Linuxptp-users mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxptp-users |