Patent ID: 11907047
Assignee: SILICON MOTION, INC.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 6:
7. A data storage device, comprising:
a data storage medium, comprising a plurality of data blocks, wherein each of the plurality of data blocks comprises a plurality of data columns, and the plurality of data columns are divided into a plurality of chunks; and
a control unit, connected to the data storage medium, and configured to execute an error tolerance selecting method, the selecting method includes:
writing data to the plurality of data blocks;
reading written data of the plurality of data block as read data;
comparing the read data and the write data of each data column in the plurality of data blocks, and calculating a number of error bits in each chunk accordingly;
selecting a column with a largest number of error bits in a chunk with a largest number of error bits as a bad data column;
calculating a difference value between the number of error bits in the chunk and a first threshold value to store the difference value in an error tolerance list until a number of bad data columns is equal to a second threshold value; and
selecting a largest difference value in the error tolerance list as the error tolerance and acquiring a number of bad data columns corresponding to the largest difference value;
wherein, the first threshold value is a number of correctable error bits of error correction code in the data storage device;
wherein, the second threshold value is a total number of recordable bad data columns in the data storage device.