cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H723 (lwIP) – Ping not working, ARP reply generated but not visible on PC

SivaElte
Associate II

Hello!

I have been using the STM32H723ZG Nucleo board and am now trying to ping the STM32 device from a PC through an Ethernet connection, but the ping is not working.

For ex:

ping 192.168.10.XX (STM32 Static IP)

No response is received.

My board setup and module details are given below.
Board / Setup

  • MCU: STM32H723ZG (Nucleo)
  • Interface: Ethernet (RMII)
  • PHY: (e.g., LAN8742 – please confirm)
  • Stack: lwIP (CubeMX generated)
  • RTOS: FreeRTOS
  • Connection: Ethernet cable through splitter (PC ↔ STM32)
  • PC IP: 192.168.10.XX (static)
  • STM32 IP: 192.168.10.XX (static)
  • STM cube IDE version: 1.18.1

Observed Behavior (STM32 side logs):

  1. STM32 successfully receives ARP requests from PC.

          Who has 192.168.10.50? Tell 192.168.10.100 (Captured by wireshark).

     2. lwIP processes the request and generates an ARP reply.

     3. ARP reply frame content (from debug log):

          192.168.10.XX is at 00:80:XX:XX:XX:XX

     4. Transmission status:

           HAL_ETH_Transmit_IT status = HAL_OK

     5. TX complete callback is triggered:

           HAL_ETH_TxCpltCallback()

Expected Behavior:

  • PC should receive ARP reply
  • PC should update ARP table
  • ICMP Echo Request / Reply should occur
  • Ping should succeed

Actual Behavior (PC side)

Using Wireshark:

  • ARP request from PC is visible
  • No ARP reply from STM32 is visible
  • PC does not learn STM32 MAC
  • Ping fails

Memory Configuration (lwIP / DMA)

  • Ethernet DMA descriptors placed in D2 SRAM:
  • lwIP heap configuration (lwipopts.h:(

          #define MEM_SIZE 16360

          #define LWIP_RAM_HEAP_POINTER 0x30040000

  • D2 SRAM size: 32 KB
  • Heap size adjusted to fit within D2 SRAM

Additional Observations

  • STM32 receives Ethernet frames correctly (ARP and IPv4 traffic visible)
  • lwIP stack appears functional
  • ARP reply frame format is correct
  • Transmission completes at software level

For your reference I have given the STM log that I get while I sent the ping command.
STM log:

RX: ARP request (broadcast)
Sender MAC: XX:XX:XX:XX:XX:XX
Sender IP : 192.168.10.XX
Target IP : 192.168.10.XX

TX: ARP reply
Sender MAC: XX:XX:XX:XX:XX:XX
Sender IP : 192.168.10.XX
Target MAC: XX:XX:XX:XX:XX:XX
Target IP : 192.168.10.XX

HAL_ETH_Transmit_IT status = 0

Questions

  1. Can TX complete callback be triggered even if the frame is not physically transmitted on the cable?
  2. Are there known STM32H7 RMII TX issues where RX works but TX does not?
  3. Any recommended way to verify TX signal activity without oscilloscope?
  4. Any CubeMX configuration that is critical for TX but easy to miss?

Any guidance would be appreciated.

Regards,

Siva

 

12 REPLIES 12
MStackDev_376
Associate III

It could likely be that some ethernet pins are not configured correctly. Could you please show the Ethernet pin configuration from CubeMX or attach the ioc file?

Or ensure D-Cache is disabled, since it could tamper with the Ethernet DMA descriptors

Thank you for your reply.
I have used the default Ethernet pin configuration. For your reference, I have attached the corresponding screenshot of configuration andStm_1.pngStm_2.png .ioc file. Kindly have a look.

Currently, both D-cache and I-cache are disabled.

Pavel A.
Super User

@SivaElte  On which machine runs the wireshark? Better run it on 3rd machine, not on the PC itself. Use a switch with a mirror port configured for packet capture (copies all other ports). Otherwise the wireshark log cannot be trusted.

I can see the TX pins are not the right ones. TXD0 should be PG13 instead of PB12, TX_EN should be PG11. Please check all the pins and compare with the board's schematic. I am running an example on my Nucleo H723 with these changes and all works.

Thank you for your response and for pointing out the pin configuration differences.

I have reviewed the Nucleo-H723ZG schematic and updated the pin assignments accordingly. Specifically, I have corrected the RMII pins as suggested (TXD0 -> PG13, TX_EN -> PG11, and TXD1 -> PB13 ), and verified the overall pin configuration in my .ioc file to match the board schematic.

However, even after making these changes, I am still facing the same issue where the ping command is not working. The Ethernet link appears to come up, but there is no response to ping requests.

I would appreciate your guidance on what additional areas I should verify. For example, I am currently checking the PHY configuration, clock settings, and LWIP initialization to identify any potential issues. Please let me know if there are any specific configurations or common pitfalls I should focus on.

Thank you again for your support.

@Pavel A.  

Thank you for your suggestion regarding the Wireshark setup.

Currently, I have been capturing packets directly on the PC connected to the STM32 board. Based on your recommendation, I understand that this may not provide fully reliable results.

I will try to set up a proper test environment using a network switch with port mirroring enabled and perform packet capture from a third machine to obtain more accurate results.

######
Senior II

Just a note on Ping (ICMP) with LWIP, ICMP can be enabled / disabled within the options opt.h or through the Cube configuration menu. The default is enabled #define LWIP_ICMP 1 , but you might want to check it hasn't been overwritten accidentally.