cancel
Showing results for 
Search instead for 
Did you mean: 

Hardfault_Handler() with minimum new project

Stoufer
Associate III

Hi - I am new to the STM32CubeIDE - moving from Attolic.

I have created a new STM32 project using STM32CubeIDE 1.9.0 for a STM32L151VET6 using New Project.

Our board is built to use an internal oscillator. 

I can try to debug the basically empty new created project or add just a for loop in the while(1) in main() and either way it immediately stops on Hardfault_Handler. 

In the Fault Analyzer :

X Bus, memory management or usage fault (FORCED)

X Imprecise data access violation (IMPRECISER)

X Stacking error (STKERR)

I have set a breakpoint on the while(1) and on the for loop inside it and neither are ever hit.

I believe I have set the pins in the IOC to match my board ( UART, SPI, GPIO )

Any suggestions on how to proceed ?

Thanks!

10 REPLIES 10
Stoufer
Associate III

Thanks!!

I found it right away looking at the startup files. Realized the board I am using has a STM32L151V C T6, and I had selected a V E T6 because that is on another board on my desk - we use both in production.

Thanks for you guys help !