# US 9,519,436 B1 · Memory erasing method, memory controller, and memory storage apparatus

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

- Number: US 9,519,436 B1
- Document ID: US9519436B1
- Status: Granted
- Kind: B1
- Application number: 15/229,125
- Filed: 2016-08-05
- Published: 2016-11-24
- Granted: 2016-12-13
- Earliest claimed: 2011-06-15
- Assignees: Phison Electronics Corp.
- Applicants: Phison Electronics Corp.
- Inventors: Wei-Chen Teo
- Web page: https://patentgrep.com/patent/US9519436B1

## CPC

- G06F 3/0625: {Power saving in storage systems}
- G06F 3/0652: {Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket}
- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 3/0688: {Non-volatile semiconductor memory arrays}
- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 2212/7205: Cleaning, compaction, garbage collection, erase control
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A memory erasing method and a memory controller and a memory storage apparatus using the same are provided. The method comprising establishing a link list according to a plurality of physical blocks of a spare area, and storing the link list into the rewritable non-volatile memory module, wherein the physical blocks of the spare area are recorded in the link list according to an arrangement order; and during every power on of the memory storage apparatus, selecting a plurality of third physical blocks among the physical blocks in the spare area according to the link list and a predetermined number, and respectively executing an erase command on the third physical blocks, wherein the third physical blocks are arranged at a beginning of the link list, and the number of the third physical blocks is the predetermined number.

## Claims

### Claim 1

A memory erasing method for a rewritable non-volatile memory module of a memory storage apparatus, wherein the rewritable non-volatile memory module has a plurality of physical blocks, the memory erasing method comprising:
logically grouping the physical blocks into at least a data area and a spare area;
establishing a link list according to the physical blocks of the spare area, and storing the link list into the rewritable non-volatile memory module, wherein the physical blocks of the spare area are recorded in the link list according to an arrangement order; and
during every power on of the memory storage apparatus, selecting a plurality of third physical blocks among the physical blocks in the spare area according to the link list and a predetermined number, and respectively executing an erase command on the third physical blocks, wherein the third physical blocks are arranged at a beginning of the link list, and the number of the third physical blocks is the predetermined number.

### Claim 2 (depends on 1)

The memory erasing method according to claim 1 further comprising:
when the physical blocks of the spare area are to be used, sequentially selecting the physical blocks of the spare area according to the link list.

### Claim 3 (depends on 1)

The memory erasing method according to claim 1 further comprising:
when a fourth physical block among the physical blocks of the data area is associated with the spare area, executing the erase command on the fourth physical block, and recording the fourth physical block at an end of the link list.

### Claim 4

A memory controller for controlling a rewritable non-volatile memory module of a memory storage apparatus, wherein the rewritable non-volatile memory module has a plurality of physical blocks, the memory controller comprising:
a host interface, configured to couple to a host system;
a memory interface, configured to couple to the rewritable non-volatile memory module;
a memory management circuit, coupled to the host interface and the memory interface, and configured to group the physical blocks into at least a data area and a spare area;
wherein the memory management circuit establishes a link list according to the physical blocks of the spare area and stores the link list into the rewritable non-volatile memory module, wherein the physical blocks of the spare area are recorded in the link list according to an arrangement order,
wherein during every power on of the memory storage apparatus, the memory management circuit selects a plurality of third physical blocks among the physical blocks of the spare area according to the link list and a predetermined number and respectively executes an erase command on the third physical blocks, wherein the third physical blocks are arranged at a beginning of the link list, and the number of the third physical blocks is the predetermined number.

### Claim 5 (depends on 4)

The memory controller according to claim 4, wherein when the physical blocks of the spare area are to be used, the memory management circuit sequentially selects the physical blocks of the spare area according to the link list.

### Claim 6 (depends on 4)

The memory controller according to claim 4, wherein when the memory management circuit associates a fourth physical block among the physical blocks of the data area with the spare area, the memory management circuit executes the erase command on the fourth physical block and records the fourth physical block at an end of the link list.

### Claim 7

A memory storage apparatus, comprising:
a connector, configured to couple to a host system;
a rewritable non-volatile memory module, having a plurality of physical blocks; and
a memory controller, coupled to the rewritable non-volatile memory module, and configured to logically group the physical blocks into at least a data area and a spare area,
wherein the memory controller establishes a link list according to the physical blocks in the spare area and stores the link list into the rewritable non-volatile memory module, wherein the physical blocks of the spare area are recorded in the link list according to an arrangement order,
wherein during every power on of the memory storage apparatus, the memory controller selects a plurality of third physical blocks among the physical blocks in the spare area according to the link list and a predetermined number and respectively executes an erase command on the third physical blocks, wherein the third physical blocks are arranged at a beginning of the link list and the number of the third physical blocks is the predetermined number.

### Claim 8 (depends on 7)

The memory storage apparatus according to claim 7, wherein when the physical blocks of the spare area are to be used, the memory controller sequentially selects the physical blocks of the spare area according to the link list.

### Claim 9 (depends on 7)

The memory storage apparatus according to claim 7, wherein when a fourth physical block among the physical blocks of the data area is associated with the spare area, the memory controller executes the erase command on the fourth physical block and records the fourth physical block at an end of the link list.
