cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H723ZG Ethernet not responding to ping (No RTOS)

max67
Associate II

I am working with the STM32H723ZG and trying to implement Ethernet communication without using an RTOS using LWIP(TCP/IP) 

Setup Details:

  • Board: NUCLEO-H723ZG

  • IDE: STM32CubeIDE v1.19.0

  • Ethernet stack: LwIP

  • PHY interface: RMII

  • Flashing tool: ST-LINK (onboard)

  • Test performed: Ping test from PC

Observed behavior:

  • The Ethernet port LEDs (orange and green) remain solid ON after connecting the Ethernet cable.

  • Ping is failing continuously, I got (Destination host unreachable) error.

Troubleshoot taken:

  • Checked with multiple Ethernet cables to ensure cable isn't a problem. 

  • I'm using static Ip and checked the Ip is correct in lwip.c while flashing the board.
  • Rebuilt and reflashed the project multiple times.

After all this still I can't ping the board.

Assistance required :

  • is there is any problem in cache coherency in the code?
  • Kindly check with the MPU unit configuration and let me know is there is any issue?

 


I'm providing my Project file below

Any guidance or working minimal examples for STM32H7 Ethernet (without RTOS) would be greatly appreciated.

13 REPLIES 13
Pavel A.
Super User

Build and run this example  (change the MAC and IP addresses per your setup) :

https://github.com/STMicroelectronics/STM32CubeH7/blob/master/Projects/NUCLEO-H723ZG/Applications/LwIP/LwIP_UDP_Echo_Server/

It should work.

Compare with your project and find differences in the ETH config.

 

 

STackPointer64
ST Employee

Hello @max67, and welcome to ST Community!

I have attached a Baremetal LwIP example below for you to review and use as a foundation for your project. Please let me know if it works for you or if you need any further assistance.

Best regards,

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.
max67
Associate II

 Hello, @STackPointer64 @Pavel A. 

I went through the LwIP_UDP_Echo_Server code.

      From the code you provide I face this problem:

      I can be able to ping it when I flash it once and if I rebuild the project and flash it once again 
it goes into hard fault error. I don't know why?
      I double checked the Ip address and no fault in that 
      I checked it with another PC after the one-time flash and that is also not pinging.    

     If I disconnect and connect the power to the board and that time also, I can't be able to ping. 

     Below is the package which I'm using.

Screenshot 2026-04-09 124359.png

Hello @max67,

After reviewing your project, I believe the only issue preventing it from working properly is that you mistakenly enabled the Ethernet global interrupt in the Ethernet settings. If you disable it, it should function correctly. Please do so and let me know whether it works.

STackPointer64_0-1775742640431.png

Best regards, 

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.

Hello @STackPointer64,

       As you said, I did disable the Ethernet interrupt and build the project. I checked the Ip address and try to ping it but still can't ping it. I still got destination host unreachable error when I try to ping.
Is there is any working code for it, could you please provide it.
is there is anything to change anything in the code.

Hello, I noticed that there's 2 additional configurations missing:

  1. MPU configuration: You need to set the MPU descriptor region 1 to bufferable, because it is currently inheriting the not bufferable attribute from the first region. Also, disable bufferability again for the third section, which is intended for the LwIP heap, as shown below:
 

 

  MPU_InitStruct.Number = MPU_REGION_NUMBER1;
  MPU_InitStruct.BaseAddress = 0x30000000;
  MPU_InitStruct.Size = MPU_REGION_SIZE_256B;
  MPU_InitStruct.SubRegionDisable = 0x0;
  MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
  MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_ENABLE;
  MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE;
  MPU_InitStruct.IsBufferable = MPU_ACCESS_BUFFERABLE; // <- This line

  HAL_MPU_ConfigRegion(&MPU_InitStruct);

  /** Initializes and configures the Region and the memory to be protected
  */
  MPU_InitStruct.Number = MPU_REGION_NUMBER2;
  MPU_InitStruct.BaseAddress = 0x30004000;
  MPU_InitStruct.Size = MPU_REGION_SIZE_16KB;
  MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL1;
  MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE;
  MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; // <- This line

 

  1. Linker file: You are missing a declaration for RxPoolSection right after the descriptor sections:
 
   .lwip_sec (NOLOAD) : {
    ...
    . = ABSOLUTE(0x30000160);
    *(.Rx_PoolSection) 
  } >RAM_D2

Best regards,

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.

Hello, @STackPointer64

       I did the changes as you said and still it's not working. I attached my changed project file below.
Could you please check it and tell me what else I can try. Is there is any working code for it, could you please provide it.

Hello @max67,

I tested the example you provided, and it worked flawlessly. To solve this, I suggest that you check whether your computer is on the same subnet as the board. If it is, try pinging from another computer, as Windows may be dropping your ICMP packets. Also, test with another Ethernet cable.

Best regards,

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.

Hello, @STackPointer64 

I tried the example with another PC , with another cable and still facing the same issue. I checked subnet and it is same as in board and checked it also in another PC. I turned off the firewall also.
Could you please provide what version of STMCubeIDE are you using and firmware package which helps a lot.
I provided my version and firmware package in the first query.
Did you do anything extra for the code test?

 

Best regards,