embedded hardware_error ai_generated partial

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

ID: embedded/flash-ecc-error-detected

Also available as: JSON · Markdown · 中文
70%Fix Rate
81%Confidence
1Evidence
2024-04-12First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
STM32Cube_FW_U5 V1.3.0 active
HAL V2.0.0 active

Root Cause

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

generic

中文

闪存 ECC 因辐射或老化导致的位翻转检测到不可纠正错误,造成数据损坏。

Official Documentation

https://www.st.com/resource/en/application_note/an5342.pdf

Workarounds

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

中文步骤

  1. 在链接脚本中映射出故障闪存扇区:将 `*(.faulty_sector)` 添加到自定义段并排除使用。
  2. 使用闪存冗余,将关键数据存储到多个位置并采用多数投票机制。
  3. ECC 错误后触发软件复位以尝试恢复:`NVIC_SystemReset();`

Dead Ends

Common approaches that don't work:

  1. 90% fail

    Re-flashing firmware does not fix hardware-level ECC errors in specific sectors.

  2. 70% fail

    Disabling ECC in flash controller removes error detection but leaves data vulnerable.