Hard Fault Occurs When Using Live Expression in CubeIDE
Good evening,
I’m reaching out to ask if anyone might be familiar with a solution to a hard fault issue we’re currently encountering.
Here is the situation:
We are using a custom-designed board that incorporates an STM32H7 microcontroller and external Flash memory from Winbond. All source code is stored in the external Flash. The code itself is relatively simple and primarily handles UART communication.
While debugging with CubeIDE, we frequently encounter hard faults when using the Live Expression feature. The fault appears to be an alignment error.
The debugger connection is via SWD using ST-Link. Interestingly, when debugging via JTAG using SEGGER’s J-Link, the hard fault does not occur—even when using Live Expression. However, in this case, the console displays a message saying “cannot read register map.”
This leads me to believe that the occurrence of hard faults may be influenced by the debugging interface (SWD vs. JTAG).
I would greatly appreciate it if anyone could share insights into what might be causing hard faults when using Live Expression during debugging. If there are known causes or recommended countermeasures, I would be grateful to learn about them.
Thank you in advance for your support.
Best regards,
