PTP with hardware support

Hi,

We are using TM4C129 MCU with the FreeRTOS TCP/IP stack and we need to use PTP. This MCU has built-in hardware support for PTP and we need the extra precision it provides. We needed to modify the library to add timestamp fields to the network buffer struct and modify the send and rcv interface to include the timestamps generated at the hardware level.

This is obviously a hack. Any comments/suggestions on how to improve it?

Thanks

Does the suggestion in this thread help you - FreeRTOS+TCP HW Timestamping Option - #5 by htibosch

Seems like you got it working. Would you be willing to create a PR and we can discuss the changes there?

The thread you mentioned is interesting, but it doesn’t really help. From what I can understand the change was never included into main since I can’t find a reference to the SO_TIMESTAMP option in the documentation or in the code. Am I wrong?

Yes, I am willing to open a PR. Just to be 100% sure can you point me to the correct repository?

Here you go - GitHub - FreeRTOS/FreeRTOS-Plus-TCP: FreeRTOS-Plus-TCP library repository. +TCP files only. Submoduled into https://github.com/FreeRTOS/FreeRTOS and various other repos.

Hi Raphael,
I was wondering if you were able to create a PTP library for FreeRTOS

Hi Subhranil,
I am planning to work on this in the coming weeks (had no time until now…).

2 Likes

Thanks Raphael.
We would be happy to help you in any way possible.

Thanks,
Shub