TWI527050B - Data storage device and method for error correction and data reading thereof - Google Patents

Data storage device and method for error correction and data reading thereof Download PDF

Info

Publication number
TWI527050B
TWI527050B TW102145065A TW102145065A TWI527050B TW I527050 B TWI527050 B TW I527050B TW 102145065 A TW102145065 A TW 102145065A TW 102145065 A TW102145065 A TW 102145065A TW I527050 B TWI527050 B TW I527050B
Authority
TW
Taiwan
Prior art keywords
storage unit
page
data
unit mode
flash memory
Prior art date
Application number
TW102145065A
Other languages
Chinese (zh)
Other versions
TW201445575A (en
Inventor
陳俊儀
Original Assignee
慧榮科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 慧榮科技股份有限公司 filed Critical 慧榮科技股份有限公司
Priority to CN201410081026.3A priority Critical patent/CN104217762B/en
Priority to US14/271,928 priority patent/US9274893B2/en
Priority to KR1020140066289A priority patent/KR101557389B1/en
Publication of TW201445575A publication Critical patent/TW201445575A/en
Priority to US15/005,272 priority patent/US9697076B2/en
Application granted granted Critical
Publication of TWI527050B publication Critical patent/TWI527050B/en

Links

Description

資料儲存裝置及其錯誤校正方法以及資料讀取方法 Data storage device, error correction method thereof, and data reading method

本發明係關於一種資料儲存裝置之錯誤校正方法;特別係關於一種校正電壓分佈的錯誤校正方法。 The present invention relates to an error correction method for a data storage device; and more particularly to an error correction method for correcting a voltage distribution.

快閃記憶體為一種普遍的非揮發性資料儲存媒體,係以電性方式抹除與程式化。以非及閘型的快閃記憶體(即NAND FLASH)為例,常用作記憶卡(memory card)、通用序列匯流排閃存裝置(USB flash device)、固態硬碟(SSD)、嵌入式快閃記憶體模組(eMMC)…等之儲存媒體。 Flash memory is a popular non-volatile data storage medium that is electrically erased and programmed. For example, NAND FLASH, which is not a gate type, is often used as a memory card, a universal flash memory device, a solid state drive (SSD), and an embedded flash. Storage media such as memory modules (eMMC).

快閃記憶體(如,NAND FLASH)的儲存陣列包括複數個區塊(blocks),而各區塊包括複數頁(pages)。由於快閃記憶體的存取過程中可能會發生資料內容的錯誤,所以目前在存入資料時係將原始的資料進行編碼以及產生對應的校驗碼後,再儲存編碼後的資料及校驗碼至快閃記憶體中,而資料讀取時則將編碼的資料及校驗碼讀出,再解碼所讀出的編碼資料來得到原先的資料。編/解碼操作雖然能夠進行除錯,然而更正能力仍是有個上限。而當發生超過一定程度以上的錯誤時,快閃記憶體控制器在執行完解碼操作後將發現無法對編碼資料進行有效解碼,即發生無法完全更正成原始資料,而造成資料毀損的情況。 A storage array of flash memory (eg, NAND FLASH) includes a plurality of blocks, and each block includes a plurality of pages. Since the error of the data content may occur during the access process of the flash memory, the original data is encoded and the corresponding check code is generated when the data is stored, and then the encoded data and the verification are stored. The code is in the flash memory, and when the data is read, the encoded data and the check code are read, and the read encoded data is decoded to obtain the original data. Although the encoding/decoding operation can perform debugging, there is still an upper limit to the correction capability. When an error exceeding a certain level occurs, the flash memory controller will find that the encoded data cannot be effectively decoded after the decoding operation is performed, that is, the data cannot be completely corrected into the original data, and the data is damaged.

本發明所提供之資料儲存裝置以及錯誤校正方法可藉由校正電壓分佈程序,以非單階儲存單元模式校正目標頁面之電壓分佈。另外,重複讀取程序可對目標頁面進行重複讀取,以根據不同之讀取電壓讀取目標頁面之資料。 The data storage device and the error correction method provided by the present invention can correct the voltage distribution of the target page in a non-single-order storage unit mode by correcting the voltage distribution program. In addition, the repeated reading program can repeatedly read the target page to read the data of the target page according to different reading voltages.

本發明提供一種資料儲存裝置。資料儲存裝置包括一快閃記憶體以及一控制器。快閃記憶體用以操作於一單階儲存單元模式以及一非單階儲存單元模式。控制器用以在單階儲存單元模式下,根據一主機之一讀取命令對快閃記憶體中相應於一第一字元線之一頁面進行一第一次讀取動作,並且當第一次讀取動作讀取相應於第一字元線之頁面發生無法藉由編解碼進行修復之錯誤時,用以執行一校正電壓分佈程序,其中在校正電壓分佈程序中,控制器致使快閃記憶體切換至非單階儲存單元模式,並且在非單階儲存單元模式下,將一數位邏輯1寫入相應於第一字元線之一最高有效位元頁面,以校正相應於第一字元線之記憶體儲存單元的電壓分佈。在本發明之一實施例中,非單階儲存單元模式係為一二階儲存單元模式。 The invention provides a data storage device. The data storage device includes a flash memory and a controller. The flash memory is used to operate in a single-order storage unit mode and a non-single-order storage unit mode. The controller is configured to perform, in a single-stage storage unit mode, a first reading operation on a page corresponding to a first character line in the flash memory according to a read command of one host, and when the first time When the read operation reads an error corresponding to the page of the first word line that cannot be repaired by the codec, a correction voltage distribution program is executed, wherein in the correction voltage distribution program, the controller causes the flash memory Switching to the non-single-order memory cell mode, and in the non-single-order memory cell mode, writing a digital logic 1 to the most significant bit page corresponding to one of the first word lines to correct corresponding to the first word line The voltage distribution of the memory storage unit. In an embodiment of the invention, the non-single-order storage unit mode is a second-order storage unit mode.

當非單階儲存單元模式係為二階儲存單元模式時,控制器更用以在校正電壓分佈程序中,在數位邏輯1寫入最高有效位元頁面後,致使快閃記憶體回復至單階儲存單元模式,並且在單階儲存單元模式下,再對相應於第一字元線之頁面進行一第二次讀取動作。當第二次讀取動作讀取相應於第一字元線之頁面發生無法藉由編解碼進行修復之錯誤時,控制器將相應於第一字元線之頁面標記為一損壞頁面。 When the non-single-order storage unit mode is the second-order storage unit mode, the controller is further configured to cause the flash memory to return to the single-order storage after the digital logic 1 writes the most significant bit page in the calibration voltage distribution program. In the unit mode, and in the single-stage storage unit mode, a second reading operation is performed on the page corresponding to the first word line. When the second read operation reads an error corresponding to the page of the first word line that cannot be repaired by the codec, the controller marks the page corresponding to the first word line as a damaged page.

在本發明之另一實施例中,非單階儲存單元模式係為一三階儲存單元模式。當非單階儲存單元模式係為三階儲存單元模式時,控制器更用以在校正電壓分佈程序中,在三階儲存單元模式下,將一數位邏輯1寫入相應於第一字元線之一中央有效位元頁面,以校正相應於第一字元線之記憶體儲存單元的電壓分佈。控制器更用以在校正電壓分佈程序中,在數位邏輯1寫入最高有效位元頁面以及中央有效位元頁面後,致使快閃記憶體回復至單階儲存單元模式,並且在單階儲存單元模式下,再對相應於第一字元線之頁面進行一第二次讀取動作。當第二次讀取動作讀取相應於第一字元線之頁面發生無法藉由編解碼進行修復之錯誤時,控制器將相應於第一字元線之頁面標記為一損壞頁面。 In another embodiment of the invention, the non-single-order storage unit mode is a third-order storage unit mode. When the non-single-order storage unit mode is the third-order storage unit mode, the controller is further configured to write a digital logic 1 corresponding to the first character line in the third-order storage unit mode in the correction voltage distribution program. One of the central valid bit pages to correct the voltage distribution of the memory storage unit corresponding to the first word line. The controller is further configured to cause the flash memory to return to the single-order storage unit mode and the single-stage storage unit after the digital logic 1 writes the most significant bit page and the central effective bit page in the calibration voltage distribution program. In the mode, a second reading operation is performed on the page corresponding to the first word line. When the second read operation reads an error corresponding to the page of the first word line that cannot be repaired by the codec, the controller marks the page corresponding to the first word line as a damaged page.

在本發明之又另一實施例中,當第一次讀取動作讀取相應於第一字元線之頁面發生無法藉由編解碼進行修復之錯誤時,控制器更用以在校正電壓分佈程序前執行一重複讀取程序,其中在重複讀取程序中,控制器用以根據一重複讀取表,對快閃記憶體中之一暫存器進行一電壓設定動作,以將暫存器中之數值,作為快閃記憶體之讀取電壓。 In still another embodiment of the present invention, when the first read operation reads an error corresponding to the page of the first word line and cannot be repaired by the codec, the controller is further configured to correct the voltage distribution. Executing a repeated reading program before the program, wherein in the repeated reading program, the controller is configured to perform a voltage setting action on one of the scratchpads in the flash memory according to a repeated reading table, so as to be in the temporary register The value is used as the read voltage of the flash memory.

本發明亦提供一種錯誤校正方法,適用於一資料儲存裝置。資料儲存裝置包含一快閃記憶體用以操作於一單階儲存單元模式以及一非單階儲存單元模式。錯誤校正方法包括:根據一主機之一讀取命令對快閃記憶體中相應於一第一字元線之一頁面進行一第一次讀取動作;判斷第一次讀取動作讀取第一頁面時,是否發生無法藉由編解碼進行修復之錯誤;以 及當第一次讀取動作讀取相應於第一字元線之頁面發生無法藉由編解碼進行修復之錯誤時,執行一校正電壓分佈程序。校正電壓分佈程序包括:致使快閃記憶體切換至非單階儲存單元模式;以及在非單階儲存單元模式下,將一數位邏輯1寫入相應於第一字元線之一最高有效位元頁面,以校正相應於第一字元線之記憶體儲存單元的電壓分佈。 The invention also provides an error correction method suitable for use in a data storage device. The data storage device includes a flash memory for operating in a single-stage storage unit mode and a non-single-order storage unit mode. The error correction method includes: performing a first reading operation on a page corresponding to a first character line in the flash memory according to a read command of one host; determining that the first reading action reads the first Whether there is an error that cannot be fixed by codec when the page is used; And when the first read operation reads an error corresponding to the page of the first word line and cannot be repaired by the codec, a correction voltage distribution program is executed. The calibration voltage distribution program includes: causing the flash memory to switch to the non-single-order memory cell mode; and in the non-single-order memory cell mode, writing a digital logic 1 to the most significant bit corresponding to one of the first word lines a page to correct the voltage distribution of the memory storage unit corresponding to the first word line.

在本發明之一實施例中,非單階儲存單元模式係為一二階儲存單元模式。在二階儲存單元模式中,校正電壓分佈程序之步驟更包括:在數位邏輯1寫入最高有效位元頁面後,致使快閃記憶體回復至單階儲存單元模式;在單階儲存單元模式下,再對相應於第一字元線之頁面進行一第二次讀取動作;當第二次讀取動作讀取相應於第一字元線之頁面發生無法藉由編解碼進行修復之錯誤時,將相應於第一字元線之頁面標記為一損壞頁面。 In an embodiment of the invention, the non-single-order storage unit mode is a second-order storage unit mode. In the second-order storage unit mode, the step of correcting the voltage distribution program further includes: after the digital logic 1 writes the most significant bit page, causing the flash memory to return to the single-order storage unit mode; in the single-order storage unit mode, And performing a second reading operation on the page corresponding to the first word line; when the second reading operation reads an error corresponding to the first word line, the error cannot be repaired by the codec. The page corresponding to the first word line is marked as a damaged page.

在本發明之另一實施例中,非單階儲存單元模式係為一三階儲存單元模式。在非單階儲存單元模式中校正電壓分佈程序之步驟更包括在三階儲存單元模式下,將一數位邏輯1寫入相應於第一字元線之一中央有效位元頁面,以校正相應於第一字元線之記憶體儲存單元的電壓分佈;在數位邏輯1寫入最高有效位元頁面以及中央有效位元頁面後,致使快閃記憶體回復至單階儲存單元模式;在單階儲存單元模式下,再對相應於第一字元線之頁面進行一第二次讀取動作;以及當第二次讀取動作讀取相應於第一字元線之頁面發生無法藉由編解碼進行修復之錯誤時,將相應於第一字元線之頁面標記為一損壞 頁面。 In another embodiment of the invention, the non-single-order storage unit mode is a third-order storage unit mode. The step of correcting the voltage distribution program in the non-single-order memory cell mode further includes writing a digital logic 1 to a central valid bit page corresponding to one of the first word lines in the third-order memory cell mode to correct the corresponding The voltage distribution of the memory storage unit of the first word line; after the digital logic 1 writes the most significant bit page and the central effective bit page, causing the flash memory to return to the single-order storage unit mode; In the unit mode, a second reading operation is performed on the page corresponding to the first character line; and when the second reading operation reads the page corresponding to the first character line, the encoding cannot be performed by the codec. When the error is fixed, the page corresponding to the first character line is marked as damaged. page.

另外,當第一次讀取動作讀取相應於第一字元線之頁面發生無法藉由編解碼進行修復之錯誤時,本發明之一實施例更用以在校正電壓分佈程序前執行一重複讀取程序,其中重複讀取程序包括根據一重複讀取表,對快閃記憶體中之一暫存器進行一電壓設定動作,以將暫存器中之數值,作為快閃記憶體之讀取電壓。 In addition, when the first read operation reads an error corresponding to the page of the first word line and cannot be repaired by the codec, an embodiment of the present invention is further used to perform a repetition before correcting the voltage distribution program. The reading program, wherein the repeating the reading process comprises: performing a voltage setting action on one of the scratchpads in the flash memory according to a repeated reading table to read the value in the scratchpad as a flash memory Take the voltage.

本發明亦提供一種資料讀取方法,適用於一資料儲存裝置,其中資料儲存裝置包含一快閃記憶體用以操作於一單階儲存單元模式以及一多階儲存單元模式,資料讀取方法包括:在單階儲存單元模式下,根據一主機之一讀取命令對快閃記憶體中相應於一第一字元線之一頁面進行一第一次讀取動作以獲取一第一資料;當第一資料發生無法修復之錯誤時,致使快閃記憶體切換至多階儲存單元模式;在多階儲存單元模式下,將一預設資料寫入相應於第一字元線之一最高有效位元頁面;致使快閃記憶體切換至單階儲存單元模式;以及再次讀取第一字元線之頁面以獲取一第二資料。 The present invention also provides a data reading method, which is applicable to a data storage device, wherein the data storage device includes a flash memory for operating in a single-stage storage unit mode and a multi-level storage unit mode, and the data reading method includes : in the single-stage storage unit mode, performing a first reading operation on a page corresponding to a first character line in the flash memory according to a read command of one host to obtain a first data; When the first data fails to be repaired, the flash memory is switched to the multi-level storage unit mode; in the multi-level storage unit mode, a preset data is written to the most significant bit corresponding to one of the first character lines. a page; causing the flash memory to switch to the single-order storage unit mode; and reading the page of the first word line again to obtain a second data.

本發明亦提供一種資料讀取方法,適用於一資料儲存裝置,其中資料儲存裝置包含一快閃記憶體用以操作於一單階儲存單元模式以及一多階儲存單元模式。資料讀取方法包括:根據一主機之一讀取命令對快閃記憶體中相應於一第一字元線之一頁面進行單階儲存單元模式的一第一次讀取動作以獲取一第一資料;當第一資料發生無法修復之錯誤時,將一預設資料以多階儲存單元模式寫入相應於第一字元線之一最高 有效位元頁面;以單階儲存單元模式讀取第一字元線之頁面以獲取一第二資料;以及當第二資料無錯誤或錯誤可更正時,將第二資料傳送予主機。 The present invention also provides a data reading method, which is suitable for a data storage device, wherein the data storage device comprises a flash memory for operating in a single-stage storage unit mode and a multi-level storage unit mode. The data reading method includes: performing a first reading operation of the single-order storage unit mode on a page corresponding to a first character line in the flash memory according to a read command of a host to obtain a first Data; when the first data fails to be repaired, a preset data is written in the multi-level storage unit mode to correspond to one of the first character lines. The valid bit page; reading the page of the first word line in the single-order storage unit mode to obtain a second data; and transmitting the second data to the host when the second data has no error or the error can be corrected.

電子系統; electronic system;

120‧‧‧主機 120‧‧‧Host

140‧‧‧資料儲存裝置 140‧‧‧Data storage device

160‧‧‧控制器 160‧‧‧ Controller

162‧‧‧運算單元 162‧‧‧ arithmetic unit

164‧‧‧永久記憶體 164‧‧‧Permanent memory

180‧‧‧快閃記憶體 180‧‧‧Flash memory

1102、1104、1202、1204‧‧‧曲線 1102, 1104, 1202, 1204‧‧‧ curves

S500-S516、S600-S624、S700-S716、S800-S824、S900-S910‧‧‧步驟 S500-S516, S600-S624, S700-S716, S800-S824, S900-S910‧‧ steps

第1圖係本發明之一種實施例之電子系統之方塊圖。 BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a block diagram of an electronic system in accordance with one embodiment of the present invention.

第2圖係本發明之快閃記憶體操作於一單階儲存單元模式下,頁面與字元線之對應關係表。 Figure 2 is a table showing the correspondence between pages and word lines in the flash memory of the present invention operating in a single-order memory cell mode.

第3圖係本發明之快閃記憶體操作於一二階儲存單元模式下,頁面與字元線之對應關係表。 Figure 3 is a table showing the correspondence between pages and word lines in the flash memory operating mode of the present invention in a second-order memory cell mode.

第4圖係本發明之快閃記憶體操作於一三階儲存單元模式下,頁面與字元線之對應關係表。 Figure 4 is a table showing the correspondence between pages and word lines in the flash memory operating mode of the present invention in a third-order memory cell mode.

第5圖係本發明之一種實施例之錯誤校正方法之流程圖。 Figure 5 is a flow chart of an error correction method of an embodiment of the present invention.

第6A-6B圖係本發明之另一種實施例之錯誤校正方法之流程圖。 6A-6B are flowcharts of an error correction method of another embodiment of the present invention.

第7圖係本發明之另一種實施例之錯誤校正方法之流程圖。 Figure 7 is a flow chart showing an error correction method of another embodiment of the present invention.

第8A-8B圖係本發明之另一種實施例之錯誤校正方法之流程圖。 8A-8B is a flow chart of an error correction method of another embodiment of the present invention.

第9圖係本發明之一種實施例之資料讀取方法之流程圖。 Figure 9 is a flow chart showing a method of reading data according to an embodiment of the present invention.

第10圖係本發明之另一種實施例之資料讀取方法之流程圖。 Figure 10 is a flow chart showing a method of reading data according to another embodiment of the present invention.

第11圖係目標頁面未經由本發明所揭露之錯誤校正方法讀取前之錯誤率模擬圖。 Fig. 11 is a simulation diagram of the error rate before the target page is not read by the error correction method disclosed in the present invention.

第12圖係目標頁面經由本發明所揭露之錯誤校正方法讀取後之錯誤率模擬圖。 Fig. 12 is a simulation diagram of the error rate after the target page is read by the error correction method disclosed in the present invention.

以下將詳細討論本發明各種實施例之裝置及使用方法。然而值得注意的是,本發明所提供之許多可行的發明概念可實施在各種特定範圍中。這些特定實施例僅用於舉例說明本發明之裝置及使用方法,但非用於限定本發明之範圍。 The apparatus and method of use of various embodiments of the present invention are discussed in detail below. However, it is to be noted that many of the possible inventive concepts provided by the present invention can be implemented in various specific ranges. These specific examples are only intended to illustrate the apparatus and methods of use of the present invention, but are not intended to limit the scope of the invention.

第1圖係本發明之一種實施例之電子系統之方塊圖。電子系統100包括一主機120以及一資料儲存裝置140。資料儲存裝置140包括一快閃記憶體180以及一控制器160,且可根據主機110所下達的命令操作。控制器160包括一運算單元162以及一永久記憶體(如,唯讀記憶體ROM)164。永久記憶體164與所載之程式碼、資料組成韌體(firmware),由運算單元162執行,使控制器160基於該韌體控制該快閃記憶體180。快閃記憶體180包括複數頁面以及複數字元線與複數位元線,其中每一字元線用以控制至少一頁面,以選擇所欲讀取之頁面。值得注意的是,本發明之快閃記憶體180可操作於不同之記憶體存取模式,例如單階儲存單元(Single-Level Cell,SLC)模式以及非單階儲存單元模式,其中非單階(或多階)儲存單元模式包括二階儲存單元(Multi-Level Cell,MLC)模式以及三階儲存單元(Triple-Level Cell,TLC)模式。 BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a block diagram of an electronic system in accordance with one embodiment of the present invention. The electronic system 100 includes a host 120 and a data storage device 140. The data storage device 140 includes a flash memory 180 and a controller 160, and is operable according to commands issued by the host 110. The controller 160 includes an arithmetic unit 162 and a permanent memory (e.g., read only memory ROM) 164. The permanent memory 164 and the stored code and data constitute a firmware, which is executed by the operation unit 162, so that the controller 160 controls the flash memory 180 based on the firmware. The flash memory 180 includes a plurality of pages and complex digital and complex bit lines, wherein each of the word lines is used to control at least one page to select a page to be read. It should be noted that the flash memory 180 of the present invention can operate in different memory access modes, such as a single-level cell (SLC) mode and a non-single-order memory cell mode, where non-single order The (or multi-level) storage unit mode includes a Multi-Level Cell (MLC) mode and a Triple-Level Cell (TLC) mode.

舉例而言,當快閃記憶體180操作於單階儲存單元模式時,快閃記憶體180中之一個記憶體儲存單元(cell)用以存放1位元(bit)的資料,並且一條字位元線用以控制至一個頁 面,其中字元線與頁面之對應關係如第2圖所示。第2圖係本發明之快閃記憶體操作於單階儲存單元模式下,頁面與字元線之對應關係表。由第2圖可知,快閃記憶體180中之每一字元線相應於一個頁面。換言之,在單階儲存單元模式中,一個字元線相應於一個頁面。另外,由於快閃記憶體180在操作於單階儲存單元模式時,一個記憶體儲存單元需要存放1位元。因此,快閃記憶體180在電壓分佈中,需要兩個信息狀態(level)來儲存資料,其中該兩個信息狀態分別相應於0和1。 For example, when the flash memory 180 operates in the single-stage storage unit mode, a memory storage unit (cell) of the flash memory 180 is used to store 1-bit data and a word position. The meta line is used to control to one page The corresponding relationship between the character line and the page is as shown in Fig. 2. Figure 2 is a table showing the correspondence between pages and word lines in the single-order memory cell mode of the flash memory of the present invention. As can be seen from FIG. 2, each character line in the flash memory 180 corresponds to one page. In other words, in the single-order storage unit mode, one word line corresponds to one page. In addition, since the flash memory 180 operates in the single-stage storage unit mode, one memory storage unit needs to store one bit. Therefore, in the voltage distribution, the flash memory 180 requires two information levels to store data, wherein the two information states correspond to 0 and 1, respectively.

當快閃記憶體180操作於二階儲存單元模式時,快閃記憶體180中之一個記憶體儲存單元(cell)用以存放2位元(bit)的資料,並且一條字位元線用以控制至兩個頁面,其中字元線與頁面之對應關係如第3圖所示。第3圖係本發明之快閃記憶體操作於二階儲存單元模式下,頁面與字元線之對應關係表。由第3圖可知,每一字元線分別用以控制一最低有效位元頁面(Least-Significant Bit page,LSB page)以及一最高有效位元頁面(Most-Significant Bit page,MSB page)。換言之,在二階儲存單元模式中,一個字元線相應於兩個頁面。另外,由於快閃記憶體180在操作於二階儲存單元模式時,一個記憶體儲存單元需要存放2位元。因此,快閃記憶體180在電壓分佈中,需要四個信息狀態(level)來儲存資料,其中該兩個信息狀態分別相應於00、01、10和11,並且該四個信息狀態係由單階儲存單元模式中的兩個信息狀態中,分別分出來的。 When the flash memory 180 operates in the second-order storage unit mode, a memory storage unit (cell) of the flash memory 180 is used to store 2-bit data, and a word bit line is used to control To two pages, where the correspondence between the word line and the page is as shown in Figure 3. Figure 3 is a table showing the correspondence between pages and word lines in the second-order storage unit mode of the flash memory of the present invention. As can be seen from FIG. 3, each word line is used to control a Least-Significant Bit Page (LSB page) and a Most-Significant Bit Page (MSB page). In other words, in the second-order storage unit mode, one word line corresponds to two pages. In addition, since the flash memory 180 operates in the second-order storage unit mode, one memory storage unit needs to store two bits. Therefore, in the voltage distribution, the flash memory 180 requires four information levels to store data, wherein the two information states correspond to 00, 01, 10, and 11, respectively, and the four information states are The two information states in the order storage unit mode are respectively separated.

當快閃記憶體180操作於三階儲存單元模式時,快閃記憶體180中之一個記憶體儲存單元(cell)用以存放3位元 (bit)的資料,並且一條字位元線用以控制至三個頁面,其中字元線與頁面之對應關係如第4圖所示。第4圖係本發明之快閃記憶體操作於二階儲存單元模式下,頁面與字元線之對應關係表。由第4圖可知,每一字元線分別用以控制一最低有效位元頁面、一中央有效位元(Central Significant Bit page,CSB page)以及一最高有效位元頁面。換言之,在三階儲存單元模式中,一個字元線相應於三個頁面。另外,由於快閃記憶體180在操作於三階儲存單元模式時,一個記憶體儲存單元需要存放3位元。因此,快閃記憶體180在電壓分佈中,需要八個信息狀態(level)來儲存資料,其中該兩個信息狀態分別相應於000、001、010、011、100、101、110和111,並且該八個信息狀態係由二階儲存單元模式中的四個信息狀態中,分別分出來的。 When the flash memory 180 operates in the third-order storage unit mode, one of the memory cells in the flash memory 180 is used to store the 3-bit memory. (bit) data, and a word bit line is used to control to three pages, wherein the correspondence between the word line and the page is as shown in FIG. Figure 4 is a table showing the correspondence between pages and word lines in the second-order storage unit mode of the flash memory of the present invention. As can be seen from FIG. 4, each word line is used to control a least significant bit page, a Central Significant Bit page (CSB page), and a most significant bit page. In other words, in the third-order storage unit mode, one word line corresponds to three pages. In addition, since the flash memory 180 operates in the third-order storage unit mode, one memory storage unit needs to store three bits. Therefore, in the voltage distribution, the flash memory 180 requires eight information levels to store data, wherein the two information states correspond to 000, 001, 010, 011, 100, 101, 110, and 111, respectively. The eight information states are respectively separated from the four information states in the second-order storage unit mode.

根據本案所揭露之技術,韌體係設計來提供主機120對快閃記憶體180進行讀取發生錯誤時,所需的錯誤校正方法,用以補救無法依正常程序讀取之資料。舉例而言,當控制器160對快閃記憶體180進行讀取發生資料錯誤,並且無法藉錯誤校驗碼(Error-correcting code,ECC)成功進行更正時,控制器160可藉由本發明所揭露之錯誤校正方法,校正無法讀取之資料。本發明所揭露的錯誤校正方法包括一校正電壓分佈程序,但本發明不限於此。在本發明之另一實施例中,錯誤校正方法包括一校正電壓分佈程序以及一重複讀取程序。本發明所揭露之校正電壓分佈程序係藉由切換記憶體存取模式,校正相應之位元線中的記憶體儲存單元(Cell)的電壓分佈。 According to the technique disclosed in the present disclosure, the tough system is designed to provide an error correction method required for the host 120 to read the flash memory 180 to correct the data that cannot be read by the normal program. For example, when the controller 160 makes a data error in reading the flash memory 180 and cannot successfully correct the error by using an error-correcting code (ECC), the controller 160 can be disclosed by the present invention. The error correction method corrects the data that cannot be read. The error correction method disclosed in the present invention includes a correction voltage distribution program, but the present invention is not limited thereto. In another embodiment of the invention, the error correction method includes a correction voltage distribution program and a repeat reading procedure. The calibration voltage distribution program disclosed in the present invention corrects the voltage distribution of the memory storage unit (Cell) in the corresponding bit line by switching the memory access mode.

舉例而言,在本發明之一實施例中,控制器160將 操作模式由單階儲存單元模式切換為二階儲存單元模式,並將數位邏輯1(例如0xFF)寫入一第一位元線所控制之最高有效位元,以校正在單階儲存單元中,第一位元線所相應之頁面的電壓分佈。換言之,控制器160將操作模式由單階儲存單元模式切換為二階儲存單元模式,並將電壓分佈中00和01的信息狀態分別移動至11和10,以校正在單階儲存單元中,第一位元線所相應之頁面的電壓分佈。 For example, in one embodiment of the invention, the controller 160 will The operation mode is switched from the single-order storage unit mode to the second-order storage unit mode, and the digital logic 1 (for example, 0xFF) is written to the most significant bit controlled by the first bit line to be corrected in the single-order storage unit. The voltage distribution of the page corresponding to a bit line. In other words, the controller 160 switches the operation mode from the single-stage storage unit mode to the second-order storage unit mode, and moves the information states of the voltage distributions 00 and 01 to 11 and 10, respectively, to correct in the single-stage storage unit, first The voltage distribution of the page corresponding to the bit line.

在本發明之另一實施例中,控制器160將操作模式由單階儲存單元模式切換為三階儲存單元模式,並將數位邏輯1(例如0xFF)寫入一第一位元線所控制之最高有效位元以及中央有效位元,以校正在單階儲存單元中,第一位元線所相應之頁面的電壓分佈。換言之,控制器160將操作模式由單階儲存單元模式切換為三階儲存單元模式,並將電壓分佈中000、001、010、011、100和101的信息狀態分別移動至111和110,以校正在單階儲存單元中,第一位元線所相應之頁面的電壓分佈。 In another embodiment of the present invention, the controller 160 switches the operation mode from the single-order storage unit mode to the third-order storage unit mode, and writes the digital logic 1 (for example, 0xFF) to be controlled by a first bit line. The most significant bit and the central significant bit to correct the voltage distribution of the page corresponding to the first bit line in the single-order memory cell. In other words, the controller 160 switches the operation mode from the single-stage storage unit mode to the third-order storage unit mode, and moves the information states of 000, 001, 010, 011, 100, and 101 in the voltage distribution to 111 and 110, respectively, to correct In a single-stage memory cell, the voltage distribution of the page corresponding to the first bit line.

另外,本發明所揭露之重複讀取程序係用以根據一重新讀取表(Read Retry Table)重新設定在讀取過程中發生錯誤之目標頁面的讀取電壓,以對目標頁面進行重複讀取(Read Retry)。值得注意的是,上述之目標頁面係主機120傳送至資料儲存裝置140的讀取命令,所要求讀取之頁面。詳細動作如下所述。 In addition, the repeated reading program disclosed in the present invention is for resetting the reading voltage of the target page that has an error during the reading process according to a read retry table to repeatedly read the target page. (Read Retry). It should be noted that the target page described above is a read command sent by the host 120 to the data storage device 140, which is required to be read. The detailed actions are as follows.

在本發明之一實施例中,控制器160用以在單階儲存單元模式下,根據主機120之一讀取命令對快閃記憶體180中 相應於一第一字元線之一頁面進行一第一次讀取動作。換言之,控制器160用以根據主機120之一讀取命令對快閃記憶體180中第一字元線所控制之頁面進行第一次讀取動作。當第一次讀取動作讀取第一頁面發生無法藉由編解碼進行修復之錯誤時,控制器160執行校正電壓分佈程序。在校正電壓分佈程序中,控制器160致使快閃記憶體180切換至二階儲存單元模式,並且在二階儲存單元模式下,將一數位邏輯1(例如0xFF)寫入相應於第一字元線之一最高有效位元頁面,以校正相應於第一字元線之記憶體儲存單元的電壓分佈。接著,控制器160更用以在數位邏輯1(例如0xFF)寫入相應於第一字元線之最高有效位元頁面後,致使快閃記憶體180回復至單階儲存單元模式,並且在單階儲存單元模式下,再對相應於第一字元線之頁面進行一第二次讀取動作。當控制器160在第二次讀取動作中成功讀取相應於第一字元線之頁面(即資料無錯誤或錯誤可更正)時,控制器160將成功讀取之相應於第一字元線之頁面的資料傳送至主機120。當控制器160在第二次讀取動作中仍然未成功讀取相應於第一字元線之頁面(即資料仍無法更正)時,控制器160將相應於第一字元線之頁面標記為一損壞頁面,或將第一字元線對應的區塊標記為一損壞區塊。 In an embodiment of the present invention, the controller 160 is configured to read commands from the host 120 in the single-stage storage unit mode to the flash memory 180. A first reading operation is performed corresponding to one of the first character line pages. In other words, the controller 160 is configured to perform a first reading operation on the page controlled by the first word line in the flash memory 180 according to a read command of the host 120. When the first read operation reads the first page and an error occurs that cannot be repaired by the codec, the controller 160 executes the correction voltage distribution program. In the correction voltage distribution procedure, the controller 160 causes the flash memory 180 to switch to the second order storage unit mode, and in the second order storage unit mode, writes a digital logic 1 (eg, 0xFF) corresponding to the first word line. A most significant bit page to correct the voltage distribution of the memory storage unit corresponding to the first word line. Then, the controller 160 is further configured to cause the flash memory 180 to return to the single-order storage unit mode after the digital logic 1 (eg, 0xFF) is written to the most significant bit page corresponding to the first word line, and In the stage storage unit mode, a second reading operation is performed on the page corresponding to the first word line. When the controller 160 successfully reads the page corresponding to the first word line in the second reading action (ie, the data is error-free or the error can be corrected), the controller 160 will successfully read the corresponding character corresponding to the first character. The data of the page of the line is transmitted to the host 120. When the controller 160 still fails to read the page corresponding to the first word line in the second reading action (ie, the data still cannot be corrected), the controller 160 marks the page corresponding to the first word line as A damaged page, or the block corresponding to the first character line is marked as a damaged block.

在本發明之另一實施例之校正電壓分佈程序中,控制器160致使快閃記憶體180切換至三階儲存單元模式,並且在三階儲存單元模式下,將一數位邏輯1(例如0xFF)寫入相應於第一字元線之一最高有效位元頁面以及一中央有效位元頁面,以校正相應於第一字元線之記憶體儲存單元的電壓分佈。 接著,控制器160更用以在數位邏輯1(例如0xFF)寫入相應於第一字元線之最高有效位元頁面以及中央有效位元頁面後,致使快閃記憶體180回復至單階儲存單元模式,並且在單階儲存單元模式下,再對相應於第一字元線之頁面進行一第二次讀取動作。同樣地,當控制器160在第二次讀取動作中成功讀取相應於第一字元線之頁面(即資料無錯誤或錯誤可更正)時,控制器160將成功讀取之相應於第一字元線之頁面的資料傳送至主機120。當控制器160在第二次讀取動作中仍然未成功讀取相應於第一字元線之頁面(即資料仍無法更正)時,控制器160將相應於第一字元線之頁面標記為一損壞頁面,或將第一字元線對應的區塊標記為一損壞區塊。 In a correction voltage distribution routine of another embodiment of the present invention, the controller 160 causes the flash memory 180 to switch to the third-order storage unit mode, and in the third-order storage unit mode, a digit logic 1 (for example, 0xFF) A page corresponding to one of the first word line and the most significant bit page is written to correct the voltage distribution of the memory storage unit corresponding to the first word line. Then, the controller 160 is further configured to cause the flash memory 180 to return to the single-order storage after the digital logic 1 (eg, 0xFF) is written to the most significant bit page corresponding to the first word line and the central effective bit page. In the unit mode, and in the single-stage storage unit mode, a second reading operation is performed on the page corresponding to the first word line. Similarly, when the controller 160 successfully reads the page corresponding to the first word line in the second reading action (ie, the data is error-free or the error can be corrected), the controller 160 will successfully read the corresponding page. The data of the page of the word line is transmitted to the host 120. When the controller 160 still fails to read the page corresponding to the first word line in the second reading action (ie, the data still cannot be corrected), the controller 160 marks the page corresponding to the first word line as A damaged page, or the block corresponding to the first character line is marked as a damaged block.

在本發明之另一實施例中,當第一次讀取動作讀取相應於第一字元線之頁面發生無法藉由編解碼進行修復之錯誤時,控制器160更用以在校正電壓分佈程序前執行一重複讀取程序。在重複讀取程序中,控制器160用以根據一重複讀取表,對快閃記憶體180中之一暫存器進行一電壓設定動作,以將暫存器中之數值,作為快閃記憶體180之讀取電壓。接著,控制器160更用以藉由所設定之快閃記憶體180之讀取電壓對相應於第一字元線之頁面進行一第二次讀取動作,並將一重複讀取計數加一。 In another embodiment of the present invention, when the first read operation reads an error corresponding to the page of the first word line and cannot be repaired by the codec, the controller 160 is further configured to correct the voltage distribution. Perform a repeat reading procedure before the program. In the repeated reading process, the controller 160 is configured to perform a voltage setting action on one of the registers in the flash memory 180 according to a repeated reading table to use the value in the register as a flash memory. The reading voltage of the body 180. Then, the controller 160 is further configured to perform a second reading operation on the page corresponding to the first word line by the read voltage of the set flash memory 180, and add one repeated reading count. .

當控制器160在第二次讀取動作中成功讀取相應於第一字元線之頁面時,控制器160將成功讀取之相應於第一字元線之頁面的資料傳送至主機120。控制器160更可在重複讀取程序後所執行之第二次讀取動作依然無法成功讀取相應於 第一字元線之頁面後,重複執行重複讀取程序,直到第一頁面之資料可成功被讀取,或者直到重複讀取程序被重複執行之次數達到一第一既定值為止。當重複讀取程序被重複執行之次數達到第一既定值時,控制器160用以執行校正電壓分佈程序。舉例而言,第一既定值可為1次、5次、10次、20次、50次、100次或者500次等,經由發明人根據電壓設定程序重讀目標頁面後之成功率的實驗數據所設計的數值,本發明不限於此。 When the controller 160 successfully reads the page corresponding to the first word line in the second read operation, the controller 160 transmits the data of the page corresponding to the first word line successfully read to the host 120. The second reading operation performed by the controller 160 after repeatedly reading the program still cannot be successfully read corresponding to After the page of the first word line, the repeated reading process is repeated until the data of the first page can be successfully read, or until the number of times the repeated reading program is repeatedly executed reaches a first predetermined value. When the number of times the repeated reading program is repeatedly executed reaches the first predetermined value, the controller 160 is configured to execute the corrected voltage distribution program. For example, the first predetermined value may be 1 time, 5 times, 10 times, 20 times, 50 times, 100 times, or 500 times, etc., and the experimental data of the success rate after the inventor rereads the target page according to the voltage setting program The numerical values of the design, the invention is not limited thereto.

第5圖係本發明之一種實施例之錯誤校正方法之流程圖。錯誤校正方法適用於第1圖所示之資料儲存裝置140。流程開始於步驟S500。 Figure 5 is a flow chart of an error correction method of an embodiment of the present invention. The error correction method is applied to the data storage device 140 shown in FIG. The flow begins in step S500.

在步驟S500中,控制器160用以在單階儲存單元模式下,根據主機120之一讀取命令對快閃記憶體180中相應於一第一字元線之一頁面進行一第一次讀取動作。換言之,控制器160用以根據主機120之一讀取命令對快閃記憶體180中由第一字元線所控制之第一頁面進行一讀取動作。 In step S500, the controller 160 is configured to perform a first reading on the page corresponding to one of the first character lines in the flash memory 180 according to the read command of the host 120 in the single-stage storage unit mode. Take action. In other words, the controller 160 is configured to perform a reading operation on the first page of the flash memory 180 controlled by the first word line according to a read command of the host 120.

接著,在步驟S502中,控制器160判斷讀取相應於第一字元線之頁面時,是否發生無法藉由編解碼進行修復之錯誤。當沒有發生無法藉由編解碼進行修復之錯誤時,流程進行至步驟S504。否則,流程進行至步驟S506。 Next, in step S502, the controller 160 determines whether an error that cannot be repaired by the codec occurs when the page corresponding to the first word line is read. When there is no error that cannot be repaired by the codec, the flow proceeds to step S504. Otherwise, the flow proceeds to step S506.

在步驟S504中,控制器160將成功讀取之第一字元線之頁面的資料,傳送至主機120。流程結束於步驟S504。 In step S504, the controller 160 transmits the data of the page of the first character line successfully read to the host 120. The flow ends in step S504.

在步驟S506中,控制器160致使快閃記憶體180切換至二階儲存單元模式。 In step S506, the controller 160 causes the flash memory 180 to switch to the second-order storage unit mode.

接著,在步驟S508中,控制器160在二階儲存單元 模式下,將一數位邏輯1(例如0xFF)寫入相應於第一字元線之一最高有效位元頁面,以校正相應於第一字元線之記憶體儲存單元的電壓分佈。 Next, in step S508, the controller 160 is in the second-order storage unit. In the mode, a digital logic 1 (eg, 0xFF) is written to the most significant bit page corresponding to one of the first word lines to correct the voltage distribution of the memory storage unit corresponding to the first word line.

接著,在步驟S510中,控制器160致使快閃記憶體180回復至單階儲存單元模式。 Next, in step S510, the controller 160 causes the flash memory 180 to revert to the single-stage storage unit mode.

接著,在步驟S512中,控制器160在單階儲存單元模式下,再對相應於第一字元線之頁面進行一第二次讀取動作。 Next, in step S512, the controller 160 performs a second reading operation on the page corresponding to the first word line in the single-order storage unit mode.

接著,在步驟S514中,控制器160判斷第二次讀取動作在讀取相應於第一字元線之頁面時,是否發生無法藉由編解碼進行修復之錯誤。當沒有發生無法藉由編解碼進行修復之錯誤時,流程進行至步驟S504。否則,流程進行至步驟S516。 Next, in step S514, the controller 160 determines whether an error that cannot be repaired by the codec occurs when the second reading operation reads the page corresponding to the first word line. When there is no error that cannot be repaired by the codec, the flow proceeds to step S504. Otherwise, the flow proceeds to step S516.

在步驟S516中,控制器160將相應於第一字元線之頁面標記為一損壞頁面或將第一字元線所對應的區塊標記為一損壞區塊。流程結束於步驟S516。 In step S516, the controller 160 marks the page corresponding to the first word line as a damaged page or marks the block corresponding to the first word line as a damaged block. The flow ends in step S516.

第6A-6B圖係本發明之一種實施例之錯誤校正方法之流程圖。錯誤校正方法適用於第1圖所示之資料儲存裝置140。流程開始於步驟S600。值得注意的是,步驟S600-S604相似於步驟S500-S504,詳細說明請參考第5圖之流程,在此不在贅述。 6A-6B is a flow chart of an error correction method of an embodiment of the present invention. The error correction method is applied to the data storage device 140 shown in FIG. The flow begins in step S600. It should be noted that steps S600-S604 are similar to steps S500-S504. For detailed description, please refer to the process of FIG. 5, and details are not described herein.

在步驟S606中,控制器160判斷相應於電壓設定動作之次數的一重複讀取計數是否超過一第一既定值。舉例而言,控制器160可利用實施於快閃記憶體180或者其它記憶體中之一記憶體區塊或者一暫存器,用以對重複讀取程序被重複執 行之次數進行一重複讀取計數。當重複讀取計數超過第一既定值時,流程進行至步驟S614。否則,流程進行至步驟S608。 In step S606, the controller 160 determines whether a repeated read count corresponding to the number of voltage setting actions exceeds a first predetermined value. For example, the controller 160 can use one of the memory blocks or a temporary memory implemented in the flash memory 180 or other memory to repeatedly execute the repeated reading program. The number of rows is counted for a repeat read. When the repeated read count exceeds the first predetermined value, the flow proceeds to step S614. Otherwise, the flow proceeds to step S608.

在步驟S608中,控制器160用以根據重複讀取表,對快閃記憶體180中之一暫存器(未圖示)進行一電壓設定動作,以將暫存器中之數值,作為快閃記憶體180之讀取電壓。舉例而言,重複讀取表可儲存於永久記憶體164中。 In step S608, the controller 160 is configured to perform a voltage setting operation on one of the registers (not shown) in the flash memory 180 according to the repeated reading table, so as to compare the value in the temporary register. The read voltage of the flash memory 180. For example, the repeated read list can be stored in the permanent memory 164.

接著,在步驟S610中,控制器160用以藉由所設定之快閃記憶體180之讀取電壓對相應於第一字元線之頁面進行一第二次讀取動作。 Next, in step S610, the controller 160 is configured to perform a second reading operation on the page corresponding to the first word line by the read voltage of the set flash memory 180.

接著,在步驟S612中,控制器160將重複讀取計數加一。舉例而言,控制器160係將用以進行重複讀取計數之記憶體區塊或者一暫存器中的數值加一。接著,流程回到步驟S602。 Next, in step S612, the controller 160 increments the repeated read count by one. For example, the controller 160 increments the value in the memory block or a register for performing repeated read counts. Next, the flow returns to step S602.

在步驟S614中,控制器160致使資料儲存裝置140切換至二階儲存單元模式。 In step S614, the controller 160 causes the data storage device 140 to switch to the second-order storage unit mode.

接著,在步驟S616中,控制器160在二階儲存單元模式下,將一數位邏輯1(例如0xFF)寫入相應於第一字元線之一最高有效位元頁面,以校正相應於第一字元線之記憶體儲存單元的電壓分佈。 Next, in step S616, the controller 160 writes a digit logic 1 (for example, 0xFF) to the most significant bit page corresponding to one of the first word lines in the second-order storage unit mode to correct the corresponding word. The voltage distribution of the memory storage unit of the line.

接著,在步驟S618中,控制器160致使快閃記憶體180回復至單階儲存單元模式。 Next, in step S618, the controller 160 causes the flash memory 180 to revert to the single-order storage unit mode.

接著,在步驟S620中,控制器160在單階儲存單元模式下,再對相應於第一字元線之頁面進行一第二次讀取動作。 Next, in step S620, the controller 160 performs a second reading operation on the page corresponding to the first word line in the single-order storage unit mode.

接著,在步驟S622中,控制器160判斷第二次讀取動作在讀取相應於第一字元線之頁面時,是否發生無法藉由編解碼進行修復之錯誤。當沒有發生無法藉由編解碼進行修復之錯誤時,流程進行至步驟S604。否則,流程進行至步驟S624。 Next, in step S622, the controller 160 determines whether an error that cannot be repaired by the codec occurs when the second reading operation reads the page corresponding to the first word line. When there is no error that cannot be repaired by the codec, the flow proceeds to step S604. Otherwise, the flow proceeds to step S624.

在步驟S624中,控制器160將相應於第一字元線之頁面標記為一損壞頁面或將第一字元線所對應的區塊標記為一損壞區塊。流程結束於步驟S624。 In step S624, the controller 160 marks the page corresponding to the first word line as a damaged page or marks the block corresponding to the first word line as a damaged block. The flow ends in step S624.

第7圖係本發明之一種實施例之錯誤校正方法之流程圖。錯誤校正方法適用於第1圖所示之資料儲存裝置140。流程開始於步驟S700。值得注意的是,步驟S700-S704、S710-S716相似於步驟S500-S504、S510-S516,詳細說明請參考第5圖之流程,在此不在贅述。 Figure 7 is a flow chart of an error correction method of an embodiment of the present invention. The error correction method is applied to the data storage device 140 shown in FIG. The flow begins in step S700. It should be noted that steps S700-S704 and S710-S716 are similar to steps S500-S504 and S510-S516. For details, please refer to the process of FIG. 5, and details are not described herein.

在步驟S706中,控制器160致使資料儲存裝置140切換至三階儲存單元模式。 In step S706, the controller 160 causes the data storage device 140 to switch to the third-order storage unit mode.

接著,在步驟S708中,控制器160在三階儲存單元模式下,將一數位邏輯1(例如0xFF)寫入相應於第一字元線之一最高有效位元頁面以及一中階有效位元頁面,以校正相應於第一字元線之記憶體儲存單元的電壓分佈。 Next, in step S708, the controller 160 writes a digit logic 1 (for example, 0xFF) to the most significant bit page corresponding to one of the first word lines and an intermediate significant bit in the third-order storage unit mode. a page to correct the voltage distribution of the memory storage unit corresponding to the first word line.

第8A-8B圖係本發明之一種實施例之錯誤校正方法之流程圖。錯誤校正方法適用於第1圖所示之資料儲存裝置140。流程開始於步驟S800。值得注意的是,步驟S800-S812、S818-S824相似於步驟S600-S612、S618-S624,詳細說明請參考第5圖之流程,在此不在贅述。 8A-8B are flowcharts of an error correction method of an embodiment of the present invention. The error correction method is applied to the data storage device 140 shown in FIG. The flow begins in step S800. It should be noted that steps S800-S812 and S818-S824 are similar to steps S600-S612 and S618-S624. For detailed description, please refer to the process of FIG. 5, and details are not described herein.

在步驟S814中,控制器160致使快閃記憶體180切 換至三階儲存單元模式。 In step S814, the controller 160 causes the flash memory 180 to be cut. Change to the third-order storage unit mode.

接著,在步驟S816中,控制器160在三階儲存單元模式下,將一數位邏輯1(例如0xFF)寫入相應於第一字元線之一最高有效位元頁面以及一中階有效位元頁面,以校正相應於第一字元線之記憶體儲存單元的電壓分佈。 Next, in step S816, the controller 160 writes a digital logic 1 (for example, 0xFF) to the most significant bit page corresponding to one of the first word lines and an intermediate effective bit in the third-order storage unit mode. a page to correct the voltage distribution of the memory storage unit corresponding to the first word line.

第9圖係本發明之一種實施例之資料讀取方法之流程圖。資料讀取方法適用於第1圖所示之資料儲存裝置140。流程開始於步驟S900。 Figure 9 is a flow chart showing a method of reading data according to an embodiment of the present invention. The data reading method is applied to the data storage device 140 shown in FIG. The flow begins in step S900.

在步驟S900中,控制器160用以在在單階儲存單元模式下,根據主機120之一讀取命令對快閃記憶體180中相應於一第一字元線之一頁面進行一第一次讀取動作以獲取一第一資料。換言之,控制器160用以根據主機120之一讀取命令對快閃記憶體180中由第一字元線所控制之第一頁面進行一讀取動作。 In step S900, the controller 160 is configured to perform a first time on the page corresponding to one of the first character lines in the flash memory 180 according to the read command of the host 120 in the single-stage storage unit mode. Read the action to get a first data. In other words, the controller 160 is configured to perform a reading operation on the first page of the flash memory 180 controlled by the first word line according to a read command of the host 120.

接著,所讀取之第一資料可能有兩種情形,包括第一資料發生無法修復之錯誤以及第一資料無錯誤或錯誤可更正,其中當第一資料無錯誤或錯誤可更正時,控制器160將第一資料傳送予主機120。另外,步驟S902所示的為另一種情況。在步驟S902中,當第一資料發生無法修復之錯誤時,控制器160致使快閃記憶體180切換至多階儲存單元模式。 Then, the first data read may have two situations, including an error that the first data cannot be repaired, and the first data has no error or the error can be corrected, wherein when the first data has no error or the error can be corrected, the controller The first data is transmitted to the host 120. In addition, the case shown in step S902 is another case. In step S902, when an error occurs in the first data that cannot be repaired, the controller 160 causes the flash memory 180 to switch to the multi-level storage unit mode.

接著,在步驟S904中,控制器160在多階儲存單元模式下,將一預設資料寫入相應於第一字元線之一最高有效位元頁面。在一實施例中,預設資料為0Xff,但本發明不限於此。 Next, in step S904, the controller 160 writes a preset data to the most significant bit page corresponding to one of the first word lines in the multi-level storage unit mode. In an embodiment, the preset material is 0Xff, but the invention is not limited thereto.

接著,在步驟S906中,控制器160致使快閃記憶體 180切換至單階儲存單元模式。 Next, in step S906, the controller 160 causes the flash memory to be 180 switches to single-stage storage unit mode.

接著,在步驟S908中,控制器160在單階儲存單元模式下,再次讀取第一字元線之頁面以獲取一第二資料。 Next, in step S908, the controller 160 reads the page of the first word line again in the single-stage storage unit mode to obtain a second data.

接著,所讀取之第二資料可能有兩種情形,包括第二資料發生無法修復之錯誤以及第二資料無錯誤或錯誤可更正。在步驟S910中,當第二資料無錯誤或錯誤可更正時,控制器160將第二資料傳送予主機120;當第二資料發生無法修復之錯誤時,控制器160將相應於第一字元線之頁面標記為一損壞頁面或者將相應於第一字元線對應之一第一區塊標記為一損壞區塊。流程結束於步驟S910。 Then, the second data read may have two situations, including an error that the second data cannot be repaired, and the second data has no errors or errors can be corrected. In step S910, when the second data has no error or the error can be corrected, the controller 160 transmits the second data to the host 120; when the second data fails to be repaired, the controller 160 will correspond to the first character. The page of the line is marked as a damaged page or the first block corresponding to the first word line is marked as a damaged block. The flow ends in step S910.

第10圖係本發明之另一種實施例之資料讀取方法之流程圖。資料讀取方法適用於第1圖所示之資料儲存裝置140。流程開始於步驟S1000。 Figure 10 is a flow chart showing a method of reading data according to another embodiment of the present invention. The data reading method is applied to the data storage device 140 shown in FIG. The flow begins in step S1000.

在步驟S1000中,控制器160根據一主機120之一讀取命令對快閃記憶體180中相應於一第一字元線之一頁面進行單階儲存單元模式的一第一次讀取動作以獲取一第一資料。 In step S1000, the controller 160 performs a first reading operation of the single-order storage unit mode on the page corresponding to one of the first character lines in the flash memory 180 according to a read command of a host 120. Get a first data.

接著,所讀取之第一資料可能有兩種情形,包括第一資料發生無法修復之錯誤以及第一資料無錯誤或錯誤可更正,其中當第一資料無錯誤或錯誤可更正時,控制器160將第一資料傳送予主機120。另外,步驟S1002所示的為另一種情況。在步驟S1002中,當第一資料發生無法修復之錯誤時,將一預設資料以多階儲存單元模式寫入相應於第一字元線之一最高有效位元頁面。在一實施例中,預設資料為0Xff,但本發明不限於此。 Then, the first data read may have two situations, including an error that the first data cannot be repaired, and the first data has no error or the error can be corrected, wherein when the first data has no error or the error can be corrected, the controller The first data is transmitted to the host 120. In addition, the case shown in step S1002 is another case. In step S1002, when the first data fails to be repaired, a preset data is written in the multi-level storage unit mode to the most significant bit page corresponding to one of the first character lines. In an embodiment, the preset material is 0Xff, but the invention is not limited thereto.

接著,在步驟S1004中,控制器160以單階儲存單元模式讀取第一字元線之頁面以獲取一第二資料。 Next, in step S1004, the controller 160 reads the page of the first word line in the single-order storage unit mode to obtain a second material.

接著,在步驟S1006中,當第二資料無錯誤或錯誤可更正時,控制器160將第二資料傳送予主機120;當第二資料發生無法修復之錯誤時,控制器160將相應於第一字元線之頁面標記為一損壞頁面或者將相應於第一字元線對應之一第一區塊標記為一損壞區塊。流程結束於步驟S1006。 Next, in step S1006, when the second data has no errors or the error can be corrected, the controller 160 transmits the second data to the host 120; when the second data fails to be repaired, the controller 160 corresponds to the first The page of the word line is marked as a damaged page or the first block corresponding to the first word line is marked as a damaged block. The flow ends in step S1006.

第11圖係目標頁面未經由本發明所揭露之錯誤校正方法讀取前之錯誤率模擬圖。在本模擬圖中,曲線1102係頁面未經由本發明之錯誤校正方法讀取前之錯誤位元數,曲線1104係頁面僅經由重複讀取程序後之錯誤位元數。由第11圖可知,重複讀取程序僅可降低有限之錯誤率,但仍然無法將頁面的錯誤位元數降低至可讀取的程度。 Fig. 11 is a simulation diagram of the error rate before the target page is not read by the error correction method disclosed in the present invention. In the simulation diagram, the curve 1102 is the number of error bits before the page is read by the error correction method of the present invention, and the curve 1104 is the number of error bits after the page is read only by repeating the program. As can be seen from Figure 11, the repeated reading process can only reduce the limited error rate, but it still cannot reduce the number of error bits of the page to a readable level.

第12圖係目標頁面經由本發明所揭露之錯誤校正方法讀取後之錯誤率模擬圖。在本模擬圖中,曲線1202係頁面僅經由校正電壓分佈程序後之錯誤位元數,曲線1204係頁面經由重複讀取程序以及校正電壓分佈程序後之錯誤位元數。由第12圖可知,校正電壓分佈程序可大幅降低頁面之錯誤率。另外,在執行校正電壓分佈程序以及重複讀取程序後,可更進一步地降低頁面之錯誤率。 Fig. 12 is a simulation diagram of the error rate after the target page is read by the error correction method disclosed in the present invention. In the simulation diagram, the curve 1202 is the number of error bits after the page is corrected only by the correction voltage distribution program, and the curve 1204 is the number of error bits after the page is read through the repeated reading program and the correction voltage distribution program. As can be seen from Fig. 12, the correction voltage distribution program can greatly reduce the error rate of the page. In addition, after performing the correction voltage distribution program and repeating the reading process, the error rate of the page can be further reduced.

由上述可知,本發明所提供之資料儲存裝置140以及錯誤校正方法可藉由校正電壓分佈程序,以非單階儲存單元模式校正目標頁面之電壓分佈。另外,重複讀取程序可對目標頁面進行重複讀取(Read Retry),以根據不同之讀取電壓讀取 目標頁面之資料。 It can be seen from the above that the data storage device 140 and the error correction method provided by the present invention can correct the voltage distribution of the target page in a non-single-order storage unit mode by correcting the voltage distribution program. In addition, the repeat reader can read the target page repeatedly (Read Retry) to read according to different read voltages. Information on the target page.

本發明之方法,或特定型態或其部份,可以以程式碼的型態存在。程式碼可儲存於實體媒體,如軟碟、光碟片、硬碟、或是任何其他機器可讀取(如電腦可讀取)儲存媒體,亦或不限於外在形式之電腦程式產品,其中,當程式碼被機器,如電腦載入且執行時,此機器變成用以參與本發明之裝置。程式碼也可透過一些傳送媒體,如電線或電纜、光纖、或是任何傳輸型態進行傳送,其中,當程式碼被機器,如電腦接收、載入且執行時,此機器變成用以參與本發明之裝置。當在一般用途處理單元實作時,程式碼結合處理單元提供一操作類似於應用特定邏輯電路之獨特裝置。 The method of the invention, or a particular type or portion thereof, may exist in the form of a code. The code can be stored in a physical medium such as a floppy disk, a CD, a hard disk, or any other machine readable (such as computer readable) storage medium, or is not limited to an external form of computer program product, wherein When the code is loaded and executed by a machine, such as a computer, the machine becomes a device for participating in the present invention. The code can also be transmitted via some transmission medium, such as a wire or cable, fiber optics, or any transmission type, where the machine becomes part of the program when it is received, loaded, and executed by a machine, such as a computer. Invented device. When implemented in a general purpose processing unit, the code combination processing unit provides a unique means of operation similar to application specific logic.

惟以上所述者,僅為本發明之較佳實施例而已,當不能以此限定本發明實施之範圍,即大凡依本發明申請專利範圍及發明說明內容所作之簡單的等效變化與修飾,皆仍屬本發明專利涵蓋之範圍內。另外本發明的任一實施例或申請專利範圍不須達成本發明所揭露之全部目的或優點或特點。此外,摘要部分和標題僅是用來輔助專利文件搜尋之用,並非用來限制本發明之權利範圍。 The above is only the preferred embodiment of the present invention, and the scope of the invention is not limited thereto, that is, the simple equivalent changes and modifications made by the scope of the invention and the description of the invention are All remain within the scope of the invention patent. In addition, any of the objects or advantages or features of the present invention are not required to be achieved by any embodiment or application of the invention. In addition, the abstract sections and headings are only used to assist in the search of patent documents and are not intended to limit the scope of the invention.

100‧‧‧電子系統 100‧‧‧Electronic system

120‧‧‧主機 120‧‧‧Host

140‧‧‧資料儲存裝置 140‧‧‧Data storage device

160‧‧‧控制器 160‧‧‧ Controller

162‧‧‧運算單元 162‧‧‧ arithmetic unit

164‧‧‧永久記憶體 164‧‧‧Permanent memory

180‧‧‧快閃記憶體 180‧‧‧Flash memory

Claims (28)

一種資料儲存裝置,包括:一快閃記憶體,用以操作於一單階儲存單元模式以及一非單階儲存單元模式;以及一控制器,用以在上述單階儲存單元模式下,根據一主機之一讀取命令對上述快閃記憶體中相應於一第一字元線之一頁面進行一第一次讀取動作,並且當上述第一次讀取動作讀取相應於上述第一字元線之上述頁面發生無法藉由編解碼進行修復之錯誤時,用以執行一校正電壓分佈程序,其中在上述校正電壓分佈程序中,上述控制器致使上述快閃記憶體切換至上述非單階儲存單元模式,並且在上述非單階儲存單元模式下,將一第一數位邏輯1寫入相應於上述第一字元線之一最高有效位元頁面,以校正相應於上述第一字元線之記憶體儲存單元的電壓分佈。 A data storage device includes: a flash memory for operating in a single-stage storage unit mode and a non-single-order storage unit mode; and a controller for operating in the single-stage storage unit mode The one read command of the host performs a first read operation on the page corresponding to one of the first character lines in the flash memory, and when the first read operation reads the first word When the above-mentioned page of the meta-line fails to be repaired by the codec, a correction voltage distribution program is executed, wherein in the correction voltage distribution program, the controller causes the flash memory to switch to the non-single-order Storing the unit mode, and in the non-single-order storage unit mode, writing a first digit logic 1 to the most significant bit page corresponding to one of the first word lines to correct corresponding to the first word line The voltage distribution of the memory storage unit. 根據申請專利範圍第1項之資料儲存裝置,其中上述非單階儲存單元模式係為一二階儲存單元模式。 According to the data storage device of claim 1, wherein the non-single-order storage unit mode is a second-order storage unit mode. 根據申請專利範圍第2項之資料儲存裝置,其中上述控制器更用以在上述校正電壓分佈程序中,在上述第一數位邏輯1寫入上述最高有效位元頁面後,致使上述快閃記憶體回復至上述單階儲存單元模式,並且在上述單階儲存單元模式下,再對相應於上述第一字元線之上述頁面進行一第二次讀取動作。 The data storage device of claim 2, wherein the controller is further configured to: after the first digital logic 1 writes the most significant bit page in the calibration voltage distribution program, causing the flash memory to be Reverting to the single-stage storage unit mode, and in the single-stage storage unit mode, performing a second reading operation on the page corresponding to the first word line. 根據申請專利範圍第3項之資料儲存裝置,其中上述控制器更用以當上述第二次讀取動作讀取相應於上述第一字元線 之上述頁面發生無法藉由編解碼進行修復之錯誤時,將相應於上述第一字元線之上述頁面標記為一損壞頁面。 The data storage device of claim 3, wherein the controller is further configured to read the first character line when the second reading operation is performed When the above page fails to be repaired by the codec, the page corresponding to the first word line is marked as a damaged page. 根據申請專利範圍第1項之資料儲存裝置,其中上述非單階儲存單元模式係為一三階儲存單元模式。 The data storage device of claim 1, wherein the non-single-order storage unit mode is a third-order storage unit mode. 根據申請專利範圍第5項之資料儲存裝置,其中上述控制器更用以在上述校正電壓分佈程序中,在上述三階儲存單元模式下,將一第二數位邏輯1寫入相應於上述第一字元線之一中央有效位元頁面,以校正相應於上述第一字元線之記憶體儲存單元的電壓分佈。 The data storage device of claim 5, wherein the controller is further configured to write a second digit logic 1 corresponding to the first in the third-order storage unit mode in the calibration voltage distribution program A central effective bit page of one of the word lines to correct the voltage distribution of the memory storage unit corresponding to the first word line. 根據申請專利範圍第6項之資料儲存裝置,其中上述控制器更用以在上述校正電壓分佈程序中,在上述第二數位邏輯1寫入上述最高有效位元頁面以及上述中央有效位元頁面後,致使上述快閃記憶體回復至上述單階儲存單元模式,並且在上述單階儲存單元模式下,再對相應於上述第一字元線之上述頁面進行一第二次讀取動作。 The data storage device of claim 6, wherein the controller is further configured to: after the second digit logic 1 writes the most significant bit page and the central valid bit page in the calibration voltage distribution program And causing the flash memory to return to the single-stage storage unit mode, and performing a second reading operation on the page corresponding to the first word line in the single-stage storage unit mode. 根據申請專利範圍第7項之資料儲存裝置,其中上述控制器更用以當上述第二次讀取動作讀取相應於上述第一字元線之上述頁面發生無法藉由編解碼進行修復之錯誤時,將相應於上述第一字元線之上述頁面標記為一損壞頁面。 According to the data storage device of claim 7, wherein the controller is further configured to: when the second reading operation reads the page corresponding to the first character line, an error cannot be repaired by the codec. When the page corresponding to the first word line is marked as a damaged page. 根據申請專利範圍第1項之資料儲存裝置,其中當上述第一次讀取動作讀取相應於上述第一字元線之上述頁面發生無法藉由編解碼進行修復之錯誤時,上述控制器更用以在上述校正電壓分佈程序前執行一重複讀取程序,其中在上述重複讀取程序中,上述控制器用以根據一重複讀取表,對 上述快閃記憶體中之一暫存器進行一電壓設定動作,以將上述暫存器中之數值,作為上述快閃記憶體之讀取電壓。 According to the data storage device of claim 1, wherein the controller is further configured to detect an error that cannot be repaired by codec when the first read operation reads the page corresponding to the first word line And a repeating reading program is executed before the correcting voltage distribution program, wherein in the repeating reading program, the controller is configured to read the table according to a repeat One of the flash memories performs a voltage setting operation to set the value in the register as the read voltage of the flash memory. 根據申請專利範圍第5項之資料儲存裝置,其中上述控制器更用以在上述重複讀取程序中,藉由所設定之上述快閃記憶體之讀取電壓對相應於上述第一字元線之上述頁面進行一第二次讀取動作,並將一重複讀取計數加一。 The data storage device of claim 5, wherein the controller is further configured to, in the repeat reading process, set the read voltage pair of the flash memory to correspond to the first word line The above page performs a second read operation and increments a repeated read count by one. 根據申請專利範圍第10項之資料儲存裝置,其中在上述重複讀取程序中,上述控制器更用以判斷上述重複讀取計數是否超過一第一既定值,並當上述重複讀取計數超過上述第一既定值時,進行上述校正電壓分佈程序。 The data storage device of claim 10, wherein in the repeating reading process, the controller is further configured to determine whether the repeated reading count exceeds a first predetermined value, and when the repeated reading count exceeds the above When the first predetermined value is used, the above-described corrected voltage distribution program is performed. 一種錯誤校正方法,適用於一資料儲存裝置,其中上述資料儲存裝置包含一快閃記憶體用以操作於一單階儲存單元模式以及一非單階儲存單元模式,上述錯誤校正方法包括:在上述單階儲存單元模式下,根據一主機之一讀取命令對上述快閃記憶體中相應於一第一字元線之一頁面進行一第一次讀取動作;判斷上述第一次讀取動作讀取上述第一頁面時,是否發生無法藉由編解碼進行修復之錯誤;以及當上述第一次讀取動作讀取相應於上述第一字元線之上述頁面發生無法藉由編解碼進行修復之錯誤時,執行一校正電壓分佈程序,其中上述校正電壓分佈程序包括:致使上述快閃記憶體切換至上述非單階儲存單元模式;以及 在上述非單階儲存單元模式下,將一第一數位邏輯1寫入相應於上述第一字元線之一最高有效位元頁面,以校正相應於上述第一字元線之記憶體儲存單元的電壓分佈。 An error correction method is applicable to a data storage device, wherein the data storage device comprises a flash memory for operating in a single-order storage unit mode and a non-single-order storage unit mode, wherein the error correction method comprises: In the single-stage storage unit mode, performing a first reading operation on a page corresponding to a first character line in the flash memory according to a read command of a host; determining the first reading action When the first page is read, whether an error cannot be repaired by the codec occurs; and when the first read operation reads the page corresponding to the first word line, the page cannot be repaired by the codec. In the case of an error, a calibration voltage distribution program is executed, wherein the correction voltage distribution program includes: causing the flash memory to switch to the non-single-order storage unit mode; In the non-single-order memory cell mode, writing a first digit logic 1 to a most significant bit page corresponding to one of the first word lines to correct a memory storage unit corresponding to the first word line Voltage distribution. 根據申請專利範圍第12項之錯誤校正方法,其中上述非單階儲存單元模式係為一二階儲存單元模式。 According to the error correction method of claim 12, wherein the non-single-order storage unit mode is a second-order storage unit mode. 根據申請專利範圍第13項之錯誤校正方法,其中上述校正電壓分佈程序之步驟更包括:在上述第一數位邏輯1寫入上述最高有效位元頁面後,致使上述快閃記憶體回復至上述單階儲存單元模式;以及在上述單階儲存單元模式下,再對相應於上述第一字元線之上述頁面進行一第二次讀取動作。 According to the error correction method of claim 13, wherein the step of correcting the voltage distribution program further comprises: after the first digital logic 1 writes the most significant bit page, causing the flash memory to return to the single a storage unit mode; and in the single-stage storage unit mode, performing a second reading operation on the page corresponding to the first word line. 根據申請專利範圍第14項之錯誤校正方法,其中上述校正電壓分佈程序之步驟更包括當上述第二次讀取動作讀取相應於上述第一字元線之上述頁面發生無法藉由編解碼進行修復之錯誤時,將相應於上述第一字元線之上述頁面標記為一損壞頁面。 According to the error correction method of claim 14, wherein the step of correcting the voltage distribution program further comprises: when the second reading operation reads the page corresponding to the first word line, the encoding cannot be performed by codec When the error is fixed, the above page corresponding to the first word line is marked as a damaged page. 根據申請專利範圍第12項之錯誤校正方法,其中上述非單階儲存單元模式係為一三階儲存單元模式。 According to the error correction method of claim 12, wherein the non-single-order storage unit mode is a third-order storage unit mode. 根據申請專利範圍第16項之錯誤校正方法,其中上述校正電壓分佈程序之步驟更包括在上述三階儲存單元模式下,將一第二數位邏輯1寫入相應於上述第一字元線之一中央有效位元頁面,以校正相應於上述第一字元線之記憶體儲存單元的電壓分佈。 According to the error correction method of claim 16, wherein the step of correcting the voltage distribution program further comprises writing a second digit logic 1 to one of the first word lines in the third-order storage unit mode. The central effective bit page is for correcting the voltage distribution of the memory storage unit corresponding to the first word line. 根據申請專利範圍第17項之錯誤校正方法,其中上述校正 電壓分佈程序之步驟更包括:在上述第二數位邏輯1寫入上述最高有效位元頁面以及上述中央有效位元頁面後,致使上述快閃記憶體回復至上述單階儲存單元模式;以及在上述單階儲存單元模式下,再對相應於上述第一字元線之上述頁面進行一第二次讀取動作。 According to the error correction method of claim 17 of the scope of patent application, wherein the above correction The step of the voltage distribution program further includes: after the second digit logic 1 writes the most significant bit page and the central effective bit page, causing the flash memory to return to the single-stage storage unit mode; In the single-stage storage unit mode, a second reading operation is performed on the page corresponding to the first word line. 根據申請專利範圍第18項之錯誤校正方法,其中上述校正電壓分佈程序之步驟更包括當上述第二次讀取動作讀取相應於上述第一字元線之上述頁面發生無法藉由編解碼進行修復之錯誤時,將相應於上述第一字元線之上述頁面標記為一損壞頁面。 According to the error correction method of claim 18, wherein the step of correcting the voltage distribution program further comprises: when the second reading operation reads the page corresponding to the first word line, the codec cannot be performed by codec When the error is fixed, the above page corresponding to the first word line is marked as a damaged page. 根據申請專利範圍第12項之錯誤校正方法,更包括當上述第一次讀取動作讀取相應於上述第一字元線之上述頁面發生無法藉由編解碼進行修復之錯誤時,在上述校正電壓分佈程序前執行一重複讀取程序,其中上述重複讀取程序包括根據一重複讀取表,對上述快閃記憶體中之一暫存器進行一電壓設定動作,以將上述暫存器中之數值,作為上述快閃記憶體之讀取電壓。 According to the error correction method of claim 12, the method further includes: when the first reading operation reads an error corresponding to the page of the first character line and cannot be repaired by codec, Performing a repeated reading process before the voltage distribution program, wherein the repeating reading program includes performing a voltage setting action on one of the flash memory in the flash memory according to a repeated reading table to be used in the temporary register The value is used as the read voltage of the above flash memory. 根據申請專利範圍第20項之錯誤校正方法,其中上述重複讀取程序之步驟更包括藉由所設定之上述快閃記憶體之讀取電壓對相應於上述第一字元線之上述頁面進行一第二次讀取動作,並將一重複讀取計數加一。 According to the error correction method of claim 20, wherein the step of repeating the reading process further comprises: performing, by setting the read voltage of the flash memory, a page corresponding to the first word line; The second read action, and a repeat read count is incremented by one. 根據申請專利範圍第21項之錯誤校正方法,其中上述重複讀取程序之步驟更包括: 判斷上述重複讀取計數是否超過一第一既定值;以及當上述重複讀取計數超過上述第一既定值時,進行上述校正電壓分佈程序。 According to the error correction method of claim 21, wherein the step of repeatedly reading the program further comprises: Determining whether the repeated read count exceeds a first predetermined value; and when the repeated read count exceeds the first predetermined value, performing the corrected voltage distribution procedure. 一種資料讀取方法,適用於一資料儲存裝置,其中上述資料儲存裝置包含一快閃記憶體用以操作於一單階儲存單元模式以及一多階儲存單元模式,上述資料讀取方法包括:在上述單階儲存單元模式下,根據一主機之一讀取命令對上述快閃記憶體中相應於一第一字元線之一頁面進行一第一次讀取動作以獲取一第一資料;當上述第一資料發生無法修復之錯誤時,致使上述快閃記憶體切換至上述多階儲存單元模式;以及在上述多階儲存單元模式下,將一預設資料寫入相應於上述第一字元線之一最高有效位元頁面;致使上述快閃記憶體切換至上述單階儲存單元模式;以及再次讀取上述第一字元線之上述頁面以獲取一第二資料。 A data reading method is applicable to a data storage device, wherein the data storage device comprises a flash memory for operating in a single-stage storage unit mode and a multi-level storage unit mode, wherein the data reading method comprises: In the single-stage storage unit mode, a first reading operation is performed on a page corresponding to a first character line in the flash memory according to a read command of a host to obtain a first data; When the first data fails to be repaired, the flash memory is switched to the multi-level storage unit mode; and in the multi-level storage unit mode, a preset data is written corresponding to the first character. One of the most significant bit pages of the line; causing the flash memory to switch to the single-stage memory cell mode; and reading the page of the first word line again to obtain a second data. 根據申請專利範圍第23項之資料讀取方法,其中上述預設資料為0xFF。 According to the data reading method of claim 23, wherein the preset data is 0xFF. 根據申請專利範圍第23項之資料讀取方法,更包含:當上述第二資料無錯誤或錯誤可更正時,將上述第二資料傳送予上述主機。 According to the data reading method of claim 23, the method further includes: transmitting the second data to the host when the second data is error-free or the error can be corrected. 根據申請專利範圍第23項之資料讀取方法,更包含:當上述第二資料發生無法修復之錯誤時,將相應於上述第一字元線之上述頁面標記為一損壞頁面。 According to the data reading method of claim 23, the method further includes: when the second data fails to be repaired, marking the page corresponding to the first character line as a damaged page. 根據申請專利範圍第23項之資料讀取方法,更包含: 當上述第二資料發生無法修復之錯誤時,將相應於上述第一字元線對應之一第一區塊標記為一損壞區塊。 According to the data reading method of the 23rd patent application scope, the method further includes: When the second data fails to be repaired, the first block corresponding to the first character line is marked as a damaged block. 一種資料讀取方法,適用於一資料儲存裝置,其中上述資料儲存裝置包含一快閃記憶體用以操作於一單階儲存單元模式以及一多階儲存單元模式,上述資料讀取方法包括:根據一主機之一讀取命令對上述快閃記憶體中相應於一第一字元線之一頁面進行上述單階儲存單元模式的一第一次讀取動作以獲取一第一資料;當上述第一資料發生無法修復之錯誤時,將一預設資料以上述多階儲存單元模式寫入相應於上述第一字元線之一最高有效位元頁面;以上述單階儲存單元模式讀取上述第一字元線之上述頁面以獲取一第二資料;以及當上述第二資料無錯誤或錯誤可更正時,將上述第二資料傳送予上述主機。 A data reading method is applicable to a data storage device, wherein the data storage device comprises a flash memory for operating in a single-stage storage unit mode and a multi-level storage unit mode, wherein the data reading method comprises: a host read command performs a first read operation of the single-stage storage unit mode on a page corresponding to a first word line in the flash memory to obtain a first data; When an error occurs that cannot be repaired, a predetermined data is written into the most significant bit page corresponding to one of the first word lines in the multi-level storage unit mode; and the above-mentioned first-order storage unit mode is read. The above page of the word line is used to obtain a second data; and when the second data has no error or the error can be corrected, the second data is transmitted to the host.
TW102145065A 2013-05-31 2013-12-09 Data storage device and method for error correction and data reading thereof TWI527050B (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201410081026.3A CN104217762B (en) 2013-05-31 2014-03-06 Data storage device and error correction method and data reading method thereof
US14/271,928 US9274893B2 (en) 2013-05-31 2014-05-07 Data storage device and error correction method thereof
KR1020140066289A KR101557389B1 (en) 2013-05-31 2014-05-30 Data storage device and error correction method thereof
US15/005,272 US9697076B2 (en) 2013-05-31 2016-01-25 Data storage device and error correction method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US201361829491P 2013-05-31 2013-05-31

Publications (2)

Publication Number Publication Date
TW201445575A TW201445575A (en) 2014-12-01
TWI527050B true TWI527050B (en) 2016-03-21

Family

ID=52707155

Family Applications (1)

Application Number Title Priority Date Filing Date
TW102145065A TWI527050B (en) 2013-05-31 2013-12-09 Data storage device and method for error correction and data reading thereof

Country Status (1)

Country Link
TW (1) TWI527050B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI544490B (en) 2015-02-05 2016-08-01 慧榮科技股份有限公司 Data storage device and data maintenance method thereof

Also Published As

Publication number Publication date
TW201445575A (en) 2014-12-01

Similar Documents

Publication Publication Date Title
CN104217762B (en) Data storage device and error correction method and data reading method thereof
TWI607312B (en) Data storage device and data writing method thereof
TWI623937B (en) Updating read voltages
TWI621129B (en) Data storage device and data writing method thereof
JP5943395B2 (en) Memory controller and data storage device
US9543983B2 (en) Decoding method, memory storage device and memory control circuit unit
TWI571742B (en) Data storage device and data maintenance method
US20160103631A1 (en) Non-volatile memory devices and control methods therefor
US9136875B2 (en) Decoding method, memory storage device and rewritable non-volatile memory module
CN106708754B (en) Data storage device and data maintenance method thereof
KR102070667B1 (en) Method of operating a nonvolatile memory device
US9257187B2 (en) Data storing method, memory control circuit unit and memory storage apparatus
TWI523025B (en) Data storage device and error correction method thereof
CN104217761B (en) Data storage device and error correction method thereof
US20170255523A1 (en) Non-volatile memory devices and controllers
TWI631456B (en) Data storage device and data maintenance method
US10340023B1 (en) Method and system for determining bit values in non-volatile memory
US9697892B1 (en) Generation and application of gray codes
TWI527050B (en) Data storage device and method for error correction and data reading thereof
TWI566094B (en) Data storage device and data refresh method thereof
TWI640868B (en) Data storage device and data writing method thereof
TWI515729B (en) Data storage device and error correction method thereof
TWI544490B (en) Data storage device and data maintenance method thereof
TWI691967B (en) Decoding method and associated flash memory controller and electronic device
TWI592801B (en) Data storage device and data maintenance method thereof