Skip to main content
Explorer
May 28, 2024
Solved

STM32H7 - Ethernet slow response time between echo request and echo reply

  • May 28, 2024
  • 1 reply
  • 1859 views

I am using the Nucleo-STM32H723ZG board and I'm trying to set up a maximally reactive UDP/TCP communication channel between the board and an external node.
Just to use a common ground, lets take as an example project the LwIP_UDP_EchoServer. 

If I send a message to the board and monitor the time it takes to receive the reply, it's over 1 millisecond. I tried to isolate the slow part and couldn't find it: I inserted a pin toggle inside the udp_echoserver_receive_callback, at the start and at the end; the time it takes to execute this function is around 11 microseconds. Nevertheless, the delay between the request and the echo reply, in wireshark, is more than 1 millisecond. 

I followed the function calls down to the HAL_ETH_Transmit and couldn't understand what may cause this long delay. It is a blocking function and my understanding is that HAL_ETH_Transmit returns when the DMA has finished transmitting the data.

 

Could you please provide any hint about what may cause this delay and what may be the possible solutions?
Any input on this issue would be greatly appreciated.

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

    Hello @ioncasu ,

    This Delay can be caused by a variety of external factors (cable, node, switch ...) so it could be that you are only seeing this delay because of a bottleneck somewhere external to the Board as you confirmed that "the time it takes to execute this function is around 11 microseconds".

    you can check this related thread to help you understand this better. 

    Regards

    1 reply

    STeaAnswer
    ST Employee
    May 31, 2024

    Hello @ioncasu ,

    This Delay can be caused by a variety of external factors (cable, node, switch ...) so it could be that you are only seeing this delay because of a bottleneck somewhere external to the Board as you confirmed that "the time it takes to execute this function is around 11 microseconds".

    you can check this related thread to help you understand this better. 

    Regards

    ioncasuAuthor
    Explorer
    July 2, 2024

    Thanks for the input.
    It was the Windows OS. 
    I measured the data exchange delay using PHY signals, and it was indeed around 13 microseconds.