cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H5 HAL_ETH_Transmit_IT() causes tcp retransmissions in ST example

sssooo
Associate

Hi all,

during testing a custom project with NETXDUO on NUCLEO-H563ZI I've noticed that sometimes web server response is rather slow.

Wireshark shows rather frequent TCP retransmissions and other problems.

2025-04-25_16-10-06.png

To be sure, I've tried an example from ST (Nx_Iperf) with the same result.

It seems that problem is in ETH_Prepare_Tx_Descriptors(), in check of Tx Descriptor:

  /* Current Tx Descriptor Owned by DMA: cannot be used by the application  */
  if ((READ_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCWBF_OWN) == ETH_DMATXNDESCWBF_OWN)
      || (dmatxdesclist->PacketAddress[descidx] != NULL))
  {
    return HAL_ETH_ERROR_BUSY;
  }


I removed this check and TCP retransmissions became much less frequent.
Is there a better solution?

1 REPLY 1
ASEHST
ST Employee

Hello @sssooo,

Thank you for your reply,

The Owned Tx Descriptor check indicates that a packet is already associated with the descriptor, making it unavailable for reuse by the application. This check ensures that the application does not modify or use a descriptor currently being processed by the DMA or linked to an unprocessed packet.

Although removing this check might improve performance, it may not be a sustainable solution and risks data corruption.

We are analyzing the root cause of these retransmissions internally and will keep you updated.

 

With Regards,

If your question is answered, please close this topic by clicking "Accept as Solution".