Skip to main content
DK.7
Associate III
March 29, 2022
Solved

LWIP get HardFault_Handler after update on STM32CubeIDE v1.9.0!

  • March 29, 2022
  • 5 replies
  • 4311 views

Hi I moved a code that was working on STM32CubeIDE v1.8. But after update STM32CubeIDE v1.9 I am facing a new issue that I have never see before in STM32CubeIDE v1.8.0!

I compared what was before and what we have now, see screen...

Maybe to me need only turn on "Auto Negotiation" in main.c and ping will start working but, I don't know how to do it?

Could someone tell me why code do not initialize MX_LWIP_INIT (); ?

0693W00000Lw7D2QAJ.png 

Bellow my simple code main.c

/* USER CODE BEGIN PV */

extern struct netif gnetif;

/* USER CODE END PV */

 while (1)

 {

   /* USER CODE END WHILE */

   /* USER CODE BEGIN 3 */

    ethernetif_input(&gnetif);

    sys_check_timeouts();

 }

 /* USER CODE END 3 */

}

This topic has been closed for replies.
Best answer by Tesla DeLorean

Should look at the LWIP_RAM_HEAP_POINTER definition

0x30044000 doesn't strike me as a valid RAM region in the STM32F4 devices.

Make sure it's building for the right target

5 replies

DK.7
DK.7Author
Associate III
March 29, 2022

No, I was wrong when I thought that to me need just activate "Auto Negotiation" it is already activated in stm32f4xx_hal_conf.h

Any ideas?

0693W00000LwAheQAF.png

Tesla DeLorean
Guru
March 29, 2022

>>Any ideas?

Hard Faults, diagnose what's actually causing it, and work the issue from there.

Look at the faulting instructions/code, see what it is doing.

Faulting in random locations, perhaps look at interrupts, handlers, call-backs.

Faulting in the same place, likely errant pointers, memory usages or corruption.

Check stack

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
DK.7
DK.7Author
Associate III
March 29, 2022

How to find out what's actually causing it? 

I'm debugging it and it write to my nothing.

After the underlined line on attached screen code immediately flies into "void HardFault_Handler(void)"

0693W00000LwAqgQAF.png