Skip to main content
Visitor II
June 3, 2024
Solved

STM32H7_PTP Connection through Ethernet

  • June 3, 2024
  • 4 replies
  • 2364 views

Hello,

I have managed to generate a IP through the LWIP in the STM32 IDE and establish a connection via Ethernet, although now when I upload the files from hasseb/stm32h7_atsame70_ptpd: IEEE 1588 PTP daemon for STM32H7 and ATSAME70 (github.com) 

I seem to have a large portion of the code in the main.c file greyed out.

As well, I'm not sure if it is concerning that there is a warning saying "_gettimeofday is not implemented and will always fail". I found some documentation stating this is not too much of a concern, as it's only a warning and not an Error.

Furthermore, I have tried getting an output using this function just as a test and no luck: 

https://stackoverflow.com/questions/42747128/does-hal-gettick-return-ticks-or-milliseconds-and-how-to-measure-in-microsec/42749284#42749284

__weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)

{

/*configuring the SysTick to have an interrupt in 1ms time basis*/

HAL_SYSTICK_Config(SystemCoreClock /1000);



/*Configure the SysTick IRQ priority */

HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority ,0);



/* Return function status */

return HAL_OK;

}

Thank you!

    This topic has been closed for replies.
    Best answer by STea

    Hello @Gianni7315 ,

    In fact, the example you are following is supporting PTP with a software implementation but on your product, it can be sone by Hardware which support this feature more details on this can be found in the reference manual section 58.5.4 IEEE 1588 timestamp support have a look especially at the explanation of PTP timestamp offload function in this section.

    Regards

     

    4 replies

    STeaAnswer
    ST Employee
    June 4, 2024

    Hello @Gianni7315 ,

    In fact, the example you are following is supporting PTP with a software implementation but on your product, it can be sone by Hardware which support this feature more details on this can be found in the reference manual section 58.5.4 IEEE 1588 timestamp support have a look especially at the explanation of PTP timestamp offload function in this section.

    Regards

     

    Graduate II
    June 5, 2024

    @STea :

    the H7 hardware PTP support is looking really good, but even better would be an example from ST to make this actually work.

    I'm using an adapted version of the PTPd mentioned above, started with that on an F767, then migrated it to H7, but have no time to change it using more of the H7 hardware features.

    ST Employee
    June 5, 2024

    Hello @LCE ,

    Thank you for your request and constructive feedback. I will try to make a quick guide on the setup of PTP using the Hardware features stay tuned.
    regards

    Graduate
    November 5, 2025

    hello @STea 
    i am looking into this now and would love the guide if it is aviable?

    Visitor II
    April 28, 2025

    @STea 

    Was it already possible to create a quick guide how to setup the PTP in hardware?

    Graduate II
    May 19, 2025

    @STea 

    One more request for at least "a quick guide on the setup of PTP using the Hardware features"!