# US 2018/0018224 A1 · Method for managing data stored in flash memory and associated memory device and controller

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2018/0018224 A1
- Document ID: US20180018224A1
- Status: Published application
- Kind: A1
- Application number: 15/717,970
- Filed: 2017-09-28
- Published: 2018-01-18
- Earliest claimed: 2012-07-25
- Assignees: Silicon Motion, Inc.
- Applicants: Silicon Motion Inc.
- Inventors: Tsung-Chieh Yang; Li-Sheng Kan
- Web page: https://patentgrep.com/patent/US20180018224A1

## CPC

- G06F 11/1068: {in sector programmable memories, e.g. flash disk (G06F11/1072 takes precedence)}
- G06F 3/00: Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F 11/14: Error detection or correction of the data by redundancy in operations (error detection or correction of the data by redundancy in hardware G06F11/16)
- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 2212/1032: Reliability improvement, data loss prevention, degraded operation etc
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for managing data stored in a flash memory is provided, where the flash memory includes a plurality of blocks. The method includes: providing a program list, where the program list records information about programmed blocks of the plurality of blocks and sequence of write times of the programmed blocks; detecting quality of a first block of the plurality of blocks to generate a detecting result, where the first block is the programmed block that has an earliest write time; and determining whether to move contents of the first block to a blank block, and to delete the contents of the first block according to the detecting result.

## Claims

### Claim 1

A method for managing data stored in a flash memory, wherein the flash memory comprises a plurality of blocks; the method comprising:
reading a program list from a memory within a memory controller for controlling the flash memory, wherein the program list records information about programmed blocks of the plurality of blocks and sequence of write times of the programmed blocks, and the memory within the memory controller is different from the flash memory;
determining a first block of the plurality of blocks according to the program list, wherein the first block is a programmed block that has an earliest write time in the program list, and the first block is a starting block for a quality detection operation;
starting the quality detection operation to read the first block to detect quality of the first block to generate a first detection result;
referring to the first detection result to determine whether to move contents of the first block to a third block.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
when the contents of the first block are moved to the third block, deleting records associated with the first block in the program list, and adding records associated with the third block into the program list stored in the memory within the memory controller.

### Claim 3 (depends on 1)

The method of claim 1, wherein the step of starting the quality detection operation to read the first block to detect quality of the first block to generate the first detection result comprises:
starting the quality detection operation to detect a bit error rate or a bit error amount of at least a portion of data of the first block to generate the first detection result.

### Claim 4 (depends on 3)

The method of claim 3, wherein the step of determining whether to move the contents of the first block to the third block comprises:
when the first detection result indicates that the bit error rate or the bit error amount of the at least a portion of data of the first block is higher than a threshold, moving the contents of the first block to the third block, and deleting the contents of the first block; and
when the first detection result indicates the bit error rate or the bit error amount of the at least a portion of data of the first block is lower than the threshold, keeping the contents of the first block intact.

### Claim 5 (depends on 1)

The method of claim 1, wherein the first block comprises a plurality of memory cells, and the step of starting the quality detection operation to read the first block to detect quality of the first block to generate the first detection result comprises:
starting the quality detection operation to detect a threshold voltage shifting status of at least a portion of the plurality of memory cells to generate the first detection result.

### Claim 6 (depends on 5)

The method of claim 5, wherein the step of determining whether to move the contents of the first block to the third block comprises:
when the first detection result indicates that the threshold voltage shifting status of the at least a portion of the plurality of memory cells does not satisfy a criterion, moving the contents of the first block to the third block, and deleting the contents of the first block; and
when the first detection result indicates that the threshold voltage shifting status of the at least a portion of the plurality of memory cells satisfies the criterion, keeping the contents of the first block intact.

### Claim 7

A memory apparatus, comprising:
a flash memory, comprising a plurality of blocks; and
a controller, comprising a memory for storing a program list, wherein the program list records information about programmed blocks of the plurality of blocks and sequence of write times of the programmed blocks;
wherein the controller determines a first block of the plurality of blocks by directly using the program list stored within the memory of the controller, wherein the first block is a programmed block that has an earliest write time in the program list, and the first block is a starting block for a quality detection operation; the controller starts the quality detection operation to read the first block to detect quality of the first block to generate a first detection result; and the controller refers to the first detection result to determine whether to move contents of the first block to a third block and delete the contents of the first block.

### Claim 8 (depends on 7)

The memory apparatus of claim 7, wherein when the contents of the first block are moved to the third block, the controller deletes records associated with the first block in the program list, and adds records associated with the third block into the program list stored in the memory within the controller.

### Claim 9 (depends on 7)

The memory apparatus of claim 7, wherein the controller detects a bit error rate or a bit error amount of at least a portion of data of the first block to generate the first detection result.

### Claim 10 (depends on 9)

The memory apparatus of claim 9, wherein when the first detection result indicates that the bit error rate or the bit error amount of the at least a portion of data of the first block is higher than a threshold, the controller moves the contents of the first block to the third block, and deletes the contents of the first block; and when the first detection result indicates that the bit error rate or the bit error amount of the at least a portion of data of the first block is lower than the threshold, the controller keeps the contents of the first block intact.

### Claim 11 (depends on 7)

The memory apparatus of claim 7, wherein the first block comprises a plurality of memory cells, and the controller detects a threshold voltage shifting status of at least a portion of the plurality of memory cells to generate the first detection result.

### Claim 12 (depends on 11)

The memory apparatus of claim 11, wherein when the first detection result indicates that the threshold voltage shifting status of the at least a portion of the plurality of memory cells does not satisfy a criterion, the controller moves the contents of the first block to the third block, and deletes the contents of the first block; and when the first detection result indicates that the threshold voltage shifting status of the at least a portion of the plurality of memory cells satisfies the criterion, the controller keeps the contents of the first block intact.

### Claim 13

A controller for accessing a flash memory, wherein the flash memory comprises a plurality of blocks; the controller comprising:
a memory, arranged for storing a program code and a program list, wherein the program list records information about programmed blocks of the plurality of blocks and sequence of write times of the programmed blocks; and
a micro processor, arranged for executing the program code to control access of the flash memory and manage the plurality of blocks;
wherein the micro processor determines a first block of the plurality of blocks by directly using the program list stored within the memory of the controller, wherein the first block is a programmed block that has an earliest write time in the program list, and the first block is a starting block for a quality detection operation; the micro processor starts the quality detection operation to read the first block to detect quality of the first block to generate a first detection result; and the micro processor refers to the first detection result to determine whether to move contents of the first block to a third block and delete the contents of the first block.

### Claim 14 (depends on 13)

The controller of claim 13, wherein when the contents of the first block are moved to the third block, the micro processor deletes records associated with the first block in the program list, and adds records associated with the third block into the program list stored in the memory.

### Claim 15 (depends on 13)

The controller of claim 13, wherein the micro processor detects a bit error rate or a bit error amount of at least a portion of data of the first block to generate the first detection result.

### Claim 16 (depends on 15)

The controller of claim 15, wherein when the first detection result indicates that the bit error rate or the bit error amount of the at least a portion of data of the first block is higher than a threshold, the micro processor moves the contents of the first block to the third block, and deletes the contents of the first block; and when the first detection result indicates that the bit error rate or the bit error amount of the at least a portion of data of the first block is lower than the threshold, the micro processor keeps the contents of the first block intact.

### Claim 17 (depends on 13)

The controller of claim 13, wherein the first block comprises a plurality of memory cells, and the micro processor detects a threshold voltage shifting status of at least a portion of the plurality of memory cells to generate the first detection result.

### Claim 18 (depends on 17)

The controller of claim 17, wherein when the first detection result indicates that the threshold voltage shifting status of the at least a portion of the plurality of memory cells does not satisfy a criterion, the micro processor moves the contents of the first block to the third block, and deletes the contents of the first block; and when the first detection result indicates that the threshold voltage shifting status of the at least a portion of the plurality of memory cells satisfies the criterion, the micro processor keeps the contents of the first block intact.

### Claim 19 (depends on 13)

The controller of claim 13, wherein the micro processor starts to generate the first detection result by detecting quality of the first block of the plurality of block when the controller is in an idle period.
