embedded
data_error
ai_generated
partial
NVM: ECC uncorrectable error at address 0x08010000, data corruption detected
ID: embedded/nvm-ecc-uncorrectable-error
78%Fix Rate
88%Confidence
1Evidence
2024-06-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| STM32Cube_FW_G4 v1.5.0 | active | — | — | — |
| ARM GCC v13.2.1 | active | — | — | — |
| HAL NVM driver v1.0.0 | active | — | — | — |
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.
generic中文
闪存单元发生多次位翻转,超出ECC纠错能力(SEC-DED),表明永久性硬件退化或辐射引起的单粒子翻转。
Official Documentation
https://www.st.com/resource/en/application_note/an5340-ecc-management-on-stm32-mcus.pdfWorkarounds
-
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.
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.
-
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.
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.
中文步骤
映射出坏闪存扇区:使用闪存控制器将扇区标记为坏块表中的坏块,然后将应用程序数据重定位到备用扇区。示例:HAL_FLASHEx_Erase()擦除该扇区并将其地址存储在专用坏块区域中。
对关键数据使用Reed-Solomon码实现软件ECC,并在ECC错误时重试读取,从存储在单独扇区中的冗余副本重建数据。
Dead Ends
Common approaches that don't work:
-
Re-flash the entire firmware to overwrite corrupted data
90% fail
Re-flashing writes new data but does not repair the underlying bad flash cell; ECC error will recur at same address.
-
Disable ECC checking in flash controller
95% fail
Disabling ECC allows silent data corruption to propagate, leading to undefined behavior and potential system crashes.