ETH_DMACSR_RBU error occurs and stalls the Ethernet receive on STM32H7. Is there a way around this issue with the DMA?
Hi,
I've been using the STM32H7 example which uses the new reworked Ethernet driver (https://github.com/STMicroelectronics/STM32CubeH7).
Changed the application layer of the example (LwIP_HTTP_Server_Netconn_RTOS) and during larger transfers, the DMA error (ETH_DMACSR_RBU) occurs and simultaneously Wireshark shows that the communication has issues (retransmissions, tcp window full) and the communication stops for a while.
Code below is located in the ethernetif.c file.
/**
* @brief Ethernet DMA transfer error callback
* @param heth: ETH handle
* @retval None
*/
void HAL_ETH_ErrorCallback(ETH_HandleTypeDef *heth)
{
SEGGER_RTT_printf(0, "DMA error occurred! %d\n",HAL_ETH_GetDMAError(heth) );
if((HAL_ETH_GetDMAError(heth) & ETH_DMACSR_RBU) == ETH_DMACSR_RBU)
{
SEGGER_RTT_printf(0, "DMA error occurred - releasing semaphore \n");
osSemaphoreRelease(RxPktSemaphore);
}
}Here is the Wireshark picture which shows the issue:
How can this be fixed?
It causes the low throughput which is a big problem for our use case.
If this is an issue with the driver, what version to use then?
The important project files are in the attachment.
Can you please give a suggestion on what might be the issue.
Thanks
