cancel
Showing results for 
Search instead for 
Did you mean: 

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

ioncasu
Associate

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.

1 REPLY 1
STea
ST Employee

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.