cancel
Showing results for 
Search instead for 
Did you mean: 

I am creating a codes from STM32CubeMx. Every code generated from the CubeMx (6.2.1) is going in hard fault when I open in CubeIde (Ver 1.6.1). I could not understand where is the problem?

DSaha.3
Associate II

Request cumunity member to guide on this topic. I am unable to download any single code which is generated from the CubeMx for Cubeide. Each generated code is going in hard fault.

Please tell me the issue and suggest correct way if I am doing any mistake or may someone has already faced this kind of issue.

Regards,

Dnyanesh

12 REPLIES 12

Hi @DSaha.3​ ,

Does problem occur with only clock & peripherals initialization? If yes, you can share an ioc file for farther check.

If you add some processing code, review what you added to identify a possible root cause.

One more tip: you can use the Hard Fault Analyzer of STM32CubeProgrammer to help you identify the root cause in your case.

You need to refer to UM2237 STM32CubeProgrammer software description (section 2.13 Hard fault analyzer) for more details on the how to.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hello Amel,

Thanks for your inputs.

I have not added any processing. Same code I had tried to build and download using ST-LINK.

I will try with Hard fault analyzer. I hope hard fault analyzer will work with ST-LINK/V2.

Please find the attached ioc file for your reference.

Regards,

Dnyanesh

Hi Amel,

Please refer the attached ioc file for ur reference. In the previous post I had added working ioc file. pls ignore that file.