Adding PTP to FreeRTOS+UDP (IEEE-1588)

hollenweger wrote on Thursday, January 22, 2015:

I’m evaluation to use FreeRTOS+UDP for a new project (probably based on a LPC18xx or LPC43xx). The project needs a precise time synchronization. I would like to use PTP (IEEE-1588). Has somebody experience with integrating PTP in FreeRTOS+UDP? Or is there another possibility?

rtel wrote on Thursday, January 22, 2015:

FreeRTOS+UDP (and FreeRTOS+TCP) use standard sockets interfaces, so if you have FreeRTOS+UDP running, and you have some PTP code compiling (I believe there are some open source libraries around) then stitching the two together should be simple. I’ve never done it myself though.

Regards.

heinbali01 wrote on Friday, January 23, 2015:

Hi Martin,

I did some testing with the Precision Time Protocol (PTP) on a LAN, using FreeRTOS+TCP.

My aim was to use PTP to synchronise playing audio between various MCU’s.

These MCU’s have their clock from a HCM49, which provides a typical audio frequency of 11.2896 MHz, which finally translates to 44100 Hz.
That also dictates the precision that I hoped to reach, deviations less than 22 us (1/F).

My conclusion: PTP can easily be implemented but I encountered a hardware problem: every XTAL’s is slightly different, some are faster and others are slower. I can synchronise the clocks but at the end of a 5-minute song the difference had become too big already.

Regards.