2025-08-07 9:35 AM - edited 2025-08-09 8:13 AM
Hello,
I would like to know if this PTP client example from Netxduo can be used on an STM32H723 MCU:
Another MCU, the STM32N6 has this implementation here: https://github.com/STMicroelectronics/STM32CubeN6/tree/main/Projects/NUCLEO-N657X0-Q/Applications/NetXDuo/Nx_PTP_Client
I wanted to confirm if the STM32H723 does support that example because i am looking at https://github.com/STMicroelectronics/x-cube-azrtos-h7/tree/main/Projects and I cannot find any ...
Thank you.
Solved! Go to Solution.
2025-08-22 3:19 AM
Hello @LCE,
The STM32 ETH PTP setup can be found in the MX_ETH_Init(...) function. Inside, you will find a PTP struct declaration used to configure the feature, followed by a call to ETH_PTP_SetConfig(...) to apply the configuration to the appropriate registers. For clock updates and addend changes, there are dedicated functions such as HAL_ETH_PTP_AddTimeOffset(...) and HAL_ETH_PTP_AddendUpdate(...).
Best regards,
2025-08-08 9:37 AM
Hello @FB__1, and welcome to ST Community,
Currently, the only available PTP example is, as you mentioned, for the STM32N6. Regarding your question about STM32H723 support, I cannot confirm it will work immediately. However, since the STM32H723 does support PTP, with some adjustments, you should be able to adapt the example to run on that MCU. Additionally, I recommend searching the community for other threads on the same topic.
Best regards,
2025-08-09 8:21 AM
As another option, will Zephyr RTOS on the STM32H723 work out of the box for the PTP example ?
https://docs.zephyrproject.org/latest/boards/st/nucleo_h723zg/doc/index.html
Thank you.
2025-08-10 11:10 AM
It looks like Zephyr supports PTP on STM32. You're welcome to try it.
2025-08-14 4:15 PM - edited 2025-08-14 4:15 PM
"STM32H723 does support PTP, with some adjustments"
I am able to successfully run the PTP on the STM32N6 with NETXDUO (https://github.com/STMicroelectronics/STM32CubeN6/tree/main/Projects/NUCLEO-N657X0-Q/Applications/NetXDuo/Nx_PTP_Client)/
I would like to use the NETXDUO with the STM32H7, can you point me to those adjustments for the H7 ?
Thanks.
2025-08-18 3:05 AM
Hello @FB__1 ,
The adjustments typically involve porting hardware-specific configurations, such as clock settings for PTP, Ethernet peripheral pinout configuration, and adapting the NetXDuo middleware to the STM32H7. I recommend reviewing the STM32H7 reference manual along with the NetXDuo PTP guide for detailed information.
Best regards,
2025-08-18 4:31 AM
Interesting!
@STackPointer64 , could you please show us where to find the following:
- STM32 ETH PTP setup (including HW offload if used)
- PTP register writing (clock update, addend change)
- Do you use PTP via UDP or "pure" Ethernet? If Ethernet, does it use HW offload?
- How is PTP sync quality?
- How is sync quality if ethernet traffic goes up?
2025-08-22 3:19 AM
Hello @LCE,
The STM32 ETH PTP setup can be found in the MX_ETH_Init(...) function. Inside, you will find a PTP struct declaration used to configure the feature, followed by a call to ETH_PTP_SetConfig(...) to apply the configuration to the appropriate registers. For clock updates and addend changes, there are dedicated functions such as HAL_ETH_PTP_AddTimeOffset(...) and HAL_ETH_PTP_AddendUpdate(...).
Best regards,
2025-08-25 7:42 AM
N6 ETH HAL driver:
-@- The PTP offload feature is not supported in this driver.
What a pity. :(
The HW feature that was never used anywhere...
BTW, as many users (F4, F7, H7) have been asking for PTP examples for years, it almost feels like a "low kick" (nicely said) that ST is sneaking it into N6.
2025-08-25 8:17 AM
So have you checked zephyr or STLinux?