cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 reading FLASH causes Hardfault

奥特曼9527
Associate II

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,

2 REPLIES 2
TDK
Super User

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 Employee

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 Accept as Solution on the reply which solved your issue or answered your question.