SJA1110 TSN GPTP

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

SJA1110 TSN GPTP

Jump to solution
2,492 Views
Ethan_L
Contributor III

Hi community,

I want to use GPTP to sync SJA1110 and S32G2?

S32G2 running BSP33.

I can measure the followup frame from SJA1110 master port, and S32G2 using "ptp4l" in slave mode.

The result is that SJA1110 and S32G2 are not sync.

How can I use GPTP to sync SJA1110 and S32G2 ?

Thanks,

Ethan.

0 Kudos
1 Solution
2,395 Views
Sabeur
NXP Employee
NXP Employee

Hi, 

 

Thanks for the log. 
What you are missing is to run Linux PTP with Automotive profile, which is already supported in the project example you are running on the SJA1110.
To run ptp4l in that mode, the command-line is the same as presented in Synchronizing the PHC but with a different configuration file. 
Please use the config files in : https://github.com/richardcochran/linuxptp/tree/master/configs, then run 

ptp4l -i eth0 -f configs/automotive-master.cfg --step_threshold=1 -m
ptp4l -i eth0 -f configs/automotive-slave.cfg --step_threshold=1 -m

automotive-slave.cfg and automotive-master.cfg are not part of the bsp so you need to copy them manually into your rootfs.

I tested the slave config on RDB2 (after configuring port #4 of the switch as a master) with the following command: ptp4l -i pfe0 -f /root/automotive-slave.cfg --step_threshold=1 -m and it worked. 
Can you please give a try and let us know ?


thanks!

 

View solution in original post

13 Replies
2,452 Views
Sabeur
NXP Employee
NXP Employee

Hi, 

 

Thanks for the details. Are you using GMAC ?
If yes can you please sync pfe0 with GMAC or the SJA1110 with GMAC ?
If not can you sync 2 pfe interfaces together or any pfe interface with a PC which should have a NIC which supports L2 timestamping ?

And please can your share some logs of ptp4l ?

thanks, Sabeur 

 

0 Kudos
2,448 Views
Ethan_L
Contributor III

Hi @Sabeur ,

I use pfe_mac0 on S32G2 and port4 on SJA1110(SGMII). 

I can sync 2 S32G2 or 2 SJA1110, but I cannot sync S32G2 and SJA1110.

Attached log is sja1110 for GM, G32G2 for slave.

I think maybe some config needs to be done for ptp4l, but I cannot succeed.

Has NXP tried this before on the S32G-VNP-RDB2?

Thanks,

Ethan.

0 Kudos
2,396 Views
Sabeur
NXP Employee
NXP Employee

Hi, 

 

Thanks for the log. 
What you are missing is to run Linux PTP with Automotive profile, which is already supported in the project example you are running on the SJA1110.
To run ptp4l in that mode, the command-line is the same as presented in Synchronizing the PHC but with a different configuration file. 
Please use the config files in : https://github.com/richardcochran/linuxptp/tree/master/configs, then run 

ptp4l -i eth0 -f configs/automotive-master.cfg --step_threshold=1 -m
ptp4l -i eth0 -f configs/automotive-slave.cfg --step_threshold=1 -m

automotive-slave.cfg and automotive-master.cfg are not part of the bsp so you need to copy them manually into your rootfs.

I tested the slave config on RDB2 (after configuring port #4 of the switch as a master) with the following command: ptp4l -i pfe0 -f /root/automotive-slave.cfg --step_threshold=1 -m and it worked. 
Can you please give a try and let us know ?


thanks!

 

2,288 Views
Ethan_L
Contributor III

Hi @Sabeur 

I tested the slave config on S32G2 and the master config on SJA1110.

The delay of ptp4l is always huge, how to reduce the delay?

Ethan_L_0-1677050009577.png

Thanks,

Ethan.

0 Kudos
2,151 Views
Sabeur
NXP Employee
NXP Employee

Hi, 

you can update the Sync Interval in the domain Sync Configuration of your SDK project. (see the attached image)

Please be aware that the resolution of "internal timer" is 10ms so it can't send syncs with the exact sync configuration period, but it is in acceptable range defined by Avnu.

 

Regards,

Sabeur

 

Sabeur_0-1677503159700.png

 

Tags (1)
0 Kudos
2,385 Views
Ethan_L
Contributor III

Hi @Sabeur ,

I tested on my board and it can sync S32G2 and SJA1110.

Thanks a lot!

 Ethan.

2,043 Views
nicolasespla93
Contributor II

Hi @Ethan_L 

I hope you are doing well.... I see that you made work GPTP with S32G, I have a couple of questions that hopefully you will help me to answer.

I am trying to do something similar but every time that I add gPTP middleware in the SJA1110 SDK  I got the message below even when just adding gPTP stack to the S32G-VNP-RDB2 project example;

"[4.885305] sja1110 spi5.0: [sja1110_uc_parse_status_many] Upload error detected in status message 39818 (status=0x36,err=0x5b)"

 

Did you face something similar?

Where did you got the documentation to make this work? All my test has been based on the gPTP example project application notes.

 

Hope that you can help me with this, I will really appreciate any information that will help me to solve this issue.

 

Best Regards

Nico

0 Kudos
2,031 Views
Ethan_L
Contributor III

Hi @nicolasespla93 ,

I don't get similar errors about this.

I also develop based on examples, there is no other documentation.

Maybe you can use the debugger first to make sure your sja1110 firmware is ready.

 

Best Regards,

Ethan.

0 Kudos
1,811 Views
nicolasespla93
Contributor II

Hi @Ethan_L 

 

I am trying to syncronize the S32G board with the SJA1110 switch; I have had not any success on this. I am using the same example project as you, I did update the project to set Port#4 as slave and I checked the pdelay initiator for this port.

I bring up the pfe0 interface by using "ifconfig pfe0 xxx.xxx.xxx.xxx/24 up"

However, when I run "ptp4l -i pfe0 -f /lib/firmware/automotive-master.cfg --step_threshold=1 -m" it seems that there is no communication between the SJA and S32g devices. Do you have any clue that will help me to solve this issue? I will really appreciate any information that you will provide.

 

Best regards

Nico

0 Kudos
1,797 Views
Ethan_L
Contributor III

Hi @nicolasespla93 ,

Your testing process seems to be the same as mine. Maybe you can first confirm whether your automotive-master.cfg and ptp4l are the same version, BSP33 default ptp4l is version 3.1.

Hope this helps you.

Best regards,

Ethan.

 

0 Kudos
2,018 Views
nicolasespla93
Contributor II
Hi Ethan

I really appreciate your answer, I will try what you suggested, and see what outcome I get.

Regards
Nico

0 Kudos
2,462 Views
kaden
NXP Employee
NXP Employee

Hi @Ethan_L ,

which evaluation board are you using? 

In general, can you provide more details on your setup so that I can better understand what might be the issue? 

BR

Kevin 

2,459 Views
Ethan_L
Contributor III

Hi @kaden ,

I use the board which is designed by our hardware team and is similar with S32G-VNP-RDB2.

1. 

SJA1110 is running example "s32g_vnp_rdb_gPTP_lwip", I change the gPTP slave port to port 4.

On S32G2 I use the command "ptp4l -i pfe0 -m -H -P -2" and try different config for ptp4l.

2.

Change SJA1110 into gPTP Grand Master.

On S32G2 I use the command "ptp4l -i pfe0 -m -H -P -2 -s" and also try different config for ptp4l.

In both cases SJA1110 and S32G2 are not sync.

Thanks,

Ethan.

 

0 Kudos