Skip to main content
Associate II
June 3, 2025
Question

STM32H7 reading FLASH causes Hardfault

  • June 3, 2025
  • 2 replies
  • 360 views

The chip is H743. After performing a erase operation on a page and resetting it, when I read the page again, the debug page shows that the erased page is 0xAA. As long as I read it, I will enter hardfault. Have you ever encountered a big shot,

This topic has been closed for replies.

2 replies

TDK
June 3, 2025

How are you erasing the page? Try erasing in STM32CubeProgrammer instead and see if you can duplicate the behavior.

"If you feel a post has answered your question, please click ""Accept as Solution""."
KDJEM.1
ST Technical Moderator
June 4, 2025

Hello @奥特曼9527 and welcome and the community;

 

May this article How to debug a HardFault on an Arm® Cortex®-M STM32 can help you to debug the HardFault. 

Also, you can take a look at this FLASH_EraseProgram example and check your code.

 

I hope this help you.

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.