2020-11-13 02:22 AM
Hi
I'm new into MCU and currently using STM32 H743.
My code is facing HardFault_Handler every time I run.
After I debugged several times, I found the root error from LWIP.
The Fault Analyzer saids, it's Imprecise data access violation(IMPRECISERR) from BUS fault.
However, I have no idea how to deal with this.
Here's the code below
Middlewares > Third Party > LwIP > src > core > init.c
void
lwip_init(void)
{
........
mem_init();
memp_init(); <------------------- THIS ONE (goes into HardFault_Handler loop)
pbuf_init();
netif_init();
.......}
And Register Content During Fault Exception saids.
NAME VALUE
sp (MSP) 0x2001ff68
r0 0x30054000
r1 0x1010108
r2 0x20001a78
r3 0x30044000
r12 0x0
lr 0x800cd8b
pc 0x800a806
xpsr 0x1000000
Can anybody help me out with this?
Thanks in advance.
Solved! Go to Solution.
2020-11-13 05:54 AM
Are your clock settings valid? What statement in memp_init triggers the hard fault?
2020-11-13 05:54 AM
Are your clock settings valid? What statement in memp_init triggers the hard fault?
2020-11-15 05:09 PM
oh... thanks a lot. As I changed clock settings, the error is immediately gone.