# Flash: ECC error detected at address 0x08010000, data corruption

- **ID:** `embedded/flash-ecc-error-detected`
- **Domain:** embedded
- **Category:** hardware_error
- **Verification:** ai_generated
- **Fix Rate:** 70%

## Root Cause

Flash memory ECC detected uncorrectable error due to bit-flip from radiation or aging, causing data corruption.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| STM32Cube_FW_U5 V1.3.0 | active | — | — |
| HAL V2.0.0 | active | — | — |

## Workarounds

1. **Map out faulty flash sector in linker script: add `*(.faulty_sector)` to custom section and exclude from use.** (75% success)
   ```
   Map out faulty flash sector in linker script: add `*(.faulty_sector)` to custom section and exclude from use.
   ```
2. **Use flash redundancy by storing critical data in multiple locations and majority voting.** (80% success)
   ```
   Use flash redundancy by storing critical data in multiple locations and majority voting.
   ```
3. **Trigger software reset after ECC error to attempt recovery: `NVIC_SystemReset();`** (60% success)
   ```
   Trigger software reset after ECC error to attempt recovery: `NVIC_SystemReset();`
   ```

## Dead Ends

- **** — Re-flashing firmware does not fix hardware-level ECC errors in specific sectors. (90% fail)
- **** — Disabling ECC in flash controller removes error detection but leaves data vulnerable. (70% fail)
