cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U575I-EV: void HardFault_Handler(void)

I am not very familiar with debugging and I am a beginner in firmware programming, if anyone can give me directions on how to solve the problem.

The error is generated in this part of the code and precisely here:

writeVal[j] = RBF1[i+1];

I am attaching the code, name file FPGA_upload

I tried to generate a new simpler project by just entering the code I entered above and I don't get any errors. At this point I have inserted on the new project through cubeIde: FILEX, THREADX and SDMMC1 the latter generates the same error written above. For FILEX, THREADX and SDMMC1 the code is only the one generated by CUbeIDE.

Thanks to those who can help me. If you also have links where to study and deepen the world of STM32 debugging, that's fine for me to learn

2 REPLIES 2
MM..1
Chief III

Simply check i+1 is in or over size of RBF1

Thanks for the reply and for taking the time.

I had made these checks and the error starts immediately even with i equal to zero: writeVal [0] = RBF1 [0 + 1];

The strange thing is that I have generated a simple project with CubeIDE and inserted only the code that I have attached above and I have no error during the debug phase, the function is not called

void HardFault_Handler (void).

Starting from this code, I added the SD CARD management through CubeIDE. I generated the code with cubeIDE, compiled the code without adding anything of my own, I debug the part of code that manages the initialization of the SD CARD interface calls me the same function void HardFault_Handler (void), this also fails .

Thanks for taking the time