cancel
Showing results for 
Search instead for 
Did you mean: 

H723-Ethernet_LWIP Ping problem

Saliwan128
Associate II

Hello ST Community,

I am currently working with the Nucleo H723ZG board and facing issues establishing a ping response using the LWIP stack. Despite following various examples and configurations, I have been unable to get it to respond to pings. Here are the details of my setup:

  • Development Environment: STM32CubeIDE V1.17  and STM32CubeMX V6.13.0
  • Configuration:
    • I have not used RTOS.
    • I configured the Ethernet settings according to package examples.
    • :C:\....\STM32Cube\Repository\STM32Cube_FW_H7_V1.12.1\Projects\NUCLEO-H723ZG\Applications\LwIP\LwIP_UDP_Echo_Server
    • I ensured that the Ethernet cable was connected properly and used a direct connection to my pc.

I have tried multiple versions of the H7 package ( 1.12.1 - 1.12.0 - 1.11.1 - 1.11.0 - 1.10.0 ) and tested various configurations without success. The ping command consistently results in "destination host unreachable."Could anyone provide insights or suggestions on what might be missing or misconfigured?

//*****************************

My  Ethernet configuration :

eth_config.png

//***************************** 

Ethernet GPIO Configuration:

eth_GPIO_config.png

//*****************************

MPU Configuration :

mpu_config.png

//*****************************

 LWIP configuration :

lwip1.png

lwip2.png

lwip3.png

lwip4.png

  I added this part to the STM32H723ZGTX_FLASH.ld file:

//************************************************************************************  

..........

. = ALIGN(8);

} >RAM_D1

 

 

.lwip_sec (NOLOAD) : {

. = ABSOLUTE(0x30000000);

*(.RxDecripSection)

 

. = ABSOLUTE(0x30000080);

*(.TxDecripSection)

 

. = ABSOLUTE(0x30000100);

*(.Rx_PoolSection)

} >RAM_D2 AT> FLASH

 

 

/* Remove information from the standard libraries */

/DISCARD/ :

//**********************************************************

and its result is like  this:

build_result.png

My main.c code:

//**********************************************************

/* USER CODE BEGIN PV */

extern struct netif gnetif;

/* USER CODE END PV */

++++++++++++++++++++++++++++++++++++++++++++++++++++

in int main(void)

 

 

while (1)

{

/* USER CODE END WHILE */

 

/* USER CODE BEGIN 3 */

ethernetif_input(&gnetif);

sys_check_timeouts();

}

//**********************************************************

ressult:

cmd.png

My CPU clock is 520Mhz. I am sure the hardware has no problem because I can give a ping from the st package example.

But when I configure according that example it does not work.

.Thank you for your assistance!Best regards,
[Your Name]

10 REPLIES 10
Saliwan128
Associate II

A few weeks ago, I encountered a significant hurdle while implementing Ethernet functionality on an STM32 microcontroller. The complexity of the task led me to seek assistance in formulating a comprehensive questionnaire to better understand and address the issues at hand.After thorough research, experimentation, and persistence, I'm pleased to announce that I've successfully resolved the problem and implemented a working Ethernet solution. This breakthrough marks a significant milestone in my project and enhances the capabilities of the STM32 microcontroller I'm working with.Below, I'll share the details of the solution I developed, hoping it might benefit others facing similar challenges in their embedded systems projects:

MPU setting:

Screenshot 2025-02-01 104234.png

Screenshot 2025-02-01 104307.png

 Ethernet Setting:

Screenshot 2025-02-01 104439.png

Screenshot 2025-02-01 104338.png

  LWIP :

Screenshot 2025-02-01 104505.png

Screenshot 2025-02-01 104524.png

 

  I added this part to the STM32H723ZGTX_FLASH.ld file:

//************************************************************************************  

.lwip_sec (NOLOAD) : {

. = ABSOLUTE(0x30000000);

*(.RxDecripSection)

 

. = ABSOLUTE(0x30000100);

*(.TxDecripSection)

 

. = ABSOLUTE(0x30000200);

*(.Rx_PoolSection)

} >RAM_D2 AT> FLASH

//************************************************************************************

  I added this to while(1)

MX_LWIP_Process();