cancel
Showing results for 
Search instead for 
Did you mean: 

LWIP get HardFault_Handler after update on STM32CubeIDE v1.9.0!

DK.7
Senior

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 */

}

1 ACCEPTED SOLUTION

Accepted Solutions

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

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

5 REPLIES 5
DK.7
Senior

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

>>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
Up vote any posts that you find helpful, it shows what's working..

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

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

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

THANK YOU!!!!!!!!!!!!!!!!!

Everything start working after commented "LWIP_RAM_HEAP_POINTER" for stm32f407vg!

Is it possible to disable "LWIP_RAM_HEAP_POINTER" in GUI?

0693W00000LwBqIQAV.png0693W00000LwBp0QAF.png