cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f4 hardfault

jhasa.2
Associate III

hi

I use stm32f4 micro but an external interrupt pin

when i increase frequency of the external signal connected to interrupt pin, the micro jump to hardfault

why? how I can detect the solution?

jhasa2_0-1697953350580.png

jhasa2_1-1697953356273.pngjhasa2_2-1697953358673.png

 

35 REPLIES 35

would you check my code again?

the array has been fixed but problem not solved yet!

 

the new code is here!

It is not that difficult to detect hardware fault, you keep putting break point after each line and run the code, at one particular line you will get hardware fault. You need to look into that function, need patience to test each line of code.

jhasa2_0-1699082911821.png

in highlighted line we have fault

You still have uint8_t temp_[60000]; defined in your code. Can you remove it?

#define BUFFER_SIZE 60000 this is also very large.

It is my important array

what is the problem with this array?

the SRAM is about 190KB and this array is 60KB

what is the wrong with it?