cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP157 PTP Flex pps drift

HReis.1
Associate

Hello,

Currently I'm working on a project that requires a synchronized clock signal between multiple devices connected through Ethernet.

The logic solution for this is PTP, and using linuxptp I was able to archive synchronous PPS on PG8 pin between devices with a jitter smaller than 1us for 1Hz. 

Now the problem is that the requirement for PPS frequency is not 1Hz but a OR between a 100Hz and 1.25Hz (see attached image). From documentation, flexible PPS output may be the solution and started testing it by generating the 100Hz signal. Here is were I found the issue, after program PPSCMD[3:0] with start I notice that the 100Hz signal starts to drift slowly (around 20us/s).

Now strange part is if I use fixed PPS (bit PPSEN0 of MACPPSCR cleared) with any frequency (1Hz to 16kHz with digital rollover) there is  no drift. From my understanding the reference clock for pps is the same as system time thus adjusted by ptp protocol for maintaining synchronization.

Is my assumption correct or when flex pps is enabled a different reference clock is selected?

Best regards

1 REPLY 1
GatienC
ST Employee

Hello,

I think I encountered the same behavior when investigating something else. I think I even saw a drift of the PPS signal with fixed PPS. I haven't had the time to investigate this but I will be getting back to it.

For now, maybe some hints that may lead you on the right track:

1) Check if the clock source is an oscillator subject to variations (internal oscillator).

2) Do you have another board you can link to yours and run PTP synchronization between them to compare PPS outputs to see if they both drift using flexible PPS?

3) Can you try to generate different flexible PPS signals to see if the frequency impacts the drift please?

Best regards,

Gatien