2022-03-04 04:40 AM
HI,
I’m working on ETH and FreeRTOS on the STM32H745 Nucleo-144. I’ve read about various problems on this forum about using the ethernet as detailed below
So when I saw this article from ST employees detailing how to use ETH and FreeRTOS, with examples I was really excited.
I took their STM32H745_Nucleo_M4_ETH example and added a very simple web site. It just said hello and displayed two large images
<!DOCTYPE HTML>
<html>
<head>
<title>STM32h745 TCP error</title>
</head>
<body>
hello
<img src="image1.jpg">
<img src="image2.jpg">
</body>
</html>
Here’s my code changes
\CM4\Core\Src\main.c
/* USER CODE BEGIN 4 */
extern void http_server_netconn_thread(void);
/* USER CODE END 4 */
/* USER CODE BEGIN 5 */
http_server_netconn_thread();
/* USER CODE END 5 */
\CM4\LWIP\App\lwip.c – changed the static IP address to 192.168.0.130 (to suite my network)
void MX_LWIP_Init(void)
{
/* IP addresses initialization */
IP_ADDRESS[0] = 192;
IP_ADDRESS[1] = 168;
IP_ADDRESS[2] = 0;
IP_ADDRESS[3] = 130;
New Files
But when the code below was called for “image2.jpg�? I found “buf�? is normally corrupted with leading zeros.
netbuf_data(inbuf, (void**)&buf, &buflen);
Looking at the “buf�? I can see the original HTTP request, but the ETH driver/DMA/?? has overwritten the start with zeros.
Looking at the web browser I can see the actual request is valid.
When the web server sees an empty string it returns back with 501, and the image is not loaded.
I had come across this problem in my actual code last year, but couldn’t release it and maybe my code was at fault. So I was hoping using ST new example code would prove if I was doing something wrong or they had fixed it.
But now I have a small test project using a ST example that demonstrates the problem (99% of the time). So I’m hoping somebody (eg @Laura C, @Camilo LEMOS, @Brian Kling, who was involved in generating the ETH example code) can look at the code, see the problem and fix it.
I’ve included the whole project as a zip file. If you debug it you need to change one of the debug configurations to use a different GDB port number, eg 61238, otherwise it will clash.
Cheers
Chris
2023-02-10 10:11 AM
Probably too late to answer this ticket, sorry, but it might be useful for someone who has similar issue:
It seems that is the same major bug on the old driver RX data corrupted and it was resolved in the new one but when downloading test case attached to the ticket it seems to be still using the old Ethernet driver despite the fact you talk about using the new driver.
https://community.st.com/s/question/0D50X0000C6eNNSSQ2/bug-fixes-stm32h7-ethernet
2023-02-11 04:34 AM
Hi Chekib,
so are you saying the examples from "How to create project for STM32H7 with Ethernet and LwIP stack working" are now fixed?
cheers
Chris
2023-02-12 09:58 AM
Hi @CHossack
What I mean is that: if you use now, the updated STM32H7 CubeFW latest version and the latest version of STM32CubeMX you should not see that issue.
I hope it helps.
2023-03-19 04:04 PM
Hello Team,
I done the same in new firmware in STM32H745ZI-Q (M7) as mentioned the same configuration of ethernet stack and it seems to have the same issue during the display of webpage.
New project was created with the mentioned configuration and seems that I'm unable to see images.
Please let me know incase of any configuration issue from my side or is there any latest bug fixes coming from ST to solve the issue.
Project attached.
Regards