Method and device for writing and detecting data
A technology for writing data and detecting data. It is applied in the field of communication electronics and can solve problems such as system failure to operate normally and file damage.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0049] refer to Figure 5 , the embodiment of the present invention provides a method for writing data, which is used in combination with a subsequent method for detecting data, which can avoid problems such as the destruction of the written file due to sudden power failure or system error; Atomic write operation is an operation that cannot be interrupted, and the operation either succeeds or fails, so when the system suddenly loses power or makes an error, it will cause fatal damage to atomic write operation, and the write operation provided by the embodiment of the present invention The data method and the method of detecting data can prevent the file from being destroyed due to sudden problems for operations similar to atomic write operations; for the convenience of introduction, here is an example of atomic write operations in MLC NandFlash, write The specific process of the data method is as follows:
[0050] Step 1, judge whether it is the first write operation, if it i...
Embodiment 2
[0060] The embodiment of the present invention provides a method for detecting data. Based on the method for writing data provided in Embodiment 1, the method detects the correctness of data. This method is especially suitable for operations similar to atomic write operations, and can be easily It is better to avoid the destruction of files due to unexpected problems; for the convenience of introduction, here is an example of atomic write operation in MLC NandFlash. The specific process of detecting data method is as follows:
[0061] Step A, when the system starts or returns to normal again, it is sequentially detected whether the data of each page in the MLC NandFlash where the last write operation was interrupted is correct; that is, it is judged whether the data in the current storage unit is correct, and if it is not correct, perform the steps B; otherwise, step C is performed; at this time, the current storage unit is the storage unit where the last write operation was in...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 