Flash Memory Corruption Recovery via Redundant Logging
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
External serial flash memories lack mechanisms to prevent or recover from data corruption due to power interruptions during erase or program operations, especially since backup power may not be maintained for non-volatile RAM, leading to invalid log information and potential data loss.
Innovation Solution
The method involves redundantly logging external flash memory program and erase operations in dedicated buffer partitions within the flash memory itself, using separate book-keeping structures to detect and mitigate corruption by ensuring that if one version of the log information is corrupted, the other version can be used for recovery, eliminating the need for non-volatile RAM.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If non-volatile RAM is used to log write and erase operations, then data corruption can be detected and recovered from, but backup power must be maintained to preserve log information validity
Solution Approach 1:
The patent merges the logging function directly into the flash memory device by integrating a log buffer and state machine within the flash memory controller. This eliminates the need for separate non-volatile RAM and its backup power requirements, while maintaining the ability to detect and recover from data corruption through the embedded logging mechanism.
Solution Approach 2:
The flash memory device performs self-monitoring and self-recovery by incorporating an internal state machine that automatically logs operations and detects corruption conditions. The device can autonomously recover from partial erase or program operations without requiring external backup power or additional memory components.
2Reliability
If non-volatile RAM is used for logging operations, then corruption can be detected, but the log information may be invalid when power is removed and reapplied
Solution Approach 1:
The patent implements preliminary action by having the flash memory controller continuously maintain an accurate log of ongoing operations in its internal buffer before corruption can occur. The state machine proactively records the current operation state, so when power is restored, the most recent valid log information is already available for immediate corruption detection and recovery.
3Device complexity
If serial flash memory lacks corruption prevention mechanisms, then device complexity is reduced, but data corruption during power interruptions cannot be prevented or recovered from
Solution Approach 1:
The flash memory controller is designed with multi-functionality, serving both as the interface controller and as the logging mechanism. The same controller that manages read/write/erase operations also maintains the operation log and detects corruption, eliminating the need for separate dedicated logging hardware and reducing overall system complexity while improving reliability.
Data Source
Figure 1~2
Figure 3
Figure 4
AI summary
The present invention relates to methods and apparatuses for eliminating or mitigating the effects of the corruption of contents in an external flash memory, such as that which can occur during a power interruption. Embodiments of the invention include methods to log external flash memory program and erase operations redundantly to dedicated buffer partitions in the flash memory itself. The log information from external serial flash memory is used to erase the sector that was being programmed or erased when power was removed. According to certain aspects, the redundant storage of log information in embodiments ensures that if one version of the log information is corrupted, the other version can be used.