Skip to main content
Mapyam
Associate II
Aug 1, 2022 4:40 AM UTC
Question

How to solve HardFault or MemManage Handler for STM32H743?

Hello,

I have implemented some source code on my original borad with STM32H743.

(ex. use HAL_UART_DMA, HAL_SAI_DMA, and more.)

I run without Breakpoint, but HardFault occurs.

However, I run with Breakpoint, HardFault does not occur.

According to the Fault exception viewer, HardFault Error Message is "The processor has attempted to execute an undefined instruction (CFSR.UNDEFINSTR)."

What is different with and without breakpoints?

This topic has been closed for replies.

2 replies

Pavel A.
Aug 1, 2022 8:07 AM UTC

Looks like timing issue.

Do you overclock to 480 MHz?

If the program runs off the internal flash, try to increase number of flash wait states.

Mapyam
MapyamAuthor
Associate II
Aug 4, 2022 1:33 PM UTC

This occurred when frequency was reduced from 480MHz to 400MHz.

I referred to the datasheet and set Flash Latency.

However, the program seems to stop at the same point.

Is there a different cause?