2023-12-19 02:11 AM
Hi,
I am working with STM32G491RET6 custom board and for debugging I am using segger jlink debugger with STM32 Cube IDE 1.13.0. Everything working correctly like flashing and debugging.
1.But I don't know what happened suddenly while debugging program getting struck in either Hardfault_handler() or in below function.
__weak uint32_t HAL_GetTick(void)
{
return uwTick;
}
2.While debugging I get to know that only one time its going inside while loop next
time its going to either Hardfault handler or HAL_GetTick function.
3.I changed the jlink debugger also I am facing same issue.I took new project in cube ide I only checked GPIO toggle with that also same issue I am facing
4.With Development board same program working perfectly. Can anyone suggest what's going wrong .
Thanks
Solved! Go to Solution.
2023-12-19 06:07 AM
> I am working with STM32G491RET6 custom board
> With Development board same program working perfectly.
So probably an error or issue in your custom board. Can you show the schematic? Ensure power is supplied, properly decoupled, ensure VCAP pins have appropriate capacitors.
2023-12-19 03:02 AM
HAL_GetTick, it cannot take you to Hardfault_handler.
You should go to there by some hardware feature go wrong.
while it go to Hardfault_handler, do you can continue debugging or the debugging also error too.
I guess that it may happen from your external oscillator or your power which it can let your controller reset while operating.
2023-12-19 03:32 AM - edited 2023-12-19 06:12 AM
Have the Hard Fault Handler output actionable data, and then identify and root cause those issues.
If waiting likely to spend bulk of time in delay functions. Instrument your code so you know the flow and where it is without stopping it constantly.
Check clocking, PLL settings, flash wait states. Check HSE_VALUE.
Try running without changing clocking source.
2023-12-19 06:07 AM
> I am working with STM32G491RET6 custom board
> With Development board same program working perfectly.
So probably an error or issue in your custom board. Can you show the schematic? Ensure power is supplied, properly decoupled, ensure VCAP pins have appropriate capacitors.
2023-12-25 08:42 PM
Hi,
Thanks everyone for suggestions. Issue was resolved. Issue was with custom board. Soldering got shorted in custom board it causes the power connections to short.