flash/ECC issue on an STM32H743.
I'm investigating a suspected flash corruption/ECC issue on an STM32H743.
A read from flash address 0x081F0000 consistently causes a fault. The problem is that I'm not fully confident that the fault status registers can be trusted after the event, so I'm looking for a diagnostic approach that does not rely entirely on the captured fault information.
Known facts:
- Accessing
0x081F0000triggers a fault. ECC_FA2Rdoes not show a failing address.- STM32H7 flash ECC is evaluated only when flash is read.
- ECC granularity is 32 bytes (256 bits).
My main question is:
If I suspect flash corruption or an ECC problem, but do not fully trust the contents of CFSR, HFSR, BFAR, SR2, or ECC_FA2R after the fault, what is the recommended way to diagnose the problem?
Would you:
- Perform a controlled BusFault-protected flash scan in 32-byte steps?
- Use
HAL_FLASHEx_ComputeCRC()over the suspect region? - Dump the entire flash bank via SWD/JTAG and verify externally?
- Use some other method?
Has anyone seen a corrupted flash word on STM32H7 that caused faults without providing useful ECC fault information?
I'm interested in the most reliable way to determine whether the root cause is:
- Double-bit ECC corruption,
- Flash content corruption,
- MPU/PCROP/protection settings,
- Or something else entirely.
