cancel
Showing results for 
Search instead for 
Did you mean: 

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

Aqwer.1
Associate II

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

3 REPLIES 3
Pavel A.
Evangelist III

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

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.

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