2024-04-22 11:47 PM
Hello STM Community,
I have a project on STM32F407 with a web server. I am loading html pages and data from external USB storage using fs_open_custom() (fs.c) but in some cases I was still using internal flash with fsdata(_custom.c). For example, a 404 page for external memory error or disconnection cases to report a web server memory error.
I recently updated to HAL 1.27.1 and reading data via fsdata_custom.c suddenly stopped working correctly. When requesting to read fsdata, the entire ethernet always dropped without reconnecting (must restart the MCU). After return back only the stm32f4xx_hal_eth.c/.h and ethernetif.c/.h files (the rest will remain in HAL 1.27.1), reading will start working correctly again.
Is there any knowledge of this specific behavior or ethernet error after updating to HAL 1.27.1? Or is there already a fix please? I read here about the major overhaul of ethernet in the 1.27.0/1 update and the new problems it brought. Updating to HAL 1.28.0 (Cube 6.11) did not fix this.
I will be grateful for any help moving me forward. Thank you in advance and have a nice day!
Tomas S.
Solved! Go to Solution.
2024-05-08 09:27 AM
Hello @Tomas Spacil,
With the new HAL driver 1.27.0/1, particularly in the F4 where the Ethernet DMA lacks access to the flash, we are experiencing issues with flash access.
To ensure proper data copying from flash memory, we recommend implementing the following modifications to your project:
-Define HTTP_IS_DATA_VOLATILE(hs) as TCP_WRITE_FLAG_COPY in the lwipopts.h.
-If your project uses RTOS with Netconn APIs, use the NETCONN_COPY flag in the netconn_write API.
This issue will be fixed in the upcoming release.
With Regads,
2024-05-08 09:27 AM
Hello @Tomas Spacil,
With the new HAL driver 1.27.0/1, particularly in the F4 where the Ethernet DMA lacks access to the flash, we are experiencing issues with flash access.
To ensure proper data copying from flash memory, we recommend implementing the following modifications to your project:
-Define HTTP_IS_DATA_VOLATILE(hs) as TCP_WRITE_FLAG_COPY in the lwipopts.h.
-If your project uses RTOS with Netconn APIs, use the NETCONN_COPY flag in the netconn_write API.
This issue will be fixed in the upcoming release.
With Regads,
2024-05-13 10:24 PM
Hello Asehst,
Thank you for your help, this solved the problem.
With regards,
Tomas S.