Skip to main content
XZou.1
Associate II
December 9, 2020
Question

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

  • December 9, 2020
  • 1 reply
  • 1127 views

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
December 9, 2020

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 VenmoUp vote any posts that you find helpful, it shows what's working..