cancel
Showing results for 
Search instead for 
Did you mean: 

Subject: Issues with LWIP on Nucleo-F746ZG – Release Mode & MPU Configuration

aKM_
Associate

Dear ST Community,

I am working on an Ethernet TCP/IP project using the Nucleo-F746ZG development board with the LWIP stack, without any RTOS. I have based my implementation on the tcp_echoclient example driver file. The project builds successfully, and the application runs in debug mode, but it does not work in release mode.

I have compared the map files for both release and debug modes but found no significant differences.

Additionally, I am facing issues with MPU configuration while using the LWIP stack. Specifically, I need clarification on:

  • The correct SRAM1 and SRAM2 addresses for the LWIP RAM heap pointer
  • The appropriate addresses for Rx and Tx DMA descriptors in the linker script
  • Whether all these addresses need to be explicitly configured in both the MPU settings and the linker script file

Project Details:

  • Development Board: Nucleo-F746ZG
  • Ethernet Stack: LWIP
  • RTOS Middleware: No
  • TCP Client: tcp_echoclient
  • Issues: Application runs in debug mode but not in release mode, MPU and linker script configuration

I would appreciate any guidance on these issues. Thank you in advance!

2 REPLIES 2
ASEHST
ST Employee

Hello @aKM_,

It appears that is a timing or synchronization issue. 

Please take a look at this post: Solved: Basic UDP Echo server works in debug, but not run ... - STMicroelectronics Community

 

With Regards,

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

Hello @aKM_ ,

 

Please try the solution below:

During the initialization process, the ETH MAC must be configured with the correct Ethernet link speed and duplex mode after the auto-negotiation process is completed, which can take up to few seconds (see the API HAL_ETH_SetMACConfig).

Add a call to the API Ethernet_Link_Periodic_Handle in your main loop.

This API will periodically polls the PHY status and updates the MAC configurations if any changes occur to the Ethernet link.

An example can be retrieved in "STM32F769I_EVAL\Applications\LwIP\LwIP_HTTP_Server_Raw" application in STM32CubeF7 v1.17.0 package.

Note: There is no need to add an additional HAL_delay().

Best regards.