cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H723ZG Ethernet

Srivatsan
Associate II

Hello everyone,

I am working with the NUCLEO-H723ZG board and attempting to establish Ethernet communication using TCP/IP. The firmware was built and flashed successfully using STM32CubeIDE version 1.19.0.

However, I am facing issues with basic network connectivity. Below are the details of my setup and observations:

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 requests consistently fail (Request timed out).

  • No response is received from the board.

Troubleshooting Already Performed

  • Tested both Static IP and Dynamic IP (DHCP) configurations.

  • Verified IP address, subnet mask, and gateway settings.

  • Tried multiple Ethernet cables to rule out cable-related issues.

  • Rebuilt and reflashed the project multiple times.

  • Verified that the firmware flashes successfully and runs without build errors.

Despite these steps, the board does not respond to ping requests.

Questions / Assistance Required

  • Does solid ON state of both Ethernet LEDs indicate a known PHY or clock configuration issue?

  • Are there any known issues with RMII_REF_CLK configuration on the NUCLEO-H723ZG?

  • Are there specific CubeMX clock, MPU, or cache settings required for reliable Ethernet operation on STM32H723?

  • Any recommended minimal or verified example project for Ethernet ping testing on this board?

I need some guidance or suggestions to identify and resolve this issue.

Srivatsan_0-1768820714125.png

13 REPLIES 13
LCE
Principal II

0) please use the </> button when posting any source code, also for linker files. The posts are unreadable / ugly enough to keep from looking at it... :D

1) For complex stuff: RTFM! CubeMX should not be trusted 100%.
Check the H7 datasheet and reference manual, there you find that SRAM1 & SRAM2 in D2 domain have only 16 kB each.

2) Also make sure that the lwIP memory is not put into DTCM RAM, because that cannot be accessed by the ETH DMA.

3) Not sure that LWIP_RAM_HEAP_POINTER must be in SRAM2. This is actually only a re-definition of the "ram_heap", which is declared in arch.h at #define LWIP_DECLARE_MEMORY_ALIGNED_HEAP.
I put the lwIP heap in AXI RAM by adding the attribute to that line:

/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
in arch.h :

#ifndef LWIP_DECLARE_MEMORY_ALIGNED
#define LWIP_DECLARE_MEMORY_ALIGNED(variable_name, size) u8_t variable_name[LWIP_MEM_ALIGN_BUFFER(size)] __ATT_SECT_LWIPPOOL
#endif

#ifndef LWIP_DECLARE_MEMORY_ALIGNED_HEAP
#define LWIP_DECLARE_MEMORY_ALIGNED_HEAP(variable_name, size) u8_t variable_name[LWIP_MEM_ALIGN_BUFFER(size)] __ATT_SECT_LWIPHEAP
#endif


/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
in main.h :

#define __ATT_SECT_LWIPPOOL		__attribute__((section(".LwipPoolSection")))
#define __ATT_SECT_LWIPHEAP		__attribute__((section(".LwipHeapSection")))


/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
in linker file :

	SRAXI_D1(xrw)		: ORIGIN = 0x24000000, LENGTH = 320K
...

/* lwIP HEAP section */
	.LwipHeapSection (NOLOAD):
	{
		. = ALIGN(4);
		*(.LwipHeapSection)
		*(.LwipHeapSection*)
		. = ALIGN(4);
	} >SRAXI_D1

/* lwIP POOL section */
	.LwipPoolSection (NOLOAD):
	{
		. = ALIGN(4);
		*(.LwipPoolSection)
		*(.LwipPoolSection*)
		. = ALIGN(4);
	} >SRAXI_D1


So, after all my hints and complaining, your memory location should be okay, because DTCM is unused (what a waste! I like to put the stack there), and a little of RAM_D2 is used, probably for the ETH descriptors.

So this was an almost useless post... sorry! :D

ajmw__0-1768991660199.png

Your memory configuration should closely match the one shown above—please verify it against your setup.
Also ensure that the PC network and STM32 network are on the same subnet.

Do not add any user-defined macros in lwipopts.h; let CubeMX handle the configuration.
If you still cannot ping the STM32, uncomment  #define DATA_IN_D2_SRAM in system_stm32h7xx.c and test again

Additionally:

  1. Disable Ethernet interrupts for now; they are not required at this stage.

  2. Set the RX buffer length to 1536 in the Ethernet parameter settings

  3. Create a new project and follow the steps from the first. 

~ AJ

STackPointer64
ST Employee

Hello @Srivatsan,

Attached is a project for the NUCLEO-H723ZG. You can compare configurations and have a working project. Please make sure to add the proper linker file configuration to your project. This application uses a fixed static IP set to 192.168.1.20 and a subnet mask set to 255.255.255.0. Please ensure your computer is on the same subnet, or feel free to change the IP configuration inside the lwip.c file or in STM32CubeMX and regenerate the project. Let me know if you manage to solve the issue you’re encountering.

Best regards,

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

After flashed the ZIP file that you have provided, I again failed in the ping test.

Srivatsan_0-1770037969392.png

Srivatsan_2-1770038017687.png

Srivatsan_3-1770038029327.png