PTP synchronization validation

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

PTP synchronization validation

1,875 Views
twu
Contributor I

Hi recently I'm working on PTP synchronization with FRDM k66. Right now I want to connect two k66 board( one as master and another as slave node) and both connect to oscilloscope and generate some pulses per second  to validate the synchronization between two boards like this one:

https://www.nxp.com/docs/en/application-note/AN4332.pdf

(this one use two boards as slaves and one PC sends PTP msg but we don't have MQX1588 library to follow all the steps in this doc)

Because we don't have MQX library, we use the frdm k66 sdk instead(https://mcuxpresso.nxp.com/en/builder ). However in the FRDM-K66 sdk frdmk66f_enet_txrx_ptp1588_transfer example, I think it only sends and receives some frames but doesn't do the synchronization step. 

Is there anyone can help with the master node and slave node synchronization with PTP or is there any example to do the synchronization with the sdk? Thanks!

0 Kudos
5 Replies

1,183 Views
dack
Contributor I

Hello
I am running the example(https://www.nxp.com/docs/en/nxp/application-notes/AN12149.pdf) on the evkbimxrt1050 evaluation board.
Does anybody know why the Ethernet communication stops when I set the GPIO_AD_B0_09_GPIO1_IO09 to zero?
I am using the GPIO_AD_B0_09_GPIO1_IO09(USER_LED) for debug purposes.

Thanks

0 Kudos

1,777 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello twu@oculii.com‌,

In the function ENET_Ptp1588Configure, a periodic timer is enabled and in the ENET_Ptp1588TimerIRQHandler sends a timestamp that is used by the protocol to synchronize the clock between nodes.

As it mention in the app note:

The IEEE 1588 PTP allows clocks distributed across an Ethernet network to be accurately synchronized using a process whereby the distributed nodes exchange timestamped messages.

Best Regards,

Alexis Andalon

0 Kudos

1,777 Views
twu
Contributor I

Hi Alexis,

Thanks for your reply. Yes but when I run the 1588ptp example code in the sdk, I didn't see the time stamp in the message when I use the wireshark...Currently I manually get the receiving time and sending time by calling ENET_GetRxFrameTime and ENET_GetTxFrameTime and manually set them in the message and then calculate the offset. I'm not sure if it is correct and ENET_Ptp1588AdjustTimer doesn't work with my calculated offset.

Also, I think the example code doesn't give us an example how to send a PTP msg with IP address. Is there any example so that I can use to send and receive a PTP msg with IP address? Thanks

0 Kudos

1,777 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello Tong,

Unfortunately, the examples in the SDK without the LWIP stack doesn't support IP address.

What you could do is to check the following document, this describes how to implement PTP using the LWIP example.

https://www.nxp.com/docs/en/nxp/application-notes/AN12149.pdf 

Best Regards,

Alexis Andalon

1,213 Views
dack
Contributor I

Hello Alexis,

I am trying to use this example (AN12149.pdf) but I would like to use a second counter running together with the output channel 3. For the second channel I want to use the ENET_1588_EVNT0_OUT as output. The counter value of the counter 0 shall be smaller that the value of the counter 3.
I am using the SDK version 2.4.x but  the ENET_Ptp1588TimerIRQHandler() is not able to works with both channels together. 
Can you tell me please how can I change the ENET_Ptp1588TimerIRQHandler() to run with more channels? 
Thank you in advance

0 Kudos