cancel
Showing results for 
Search instead for 
Did you mean: 

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

XZou.1
Associate II

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 

1 REPLY 1

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