IP Library Granted Patent US 10,061,512
Granted Patent B2
US 10,061,512 · App. 15/659,203 · Granted Aug 28, 2018

Data storage device and data writing method thereof

Inventor: Wen-Sheng Lin (Kaohsiung, TW)
Assignee: Silicon Motion, Inc.
G06F3/0604G06F3/064G06F12/0246G06F12/10G06F2212/657G06F2212/7201
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,061,512
App. No.
15/659,203
Granted
Aug 28, 2018
Kind
B2
Abstract

A data storage device including a flash memory and a controller is provided. The flash memory has a plurality of TLC blocks, each of which includes a plurality of pages. The controller checks whether any of the TLC blocks was undergoing a write operation and unfinished at the time that the power-off event occurred when the data storage device resumes operation after a power-off event. When a first TLC block was undergoing the write operation and unfinished at the time that the power-off event occurred, the controller further checks whether data stored in a page which was the last one being written in the first TLC block can be successfully read, and continues to write the remaining data into the first TLC block when the data of the page which was the last one being written in the first TLC block can be successfully read.

Claims (27)

1. A data storage device, comprising:

a flash memory, having a plurality of TLC blocks, wherein each of the TLC blocks comprises a plurality of pages; and

a controller, checking whether any of the TLC blocks was undergoing a write operation which was unfinished at the time that the power-off event occurred when the data storage device resumes operation after a power-off event, wherein when a first TLC block was undergoing a write operation which was unfinished at the time that the power-off event occurred, the controller further checks whether data stored in a page which was the last one being written in the first TLC block can be successfully read, and continues to write the remaining data into the first TLC block when the data of the page which was the last one being written in the first TLC block can be successfully read.

2. The data storage device as claimed in claim 1 , wherein the flash memory has a plurality of SLC blocks, and each of the SLC blocks comprises a plurality of pages, wherein the write operation is arranged to program a predetermined size of data stored in the SLC blocks into one of TLC blocks.

3. The data storage device as claimed in claim 1 , wherein when all of the remaining data of the write operation is written into the first TLC block, the controller checks whether a number of error bits of each of the pages in the first TLC block is higher than a first predetermined number.

4. The data storage device as claimed in claim 3 , wherein when any of the numbers of error bits of the pages in the first TLC block is higher than the first predetermined number, the controller selects a second TLC block from the other TLC blocks to write the data of the write operation which was arranged to be written into the first TLC block into the second TLC block.

5. The data storage device as claimed in claim 4 , wherein when no power-off event has occurred during the write operation performed on the second TLC block, the controller continues to perform other tasks and bypasses a step of checking the numbers of error bits of the pages in the second TLC block after the write operation performed on the second TLC block is finished.

6. The data storage device as claimed in claim 1 , wherein when the data of the page which was the last one being written in the first TLC block can be successfully read and the number of error bits of the page which was the last one being written in the first TLC block is higher than a second predetermined number, the controller further moves the data which was written in the first TLC block before the power-off event occurred to a temporary block of the flash memory.

7. The data storage device as claimed in claim 1 , wherein when the data of the page which was the last one being written in the first TLC block cannot be successfully read, the controller selects a third TLC block from the TLC blocks to write the data of the write operation which was arranged to be written into the first TLC block into the third TLC block.

8. The data storage device as claimed in claim 7 , wherein the controller selects the TLC block which is not the first TLC block and does not have valid data to serve as the third TLC block.

9. A data writing method, applied to a data storage device, wherein the data storage device comprises a flash memory having a plurality of TLC blocks, and the data writing method comprises:

when the data storage device resumes operation after a power-off event, checking whether any of the TLC blocks was undergoing a write operation and which was unfinished at the time that the power-off event occurred;

when a first TLC block was undergoing the write operation and which was unfinished at the time that the power-off event occurred, checking whether data stored in a page which was the last one being written in the first TLC block can be successfully read; and

when the data of the page which was the last one being written in the first TLC block can be successfully read, continuing to write the remaining data into the first TLC block.

10. The data writing method as claimed in claim 9 , wherein the flash memory has a plurality of SLC blocks, and each of the SLC blocks comprises a plurality of pages, wherein the write operation is arranged to program a predetermined size of data stored in the SLC blocks into one of TLC blocks.

11. The data writing method as claimed in claim 9 , further comprising when all of the remaining data of the write operation is written into the first TLC block, checking whether the number of error bits of each of the pages in the first TLC block is higher than a first predetermined number.

12. The data writing method as claimed in claim 11 , further comprising:

when any of the numbers of error bits of the pages in the first TLC block is higher than the first predetermined number, selecting a second TLC block from the other TLC blocks; and

writing the data of the write operation which was arranged to be written into the first TLC block into the second TLC block.

13. The data writing method as claimed in claim 12 , further comprising when no power-off event has occurred during the write operation performed on the second TLC block, continuing to perform other tasks and bypassing the step of checking the numbers of error bits of the pages in the second TLC block after the write operation performed on the second TLC block is finished.

14. The data writing method as claimed in claim 9 , wherein when the data of the page which was the last one being written in the first TLC block can be successfully read, the data writing method further comprises:

determining whether the number of error bits of the page which was the last one being written in the first TLC block is higher than a second predetermined number; and

when the number of error bits of the page which was the last one being written in the first TLC block is higher than a second predetermined number, writing the data which was written in the first TLC block before the power-off event occurred into a temporary block of the flash memory.

15. The data writing method as claimed in claim 9 , further comprising:

when the data of the page which was the last one being written in the first TLC block cannot be successfully read, selecting a third TLC block from the TLC blocks; and

writing the data of the write operation which was arranged to be written into the first TLC block into the third TLC block.

16. The data writing method as claimed in claim 15 , wherein the step of selecting the third TLC block from the TLC blocks further comprises selecting the TLC block which is not the first TLC block and does not have valid data to serve as the third TLC block.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 25, 2017
From: LIN, WEN-SHENG
To: SILICON MOTION, INC.
Reel/Frame 043093/0667 →
Priority Claims (1)
TW 105132526 A · Oct 7, 2016 · national
Continuity (1)
Related Publication 20180101302A1 · Apr 12, 2018
Cited By (47)
US 12,197,390 US 12,204,413 US 12,204,768 US 12,204,788 US 12,212,624 US 12,216,903 US 12,229,402 US 12,229,437 US 12,235,743 US 12,236,117 US 12,242,425 US 12,253,922 US 12,253,941 US 12,271,264 US 12,271,359 US 12,277,106 US 12,282,686 US 12,282,799 US 12,293,111 US 12,314,131 US 12,314,163 US 12,314,170 US 12,314,183 US 12,340,107 US 12,341,848 US 12,366,972 US 12,373,289 US 12,373,340 US 12,379,854 US 12,393,340 US 12,393,353 US 12,430,053 US 12,430,059 US 12,439,544 US 12,475,041 US 12,481,442 US 12,487,920 US 12,511,239 US 12,524,309 US 12,547,317 US 12,561,093 US 12,572,421 US 12,619,469 US 12,682,949 US 12,687,973 US 12,699,512 US 12,717,709