IEEE 1588 PTP synchronization in combination with PPS output signal

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

IEEE 1588 PTP synchronization in combination with PPS output signal

Jump to solution
2,730 Views
andreasaichhorn
Contributor I

Hello Community!

 

I have a problem with the i.MX 6 while using IEEE1588 PTP time synchronization in combination with the related PPS signal.

 

For the PTP synchronization I'm using the linuxptp application from sourceforge.net, which seems to be working according the logging messages. The code (fec_ptp.c) is changed to get a PPS signal at the output. PPS is just working with the TMODE setting "toggle output on compare" at the ENET_TCSRn register. I would prefer to use the TMODE setting "clear output on compare" as I need a falling edge with a frequency of 1 Hz. The (working) toggle mode changes the output each second and I do not know exactly where I define the period, as for initialization the timer period register (ENET_ATPER) is set to 0 initially that PTP is working. Is this correct?

=> Does anyone know what to change/set to use TMODE "clear output on compare", respectively how to set the output after clearing it?

 

What is also unclear to me is that the logging messages of the PTP app. show a very high accuracy (in the 10th or 100th ns region after some periods), whereas the PPS output signal stays the same and it seem that this signal is not synchronized with the PTP clock!

=> Does anyone know where I have to make the settings that the pulse is adjusted to the PTP clock?

 

Attached is the file fec_ptp.c.

 

 

Thanks in advance!

Original Attachment has been moved to: fec_ptp.c.zip

Labels (1)
Tags (3)
1 Solution
1,839 Views
nluca
Contributor III

Hi Andreas,

You should be able to solve the problem by using FEC_HIGH_PULSE in place of FEC_TMODE_TOGGLE. You already have it commented in the right place, just swap the two defines. You'll then have a 1Hz square wave on the ENET_1588_EVENT0_OUT pin

Regards,

Luca

View solution in original post

2 Replies
1,840 Views
nluca
Contributor III

Hi Andreas,

You should be able to solve the problem by using FEC_HIGH_PULSE in place of FEC_TMODE_TOGGLE. You already have it commented in the right place, just swap the two defines. You'll then have a 1Hz square wave on the ENET_1588_EVENT0_OUT pin

Regards,

Luca

1,839 Views
gusarambula
NXP TechSupport
NXP TechSupport

Thank you, Luca! Andreas, please let us know if this resolved your issue!

0 Kudos