Corrupted ETH Rx Buffer in STM32H7
Hello everyone,
I'm running a webserver on a STM32H7. Code was generated with CubeIDE 1.5.0, using LwIP V2.1.2 and the Firmware-Package V1.8.0. So far, I had no problems receiving or transmitting smaller files, in the x-xx kB range from the MCU to a client via Ethernet.
When the client requests 3 rather large files successively, the Rx ETH buffers get corrupted. In this example, the resource chart.js is transferred successfully (see below network trace). The data directly following this request can not be properly sent back from the server. They should be in the *** kB range, however my server can't interpret the HTTP query and sends back a error message (~100B).
This is a more detailed view with Wireshark. The transmission for the first resource (chart.js) works (on port 30986 here):
The other following GET's fail. Further investigation shows, that the begin of the HTTP request line and some header fields are overwritten with 0's. This is unprocessed data directly out of the LwIP stack:
The rest of the frame is ok and has valid data. This phenomenon never occurred to me before:
The ETH hardware is configured like this:
The MPU treats the Rx-Buffers as Strongly ordered, and the Rx+Tx descriptors as Device Memory:
Here is the snippet, where "buf" from above was inspected, with a breakpoint in line 10:
recv_err = netconn_recv(conn, &inbuf);
if(recv_err != ERR_OK)
{
webservState = WEBS_NETWORK_ERR;
break;
}
netbuf_data(inbuf, (void*)&buf, (u16_t*)&buflen);
webservState = WEBS_HANDLE_FILLING;
break;I've read quiet a lot of forum posts about the ETH driver and it's problems, but I could not resolve my problem with this knowledge. I'm out of ideas what the cause of this might be.
Has anyone a tip where to dive deeper with debugging? Or has anyone had similar behavior?
