cancel
Showing results for 
Search instead for 
Did you mean: 

PTP support in HAL drivers STM32H7

leshich-k
Associate II

We have migrated our project from STM32F7 to STM32H7 MCU and found that there's no support for PTP IEEE 1588 protocol in MAC Ethernet driver (HAL).

Here is a message written in stm32h7xx_hal_eth.c file:

   -@- The PTP protocol offload APIs are not supported in this driver.

Is it ever going to be supported?

16 REPLIES 16
Imen.D
ST Employee

Hello @leshich-k​ ,

For the moment, no plan to implement PTP feature in the STM32CubeH7 software package.

The request is already raised internally to implement this feature, but Currently, not at the short term planning.

Kind Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
JMath.5
Associate

Hello Any updates in this area? Is PTP feature available in STM32CubeH7 now? Is reference driver available for some other platform?

JMath.5
Associate

Thanks for the quick response. Is there any examples using the PTP available too?

BSeeg
Associate II

@JMath.5​ im intresed in examples for ptp on stm32h7 and f7 cups aswell

LCE
Principal

Somewhere on Github someone ported "PTPd" to H7, I just did the same - but without using the H7's "hardware" features, there's so much info in the descriptors which would really speed up the PTP stuff compared to PTPd.

But I haven't had time yet for that, PTPd is working for now...

And HAL... no thanks for the important stuff! ;)

BSeeg
Associate II

@Community member​ do you mean this repo https://github.com/hasseb/stm32h7_atsame70_ptpd ?

For my application i want to use atleast the RMMI_PTP_synchro and then use the PPS puse to replace an GPS PPS Pulse in my application.

I tryed something in cube MX but there seams to be an bug so i will create an question ragarding this topic and linking it here.

Hardware feature is the main thing that PTP requires, otherwise PTP doesn't make sense since it cannot be as precise.

H7 has some silicon bugs in ETH-MAC, so this is the reason of not supporting PTP in HAL. But theres are workarounds for those bugs.

Yes, that's what I meant. But it needs some further tuning, I think.

To get the PPS working, you need to have lwIP and the ETH driver working, then PTP, then you can turn on the PPS output.

I have it working here to sync multiple devices.

Here's my HAL-less ETH driver, with the heavily modified PTPd stuff, mostly because it's blocking waiting for the TX timestamps, which I could not use without an OS.