cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 PTP NETXDUO

FB__1
Associate III

Hello,

 

I would like to know if this PTP client example from Netxduo can be used on an STM32H723 MCU: 

https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/netx-duo/netx-duo-ptp-client/chapter1.md

 

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.

1 ACCEPTED SOLUTION

Accepted Solutions

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,

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.

View solution in original post

10 REPLIES 10
STackPointer64
ST Employee

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,

 

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.

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.

@STackPointer64 

"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.

STackPointer64
ST Employee

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,

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.
LCE
Principal II

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)

 

@FB__1 

- 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?

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,

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.
LCE
Principal II

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.

So have you checked zephyr or STLinux?