2022-07-25 04:25 AM
I got this issue when i am executing FLASH TEST, inside that i am calling OPTIONAL BYTE CONFIG
when i am calling it in main.c it is working fine but when i am trying to debug second time it is enter into HardFault_handler(void) function. when i am trying to reset or restarting it is not resolved it is throwing same fault
NOTE:- Now it is not working for all others modules. please help me with this issue,thank you in Advance
2022-07-25 04:29 AM
Have a better Hard Fault Handler which can unpack and display details.
Is the RAM or cache changed by the command/configuration here.
Look at registers and expectations at fault.
2022-07-25 04:48 AM
Hi Tesla DeLorean,
issue is when i am trying to debug different module in the same (stm32h723zg) nucleon board before hitting the break point it is Entering into Hardfault_ handler ()function.So, when i am trying to find solution. i got to know st community. Can you please help me how to find route cause and solution .
when i am observing SCB->CFSR register one flag(IMPRECISERR) is set with "1" ,AND one more register which is SCB->HFSR inside that FORCED set with "1".
2022-07-25 05:08 AM
After line number 64 it is enter into Hardfault_Handle() state.
2022-07-25 05:29 AM
So your code is not reaching main function.
Use the below registers to know which error you are facing. And try to see from there.
Mostly UFSR or CFSR. But use a debugger and find the fault.
2022-07-25 05:33 AM
Imprecise suggests a WRITE
Is the stack at a RAM address, or did the OB change the memory mapping such that the compiled/linked code had different expectations?
2022-07-25 09:02 PM
hi Vmere.1
thank you for you support, but this what i am getting while debugging i am not able to find what is the exact issue.
2022-07-25 09:07 PM
After 183 line it is entering into Hardfault _handler. even i am not sure what exactly issue is.
2022-07-25 10:20 PM
I never faced this.
But there are some issues already with the same problem.
https://community.st.com/s/question/0D50X00009Xke1gSAB/hardfault-impreciserr
Imprecise error means, the system doesn't know where the error came from. So it should be little more difficult to find out. But if your code is small then you can find it out.
I found this link, I hope it should be helpful.
https://interrupt.memfault.com/blog/cortex-m-fault-debug#coprocessor-fault-example
Are you using some kind of rtos?
2022-07-25 10:34 PM
Hi Vmere.1
when i am doing flash optional byte shared RAM configuration testing. when i am debugging it is working fine for first time when i am stopped and started second time debugging i am facing this issue, before entering into main() function it is hitting with Hardfault_handler(), aftter that i am trying with other modules it is hitting same thing , So i am not sure where the issue and what is the solution for that.