Skip to main content
XZou.1
Associate II
Dec 9, 2020 6:28 AM UTC
Question

When debugging, I saved the data in flash memory successfully and at soon the HardFault_Handler happened ,way?

When debugging, I saved the data in flash memory successfully and at soon the HardFault_Handler happened ,way? I used the same function in examples and the same Flash memory address.

 https://github.com/STMicroelectronics/STM32CubeL5/tree/a7a8ea66c42ca57e5f1662a2d4023d32edf9f993/Projects/STM32L562E-DK/Examples/FLASH/FLASH_EraseProgram

0693W000006F5NYQA0.png 

This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
Dec 9, 2020 9:05 AM UTC

Show a disassembly of the section of code that actually faulted, and the registers at the fault. The handler code is of no interest.

​

Make sure the memory is erased and aligned, and that you're not trying to reprogram within the flash line.​

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..