2022-09-21 06:48 AM
Hi,
We are using STM32H7 and ethernet connectivity in our project.
We followed the instructions from the link "How-to-create-project-for-STM32H7-with-Ethernet-and-LwIP-stack-working".
We are able to ping and communicate within the server(STM32) and client(PC application) and transferring the files like Image files (.jpg format) from STM32 to PC app.
For checking the durability of the ethernet connectivity between both we tested it rigorously. During rigorous/regression testing we found that after 6-7 hours of running the ethernet connectivity gets lost between server and client.
After debugging the issue we found that ethernet MAC goes in error state "HAL_ETH_STATE_ERROR" and error code as "HAL_ETH_ERROR_TIMEOUT" from the HAL_ETH_Transmit() API.
The above behavior is random, sometimes it comes after 10hrs, 14hrs.
We are not getting why the timeout is occurring during ETH Transmit.
Can anyone help us to resolve this problem?
Thank you in advance.
2022-09-21 07:29 AM
Hello @PNaph.2 ,
Have a look at this thread: How to make Ethernet and lwIP working on STM32, and check if you have the same problem described here.
Maybe this post helps you: LWIP - HAL_ETH_Transmit stall on "Wait for data to be transmitted or timeout occurred"
Imen
2022-09-26 09:45 AM
Hi,
Thanks for your response and providing the helpful links regarding the STM32H7 Ethernet configuration.
We did some changes in the MPU configuration, LWIP tuning in lwipopts.h and added the memory barriers checks __DMB() and __DSB() in HAL_ETH_Transmit() API.
Since we added the above changes we did not observed the DMA timeout error as such, but we found one new issue as - The microcontroller becomes very slow in performance after 6-7 hours of continuous running. Means, we are getting the delayed response from the board.
We thought somewhere the dynamically allocated memory is not getting freed after its usage or something gets messed with the mcu clock.
We are not getting the possible reasons for this behaviors? Do you or anyone have any idea regarding this?