cancel
Showing results for 
Search instead for 
Did you mean: 

fsdata(_custom) stopped working after upadte on HAL 1.27.(0/1)

Tomas Spacil
Associate II

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.

 

 
1 ACCEPTED SOLUTION

Accepted Solutions
ASEHST
ST Employee

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,

If your question is answered, please close this topic by clicking "Accept as Solution".

View solution in original post

2 REPLIES 2
ASEHST
ST Employee

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,

If your question is answered, please close this topic by clicking "Accept as Solution".

Hello Asehst,

Thank you for your help, this solved the problem.

With regards,

Tomas S.