how to config SJA1105PR for work with PTP?

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

how to config SJA1105PR for work with PTP?

1,578 Views
caidapeng
Contributor II

HI everyone:

             How to configure SJA1105X_CONFIG-GENTOOL to enable the PTP time synchronization function of SJA1105PR?

Tags (1)
0 Kudos
Reply
9 Replies

1,517 Views
PavelL
NXP Employee
NXP Employee

Hello @caidapeng ,

The SJA1105PQRS supports two PTP modes. Let me briefly describe them:

  • One‑step: the switch updates the correction field in the Sync message on the fly, inserting its residence time so that downstream clocks account for the in‑switch delay. No extra PTP message is needed. No host MCU is required.
  • Two‑step: the Sync is sent first, and the precise correction is conveyed in a separate Follow_Up message. Two‑step is common when the timestamp is only known after egress or when a software stack/host CPU participates.

For more details, please refer to AH1704, SJA1105PQRS Application Hints, Rev. 1.4. There are lots of information regarding PTP. Static configuration of 1-step and 2-step SYNC frame handling is shown in Table 43.

You may start with SJA1105X_CONFIG-GENTOOL/sja1105PR.py :

  • Do edits based on Table 43.
  • Configure xMII interfaces based on your HW setup.

After loading configuration to the switch, you need to configure CGU registers accordingly to AH1704, chapter 6 Interface Configuration.

Best regards,

Pavel

0 Kudos
Reply

1,479 Views
caidapeng
Contributor II

HI Pavel:

                  Thanks for your reply。

                  The official website only has the version 1.3 of the SJA1105PQRS Application Hints.

                   How to obtain the version 1.4 of the SJA1105PQRS Application Hints?

Best wishes

0 Kudos
Reply

1,459 Views
PavelL
NXP Employee
NXP Employee

Hello @caidapeng ,

AH1704 Rev 1.4 is available under Secure Files:

PavelL_0-1768992808833.png

There are only minor differences between Rev. 1.3 and 1.4. No differences related to PTP, so you can refer to Rev. 1.3 as well. In Rev 1.3,  Table 44 (instead of Table 43 (Rev 1.4)) is your reference now.

Best regards,

Pavel

0 Kudos
Reply

1,405 Views
caidapeng
Contributor II

Hello Pavel:

                  Thank you very much for your reply.

                  After reading the 7.6.6  section of the SJA1105PQRS Application Hints, I still have many questions.

                  The current architecture is that HOST_PORT is connected to the MCU,and The remaining 4 mac_ports randomly connect to the Ethernet network,In this network, there is a time synchronization source that synchronizes the devices throughout the entire network.Simultaneously send the "sysc" and "follow_up" messages to the outside.

                  According to Section 7.6.6.2, the devices on the host_port seem to be supposed to serve as the time source for the network.

How can the PTP function of the switch chip be realized in this current network architecture?

Best wishes

Tags (1)
0 Kudos
Reply

1,387 Views
PavelL
NXP Employee
NXP Employee

Hello @caidapeng ,

For 2-step setup:

  • You need to configure switch accordingly (Table 43 or 44 - depends on AH1704 version)
  • MCU needs to be connected to the HOST_PORT and gPTP stack should run on that MCU.

Best regards,

Pavel

0 Kudos
Reply

1,181 Views
caidapeng
Contributor II

hello PavelL:

                   I have configured sja1105PR according to the manual, and the PTP mode is set to "one-step". However, I observed that the timestamp of the sys message was not updated in the "correctionField" field when it passed through the switch chip. Does SJA1105PR support the ONE-STEP mode?

 

best wishes

Tags (1)
0 Kudos
Reply

1,157 Views
PavelL
NXP Employee
NXP Employee

Hello @caidapeng ,

yes, the switch shall support one-step gPTP.

Please check this thread:

help for sja1105 gPTP test problem !!!! - NXP Community

Please also make sure that your Grand Master uses gPTP automotive profile:

Automotive Master

Best regards,

Pavel

0 Kudos
Reply

1,174 Views
caidapeng
Contributor II

hello PavelL:

        Could you please provide me with a script based on SJA1105PR for implementing PTP TWO-STEP?The time taken was too long, and the project has been delayed.

        Thank you very much!

0 Kudos
Reply

1,148 Views
PavelL
NXP Employee
NXP Employee

Hello @caidapeng ,

Unfortunately, I do not have such a configuration script. All python scripts are in SJA1105X_CONFIG-GENTOOL or SJA1105X-DEVICE-TOOLS. Additionally,  there's SJA1105Q-EVB Configuration Tools - https://www.nxp.com/webapp/Download?colCode=SJA1105Q-EVB-CONFIGURATION-TOOLS&appType=license

Notice, that two-step gPTP requires host processor with running gPTP stack.

Best regards,

Pavel

0 Kudos
Reply