2025-04-27 12:07 PM
hi. i am trying to save a data into stm32h7b0vbt6 flash memory. so i have used HAL_FLASHEx_Erase to erase one of the sectors and HAL_FLASH_Program to program it.
it works and flash will be programed.
but when debuging, code gets stuck to while of the void HardFault_Handler(void) and it doesn't continue. how i fix it?
Solved! Go to Solution.
2025-04-27 12:14 PM
At 8K in you're probably erasing the application itself.
Use a sector at the END of memory, not the front.
Look at what is actually reported by the Hard Fault.. the memory address and the processor registers.
2025-04-27 12:14 PM
At 8K in you're probably erasing the application itself.
Use a sector at the END of memory, not the front.
Look at what is actually reported by the Hard Fault.. the memory address and the processor registers.