2025-05-12 12:10 PM
I'm using HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, 32-bit-addr, 64-bit-data) and it crashes with an 0xfffffff7 exception. Has anyone else seen this? I've checked that the addresses are aligned to 64-bit boundary.
2025-05-12 4:56 PM
Crashes or Hard Faults? Where's this Exception# reported?
Is the memory Erased? You get one-shot to program it
2025-05-14 8:21 AM
2025-05-14 8:27 AM
Are you break-pointing or single-stepping the code?
Best just to instrument FLASH interaction, to print via serial debug console, reporting progress, variables of interest, internal state, etc.
The debugger can be quite invasive, especially if debug views parked over peripheral registers, or unwritten memory. Blank memory may fault with ECC, so might not be readable from the MCU side.
2025-05-14 8:35 AM - edited 2025-05-14 8:36 AM
Are you erasing flash that contains code? Show a complete program which exhibits the problem.
FLASH_SR shows no error codes.
2025-05-20 9:20 AM
Thanks for all of the helpful replies. Turned out to be a silly mistake where the flash hadn't actually be properly erased prior to the attempted write/program. Working now.