cancel
Showing results for 
Search instead for 
Did you mean: 

(Solved) STM32G0B1CCU6 runs into hard fault after activating EXTI3 interrupt

RGmün.1
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
RGmün.1
Associate II

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

View solution in original post

2 REPLIES 2

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

RGmün.1
Associate II

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