2025-12-19 3:52 AM - last edited on 2025-12-19 4:07 AM by mƎALLEm
I'm trying to ping my NUCLEO-H723ZG board and I've failed with every attempt over many hours;
My goal: Ping the STM32 over ethernet
Results:
Request timeout for icmp_seq 301
ping: sendto: Host is down
Or it will hardfault
Code:
/* USER CODE BEGIN PV */
extern struct netif gnetif;
/* USER CODE END PV */
...
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
ethernetif_input(&gnetif);
sys_check_timeouts();
}
/* USER CODE END 3 */
Config:
These config files are based from .ioc files from this thread: https://community.st.com/t5/stm32-mcus-embedded-software/h723-ethernet-lwip-ping-problem/m-p/758419#M58561 (No help from linked topic helped here)
I've also tried this tutorial with the same results: https://rafalbartoszak.com/stm32-ethernet-the-first-launch/
2025-12-20 12:12 AM
You have multiple problems with ICMP_packet_processing.c code.
Also calls to HAL drivers are not properly scheduled.
2025-12-20 12:16 AM
@mbarg.1 Would you please care to elaborate? I have no ICMP_packet_processing.c file, nor have I shown any HAL driver scheduling.
2025-12-20 12:53 AM
Which software is running ethernet connection ?
2025-12-22 8:04 AM
Hello @ten_filip, and welcome to ST community!
After reviewing your screenshots, I noticed several crucial configuration steps were missed for the Ethernet to work properly. Notably:
I suggest following the example project LwIP_TCP_Echo_Server. For MPU configuration, enable both I-Cache and D-Cache, and apply the recommended settings.
Additionally, add the following memory section declarations for Ethernet descriptors and buffers in the STM32H723ZGTX_FLASH.ld linker file to ensure proper placement and alignment with the MPU configuration.
Finally, increase the heap memory allocation by modifying the memory size definition inside lwipopts.h.
Please apply these changes and let me know how it goes.
Best regards,