2022-04-21 07:55 AM
Hello
The STM32G0B1CCU6 running into a hard fault caused by SPI2.
After activating EXTI3 at the Pin PB3 (as interrupt) the controller is running into a hard fault. We think, that the hard falut is comming from the SPI-line because the MISO-pin is on the same EXTI-Line!?
Note: MISO Pin at SPI2 uses the same EXTI3 - Line.
Question:
Why runs the controller into the hard fault? Is it, becuase the MISO-Pin is not defined?
Is there any restriction about the EXTI3 - Line and using SPI2?
Is there any workaround for this issue?
thanks
Roland
Solved! Go to Solution.
2022-04-22 05:58 AM
Hello Jan
thanks for your fast answer.
After updating the IDE to the latest version and regeneration from the ioc-file the application will now run without any hard fault.
May this issue caused about wrong/different IDE/CubeMX versions.
Thanks
Roland
2022-04-21 08:07 AM
Hardfault does not result from hardware, but from bug in program.
Debug as usually: in the hardfault handler, look at the stacked PC (perhaps using debugger) and content of all core registers, then in disasm (or better mixed C/disasm) walk back a couple of instructions from this address and look at the potentially offending instruction.
JW
2022-04-22 05:58 AM
Hello Jan
thanks for your fast answer.
After updating the IDE to the latest version and regeneration from the ioc-file the application will now run without any hard fault.
May this issue caused about wrong/different IDE/CubeMX versions.
Thanks
Roland