FLASH single-mode data storage bad block management method and system for satellite

By adopting a management method of single-mode storage data combined with bad block mapping in FLASH memory devices, the problems of low efficiency of bad block management and insufficient utilization of storage capacity in the prior art are solved, and efficient bad block management and maximization of storage capacity are achieved.

CN119782202AActive Publication Date: 2025-04-08HUNAN SIBEITU TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411962740.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-08
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

The prior art when dealing with bad blocks in FLASH memory devices leads to a decrease in actual available capacity and data errors, and lacks an efficient bad block management method, which increases the cost and inefficiency problems.

Method used

The management method of single-mode storage data combined with bad block mapping is adopted. By dividing the data storage area, bad block mapping area and other data areas in the FLASH chip, and building a three-mode redundant bad block table and bad block mapping table, efficient management of bad blocks is achieved.

Benefits of technology

It effectively avoids data errors caused by bad blocks, improves storage capacity utilization, simplifies the bad block management process, and reduces operational complexity and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782202A_ABST
    Figure CN119782202A_ABST
Patent Text Reader

Abstract

The invention discloses a FLASH single-mode data storage bad block management method and a FLASH single-mode data storage bad block management system for a satellite. The method comprises the following steps: dividing a FLASH chip into a data storage area, a bad block mapping area and other data areas; constructing a bad block table in other data areas; mapping bad block addresses in the bad block table to a bad block mapping table; when data is written or read, checking whether the current operation MB is a bad block, and if so, mapping to a bad block mapping area for operation; when data are erased, written and read, if failure occurs, bad block marking is carried out on the MB address; and when the data address is read, if the read data cannot be normally recovered, carrying out bad block marking on the MB address. The method is applied to the field of satellite data management, data errors caused by bad blocks can be avoided, meanwhile, the data storage capacity of a data storage area is larger than that of conventional triple modular redundancy, the problem that the actual storage capacity is reduced is avoided, functions are easy to achieve, and bad block judgment and processing time consumption is short.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of satellite data management, and in particular to a method and system for managing bad blocks of FLASH single-mode data storage used by satellites. Background Art

[0002] FLASH is a storage device that is widely used in satellite products. Due to its non-volatile power-off and large storage capacity, it is often used as a common storage device for satellite products. However, due to its process and manufacturing characteristics, there are a certain number of bad blocks when it leaves the factory, and new bad blocks will inevitably appear gradually during use due to the increase in the number of write and erase times. If the bad blocks are not managed, the data will be incorrect due to the bad block problem during use, and this error cannot be eliminated, making the data at the location of the bad block unavailable for a long time.

[0003] A common circumvention method is to skip the bad block position by adjusting the command so that it can work normally. The disadvantage of this method is that it leads to a decrease in the actual available capacity (bad blocks usually appear at 1MB), and a series of work caused by adjusting the command actually affects the normal processing flow of satellite data when the satellite is working at the end.

[0004] At present, in the case of a payload or satellite subsystem that lacks a bad block management module, the general way to handle bad blocks is to find the location of the damaged bad block through data comparison on the ground, and skip the bad block location by adjusting the read and write address instructions. This method requires modification every time a bad block appears. This method of avoiding bad blocks is costly and inefficient, and is a problem that cannot be ignored in the satellite data processing process. For payloads or satellite subsystems that use a three-mode storage method, although the three-mode redundancy ensures the accuracy of the data, the three-mode redundancy itself will reduce the storage space of the actual valid data. In the current situation where the data volume requirements are gradually increasing, the single-mode data storage plus bad block management method is more in line with market demand. Summary of the invention

[0005] In view of the deficiencies in the above-mentioned prior art, the present invention provides a bad block management method and system for FLASH single-mode data storage used in satellites. By adopting a single-mode storage data and bad block mapping management method to manage the bad blocks in the FLASH, the satellite can avoid data errors caused by bad blocks during operation and avoid the problem of reduced actual storage capacity. At the same time, no additional operations are required to avoid the bad block problem during use.

[0006] To achieve the above object, the present invention provides a bad block management method for FLASH single-mode data storage used in a satellite, comprising the following steps: Step 1, dividing the FLASH chip into a data storage area, a bad block mapping area and other data areas, wherein the bad block mapping area and the other data areas both adopt a triple-module redundancy design; Step 2, constructing the same bad block table in the three other data areas, wherein the bad block table corresponds to the address and bad block status of each 1MB space in the data storage area; Step 3, after the FLASH chip is powered on, it enters a bad block self-check state, records the bad block addresses found during the self-check process into a local cache, and writes all bad block addresses into each of the bad block tables after the self-check is completed; Step 4, the third module reads the bad block table stored in the other data area, and then maps the bad block address in the bad block table to a bad block mapping table, wherein the bad block mapping table corresponds to the address and bad block status of each 1MB space in the data storage area; Step 5, after the FLASH chip enters the working state: When writing or reading data to a whole MB address, read the bad block mapping table to check whether the current operation MB is a bad block. If so, map it to the three bad block mapping areas for operation at the same time, otherwise operate normally; When erasing, writing, or reading data to a whole MB address, if a failure occurs, the MB address is marked as a bad block, and the bad block table and bad block mapping table in the local cache are updated; When reading data to a whole MB address, if the read data cannot be recovered normally, the MB address is marked as a bad block, and the bad block table and bad block mapping table in the local cache are updated at the same time; Step 6: after the FLASH chip stops working, the bad block table of the local cache is updated to the three other data areas.

[0007] In one embodiment, step 3 specifically includes: Erasing each whole MB address space of the data storage area, and recording the current whole MB address locally when erasing fails; When all the whole MB address spaces in the data storage area are completely erased, all recorded whole MB addresses are marked as bad blocks and written into the bad block table in the other storage areas.

[0008] In one embodiment, the bad block mapping table is mapped to: The three-mode reads the bad block table stored in the other data area, reads the data after the three-mode redundancy and updates it to the local cache, and then maps the bad block addresses in the three bad block tables to the bad block mapping table, that is, the three-mode bad block table is stored locally to reduce the impact of single-particle flips on track.

[0009] In one of the embodiments, for any whole MB address, when the three bad block tables all mark it as a bad block, it is marked as a bad block in the bad block mapping table, otherwise it is marked as a non-bad block.

[0010] To achieve the above object, the present invention also provides a FLASH single-mode data storage bad block management system used in satellites, which uses the above method to manage FLASH single-mode data storage bad blocks; The FLASH single-mode data storage bad block management system includes: A storage partitioning unit, used to divide the FLASH chip into a data storage area, a bad block mapping area and other data areas, wherein the bad block mapping area and the other data areas both adopt a triple-module redundancy design; A bad block table construction unit, used to construct the same bad block table in the three other data areas, wherein the bad block table corresponds to the address and bad block status of each 1MB space in the data storage area; A bad block self-check unit is used to enter a bad block self-check state after the FLASH chip is powered on, record the bad block addresses found during the self-check process into a local cache, and write all bad block addresses into each of the bad block tables after the self-check is completed; A bad block table mapping unit, used for reading the bad block table stored in the other data area by three modes, and then mapping the bad block address in the bad block table to the bad block mapping table, wherein the bad block mapping table corresponds to the address and bad block status of each 1MB space in the data storage area; The bad block management unit is used to read the bad block mapping table to check whether the current operation MB is a bad block when writing or reading data to the whole MB address after the FLASH chip enters the working state. If so, it is mapped to the three bad block mapping areas for operation at the same time, otherwise it is operated normally; when erasing, writing, and reading data to the whole MB address, if a failure occurs, the MB address is marked as a bad block, and the bad block table and bad block mapping table in the local cache are updated at the same time; when reading data to the whole MB address, if the output data cannot be normally recovered through ECC, the MB address is marked as a bad block, and the bad block table and bad block mapping table in the local cache are updated at the same time; The bad block table updating unit is used to update the bad block table cached locally to the three other data areas after the FLASH chip stops working.

[0011] In one embodiment, the FLASH single-mode data storage bad block management system further includes: The bad block table reconstruction unit is used to clear the data of the bad block table and rebuild the bad block table when the number of bad blocks in the bad block table increases frequently or the current number of bad blocks is abnormal.

[0012] In one embodiment, the FLASH single-mode data storage bad block management system further includes: The re-self-check unit is used to re-self-check the bad blocks to confirm whether the bad blocks actually exist.

[0013] In one embodiment, the FLASH single-mode data storage bad block management system further includes: The data output unit is used to output the address information of each bad block and the total number of bad blocks in real time.

[0014] In one embodiment, the FLASH single-mode data storage bad block management system further includes: The bad block enable switch is used to turn off the bad block enable, while allowing the address where the bad block is located to be accessed normally, thereby confirming whether the bad block judgment is true and valid.

[0015] Compared with the prior art, the present invention has the following beneficial technical effects: 1. The present invention uses a single-mode data storage area combined with bad block management for storage design, which can avoid data errors caused by bad blocks while making the storage data area have more storage data capacity than the conventional triple-mode redundant storage area, avoiding the problem of reduced actual storage capacity, and the function is simple to implement, and the bad block judgment and processing time consumption is short; 2. The present invention maps bad blocks by setting a bad block mapping area, and no additional operations are required to avoid the bad block problem in use, and no manual intervention is required; 3. The bad block table and the bad block mapping table in the present invention are in a one-to-one correspondence, which not only reduces the space consumed in FLASH storage, but also improves the efficiency of bad block query; 4. The present invention can also output the number and location of bad blocks in the preferred embodiment, which is convenient for problem location and troubleshooting when bad blocks are generated. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.

[0017] Figure 1 This is a flowchart of the bad block management method for FLASH single-mode data storage in Example 1 of the present invention; Figure 2 This is a schematic diagram of the FLASH chip partitioning result in Example 1 of the present invention; Figure 3 This is a structural block diagram of a FLASH single-mode data storage bad block management system in Example 2 of the present invention.

[0018] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0020] In addition, the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0021] Definition of noun: Single-mode storage: only one copy of data is stored; Triple-mode storage: three copies of the same data are stored; Triple-mode redundancy: If two of the three copies of data are consistent, the contents of these two copies shall prevail; Bad block: generated when the FLASH device is produced or used. The bad block area cannot be erased, written, or read normally. Any of the above three will cause abnormalities in the stored data. Local cache: The storage unit of the chip that implements this function; Offset address: The part exceeding a fixed address (base address) is the offset address. For example, if the base address is 0x40000, then the address 0x40001 can be considered as the base address 0x40000 offset by 0x1. The offset address is 0x1.

[0022] Example 1 The present embodiment discloses a bad block management method for FLASH single-mode data storage used by satellites. By adopting a single-mode data storage and bad block mapping management method to manage bad blocks in FLASH, the satellite can avoid data errors caused by bad blocks and the problem of reduced actual storage capacity during operation. At the same time, no additional operations are required to avoid the bad block problem during use.

[0023] The FLASH chip can determine whether it is a bad block by the following three methods. Different FLASH chips have different single operation sizes. This embodiment takes a 1MB operation size as an example: 1. After erasing, the status register is used to judge. If the erasing is successful, the MB is considered a good block. If the erasing fails, the MB is considered a bad block. 2. After writing data, the status register is used to judge that if the writing is successful, the MB is considered a good block, and if the writing fails, the MB is considered a bad block; 3. After reading the data, the status register is used for judgment. If the reading is successful, the MB is considered to be a good block. If the reading fails, the MB is considered to be a bad block.

[0024] In order to ensure the reliability of single-mode data storage, this embodiment uses the above three methods to judge bad blocks when the FLASH chip enters the working state. In addition, since the FLASH chip itself has the possibility of flipping, that is, some bits of good blocks may also flip, resulting in data errors. Therefore, this embodiment adds the ECC algorithm on this basis to correct the data, that is, add ECC judgment when judging bad blocks. When the ECC error correction mechanism cannot take effect, it is considered that this part of the storage space is a bad block. Among them, the ECC error correction mechanism is specifically to divide every 1024 bytes of data in the storage space of the FLASH chip into 896 valid data bytes for storage and 128 bytes of check bytes for storage, and use the error correction mechanism of the ECC algorithm to reduce the errors caused by the flipping of FLASH itself.

[0025] In a specific application process, the number of bad blocks of a FLASH chip is limited. For example, the available capacity of a 4096MB FLASH is greater than 4016MB, and the upper limit of bad blocks is no more than 2% of the storage capacity. Therefore, this embodiment reserves a bad block mapping area as a replacement storage space for generating bad blocks, thereby avoiding the reduction of the actual effective space, and there is no need to circumvent the bad block space through instructions or other operations.

[0026] refer to Figure 1 In this embodiment, the bad block management method of FLASH single-mode data storage used by the satellite specifically includes the following steps 1 to 6.

[0027] Step 1: Divide the FLASH chip into a data storage area, a bad block mapping area and other data areas. Specifically: The data storage area is used to store valid data required for work, the bad block mapping area is used to replace the bad block storage data when a bad block is generated, and the other data areas are used to store the bad block table and the data that needs to be stored. In the specific application process, when the FLASH chip is divided, other data areas may not be divided, that is, other data areas are stored in other non-lost devices, such as RAM, DDR and other devices.

[0028] Specifically, the bad block mapping area and other data areas adopt triple-mode redundancy design to ensure the correctness of the data, for example Figure 2 The figure shows the partitioning result of a FLASH chip with a storage capacity of 4096MB.

[0029] Step 2: construct the same bad block table and bad block self-check table in three other data areas. Specifically: The bad block self-check table is used as a mark to indicate whether the device has completed the self-check. The bad block table is an address table that records the addresses of the blocks that have been marked as bad blocks, that is, the bad block table corresponds to the address and bad block status of each 1MB space in the data storage area.

[0030] Taking the FLASH with a storage size of 4096MB as an example, the bad block self-test table is filled with 1KB of AA55 data. When the result of reading the bad block self-test table after three modes after power-on is AA55, it is considered that the device has completed the self-test. Otherwise, it is considered that the device has not been self-tested and needs to enter the self-test state. The bad block table is 1KB of data size. Assuming that the 12MB, 25MB, 80MB, 500MB, and 900MB are bad blocks, the bad block table is filled in the order of their appearance, as shown in Table 1.

[0031] Table 1

[0032] When a new bad block is added during use, it can be added after the previous sequence. For example, if 800MB is added as a bad block, the bad block table is changed to the format shown in Table 2.

[0033] Table 2

[0034] Step 3, after the FLASH chip is powered on, it enters the bad block self-check state, records the bad block addresses found during the self-check process into the local cache, and writes all bad block addresses into each bad block table after the self-check is completed. In this embodiment, the specific implementation process of step 3 is: Erases every whole MB address space in the data storage area, and records the current whole MB address locally when an erase fails; When all the whole MB address spaces in the data storage area are erased, all recorded whole MB addresses are marked as bad blocks and written into the bad block table in other storage areas.

[0035] In the specific application process, the self-test process is calculated according to the size of the erased capacity. Taking 4096MB FLASH as an example, according to the maximum time of 7ms to erase 1MB, 4096×0.007=28.672s, erasing takes a maximum of 28.672s, plus the device processing time, the self-test can be completed in 30s at most, thereby ensuring the efficiency of the self-test.

[0036] Step 4: The three modules read the bad block table stored in other data areas, and then map the bad block addresses in the bad block table to the bad block mapping table, wherein the bad block mapping table corresponds to the address and bad block status of each 1MB space in the data storage area. In this embodiment, the specific implementation process of step 4 is: The three-mode reads the bad block table stored in other data areas, updates the data after reading the three-mode redundancy to the local cache, and then maps the bad block addresses in the three bad block tables to the bad block mapping table, that is, the three-mode bad block table is stored locally to reduce the impact of single-particle upsets on track. Among them, for any whole MB address, when the three bad block tables all mark it as a bad block, it is marked as a bad block in the bad block mapping table, otherwise it is marked as a non-bad block.

[0037] Taking 4096MB FLASH as an example, the size of its bad block mapping area is 100MB, and the 7-bit width can represent its offset address size. Then use 3 bits as the three-mode signal. When all 3 bits are 1, it means that the MB is a bad block, otherwise it is a non-bad block. Taking the bad block table in Table 2 as an example, the bad block mapping table after mapping is shown in Table 3.

[0038] Table 3

[0039] Step 5, after the FLASH chip enters the working state: When writing or reading data to a whole MB address, read the bad block mapping table to check whether the current operation MB is a bad block. If so, map it to three bad block mapping areas for operation at the same time, otherwise operate normally; When erasing, writing, or reading data to a whole MB address, if a failure occurs, the MB address is marked as a bad block, and the bad block table and bad block mapping table in the local cache are updated; When reading data to a whole MB address, if the data cannot be recovered normally through ECC, the MB address is marked as a bad block, and the bad block table and bad block mapping table in the local cache are updated; Step 6: after the FLASH chip stops working, the bad block table in the local cache is updated to the three other data areas. In a specific application process, if the bad block table in the local cache does not change, this step is not executed.

[0040] As a preferred implementation, when the number of bad blocks in the bad block table increases frequently (for example, the number of bad blocks increased by more than two within ten minutes) or the current number of bad blocks is abnormal (for example, the current number of bad blocks exceeds the threshold), the data in the bad block table and the bad block preset table are cleared, and the bad block table and the bad block preset table are rebuilt. In addition, the bad block re-self-check function can be used to re-self-check the bad blocks to confirm whether the bad blocks really exist.

[0041] As a preferred implementation, the FLASH single-mode data storage bad block management method in this embodiment also includes real-time output of the address information of each bad block, and output of the total number of bad blocks. For example, the bad block count increases by 1 each time a bad block is generated, and the specific address information of each bad block is output in real time at intervals of one second to facilitate subsequent problem location and troubleshooting. In addition, the FLASH single-mode data storage bad block management method in this embodiment also has a bad block enable control, which can keep the address of the bad block location normally accessible while turning off the bad block enable, thereby confirming whether the bad block judgment is true and valid.

[0042] It is worth noting that in addition to the judgment method of the FLASH chip itself, the bad block judgment method in the FLASH single-mode data storage bad block management method of this embodiment can also be performed by adding verification data to the FLASH and calculating whether the verification data is correct when reading it out, and the verification and error correction method is not limited to the ECC error correction algorithm.

[0043] It is worth noting that although this embodiment Figure 1 The steps in the process are shown in sequence as indicated by the arrows, but the steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of the steps, and the steps can be executed in other orders. Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0044] Example 2 Based on the FLASH single-mode data storage bad block management method in Example 1, this embodiment discloses a FLASH single-mode data storage bad block management system used by a satellite, referring to Figure 3 The FLASH single-mode data storage bad block management system includes a storage partition unit, a bad block table construction unit, a bad block self-check unit, a bad block table mapping unit, a bad block management unit and a bad block table update unit, a bad block table reconstruction unit, a re-self-check unit, a data output unit and a bad block enable switch, and performs FLASH data storage bad block management by adopting the FLASH single-mode data storage bad block management method of Example 1.

[0045] Specifically: The storage partition unit is used to divide the FLASH chip into a data storage area, a bad block mapping area and other data areas, wherein the bad block mapping area and other data areas are designed with triple-module redundancy; The bad block table construction unit is used to construct the same bad block table in the three other data areas, wherein the bad block table corresponds to the address and bad block status of each 1MB space in the data storage area; The bad block self-check unit is used to enter the bad block self-check state after the FLASH chip is powered on, record the bad block addresses found during the self-check process into the local cache, and write all bad block addresses into each bad block table after the self-check is completed; The bad block table mapping unit is used to read the bad block table stored in other data areas by the three modes, and then map the bad block address in the bad block table to the bad block mapping table, wherein the bad block mapping table corresponds to the address and bad block status of each 1MB space in the data storage area; The bad block management unit is used to read the bad block mapping table to check whether the current operation MB is a bad block when writing or reading data to the whole MB address after the FLASH chip enters the working state. If so, it is mapped to the three bad block mapping areas for operation at the same time, otherwise it operates normally; when erasing, writing, and reading data to the whole MB address, if a failure occurs, the MB address is marked as a bad block, and the bad block table and bad block mapping table in the local cache are updated at the same time; when reading data to the whole MB address, if the output data cannot be recovered normally through ECC, the MB address is marked as a bad block, and the bad block table and bad block mapping table in the local cache are updated at the same time; The bad block table update unit is used to update the bad block table cached locally to three other data areas after the FLASH chip stops working; The bad block table reconstruction unit is used to clear the data of the bad block table and rebuild the bad block table when the number of bad blocks in the bad block table increases frequently or the current number of bad blocks is abnormal; The re-self-check unit is used to re-check the bad blocks to confirm whether the bad blocks actually exist; The data output unit is used to output the address information of each bad block and the total number of bad blocks in real time; The bad block enable switch is used to turn off the bad block enable, while allowing the address where the bad block is located to be accessed normally, thereby confirming whether the bad block judgment is true and valid.

[0046] In this embodiment, the specific working process and working principle of the storage partition unit, the bad block table construction unit, the bad block self-check unit, the bad block table mapping unit, the bad block management unit and the bad block table update unit, the bad block table reconstruction unit, the re-self-check unit, the data output unit and the bad block enable switch are the same as those in the method in Embodiment 1, so they are not described in detail in this embodiment. Each unit module can be implemented in whole or in part by software, hardware and a combination thereof, and each unit module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above unit modules.

[0047] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the inventive concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.

Claims

1. A bad block management method for FLASH single-mode data storage used in satellites, characterized in that: The steps include: Step 1, dividing the FLASH chip into a data storage area, a bad block mapping area and other data areas, wherein the bad block mapping area and the other data areas both adopt a triple-module redundancy design; Step 2, constructing the same bad block table in the three other data areas, wherein the bad block table corresponds to the address and bad block status of each 1MB space in the data storage area; Step 3, after the FLASH chip is powered on, it enters a bad block self-check state, records the bad block addresses found during the self-check process into a local cache, and writes all bad block addresses into each of the bad block tables after the self-check is completed; Step 4, the third module reads the bad block table stored in the other data area, and then maps the bad block address in the bad block table to a bad block mapping table, wherein the bad block mapping table corresponds to the address and bad block status of each 1MB space in the data storage area; Step 5, after the FLASH chip enters the working state: When writing or reading data to a whole MB address, read the bad block mapping table to check whether the current operation MB is a bad block. If so, map it to the three bad block mapping areas for operation at the same time, otherwise operate normally; When erasing, writing, or reading data to a whole MB address, if a failure occurs, the MB address is marked as a bad block, and the bad block table and bad block mapping table in the local cache are updated; When reading data to a whole MB address, if the read data cannot be recovered normally, the MB address is marked as a bad block, and the bad block table and bad block mapping table in the local cache are updated at the same time; Step 6: after the FLASH chip stops working, the bad block table of the local cache is updated to the three other data areas.

2. The bad block management method for FLASH single-mode data storage used by satellites according to claim 1, characterized in that: Step 3 specifically includes: Erasing each whole MB address space of the data storage area, and recording the current whole MB address locally when erasing fails; When all the whole MB address spaces in the data storage area are completely erased, all recorded whole MB addresses are marked as bad blocks and written into the bad block table in the other storage areas.

3. The bad block management method for FLASH single-mode data storage used by satellites according to claim 1, characterized in that: In step 4, the three modules read the bad block table stored in the other data area, and then map the bad block addresses in the bad block table to the bad block mapping table, specifically: The three-mode reads the bad block table stored in the other data area, reads the data after the three-mode redundancy and updates it to the local cache, and then maps the bad block addresses in the three bad block tables to the bad block mapping table, that is, the three-mode bad block table is stored locally to reduce the impact of single-particle flips on track.

4. The bad block management method for FLASH single-mode data storage used by satellites according to claim 3, characterized in that: For any whole MB address, when all three bad block tables mark it as a bad block, it is marked as a bad block in the bad block mapping table, otherwise it is marked as a non-bad block.

5. A FLASH single-mode data storage bad block management system used in satellites, characterized in that: Using the method described in any one of claims 1 to 4 to manage bad blocks of FLASH single-mode data storage; The FLASH single-mode data storage bad block management system includes: A storage partitioning unit, used to divide the FLASH chip into a data storage area, a bad block mapping area and other data areas, wherein the bad block mapping area and the other data areas both adopt a triple-module redundancy design; A bad block table construction unit, used to construct the same bad block table in the three other data areas, wherein the bad block table corresponds to the address and bad block status of each 1MB space in the data storage area; A bad block self-check unit is used to enter a bad block self-check state after the FLASH chip is powered on, record the bad block addresses found during the self-check process into a local cache, and write all bad block addresses into each of the bad block tables after the self-check is completed; A bad block table mapping unit, used for reading the bad block table stored in the other data area by three modes, and then mapping the bad block address in the bad block table to the bad block mapping table, wherein the bad block mapping table corresponds to the address and bad block status of each 1MB space in the data storage area; The bad block management unit is used to read the bad block mapping table to check whether the current operation MB is a bad block when writing or reading data to the whole MB address after the FLASH chip enters the working state. If so, it is mapped to the three bad block mapping areas for operation at the same time, otherwise it is operated normally; when erasing, writing, and reading data to the whole MB address, if a failure occurs, the MB address is marked as a bad block, and the bad block table and bad block mapping table in the local cache are updated at the same time; when reading data to the whole MB address, if the output data cannot be normally recovered through ECC, the MB address is marked as a bad block, and the bad block table and bad block mapping table in the local cache are updated at the same time; The bad block table updating unit is used to update the bad block table cached locally to the three other data areas after the FLASH chip stops working.

6. The FLASH single-mode data storage bad block management system used by satellites according to claim 5, characterized in that: The FLASH single-mode data storage bad block management system also includes: The bad block table reconstruction unit is used to clear the data of the bad block table and rebuild the bad block table when the number of bad blocks in the bad block table increases frequently or the current number of bad blocks is abnormal.

7. The FLASH single-mode data storage bad block management system used by satellites according to claim 5, characterized in that: The FLASH single-mode data storage bad block management system also includes: The re-self-check unit is used to re-self-check the bad blocks to confirm whether the bad blocks actually exist.

8. The FLASH single-mode data storage bad block management system used by satellites according to claim 5, characterized in that: The FLASH single-mode data storage bad block management system also includes: The data output unit is used to output the address information of each bad block and the total number of bad blocks in real time.

9. The FLASH single-mode data storage bad block management system used by satellites according to claim 5, characterized in that: The FLASH single-mode data storage bad block management system also includes: The bad block enable switch is used to turn off the bad block enable, while allowing the address where the bad block is located to be accessed normally, thereby confirming whether the bad block judgment is true and valid.

Citation Information

Patent Citations

  • Bad block management system for satellite-based NAND FLASH solid memory

    CN105005453A

  • Single event upset resisting circuit and method for FPGA configuration FLASH chip

    CN113380294A

  • Storage management method based on flash array

    CN117009158A

  • Embedded file management method based on NAND Flash array

    CN118466845A

  • Memory controller and method of operating the same

    US20210279132A1