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

- **ID:** `embedded/nvm-ecc-uncorrectable-error`
- **Domain:** embedded
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 78%

## Root Cause

Flash memory cell has experienced multiple bit flips exceeding ECC correction capability (SEC-DED), indicating permanent hardware degradation or radiation-induced single event upset.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| STM32Cube_FW_G4 v1.5.0 | active | — | — |
| ARM GCC v13.2.1 | active | — | — |
| HAL NVM driver v1.0.0 | active | — | — |

## Workarounds

1. **Map out the bad flash sector: use flash controller to mark sector as bad in a bad block table, then relocate application data to a spare sector. Example: HAL_FLASHEx_Erase() the sector and store its address in a dedicated bad block region.** (80% success)
   ```
   Map out the bad flash sector: use flash controller to mark sector as bad in a bad block table, then relocate application data to a spare sector. Example: HAL_FLASHEx_Erase() the sector and store its address in a dedicated bad block region.
   ```
2. **Implement software ECC using Reed-Solomon codes on critical data, and retry reads on ECC error with data reconstruction from redundant copies stored in separate sectors.** (75% success)
   ```
   Implement software ECC using Reed-Solomon codes on critical data, and retry reads on ECC error with data reconstruction from redundant copies stored in separate sectors.
   ```

## Dead Ends

- **Re-flash the entire firmware to overwrite corrupted data** — Re-flashing writes new data but does not repair the underlying bad flash cell; ECC error will recur at same address. (90% fail)
- **Disable ECC checking in flash controller** — Disabling ECC allows silent data corruption to propagate, leading to undefined behavior and potential system crashes. (95% fail)
