gPTP master port of sja1110

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

gPTP master port of sja1110

ソリューションへジャンプ
1,634件の閲覧回数
xiaoshumiao
Contributor IV

This question has troubled me for a long time. I hope to get an answer. 

I will be very grateful。

I am using S32G-VNP-RDB3 and LinuxBSP 43.0.

Configuring sja1110 as grand master or bridge, the master port (port 4)always sends only sync messages without follow up messages. Then the flag field of the sync message shows two step. I don't know why no follow up message was sent.

The s32g pfe0 port as the slave port sends  pdelay req message, but the sja1110 port4 as the master port does not respond to the pdealy req message and sends a qdelay resp message.

The command for s32g pfe0 as slave port is:

sudo ./ptp4l -i pfe0 -f configs/automotive-slave.cfg --step_threshold=1 -m

xiaoshumiao_0-1750661032527.png

 

However, when sja1110 is configured as a bridge, the slave port of sja1110 can synchronize time normally. Sja1110 port4 as a slave port can synchronize time normally with s32g pfe0 as a master port.

The command for s32g pfe0 as master port is:

bluebox@ubuntu-s32g399ardb3:~/linuxptp$ sudo ./ptp4l -i pfe0 -f configs/automotive-master.cfg --step_threshold=1 -m

I uploaded my project and the capture file.

 

 

 

 

 

0 件の賞賛
返信
1 解決策
915件の閲覧回数
PavelL
NXP Employee
NXP Employee

Hello @xiaoshumiao ,

I also noticed the timer configuration issue.

After spending a significant amount of time on this and performing a deep investigation using the Lauterbach debugger, I was able to identify the root cause: adding the tcpip component and the lwip_demo.c file to the gptp_sja1110x project introduces the same faulty behavior.

At this point, the only available workaround is to remove both the lwip and tcpip components from the project. Please refer to gptp_sja1110x/main.c for an example of how the switch and gPTP are initialized without lwIP. Also, take note of the ENET settings, which differ slightly from those in the switch_config_s32g_vnp_rdb example.

I apologize for any inconvenience this may have caused.

Best regards,

Pavel

元の投稿で解決策を見る

0 件の賞賛
返信
13 返答(返信)
1,560件の閲覧回数
PavelL
NXP Employee
NXP Employee

Hello @xiaoshumiao ,

I apologize for the delayed reply.

I need more time, since I don't know the answer right now.

Thank you for your patience.

Best regards,

Pavel

0 件の賞賛
返信
1,186件の閲覧回数
xiaoshumiao
Contributor IV

Hello @PavelL ,

Thank you very much, I have tried to solve it many times but to no avail.

0 件の賞賛
返信
1,155件の閲覧回数
PavelL
NXP Employee
NXP Employee

Hello @xiaoshumiao ,

I apologize for the late response caused by workload.

After reviewing your project, everything I checked looks correct — including the source code and gPTP settings. However, I noticed that only one port is defined for gPTP. You might want to try enabling the "Pdelay Initiator" option for that port.

Could you please confirm which port you are using to connect Wireshark on your PC?

General suggestions:

  • Please compare your project with the reference example gptp_sja1110x, which was prepared for the SJA1110-EVM board.
  • Also, refer to the gPTP application note, available on the SJA1110 product page under the Documents section (in Secure Files).

Best regards,

Pavel

0 件の賞賛
返信
1,088件の閲覧回数
xiaoshumiao
Contributor IV

Hello @PavelL ,

1. When as bridge, the slave is port 4 and the master is port 2.

xiaoshumiao_2-1751879716342.pngxiaoshumiao_3-1751879736089.png

Connected the slave port to nvidia orin, and then captured the packets on nvidia orin.

sudo  tcpdump -i any -vnn -w tsn0707.pcap

2. when sja1110 as grandmaster, the grandmaster is port 4, and the s32g pfe0 is slave.

in this case,  capture the packets on s32g: sudo  tcpdump -i any -vnn -w tsn0707.pcap

In this case, the captured packet only has sync but no follow up.

 

 

0 件の賞賛
返信
1,061件の閲覧回数
PavelL
NXP Employee
NXP Employee

Hello @xiaoshumiao ,

I apologize for the delayed response due to public holidays.

I can't see the reason for such a behavior. I will further investigated. I will keep you updated on any progress.

Best regards,

Pavel

0 件の賞賛
返信
965件の閲覧回数
PavelL
NXP Employee
NXP Employee

Hello @xiaoshumiao ,

I apologize for the late response caused my workload.

I was able to replicate your issue. It's still not clear to me, because gptp_sja1110x example working well on SJA1110-EVM.

I'll do my best to reply within this week.

Thank you for your patience.

Best regards,

Pavel

0 件の賞賛
返信
932件の閲覧回数
xiaoshumiao
Contributor IV

Hello @PavelL 

Thank you for your continued attention to this issue.

I found a mistake in the configuration, which was caused by my carelessness.

The trigger source of LPIT channel 3 should be changed to internal trigger.

xiaoshumiao_0-1752744828562.png

Other changes I made are:

xiaoshumiao_1-1752746723825.pngxiaoshumiao_2-1752746780690.png

In this case, follow up messages are occasionally sent, but I don't know the reason.

xiaoshumiao_3-1752746880092.png

The attachment is the captured package.

0 件の賞賛
返信
916件の閲覧回数
PavelL
NXP Employee
NXP Employee

Hello @xiaoshumiao ,

I also noticed the timer configuration issue.

After spending a significant amount of time on this and performing a deep investigation using the Lauterbach debugger, I was able to identify the root cause: adding the tcpip component and the lwip_demo.c file to the gptp_sja1110x project introduces the same faulty behavior.

At this point, the only available workaround is to remove both the lwip and tcpip components from the project. Please refer to gptp_sja1110x/main.c for an example of how the switch and gPTP are initialized without lwIP. Also, take note of the ENET settings, which differ slightly from those in the switch_config_s32g_vnp_rdb example.

I apologize for any inconvenience this may have caused.

Best regards,

Pavel

0 件の賞賛
返信
506件の閲覧回数
xiaoshumiao
Contributor IV

Hello @PavelL ,

Normally, the tcpip component should not affect the normal operation of the gPTP component. Will nxp fix it later?

0 件の賞賛
返信
498件の閲覧回数
PavelL
NXP Employee
NXP Employee

Hello @xiaoshumiao ,

yes, you are right. In the meantime, I did some research and I have a solution. I will share it via private email within this week.

Best regards,

Pavel

0 件の賞賛
返信
200件の閲覧回数
xiaoshumiao
Contributor IV

Hello @PavelL 

I have replied to this email, can you see it?tech.support@nxp.com

0 件の賞賛
返信
34件の閲覧回数
PavelL
NXP Employee
NXP Employee

Hello @xiaoshumiao ,

a new support case has been created on your behalf. You have already replied on that, as well I have. It is still on progress. I will keep you informed in that new support case.

Best regards,

Pavel

0 件の賞賛
返信
819件の閲覧回数
xiaoshumiao
Contributor IV

hello @PavelL ,

Thank you so much, I will follow your suggestion.

0 件の賞賛
返信