Skip to main content
Visitor
July 22, 2026
Question

STM32H747I-DISCO — HardFault_Handler intermittently triggered during Ethernet + LwIP, ping never succeeds

  • July 22, 2026
  • 1 reply
  • 13 views

Hi all,

I'm working on the STM32H747I-DISCO (CM7 core, bare-metal LwIP without RTOS, polling mode via MX_LWIP_Process()). Goal is simply to get the board to respond to ping from my PC over Ethernet.

Hardware done:

  • Solder bridge rework completed per UM2411 Table 5: SB8 closed / SB21 open (PC1 → ETH_MDC instead of mic DOUT), R87 open / SB17 closed (PE2 → ETH_nINT instead of mic CLK)

Software config:

  • ETH set to RMII mode in CubeMX, all 9 RMII pins showing green in Pinout view (PA1, PA2, PA7, PC1, PC4, PC5, PG11, PG12, PG13)
  • LWIP middleware enabled, static IP configured (matching my PC's subnet), no DHCP
  • USART3 used for debug output via Putty
  • Everything runs on CM7 only; CM4 isn't touching ETH/LWIP

Symptom:
The code intermittently jumps into HardFault_Handler(void) — not on every run, which points to a timing/cache-related issue rather than a hard config error. When it doesn't crash, ping still doesn't get a reply.

/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
extern struct netif gnetif;
/* USER CODE END 0 */

  /* Infinite loop */
  /* USER CODE BEGIN WHILE */
  while (1)
  {
    /* USER CODE END WHILE */

    /* USER CODE BEGIN 3 */
      ethernetif_input(&gnetif);
      sys_check_timeouts();
  }
 

 

1 reply

ST Technical Moderator
July 22, 2026

Hello ​@yougi 

Please refer to the article below to debug your hard fault:

How to debug a HardFault on an Arm® Cortex®-M STM32 | Community

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om