-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MCU crash after few thousand TCP requests #87
Comments
Hi, The update to the Ethernet source files, as described below, seems to have resolved my issue (100,000 successful HTTP requests). This change was inspired by the RTT-Ethernet source code. However, I’m still not entirely sure I understand all the underlying reasons. Anyway. -board library: STM32 based board, version 2.8.1 compared to version STM32duino Ethernet 1.4.0:
my loop function is:
|
Hi @raphaelvalentin |
Hi, You can find RTT-Ethernet here: RTT-Ethernet, which is a fork of the STM32duino_STM32Ethernet library. The STM32duino_STM32Ethernet_STABLE (I called it *_stable as i could call it *_debug) code is derived from the modifications I made to the STM32duino_STM32Ethernet library, as shown by the previous diff -r. Additionally, It will be great to explore the netconn functions within LWIP for handling more complex and unpredictable TCP/IP communication scenarios (disorder packets, loss of connection, delay on disconnection, etc). There's an example (using FreeRTOS) available in the STM Cube repository on GitHub. However, I’m not deeply familiar with the low-level implementation to build an implementation. Actually, as a feature, it will be great to implement a Debug LOG on the library, particularly on the implementation of stm32duino/LwIP and stm32duino/Ethernet . I saw an example at lwip-Arduino. This would have helped me a lot. Thank you for your reply. |
Hi,
I am encountering an issue where the MCU crashes after sending 80KB of data via TCP several thousand times. Below is a summary of the problem:
After several thousand successful data transfers, the TCP connection begins to fail with an "Out-of-order" packet (that can occur randomly let say between 1000 to 15000). This eventually leads to a complete crash of the MCU, rendering the device unresponsive and requiring a manual reset (if no watchdog).
Could you please help me investigate this behavior? It seems to be related to TCP buffer management or the handling of out-of-order packets within the Ethernet library or underlying stack. After trying to print some error logs, I feel out of options at this moment.
Board: Nucleo stm32f767zi
All libraries: up-to-date
Thank you for your assistance!
A Wireshark capture shows that a TCP "Out-of-order" event occurs right before the MCU crashes. This event might indicate a problem in the TCP stack or network buffer handling (lwip parameters not optimized, memory corruption or race condition?).
The text was updated successfully, but these errors were encountered: