Skip to main content
MS.9
Associate III
September 17, 2024
Solved

STM32H723 HAL example raises HAL_ETH_ErrorCallback on every packet, but still works!

  • September 17, 2024
  • 3 replies
  • 1325 views

Hi!

when I run the HAL example code LwIP_HTTP_Server_Netconn_RTOS I get HAL_ETH_ErrorCallback() called on every packet, but the program seems to work fine.

its this bit that gets called (so something hapenning with DMA)

if((HAL_ETH_GetDMAError(heth) & ETH_DMACSR_RBU) == ETH_DMACSR_RBU)
{
    osSemaphoreRelease(RxPktSemaphore);
}

I've read as much as is humanly possible on this and other forums to see if this is normal or what the issue could be, but I have found nothing.

I've played around with using different LwIP & Ethernet buffer sizes etc, and different memory sections/protection options etc, but it wont go away, yet the program still runs fine.

Can anyone explain what is going on please.

the code I'm using is in

STM32Cube_FW_H7_V1.11.2\Projects\NUCLEO-H723ZG\Applications\LwIP\LwIP_HTTP_Server_Netconn_RTOS

thanks all,

Mark

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

Hello @MS.9,

Thank you for your contribution. The RBU problem was resolved by correcting the tail pointer calculation in this fix: [HAL][ETH] Fix the calculation of the tail pointer so that it points … · STMicroelectronics/stm32h7xx_hal_driver@ceda3ce (github.com)

 

With Regards,

3 replies

LCE
Principal II
September 17, 2024

> I've played around with using different LwIP & Ethernet buffer sizes etc, and different memory
> sections/protection options etc, but it wont go away, yet the program still runs fine.

Have you also increased the number of descriptors?

I don't use the HAL ETH driver and I don't know Netcon or RTOS ...

So what kind of "lwIP RX buffer scheme" is used?

ASEHSTBest answer
ST Employee
September 17, 2024

Hello @MS.9,

Thank you for your contribution. The RBU problem was resolved by correcting the tail pointer calculation in this fix: [HAL][ETH] Fix the calculation of the tail pointer so that it points … · STMicroelectronics/stm32h7xx_hal_driver@ceda3ce (github.com)

 

With Regards,

"If your question is answered, please close this topic by clicking ""Accept as Solution""."
MS.9
MS.9Author
Associate III
September 17, 2024

Thanks for the quick response and fix.

I had seen this error for a long while and never really looked into it as everyhing seemed to work ok.

sad to see it go - was becoming a familiar friend :)