Skip to main content
Aqwer.1
Associate
Apr 12, 2021 7:46 PM UTC
Question

How do I get ethernet driver code generated when using PTP?

In CubeIDE, when setting up ethernet, you can select

ETH -> Mode -> RMII

or

ETH -> Mode -> RMII_PTP_Synchro

If I pick RMII, ethernet drivers get included as expected, and appear to work correctly.

However, this application requires PTP, and if I change the selection to RMII_PTP_Synchro, the ethernet drivers disappear!

Is this a bug in CubeIDE 1.6.0?

How do I work around this?

-Dan

This topic has been closed for replies.

3 replies

Pavel A.
Apr 13, 2021 1:40 AM UTC

Probably not in the published version yet.

Comment in stm32h7xx_hal_eth.c says : "The PTP protocol offload APIs are not supported in this driver"

https://github.com/STMicroelectronics/stm32h7xx_hal_driver/blob/3ba4eb3e14ec1d407c05f5af5665e0eae789bd0b/Src/stm32h7xx_hal_eth.c#L72

I tried to set this mode in my project but it doesn't work, though both FDCANs are enabled. Works only with a timer as it says in the message below. --pa

0693W000008zLKuQAM.png

Aqwer.1
Aqwer.1Author
Associate
Apr 13, 2021 8:17 PM UTC

What are "offload APIs"? Do they exist for the F7, and could they be ported?

I am indeed setting up with the required timer and signal as required. But that issue seems to simply enable the selection. It doesn't explain why the usual ethernet drivers aren't generated by CubeMX when RMII_PTP_Synchro is selected.

Pavel A.
Apr 14, 2021 9:28 PM UTC

I only can guess that it should recognize PTP v2 packets and handle the handle timestamps.

Meanwhile we have to do this ourselves.

Could somebody from ST explain what is this "RMII_PTP_Synchro" mode for ETH , and how it is related to FDCAN time sync feature?

-- pa