TW201003399A - Flash memory card and method for securing a flash memory against data damage - Google Patents

Flash memory card and method for securing a flash memory against data damage Download PDF

Info

Publication number
TW201003399A
TW201003399A TW97141754A TW97141754A TW201003399A TW 201003399 A TW201003399 A TW 201003399A TW 97141754 A TW97141754 A TW 97141754A TW 97141754 A TW97141754 A TW 97141754A TW 201003399 A TW201003399 A TW 201003399A
Authority
TW
Taiwan
Prior art keywords
page
data
flash memory
strong
weak
Prior art date
Application number
TW97141754A
Other languages
Chinese (zh)
Other versions
TWI386803B (en
Inventor
Wei-Yi Hsiao
Original Assignee
Silicon Motion Inc
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 Silicon Motion Inc filed Critical Silicon Motion Inc
Priority to US12/400,149 priority Critical patent/US8074012B2/en
Publication of TW201003399A publication Critical patent/TW201003399A/en
Application granted granted Critical
Publication of TWI386803B publication Critical patent/TWI386803B/en

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

When a controller completes writing data to a plurality of pages of a first block of a flash memory, the pages are searched to determine a last weak page. A first strong page corresponding to the last weak page is then determined. A plurality of strong pages between the first strong page and the last weak page are then determined. Finally, data of the strong pages are copied to a backup area of the flash memory for data recovery.

Description

201003399 九、發明說明: 【發明所屬之技術^領域】 本發明係有關於記憶卡,特別是有關於快閃記憶卡。 【先前技術】 目前許多的電子裝置如數位像機與手機皆使用快閃記 憶體以儲存資料。一 NAND型快閃記憶體包括多個區塊 (block),每一區塊又包含多個分頁(page)。該多個分頁又可 區分為強分頁(strong page)與弱分頁(weak page)。所謂強分 頁,係指該分頁被寫入資料時的編程忙碌時間(program busy time)較短。反之,所謂弱分頁,係指該分頁被寫入資 料時所需的編程忙碌時間較長。 第1圖顯示一 NAND型快閃記憶體之一區塊100所包 含的複數分頁示意圖。區塊100包括多個分頁。於分頁0〜 分頁9中,可見分頁0、1、2、3、6、7為強分頁,而分頁 4、5、8、9為弱分頁。此外,每一強分頁有一與其相對應 的弱分頁,每一弱分頁有一與其相對應的強分頁。例如, 強分頁0與弱分頁4相對應,強分頁2與弱分頁8相對應, 弱分頁9與強分頁3相對應。因此一區塊又包含多個分頁 呈兩兩對應之關係。 有對應關係的強分頁與弱分頁受編程寫入資料時會相 互影響。由於強分頁所需的編程忙碌時間較短,當強分頁 受編程時發生錯誤,例如斷電時,與該強分頁對應的弱分 頁通常不會受影響。反之,由於弱分頁所需的編程忙綠時 SMI-08-021/9031-A41798-TW/Final 5 201003399 間較長,當弱分頁受編程時發生錯誤時,與該弱分頁對應 的強分頁所儲存的資料很可能被連帶影響以致發生資料損 壞。因此,需要有一種方法,能在上述資料損毀情況發生 時回復資料,以保證資料的完整性。 【發明内容】 有鑑於此,本發明之目的在於提供一種快閃記憶體預 防資料毀損的方法,以解決習知技術存在之問題。首先, 當一控制器完成寫入一筆資料至一快閃記憶體之一第一區 塊的多個分頁時,找出該等多個分頁中的一最後弱分頁 (weak page)。接著,找出與該最後弱分頁相對應之一第一 強分頁(strong page)。接著,決定介於該第一強分頁與該最 後弱分頁之間的多個強分頁。接著,複製該多個強分頁之 資料至該快閃記憶體之一備份資料儲存區,以供資料毁損 時回復資料之用。 本發明更提供一種快閃記憶卡,可預防資料毀損。於 一實施例中,該快閃記憶卡包括一快閃記憶體以及一控制 器。當完成寫入一筆資料至該快閃記憶體之一第一區塊的 多個分頁時,該控制器找出該等多個分頁中的一最後弱分 頁(weak page),找出與該最後弱分頁相對應之一第一強分 頁(strong page),決定介於該第一強分頁與該最後弱分頁之 間的多個強分頁,以及複製該多個強分頁之資料至該快閃 記憶體之一備份資料儲存區,以供資料毁損時回復資料之 用。 為了讓本發明之上述和其他目的、特徵、和優點能更 SMI-08-021/9031-A41798-TW/Final 6 201003399 明顯易懂,下文特舉數較佳實施例,並配合所附圖示,作 詳細說明如下: 【實施方式】 第2圖係依據本發明之快閃記憶卡2〇4的區塊圖。於 一實施例中,快閃記憶卡2〇4包括一控制器2〇6及一快閃 έ己憶體208。快閃記憶體2〇8包含多個區塊(bl〇ck),每個 區塊包含多個分頁(page),以儲存資料。於一實施例中,該 ( 快閃記憶體208為一 NANr)型快閃記憶體。控制器2〇6連 接至主機202 ’依據主機2〇2的指示存取快閃記憶體2〇8, 例如將主機202所傳遞的資料寫入快閃記憶體2〇8,或自 快閃圮憶體208讀取資料以回傳至主機2〇2。於一實施例 中,控制器206與快閃記憶體2〇8間耦接傳送命令之一命 令線CMD,以及傳送資料之多個資料線D〇、Db ...、Dn。 第3圖為依據本發明之備份快閃記憶體資料之方法 300之流程圖。每當控制器2〇6寫入一筆資料至快閃記憶 y 體208(步驟302) ’便檢測是否該筆資料寫入完畢(步驟 304)。於一 κ她例中,當控制器2〇6接收主機2〇2所發送 的- 0x24寫人命令’以寫人該筆資料至快閃記憶體2〇8, 便可藉偵測疋否控制器206與快閃記憶體2〇8間之資料線 D0之電位自忙碌(busy)狀態回復為待命(ready)狀態,以得 知資料寫入完畢的時間點。於另—實施例中,控制器2〇6 接收主機202所發送的一 0x25寫入命令,以寫入該筆資料 至快閃記憶體208,而可藉偵測是否控制器2〇6接收主機 202所發送的一 0x12結束命令,亦可得知資料寫入完畢的 SMI-08-021/9031-A41798-TW/Final 7 201003399 二W 胃根據不同的主機介面而 實施㈣卡為例’但不以上述實施例為限。 錄圖為本發明之快閃記憶體所儲存之區塊· =貫施例的示意圖。假設控制器鳥係將該筆資料寫入 :閃⑽體·的區塊之多個分頁〇〜4,如標號41〇 不控制裔206柄由該多個分頁〇〜4中搜尋具有最後 序^立的-最後弱分頁。料等多個分頁㈣中之最後分頁 4為-弱分頁(步驟306) ’則控制器2()6決定該最後分頁* 為該最後弱分頁。接著’控制器2〇6找出該最後弱分頁4 所對應H強分頁〇(步驟肩,並進㈣定介於最後 弱分頁4及第-強分頁〇之間的多個強分頁卜^(步驟 316)。接著,控制器206複製該多個強分頁卜2、3之次 料至快閃記憶體208之-備份資料儲存區,以供資料毁損 時回復資料之用(步驟312)。第4B圖為對應第4A圖之備 份資料儲存區450所儲存之資料的示意圖。如圖所示 份資料儲存區450儲存了強分頁1、2、3之資料。 假設控制器2〇6有下-筆資料待寫入(步驟3 i 8),並寫 入第二筆資料至快閃記憶體2〇8之區塊4〇〇(步驟狗,如 第5A圖之標號510所包含的分頁5〜1〇所示。當第二筆次 料5K)寫入完畢(步驟304),控制器2〇6便“分; 5〜10中搜尋具有最後序位的一最後弱分頁。若該等多個分 頁5〜10中之最後分頁10為一強分頁(步驟3〇6),則控制= 206以該最後分頁H)之前的一弱分頁9為最後弱分頁(步; 308) ’並找出該最後弱分頁9所對應的—第一強分頁〕(步201003399 IX. INSTRUCTIONS: [Technical Fields of the Invention] The present invention relates to a memory card, and more particularly to a flash memory card. [Prior Art] Many electronic devices such as digital cameras and mobile phones currently use flash memory to store data. A NAND type flash memory includes a plurality of blocks, each of which contains a plurality of pages. The plurality of pages can be further divided into a strong page and a weak page. The so-called strong page means that the program busy time when the page is written is shorter. Conversely, a weak page break means that the programming busy time required for the page to be written is longer. Fig. 1 shows a schematic diagram of a plurality of pages included in a block 100 of a NAND type flash memory. Block 100 includes a plurality of pages. In page 0 to page 9, it can be seen that pages 0, 1, 2, 3, 6, and 7 are strong pages, and pages 4, 5, 8, and 9 are weak pages. In addition, each strong page has a weak page corresponding to it, and each weak page has a strong page corresponding thereto. For example, strong page break 0 corresponds to weak page 4, strong page 2 corresponds to weak page 8, and weak page 9 corresponds to strong page 3. Therefore, a block contains a plurality of pages in a two-to-two correspondence. Strong pages and weak pages with corresponding relationships are affected by programming data. Due to the short programming busy time required for strong page breaks, an error occurs when strong page breaks are programmed. For example, when a power is turned off, the weak page corresponding to the strong page is usually not affected. Conversely, since the programming required for weak paging is busy green, SMI-08-021/9031-A41798-TW/Final 5 201003399 is long. When an error occurs when weak paging is programmed, the strong paging corresponding to the weak paging The stored data is likely to be affected by the joint damage. Therefore, there is a need to have a way to respond to data in the event of a data loss that occurs to ensure the integrity of the data. SUMMARY OF THE INVENTION In view of the above, an object of the present invention is to provide a method for preventing data corruption of a flash memory to solve the problems of the prior art. First, when a controller finishes writing a piece of data to a plurality of pages of a first block of one of the flash memories, it finds a last weak page of the plurality of pages. Next, find the first strong page corresponding to the last weak page. Next, a plurality of strong pages between the first strong page and the last weak page are determined. Then, copying the data of the plurality of strong pages to one of the backup data storage areas of the flash memory for replying to the data when the data is damaged. The invention further provides a flash memory card, which can prevent data damage. In one embodiment, the flash memory card includes a flash memory and a controller. When writing a piece of data to a plurality of pages of the first block of one of the flash memories, the controller finds a last weak page of the plurality of pages to find out the last page The weak page corresponds to one of the first strong pages, determines a plurality of strong pages between the first strong page and the last weak page, and copies the plurality of strong pages to the flash memory One of the backup data storage areas for data recovery when the data is damaged. In order to make the above and other objects, features, and advantages of the present invention more apparent, SMI-08-021/9031-A41798-TW/Final 6 201003399, the preferred embodiments are exemplified below, with the accompanying drawings The detailed description is as follows: [Embodiment] Fig. 2 is a block diagram of a flash memory card 2〇4 according to the present invention. In one embodiment, the flash memory card 2〇4 includes a controller 2〇6 and a flash memory 208. Flash memory 2〇8 contains a plurality of blocks (bl〇ck), each block containing a plurality of pages to store data. In one embodiment, the (flash memory 208 is a NANr) type flash memory. The controller 2〇6 is connected to the host 202' to access the flash memory 2〇8 according to the instruction of the host 2〇2, for example, writing the data transmitted by the host 202 to the flash memory 2〇8, or flashing itself. The memory 208 reads the data for transmission back to the host 2〇2. In one embodiment, the controller 206 is coupled to the flash memory 2〇8 to transmit a command line CMD, and a plurality of data lines D〇, Db, . . . Dn for transmitting data. Figure 3 is a flow diagram of a method 300 of backing up flash memory data in accordance with the present invention. Each time the controller 2〇6 writes a piece of data to the flash memory y body 208 (step 302), it detects whether the piece of data has been written (step 304). In her case, when the controller 2〇6 receives the -0x24 writer command sent by the host 2〇2 to write the data to the flash memory 2〇8, it can be detected by the control or not. The potential of the data line D0 between the flash memory 206 and the flash memory 2〇8 is restored from the busy state to the ready state to know the time point at which the data is written. In another embodiment, the controller 2〇6 receives a 0x25 write command sent by the host 202 to write the data to the flash memory 208, and can detect whether the controller 2〇6 receives the host. A 0x12 end command sent by 202 can also be known as SMI-08-021/9031-A41798-TW/Final 7 201003399. The W stomach is implemented according to different host interfaces (4) as an example 'but not It is limited to the above embodiment. The recorded picture is a block stored in the flash memory of the present invention. Assume that the controller bird writes the pen data to: a plurality of pagination 〇~4 of the block of the flash (10) body, such as the label 41 〇 does not control the patriarch 206 handle from the plurality of pagination 〇 4 search with the last order ^ Standing - the last weak page. The last page 4 of the plurality of pages (4) is a weak page (step 306) ’, then the controller 2() 6 determines that the last page* is the last weak page. Then, the controller 2〇6 finds the H strong page corresponding to the last weak page 4 (step shoulder, and enters (4) a plurality of strong pages between the last weak page 4 and the first strong page ^^ (step 316) Next, the controller 206 copies the plurality of strong page pages 2 and 3 to the backup data storage area of the flash memory 208 for replying data when the data is damaged (step 312). The figure is a schematic diagram of the data stored in the backup data storage area 450 corresponding to FIG. 4A. As shown in the figure, the data storage area 450 stores the data of the strong pages 1, 2, and 3. It is assumed that the controller 2〇6 has a lower-pen The data is to be written (step 3 i 8), and the second data is written to the block 4 of the flash memory 2〇8 (step dog, page 5 to 1 included in the reference numeral 510 of FIG. 5A) 〇. When the second sub-material 5K) is written (step 304), the controller 2〇6 “divides; 5~10 searches for a last weak page with the last order. If the multiple pages are The last page 10 in 5~10 is a strong page (step 3〇6), then control=206 is the last weak page 9 before the last page H) is the last weak page (step; 308) ’ and find the first strong page corresponding to the last weak page 9 (step

SMI-08-021/9031-A41798-TW/FinaI 8 201003399 驟308)。接著,控制器206進而決定介於最後弱 及 第-,分頁3之間的多個強分頁6、7(步驟3ι〇) Γ:::二ί::強分頁6、7之資料至快閃記憶體 208之If刀貝枓儲存區,以供資料毁損時 (步驟312)。第5B圖為對應第5A圖之備份資崎 所儲存之資料^意圖。如圖所示,除了前次错存的強分 頁1、2、3之資料以外,備份資料儲存區彻 分頁6、7之資料。 又储存了強SMI-08-021/9031-A41798-TW/FinaI 8 201003399 Step 308). Then, the controller 206 further determines a plurality of strong pages 6, 7 between the last weak and the -, page 3 (step 3 ι〇) Γ::: two ί:: strong page 6, 7 data to flash The If knife shell storage area of the memory 208 for data corruption (step 312). Fig. 5B is a view of the data stored in the backup of the subordinates of Figure 5A. As shown in the figure, in addition to the data of the strong pages 1, 2, and 3 that were previously stored, the backup data storage area is completely divided into pages 6 and 7. Also stored strong

第6圖為依據本發明之回復快閃記憶體資料毁損之方 法_之流程圖。首先,控制器206寫入資料至快閃記憶 體208之一區塊(步驟6〇2”每當控制器2〇6寫入資料時, 便偵測資料寫人過程是否發生錯誤.(步驟6G4),例如在寫入 #料時發生斷電。以第5A圖為例,假設當控制器施寫 入第三筆資料至快閃記憶體期之區塊権,且於寫入資 料至分頁13時發生斷電而產生寫入錯誤。此時,由於分頁 13為一弱分頁,與其相對應的強分頁7所儲存之資料有很 大之機率連帶發生資料損毀。 控制器206首先決定區塊4〇〇發生寫入錯誤之一第一 分頁13(步驟606)。若該第一分頁為一強分頁,其對應之 弱分頁並不會發生資料損毁之情形。此時,因該第一分頁 13為一弱分頁(步驟6〇8),控制器2〇6決定第一分頁13對 應之一第一強分頁7(步驟610)。接著,控制器206搜尋第 5B圖之備份資料儲存區45〇以得到該第一強分頁7之資料 (步驟512)。接著’控制器2〇6便可依據該第一強分頁7之Figure 6 is a flow chart of the method for recovering the data of the flash memory in accordance with the present invention. First, the controller 206 writes the data to a block of the flash memory 208 (step 6〇2). When the controller 2〇6 writes the data, it detects whether the data writer process has an error. (Step 6G4 For example, when the #料 is written, the power is turned off. Taking Figure 5A as an example, assume that when the controller writes the third data to the block of the flash memory period, and writes the data to the page 13 When a power failure occurs, a write error occurs. At this time, since the page 13 is a weak page, the data stored in the corresponding strong page 7 has a large probability of data corruption. The controller 206 first determines the block 4.之一 One of the first page 13 of the write error occurs (step 606). If the first page is a strong page, the corresponding weak page does not cause data corruption. At this time, the first page 13 For a weak page (step 6-8), the controller 2〇6 determines that the first page 13 corresponds to one of the first strong pages 7 (step 610). Next, the controller 206 searches for the backup data storage area 45 of the 5B chart. To obtain the data of the first strong page 7 (step 512). Then the controller 2〇6 can be According to the first strong page 7

SMI-08-021/903 l-A41798-TW/FinaI 9 201003399 備 <刀寅料回彳是發生資料損毁之第一強分頁之資料。 於一實施例中,控制器206取得一空白區塊,並依序 複製區塊400之資料及步驟612搜尋所得之第一強分頁7 之資料至該空白區塊(步驟614)。接著,控制器2〇6以該空 白區塊取代區塊400(步驟616)。於一實施例中,控制器2〇6 將區塊400之邏輯區塊位址對應至已儲存有回復所得資料 的空白區塊之實體區塊位址,以便取代區塊4⑽。最後, 控制器206清除資料損毁之區塊4〇〇。SMI-08-021/903 l-A41798-TW/FinaI 9 201003399 备 <Knife 彳 彳 is the first strong page of data corruption. In one embodiment, the controller 206 obtains a blank block and sequentially copies the data of the block 400 and the step 612 searches for the obtained first strong page 7 data to the blank block (step 614). Next, controller 2〇6 replaces block 400 with the blank block (step 616). In one embodiment, controller 2〇6 maps the logical block address of block 400 to the physical block address of the blank block in which the recovered data has been stored, in place of block 4 (10). Finally, the controller 206 clears the block of data corruption.

本發明於每筆資料寫入完畢後便預先備份可能發生資 料毀,分頁的資料至一備份資料儲存 損 -旦發生,料由被份資料儲存⑲ 之原始資料,ϋ進㈣錢損之_區塊貝 雖然本發明已以較佳實施例揭露如上U並非用以 神和範_,當可魅敎” 麟本發明之精 + ^文動與潤飾,因此本發明之保 護蛇圍當視後附之申請專利範圍所界定者為準。 【圖式簡單說明】 第1圖為一 數分頁示意圖; NAND型快閃記憶 體之一區塊所包含的複 憶卡的區塊圖; 閃記憶體資料之方法之 第2圖係依據本發明之快閃記 第3圖為依據本發明之備份快 流程圖; 己憶體所儲存之區塊的一實 第4A圖為本發明之快閃| 施例的不意圖; SMI-08-021 /9031-A41798-TW/Final 10 201003399 第4B圖為對應第4A圖之備份資料儲存區所儲存之資 料的不意圖, 第5A圖為本發明之快閃記憶體所儲存之區塊的另一 實施例的不意圖; 第5B圖為對應第5A圖之備份資料儲存區所儲存之資 料的示意圖;以及 第6圖為依據本發明之回復快閃記憶體資料毀損之方 法之流程圖。 ( 【主要元件符號說明】 202〜主機; 204〜快閃記憶卡; 206〜控制器; 208〜快閃記憶體。 SMI-08-021/903 l-A41798-TW/Final 11The invention pre-backs up the data destruction after each data is written, and the paged data to a backup data storage loss occurs, and it is expected that the original data of the stored data 19 is broken into (4) the money loss area Although the present invention has been disclosed in the preferred embodiment, the above U is not used for God and Fan _, and when the enchanting of the invention is in accordance with the essence of the invention, the protection of the snake is attached to it. The definition of the scope of the patent application shall prevail. [Simplified description of the drawing] Figure 1 is a schematic diagram of a number of pages; a block diagram of a memory card included in one block of the NAND flash memory; Figure 2 is a flash flow chart according to the present invention according to the flash chart of the present invention; a real 4A picture of the block stored in the memory of the present invention is a flash of the present invention | Intent; SMI-08-021 /9031-A41798-TW/Final 10 201003399 Figure 4B is a schematic diagram corresponding to the data stored in the backup data storage area of Figure 4A, and Figure 5A is a flash memory of the present invention. Not intending another embodiment of the stored block; Figure 5B A schematic diagram of the data stored in the backup data storage area corresponding to FIG. 5A; and FIG. 6 is a flow chart of the method for recovering the flash memory data according to the present invention. ( [Main component symbol description] 202~host; 204~ flash memory card; 206~ controller; 208~ flash memory. SMI-08-021/903 l-A41798-TW/Final 11

Claims (1)

201003399 十、申請專利範圍: 1. 一種快閃記憶體預防資料毁損 驟: J万去,包括下列步 當一控制器完成寫入一筆資料至一 :塊的多個分頁時’找出該等多個分頁中:=二第 頁(weak page); 取後弱刀 找出與該最後弱分頁相對應之—一 page); 弟強分頁(strong 決定介於該第-強分頁與該最後弱分頁之 分頁,以及 y w 複製該多個強分頁之資料至該快閃記憶體之-備份資 料儲存區,以供資料毀損時回復資料之用。 ^月專利範圍第i項所述之快閃記憶體預防資料 毁抽的方法,其中找出該最後弱分頁之步驟包括: 找出該等多個分頁中的一最後分頁; ί %, 右該取後分頁為弱分頁,則決定該最後分頁為該最後 弱分頁;以及 右該最後分頁為強分頁,則決定該最後分頁之前的一 弱分頁為該最後弱分頁。 3.如申請專利範圍第丨項所述之快閃記憶體預防資料 毁損的方法,其中當該控制器接收- 0x24寫入命令以寫入 該筆資料至该快閃記憶體,而該筆資料之寫入的完成係偵 測疋否該控制器與該快閃記憶體之一資料線之電位自—忙 碌(busy)狀態回復為—待命(ready)狀態'。 SMI-08-021/9031-A41798-TW/Final 12 201003399 請專利範圍第1項所述之快閃記憶體預防資料 測是否該控;器接=;2=^之寫入的完成係偵 毁損=請==述,記憶體預防資料 之㈣料寫^該快閃記憶體之該第—區塊 一弱分頁=、雜發生錯辦,檢查是否該第二分頁為 之第分頁為-弱分頁,找出與該第二分頁相對應 資料搜::備份資料儲存區,以得到該第二強分頁之備份 料。依據該第二強分頁之備份資料回復該第二強分頁之資201003399 X. Patent application scope: 1. A flash memory to prevent data damage: J Wan goes, including the following steps: When a controller finishes writing a piece of data to one: multiple pages of the block, 'find out more In the tabs: = two pages (weak page); take the weak knife to find the corresponding page corresponding to the last weak page - a page); brother strong page (strong decides between the first - strong page and the last weak page The paging, and yw copy the data of the plurality of strong pages to the backup data storage area of the flash memory for replying to the data when the data is damaged. ^The flash memory described in item i of the monthly patent range The method for preventing data destruction, wherein the step of finding the last weak page comprises: finding a last page of the plurality of pages; ί%, right, and then dividing the page into a weak page, determining that the last page is the The last weak page; and the right last page is a strong page, then a weak page before the last page is determined as the last weak page. 3. A method for preventing data corruption in flash memory as described in the scope of the patent application. Wherein the controller receives a -0x24 write command to write the pen data to the flash memory, and the completion of the writing of the data is detected by the controller and one of the flash memories The potential of the data line is restored from the busy state to the "ready" state. SMI-08-021/9031-A41798-TW/Final 12 201003399 Please refer to the flash memory prevention described in item 1 of the patent scope. Whether the data is measured or not; the connection is completed; the completion of the writing of the 2=^ is detected by the damage = please == said, the memory prevention data is (4) the material is written ^ the flash memory of the first block is weakly paged =, miscellaneous miscellaneous, check whether the second page is the first page is - weak page, find the data corresponding to the second page search:: backup data storage area to get the second strong page Backup material. Respond to the second strong page by the backup data of the second strong page 毁損的範圍第5項所述之快閃記憶體預防資歩 敗β中5亥弟二強分頁之資料之回復步驟包括: 取侍一空白之第二區塊; =第-區塊之資料及自該備份資料儲存區所得到的 弟一強/刀頁之備份資料寫入該第二區塊; 以該第二區塊取代該第一區塊;以及 〉月除该第一區塊。 申料鄉圍第6項所述之_記㈣預防資料 又貝的方法’其中以該第二區塊取代該第一區塊之步驟包 SMI-08-021/9031-Α41798-TW/Final 13 201003399 區塊之邏輯區塊位址對應至該第二區塊之實體 毁損8的範圍第1項所述之快閃記憶體預_^^ *頁需要較長的頁需要較短的編程時間,而該弱 毀二二申請甘專利卿1項所述之快閃記憶體預防資料 ίί的,,其中該第-區塊之每-分頁可為弱分頁或強 二分頁有一與其相對應的強分頁,其中當該 頁相對庫:一弱分頁的過程發生錯誤時,與該弱分 ί應之额分頁有極大解會發生資料毁損。 料毀1销述之㈣記憶體預防資 體。、其中該快閃記憶體為一 NAND型快閃記憶 u. -種快閃記憶卡,可預防資料毁損,包括: 一快閃記憶體;以及 第—成寫人—筆資料至該快閃記憶體之一 八:白勺多個分頁時,找出該等多個分頁中的-最後弱 八百eak page) ’找出與該最後弱分頁相對應之一第一強 I Η :Γ:7卵㈣,決定介於該第一強分頁與該最後弱分頁 門·ν ^固強'刀頁’以及複製該多個強分頁之資料至該快 憶…備份資料儲存區’以供資料毁損時回復資料 之用。 12.如申請專利範圍第u項所述之快閃記憶卡,其中 制器先找出該等多個分頁中的一最後分頁,若該最後 SMI-〇8-〇21/9〇31-A41798-TW/Final 14 201003399 分頁為弱分頁則決定該最後分頁為該最後弱分頁,若該最 後分頁為強分頁則決定該最後分頁之前的一弱分頁為該最 後弱分頁,以達成找出該最後弱分頁。 13. 如申請專利範圍第11項所述之快閃記憶卡,其中 當該控制器接收一 0x24寫入命令以寫入該筆資料至該快 閃記憶體,而該筆資料之寫入的完成係偵測是否該控制器 與該快閃記憶體之一資料線之電位自一忙碌(busy)狀態回 復為一待命(ready)狀態。 14. 如申請專利範圍第11項所述之快閃記憶卡,其中 當該控制器接收一 0x25寫入命令以寫入該筆資料至該快 閃記憶體,而該筆資料之寫入的完成係偵測是否該控制器 接收一 0x12結束命令。 15. 如申請專利範圍第11項所述之快閃記憶卡,其中 當該控制器將資料寫入至該快閃記憶體之該第一區塊之一 第二分頁的過程發生錯誤時,該控制器檢查是否該第二分 頁為一弱分頁,若該第二分頁為一弱分頁,則該控制器找 出與該第二分頁相對應之第二強分頁,搜尋該備份資料儲 存區以得到該第二強分頁之備份貪料’並依據該第二強分 頁之備份資料回復該第二強分頁之資料。 16. 如申請專利範圍第15項所述之快閃記憶卡,其中 該控制器首先取得一空白之第二區塊,將該第一區塊之資 料及自該備份資料儲存區所得到的該第二強分頁之備份資 料寫入該第二區塊,以該第二區塊取代該第一區塊,接著 清除該第一區塊,以達成回復該第二強分頁之資料。 SMI-08-021 /9031-A41798-TW/Final 15 201003399 士申明專利範圍第16項所述之伊門 文中 之杏心—區塊之邏輯區塊位址對應至該第二區塊 只;、位址’以達成將該第二區塊取代該第一區塊。 該強八百^申請專利範圍第1 1項所述之快閃記憶卡,其中 程時I] f而要較_編程時間,而該11分頁需要較長的編 19.如申請專利範圍第u項所述之快閃記憶卡,其中 =一區塊之每一分頁可為弱分頁或強分頁,而每一弱分 二有一與其相對應的強分頁,其中當該控制器將資料寫入 一弱分頁的過程發生錯誤時,與該弱分頁相對應之該強八 頁有極大機率會發生資料毁損。 刀 二20.如申請專利範圍第u項所述之快閃記憶卡,其 該快閃記憶體為一 NAND型快閃記憶體。 一 SMI-08-021 /9031-A41798-TW/Final 16The recovery steps of the data in the flash memory prevention category in the fifth item of the 5th Haidi second page of the damages included in the scope of the damage include: the second block of the blank; the data of the block - The backup data of the brother/strong page obtained from the backup data storage area is written into the second block; the first block is replaced by the second block; and > the first block is deleted. ____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ 201003399 The logical block address of the block corresponds to the range of the physical damage 8 of the second block. The flash memory pre-_^^ * page described in item 1 requires a shorter page and requires a shorter programming time. And the weakly ruined two applications of the flash memory prevention data ίί, wherein the per-page of the first block may be a weak page or a strong page has a strong page corresponding thereto , when the page is relative to the library: a weak page breaks the process, and the weak scores have a significant solution to the data corruption. It is expected to destroy (4) memory prevention assets. The flash memory is a NAND flash memory. A flash memory card can prevent data corruption, including: a flash memory; and a first-written person-pen data to the flash memory. One of the eight: when multiple pages are sorted, find out among the multiple pages - the last weak eight hundred eak page) 'find one of the first strong I corresponding to the last weak page I Η :Γ:7 Egg (4), decides between the first strong page and the last weak page door · ν ^固强 'knife page' and copying the data of the plurality of strong pages to the quick memory... backup data storage area for data corruption Reply to the information. 12. The flash memory card of claim 5, wherein the controller first finds a last page of the plurality of pages, if the last SMI-〇8-〇21/9〇31-A41798 -TW/Final 14 201003399 The page is a weak page, then the last page is the last weak page. If the last page is a strong page, then a weak page before the last page is determined as the last weak page to find out the last. Weak paging. 13. The flash memory card of claim 11, wherein the controller receives a 0x24 write command to write the data to the flash memory, and the writing of the data is completed. It is detected whether the potential of the controller and the data line of one of the flash memories returns from a busy state to a ready state. 14. The flash memory card of claim 11, wherein the controller receives a 0x25 write command to write the data to the flash memory, and the writing of the data is completed. It is detected whether the controller receives a 0x12 end command. 15. The flash memory card of claim 11, wherein when the controller writes data to the second page of the first block of the flash memory, an error occurs. The controller checks whether the second page is a weak page, and if the second page is a weak page, the controller finds a second strong page corresponding to the second page, searching for the backup data The storage area obtains the backup information of the second strong page and responds to the information of the second strong page according to the backup data of the second strong page. 16. The flash memory card of claim 15, wherein the controller first obtains a blank second block, the data of the first block and the obtained from the backup data storage area The backup data of the second strong page is written into the second block, the first block is replaced by the second block, and then the first block is cleared to obtain the data for replying to the second strong page. SMI-08-021 /9031-A41798-TW/Final 15 201003399 The logical block address of the apricot heart-block in Yimenwen mentioned in the 16th item of the patent scope corresponds to the second block; The address 'to replace the first block with the second block. The strong flash memory card described in claim 1 of the patent application, wherein the time I] f is longer than the _ programming time, and the 11 pages need a longer editing. 19. The flash memory card of the item, wherein each page of the = block may be a weak page or a strong page, and each of the weak points 2 has a strong page corresponding thereto, wherein the controller writes the data to the page. When an error occurs in the process of weak paging, the strong eight pages corresponding to the weak paging have a great probability that data corruption will occur. The flash memory card of claim 5, wherein the flash memory is a NAND type flash memory. A SMI-08-021 /9031-A41798-TW/Final 16
TW97141754A 2008-07-02 2008-10-30 Flash memory card and method for securing a flash memory against data damage TWI386803B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US12/400,149 US8074012B2 (en) 2008-07-02 2009-03-09 Flash memory apparatus and method for securing a flash memory from data damage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US7754908P 2008-07-02 2008-07-02

Publications (2)

Publication Number Publication Date
TW201003399A true TW201003399A (en) 2010-01-16
TWI386803B TWI386803B (en) 2013-02-21

Family

ID=41513822

Family Applications (1)

Application Number Title Priority Date Filing Date
TW97141754A TWI386803B (en) 2008-07-02 2008-10-30 Flash memory card and method for securing a flash memory against data damage

Country Status (2)

Country Link
CN (1) CN101620575B (en)
TW (1) TWI386803B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8667321B2 (en) 2011-04-14 2014-03-04 Mstar Semiconductor, Inc. Controlling method and controller for memory
TWI492052B (en) * 2012-06-18 2015-07-11 Silicon Motion Inc Method for accessing flash memory and associated memory device
US9384125B2 (en) 2012-06-18 2016-07-05 Silicon Motion Inc. Method for accessing flash memory having pages used for data backup and associated memory device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW484064B (en) * 1999-07-12 2002-04-21 Feiya Technology Corp Flash memory management, data linking architecture and algorithm
US6349056B1 (en) * 2000-12-28 2002-02-19 Sandisk Corporation Method and structure for efficient data verification operation for non-volatile memories
TWI240862B (en) * 2003-04-22 2005-10-01 Mobitek Comm Corp File system managing-method of flash memory and its logic framework
US7275140B2 (en) * 2005-05-12 2007-09-25 Sandisk Il Ltd. Flash memory management method that is resistant to data corruption by power loss
US20070086244A1 (en) * 2005-10-17 2007-04-19 Msystems Ltd. Data restoration in case of page-programming failure
JP2008033801A (en) * 2006-07-31 2008-02-14 Victor Co Of Japan Ltd Memory data management device
CN1936866A (en) * 2006-08-18 2007-03-28 福昭科技(深圳)有限公司 Flash memory body storing mechanism with data restoring function
JP2008146253A (en) * 2006-12-07 2008-06-26 Sony Corp Storage device, computer system, and data processing method for storage device
CN100555246C (en) * 2007-09-24 2009-10-28 中兴通讯股份有限公司 A kind of on flash memory the system and method for access data

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8667321B2 (en) 2011-04-14 2014-03-04 Mstar Semiconductor, Inc. Controlling method and controller for memory
TWI492052B (en) * 2012-06-18 2015-07-11 Silicon Motion Inc Method for accessing flash memory and associated memory device
US9384125B2 (en) 2012-06-18 2016-07-05 Silicon Motion Inc. Method for accessing flash memory having pages used for data backup and associated memory device

Also Published As

Publication number Publication date
TWI386803B (en) 2013-02-21
CN101620575B (en) 2011-07-27
CN101620575A (en) 2010-01-06

Similar Documents

Publication Publication Date Title
US10255192B2 (en) Data storage device and data maintenance method thereof
US8762661B2 (en) System and method of managing metadata
CN103914393B (en) MCU-based (microprogrammed control unit-based) non-loss FLASH storage update method
JP4633802B2 (en) Nonvolatile storage device, data read method, and management table creation method
US7558904B2 (en) Controller, data memory system, data rewriting method, and computer program product
US6687784B2 (en) Controller for controlling nonvolatile memory unit
TWI461913B (en) Flash memory device and data reading method thereof
US20080195799A1 (en) Systems, methods and computer program products for operating a data processing system in which a file delete command is sent to an external storage device for invalidating data thereon
CN107220145B (en) Method for recovering data of flash memory database
EP2003569A2 (en) Flash memory controller
US20070150645A1 (en) Method, system and apparatus for power loss recovery to enable fast erase time
CN103617101A (en) Power fail safeguard method and device
ATE233415T1 (en) STORAGE ORGANIZATION OF A COMPUTER AND METHOD THEREOF
TWI486957B (en) Method, device and operating system for processing, using a nand flash memory burn data
TWI317099B (en)
US20100005229A1 (en) Flash memory apparatus and method for securing a flash memory from data damage
EP3754508A1 (en) Access request processing method and apparatus, and computer system
TW201003399A (en) Flash memory card and method for securing a flash memory against data damage
US20160124650A1 (en) Data Storage Device and Flash Memory Control Method
JP2008084184A (en) Memory controller
JP4794530B2 (en) Semiconductor device and mobile phone
JP5104653B2 (en) IC card and IC card program
CN114816860A (en) Data recovery processing method and system based on solid state disk and computer equipment
CN111142792B (en) Power-down protection method of storage device
TW201510724A (en) Non-volatile storage apparatus and a method of programming the same