JP2004220068A - Memory card and method for writing data in memory - Google Patents

Memory card and method for writing data in memory Download PDF

Info

Publication number
JP2004220068A
JP2004220068A JP2003003016A JP2003003016A JP2004220068A JP 2004220068 A JP2004220068 A JP 2004220068A JP 2003003016 A JP2003003016 A JP 2003003016A JP 2003003016 A JP2003003016 A JP 2003003016A JP 2004220068 A JP2004220068 A JP 2004220068A
Authority
JP
Japan
Prior art keywords
block
data
error
writing
normally
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
JP2003003016A
Other languages
Japanese (ja)
Other versions
JP2004220068A5 (en
JP4158526B2 (en
Inventor
Tetsushi Kasahara
哲志 笠原
Tomoaki Izumi
智紹 泉
Masahiro Nakanishi
雅浩 中西
Kiminori Matsuno
公則 松野
Keisuke Sakai
敬介 坂井
Koichiro Fue
浩一郎 笛
Hiroki Kikko
弘樹 橘高
Toshiyuki Honda
利行 本多
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2003003016A priority Critical patent/JP4158526B2/en
Publication of JP2004220068A publication Critical patent/JP2004220068A/en
Publication of JP2004220068A5 publication Critical patent/JP2004220068A5/ja
Application granted granted Critical
Publication of JP4158526B2 publication Critical patent/JP4158526B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To solve the problem with writing on a flash memory wherein writing on a flash memory where writing errors are likely to occur, such as a multivalued flash memory, often results in writing errors, while defective blocks are likely to be generated in large numbers. <P>SOLUTION: In the event of a writing error (step 4), writing is retried on another block. If a writing error occurs again, a writing process is ended because of the error (step 7), while data are read and an error check is performed (step 8). Only when there are uncorrectable errors, the block is registered as a defective block (step 9); when there are correctable errors, it is not registered as a defective block. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、書き換え可能な不揮発性メモリへのデータ書き込み時のエラー処理に特徴を有するメモリカードおよびメモリへのデータ書き込み方法に関する。
【0002】
【従来の技術】
近年、デジタル情報を保存する記憶装置として、書き換え可能な不揮発性メモリを搭載したメモリカードや機器が広まってきている。特にメモリカードは、小型かつ耐震性に優れるため、今後、益々携帯機器で多用されることが期待されている。
【0003】
書き換え可能な不揮発性メモリの代表的なものにNAND型フラッシュメモリ(以下、フラッシュメモリと称す)がある。フラッシュメモリはブロック単位でその使用、未使用が管理されており、例えば、未使用のブロックに対しては管理データとして“1 ”が書き込まれ、データの書き込みを行った場合に、管理データを“1 ”から“0 ”に書き換える。
【0004】
また、一般的に、フラッシュメモリは、正常に書き込まれない場合が希に存在する。このため、フラッシュメモリには、正常書き込みであったか、または異常書き込みであったかを示すステータスをリード(読み出し)する機能が備わっており、データの書き込み後、このステータスをリードすることによって、書き込みが正常に行なわれたか否かを判別することが必要である。書き込みエラーが発生した場合は、そのブロックが再び書き込みブロックとして選択されないようにするために、対応するブロックの管理データを“1 ”から“0 ”に書き換えを行う。
【0005】
以上のような、フラッシュメモリの書き込みエラーに関するものは、特許文献1に記載されたものが知られている。
【0006】
【特許文献1】
特開2002−108720号公報(段落0003〜0004)
【0007】
【発明が解決しようとする課題】
従来のフラッシュメモリは、1つのセルに“0”または“1”の2値のデータを書き込んでいたが、近年、“00”、“01 ”、“10”または“11 ”の4値或いはそれ以上の多値のデータを書き込むフラッシュメモリが開発され、一部では実用化が開始されている。多値のフラッシュメモリは、同容量の2値のフラッシュメモリに比べて小面積で構成することができ、フラッシュメモリの低コスト化を図ることができるため、今後、フラッシュメモリの多値化が進むものと考えられる。しかし、多値のフラッシュメモリは、従来の2値のフラッシュメモリに比べて、書き込み時にエラーとなる確率が高い。このため、従来通りに書き込みを行うと、頻繁に書き込みエラーとなり、また、不良ブロックが大量に生成されてしまう可能性があった。
【0008】
本発明は上記の課題を解決するためになされたもので、書き込みエラーの頻度を下げ、不良ブロックの生成を低減可能なメモリカード及びメモリへのデータ書き込み方法を提供することを目的とする。
【0009】
【課題を解決するための手段】
この課題を解決するために、本発明のメモリカードは、書き換え可能な不揮発性メモリを搭載したメモリカードであって、不揮発性メモリのデータ書き込み状態を管理する管理テーブルと、不揮発性メモリへブロック単位でデータを書き込む手段と、データの書き込みが正常に実行されたか否かを判定する判定手段と、判定手段によってデータの書き込みが正常に実行されたと判断された場合に、書き込みを行ったブロックの再書き込みを禁止するよう管理テーブルを更新し正常終了する手段と、判定手段によってデータの書き込みが正常に実行されなかったと判断された場合に、不揮発性メモリの異なるブロックへデータの書き込みをリトライする手段と、リトライによるデータの書き込みが判定手段により正常に実行されなかったと判断された場合はリトライに時に書き込みを行ったブロックからデータを読み出し誤り訂正を行う誤り訂正手段と、誤り訂正手段によって訂正能力を超えるエラーと判断された場合のみリトライに使用したブロックを不良ブロックとして管理テーブルを更新し、訂正能力内のエラーと判断された場合には不良ブロックとせずにエラー終了する手段を有するものである。
【0010】
これにより、リトライ処理を行うことでエラー終了発生の頻度を下げ、また誤り訂正不可能な場合のみ不良ブロックとすることで不良ブロックの増大を防止することができる。
【0011】
【発明の実施の形態】
本発明の請求項1に記載の発明は、書き換え可能な不揮発性メモリを搭載したメモリカードであって、前記不揮発性メモリのデータ書き込み状態を管理する管理テーブルと、前記管理テーブルに基づき前記不揮発性メモリへブロック単位でデータを書き込む手段と、前記データの書き込みが正常に実行されたか否かを判定する判定手段と、前記判定手段によって前記データの書き込みが正常に実行されたと判断された場合に、書き込みを行ったブロックの再書き込みを禁止するよう前記管理テーブルを更新し正常終了する手段と、前記判定手段によって前記データの書き込みが正常に実行されなかったと判断された場合に、前記不揮発性メモリの異なるブロックへデータの書き込みをリトライする手段と、前記リトライによるデータの書き込みが前記判定手段により正常に実行されなかったと判断された場合は、前記リトライに時に書き込みを行ったブロックからデータを読み出し誤り訂正を行う誤り訂正手段と、前記誤り訂正手段によって訂正能力を超えるエラーと判断された場合のみリトライに使用したブロックを不良ブロックとして前記管理テーブルを更新し、訂正能力内のエラーと判断された場合には不良ブロックとせずにエラー終了する手段を有するメモリカードである。
【0012】
また、本発明の請求項2に記載の発明は、書き換え可能な不揮発性メモリへのデータ書き込み方法であって、前記不揮発性メモリのデータ書き込み状態を管理する管理テーブルに基づき、前記不揮発性メモリへブロック単位でデータを書き込むステップと、前記データの書き込みが正常に実行されたか否かを判定する判定ステップと、前記判定ステップによって前記データの書き込みが正常に実行されたと判断された場合に、書き込みを行ったブロックの再書き込みを禁止するよう前記管理テーブルを更新し正常終了するステップと、前記判定ステップによって前記データの書き込みが正常に実行されなかったと判断された場合に、前記不揮発性メモリの異なるブロックへデータの書き込みをリトライするステップと、前記リトライによるデータの書き込みが前記判定ステップにより正常に実行されなかったと判断された場合は、前記リトライに時に書き込みを行ったブロックからデータを読み出し誤り訂正を行う誤り訂正ステップと、前記誤り訂正ステップによって訂正能力を超えるエラーと判断された場合のみリトライに使用したブロックを不良ブロックとして前記管理テーブルを更新し、訂正能力内のエラーと判断された場合には不良ブロックとせずにエラー終了するステップを有するメモリへのデータ書き込み方法である。
【0013】
これにより、データ書き込みが異常の場合にリトライ処理を行うことでエラー終了発生の頻度を下げ、またリトライ処理後もデータ書き込みが異常であっても誤り訂正不可能な場合のみ不良ブロックとすることで不良ブロックの増大を防止するという作用を有する。
【0014】
以下、本発明の実施の形態について、図面を参照して説明する。
【0015】
(実施の形態)
図1は、本発明の実施の形態によるメモリカードの構成を示すブロック図である。
【0016】
図1において、メモリカード1は、例えばディジタル・スチル・カメラ、パーソナルコンピュータ等の電子機器(図示せず)に装着して使用されるものであり、ホストインタフェース2と、コントローラ3と、RAM4と、インストラクションROM5と、バッファメモリ6と、書き換え可能な不揮発性メモリとして、例えばフラッシュメモリ7から構成される。
【0017】
ホストインタフェース2は、メモリカード1が装着される電子機器本体(以下、ホストと称する)とのインタフェースを行うブロックであり、フラッシュメモリ7に読み書きするデータや各種制御のためのコマンドやクロックを送受信する。
【0018】
コントローラ3は、メモリカード1全体を制御するブロックであり、マイクロプロセッサ(以下、MPUと称する)31を有している。MPU31は、インストラクションROM5に格納されている制御プログラムに従って、RAM4、フラッシュメモリ7、バッファメモリ6の制御を行う。
【0019】
インストラクションROM5は、読み出し専用の不揮発性メモリであり、MPU31の制御プログラムが格納されている。
【0020】
RAM4は、揮発性メモリであり、コントローラ3の作業用領域であるワークRAM41と、ブロック管理テーブル42から構成されている。ブロック管理テーブル42は、フラッシュメモリ7の使用状態を管理するテーブルであり、その一例を図2に示す。
【0021】
一般にフラッシュメモリ7の物理上のブロック(以下、物理ブロックと称す)への読み書きは、ホストから与えられる論理上のブロック(以下、論理ブロックと称す)のアドレスを指定して行われる。ブロック管理テーブル42の1つの役割は、この論理ブロックのアドレス(論理アドレス)を物理ブロックのアドレス(物理ブロック)に変換するものである。
【0022】
図2では、ブロックアドレスである物理アドレスと論理アドレスの対応関係と、その物理アドレス(アドレスで指定されるブロック)の使用の有無を示している。
【0023】
例えば、図2に示すように、物理ブロックの使用の有無、及び各物理ブロックに割り当てられた論理アドレスの番号が書かれている。使用の有無を示す欄で“0”、すなわち使用済みであるにもかかわらず、論理アドレスが書かれていない場合(図2の例では、物理アドレス「6」)は、その物理ブロックは不良ブロックであることを示しており、書き込みアドレスとして選択されることはない。
【0024】
バッファメモリ6は、ホストから転送されてきたデータを一時的に保持するメモリである。また、フラッシュメモリ7は、ホストから転送されたデータを書き込むメモリである。
【0025】
以上のように構成されたメモリカード1のデータ書き込み処理について、図3に示すフローチャートを参照して説明する。図3に示されるフローチャートは、コントローラ3により実行されるものである。
【0026】
まず、ステップ1として、コントローラ3は、ホストインタフェース2を介して、ホストからの書き込みコマンドを受けると、ホストから送られてくるデータをバッファメモリ6に一時的に保持し、ブロック単位でフラッシュメモリ7へデータの転送を行なう。
【0027】
次に、ステップ2として、MPU31はブロック管理テーブル42に書き込まれているブロック管理データを参照し、書き込み可能な物理アドレス、すなわち管理データ(使用の有無)が“1”の物理アドレス(未使用の物理アドレス)をサーチする。
【0028】
次に、ステップ3として、ステップ2でサーチされた物理アドレスに書き込みを行なう。このステップ3がデータを書き込む手段またはデータを書き込むステップに相当する。
【0029】
次に、ステップ4として、フラッシュメモリ7に対してステータス・リードコマンドを発行し、フラッシュメモリ7からの応答からデータ書き込みの処理ステータスが正常に行われたか否かを判別する。このステップ4が判定手段または判定ステップに相当する。
【0030】
ステップ4において、データ書き込みが正常に行われたと判断された場合には、ステップ5として、ブロック管理テーブル42上の対応する管理データを“1”から“0”に書き換えるとともに、論理ブロック番号(論理アドレス)を書き込み、書き込みを正常終了する(ステップ6)。このステップ5,6が正常終了する手段または正常終了するステップに相当する。
【0031】
一方、ステップ4において、データ書き込みが正常に行われなかったと判断された場合には、ステップ7として、この書き込み処理がリトライ処理であったか否かを判定する。リトライ処理でなかった場合には、1回目のリトライ処理を実行するためにステップ2に移行する。このステップ2に移行し、再度ステップ2,3を実行するステップ7,2,3がリトライする手段またはリトライするステップに相当する。
【0032】
ステップ7において、リトライ処理と判断された場合は、ステップ8として、リトライ処理でデータ書き込みをした物理ブロックからデータの読み出しを行い、データの誤り検出を行う。そして、データの誤りが訂正できるか否かを判断し、訂正可能と判断した場合には、ブロック管理テーブル42を更新することなくエラー終了する(ステップ10)。このステップ8が誤り訂正手段または誤り訂正ステップに相当する。
【0033】
一方、ステップ8において、訂正不可能と判断された場合には、ステップ9として、ブロック管理テーブル42上の対応する管理データを“1”から“0”に書き換え、書き込みをエラー終了する(ステップ10)。この場合、論理アドレスの書き込みは行われない。このステップ9,10がエラー終了する手段またはエラー終了するステップに相当する。
【0034】
以上のように本実施の形態によれば、ステップ4でステータスリード書き込みが異常の場合にリトライ処理を行うので、ホストからの書き込み指示に対してエラー終了する頻度を低減することができる。また、ステップ8でデータを読み出し誤り訂正が不可能な場合のみ不良ブロック処理(BB処理)を行うので、不良ブロックの増大を防止することができる。また、ステップ8で誤り訂正可能な場合でもエラー終了させることで、書き込みの品質を保証することができる。
【0035】
なお、上記実施の形態では、不揮発性メモリを搭載したメモリカードに実施した場合について説明したが、その他、例えば電子機器が内蔵する不揮発性メモリに対しても、同様に実施可能であり、本発明はメモリカードに限るものではないことは言うまでもない。
【0036】
【発明の効果】
以上のように本発明によれば、多値のフラッシュメモリのような書き込みエラーが発生しやすい不揮発性メモリであっても、リトライ処理を行うことで、ホストからの書き込み指示に対してエラー終了する頻度を下げることが可能となる。また、リトライ処理を繰り返すと、不良ブロックが増大する可能性があるが、誤り訂正不可能な場合のみを不良ブロックとして登録することで、ブロックの不良ブロックの増大を防止し、不揮発性メモリの寿命の低下を回避することが可能である。また、誤り訂正可能なエラーを含んだデータは、他ブロックの書き込みのストレス等によって誤り訂正が行えないエラーとなる可能性があるが、例え、誤り訂正が可能であってもエラー終了させることにより、書き込み終了時点でエラーを含んだデータを不揮発性メモリ内に残さないようにすることで、他ブロックの書き込みのストレスに強いメモリカードとすることが可能である。
【0037】
以上より、本発明を用いることにより、多値のフラッシュメモリ等の書き込みエラーの頻度が高い不揮発性メモリを用いてメモリカードを構成することができ、メモリカードの低コスト化を図ることが可能となる。
【図面の簡単な説明】
【図1】本発明の実施の形態によるメモリカードの構成を示すブロック図
【図2】同メモリカードにおけるブロック管理テーブルの構成と管理データの一例を示す図
【図3】同メモリカードにおける書き込み処理の動作を示すフローチャート
【符号の説明】
1 メモリカード
2 ホストインタフェース
3 コントローラ
4 RAM
5 インストラクションROM
6 バッファメモリ
7 フラッシュメモリ
31 マイクロプロセッサ(MPU)
41 ワークRAM
42 ブロック管理テーブル
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a memory card and a method of writing data to a memory, which are characterized by error processing when writing data to a rewritable nonvolatile memory.
[0002]
[Prior art]
In recent years, as storage devices for storing digital information, memory cards and devices equipped with rewritable nonvolatile memories have become widespread. In particular, since memory cards are small and have excellent earthquake resistance, they are expected to be increasingly used in portable devices in the future.
[0003]
A typical rewritable nonvolatile memory is a NAND flash memory (hereinafter referred to as a flash memory). Whether the flash memory is used or not used is managed in block units. For example, “1” is written as management data to an unused block, and when data is written, the management data is changed to “1”. Rewritten from "1" to "0".
[0004]
In general, flash memory rarely does not normally write. For this reason, the flash memory has a function of reading (reading) a status indicating whether the writing was normal or abnormal, and by reading this status after writing the data, the writing is normally performed. It is necessary to determine whether this has been done. When a write error occurs, the management data of the corresponding block is rewritten from "1" to "0" so that the block is not selected as a write block again.
[0005]
As described above, regarding the write error of the flash memory, the one described in Patent Document 1 is known.
[0006]
[Patent Document 1]
JP-A-2002-108720 (paragraphs 0003 to 0004)
[0007]
[Problems to be solved by the invention]
In the conventional flash memory, binary data of "0" or "1" is written in one cell, but in recent years, four values of "00", "01", "10" or "11", or A flash memory for writing the above multi-valued data has been developed, and some of the flash memories have been put into practical use. A multi-valued flash memory can be configured with a smaller area than a binary flash memory having the same capacity and can reduce the cost of the flash memory. It is considered something. However, a multi-valued flash memory has a higher probability of causing an error during writing than a conventional binary flash memory. Therefore, if writing is performed in the conventional manner, a writing error frequently occurs, and a large number of defective blocks may be generated.
[0008]
SUMMARY An advantage of some aspects of the invention is to provide a memory card and a method of writing data to a memory that can reduce the frequency of write errors and reduce the generation of defective blocks.
[0009]
[Means for Solving the Problems]
In order to solve this problem, a memory card according to the present invention is a memory card equipped with a rewritable nonvolatile memory, and includes a management table for managing a data write state of the nonvolatile memory, and a block unit for the nonvolatile memory. Means for writing data, determining means for determining whether the data writing has been performed normally, and rewriting the block on which the writing has been performed when the determining means determines that the data writing has been performed normally. Means for updating the management table so as to prohibit writing and terminating normally, and means for retrying data writing to a different block of the nonvolatile memory when the judging means judges that data writing was not executed normally. Determined that the data writing by retry was not executed normally by the determining means Error correction means that reads data from the block that was written at the time of retry and corrects the error. A means for updating the table and terminating the error without determining a bad block when the error is determined to be within the correction capability is provided.
[0010]
As a result, the frequency of occurrence of error termination can be reduced by performing the retry process, and an increase in the number of defective blocks can be prevented by setting a defective block only when an error cannot be corrected.
[0011]
BEST MODE FOR CARRYING OUT THE INVENTION
The invention according to claim 1 of the present invention is a memory card equipped with a rewritable nonvolatile memory, wherein the management table manages a data write state of the nonvolatile memory, and the nonvolatile memory is configured based on the management table. Means for writing data to the memory in block units, determining means for determining whether or not the data writing has been performed normally, and when the determining means determines that the data writing has been performed normally, Means for updating the management table so as to prohibit rewriting of the block in which the data has been written and terminating the data normally, and when the determination means determines that the data writing has not been performed normally, Means for retrying data writing to a different block, and data writing by said retry When it is determined by the determination unit that the execution was not performed normally, an error correction unit that reads data from the block that was written at the time of the retry and performs error correction, and an error that exceeds the correction capability by the error correction unit. A memory card having means for updating the management table with a block used for retry as a bad block only when it is determined, and terminating an error without determining a bad block when the error is within the correction capability.
[0012]
According to a second aspect of the present invention, there is provided a method for writing data to a rewritable nonvolatile memory, the method comprising: writing data to the nonvolatile memory based on a management table for managing a data write state of the nonvolatile memory; A step of writing data in block units, a determining step of determining whether or not the data writing has been normally performed; and a step of determining whether the writing of the data has been normally performed by the determining step. Updating the management table so as to prohibit rewriting of the performed block and terminating the block normally; and, when it is determined by the determination step that the data writing has not been executed normally, different blocks of the nonvolatile memory. Retrying to write data to the If it is determined that the writing of the data has not been normally performed by the determination step, the error correction step of reading data from the block to which the data was written at the time of the retry and performing error correction; The management table is updated with the block used for retry as a bad block only when it is determined that the error is exceeded, and when the error is determined to be within the correction capability, the error is terminated without determining the block as a bad block. This is a data writing method.
[0013]
As a result, the frequency of occurrence of error termination is reduced by performing retry processing when data writing is abnormal, and a bad block is set only when error correction is impossible even if data writing is abnormal after retry processing. This has the effect of preventing an increase in bad blocks.
[0014]
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0015]
(Embodiment)
FIG. 1 is a block diagram showing a configuration of a memory card according to an embodiment of the present invention.
[0016]
In FIG. 1, a memory card 1 is used by being mounted on an electronic device (not shown) such as a digital still camera or a personal computer. The host card 2, a controller 3, a RAM 4, An instruction ROM 5, a buffer memory 6, and a rewritable nonvolatile memory such as a flash memory 7 are provided.
[0017]
The host interface 2 is a block that interfaces with an electronic device main body (hereinafter, referred to as a host) on which the memory card 1 is mounted, and transmits and receives data to be read from and written to the flash memory 7 and commands and clocks for various controls. .
[0018]
The controller 3 is a block that controls the entire memory card 1 and has a microprocessor (hereinafter, referred to as an MPU) 31. The MPU 31 controls the RAM 4, the flash memory 7, and the buffer memory 6 according to a control program stored in the instruction ROM 5.
[0019]
The instruction ROM 5 is a read-only nonvolatile memory, and stores a control program of the MPU 31.
[0020]
The RAM 4 is a volatile memory, and includes a work RAM 41 that is a work area of the controller 3 and a block management table 42. The block management table 42 is a table for managing the use state of the flash memory 7, and an example is shown in FIG.
[0021]
Generally, reading from and writing to a physical block (hereinafter, referred to as a physical block) of the flash memory 7 is performed by designating the address of a logical block (hereinafter, referred to as a logical block) provided by a host. One role of the block management table 42 is to convert the address (logical address) of this logical block into the address (physical block) of a physical block.
[0022]
FIG. 2 shows the correspondence between a physical address and a logical address, which are block addresses, and whether or not the physical address (the block specified by the address) is used.
[0023]
For example, as shown in FIG. 2, whether or not a physical block is used and the number of a logical address assigned to each physical block are described. If the logical address is not written in the column indicating whether or not the physical block is used (ie, the physical address is “6” in the example of FIG. 2), the physical block is a bad block. , And is not selected as the write address.
[0024]
The buffer memory 6 is a memory for temporarily holding data transferred from the host. The flash memory 7 is a memory for writing data transferred from the host.
[0025]
The data writing process of the memory card 1 configured as described above will be described with reference to the flowchart shown in FIG. The flowchart shown in FIG. 3 is executed by the controller 3.
[0026]
First, as a step 1, when the controller 3 receives a write command from the host via the host interface 2, the controller 3 temporarily holds data sent from the host in the buffer memory 6, and stores the data in the flash memory 7 in block units. Transfer data to
[0027]
Next, in step 2, the MPU 31 refers to the block management data written in the block management table 42, and writes the physical address where the writable physical address, that is, whether the management data (use or not) is “1” (unused physical address). (Physical address).
[0028]
Next, as step 3, writing is performed on the physical address searched in step 2. This step 3 corresponds to data writing means or data writing step.
[0029]
Next, in step 4, a status read command is issued to the flash memory 7, and it is determined from the response from the flash memory 7 whether the processing status of the data writing has been normally performed. Step 4 corresponds to a determination unit or a determination step.
[0030]
If it is determined in step 4 that the data writing has been performed normally, in step 5 the corresponding management data on the block management table 42 is rewritten from “1” to “0” and the logical block number (logical Address) is written, and the writing ends normally (step 6). Steps 5 and 6 correspond to means for ending normally or steps for ending normally.
[0031]
On the other hand, if it is determined in step 4 that the data writing was not performed normally, it is determined in step 7 whether or not the writing process was a retry process. If it is not a retry process, the process proceeds to step 2 to execute the first retry process. Steps 7, 2, and 3 in which the process proceeds to step 2 and steps 2 and 3 are executed again correspond to a retry means or a retry step.
[0032]
If it is determined in step 7 that the process is a retry process, the process proceeds to step 8 where data is read from the physical block to which the data was written in the retry process, and data error detection is performed. Then, it is determined whether or not the data error can be corrected. If it is determined that the data can be corrected, the error is terminated without updating the block management table 42 (step 10). Step 8 corresponds to an error correction means or an error correction step.
[0033]
On the other hand, if it is determined in step 8 that the correction is impossible, in step 9 the corresponding management data on the block management table 42 is rewritten from "1" to "0", and the writing ends with an error (step 10). ). In this case, the writing of the logical address is not performed. Steps 9 and 10 correspond to a means for terminating the error or a step for terminating the error.
[0034]
As described above, according to the present embodiment, the retry processing is performed when the status read / write is abnormal in step 4, so that the frequency of ending the error in response to the write instruction from the host can be reduced. Further, since the bad block processing (BB processing) is performed only when the data is not read and error correction is not possible in step 8, it is possible to prevent the number of bad blocks from increasing. In addition, even if the error can be corrected in step 8, the quality of writing can be guaranteed by terminating the error.
[0035]
Although the above embodiment has been described with reference to the case where the present invention is applied to a memory card equipped with a nonvolatile memory, the present invention can be similarly applied to a nonvolatile memory incorporated in an electronic device, for example. It is needless to say that is not limited to a memory card.
[0036]
【The invention's effect】
As described above, according to the present invention, even in a non-volatile memory such as a multi-valued flash memory in which a write error is likely to occur, the retry processing is performed, thereby terminating the error in response to the write instruction from the host. The frequency can be reduced. Further, if the retry process is repeated, the number of defective blocks may increase. However, by registering only the case where the error cannot be corrected as a bad block, the increase of the bad blocks of the block is prevented, and the life of the nonvolatile memory is reduced. Can be avoided. In addition, data containing an error that can be corrected can be an error that cannot be corrected due to stress of writing of another block, etc. By preventing data containing an error from being left in the non-volatile memory at the end of writing, it is possible to provide a memory card which is resistant to writing stress of other blocks.
[0037]
As described above, by using the present invention, a memory card can be configured using a nonvolatile memory such as a multi-valued flash memory having a high frequency of write errors, and the cost of the memory card can be reduced. Become.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a memory card according to an embodiment of the present invention; FIG. 2 is a diagram showing a configuration of a block management table and an example of management data in the memory card; FIG. Flow chart showing the operation of [Description of reference numerals]
1 memory card 2 host interface 3 controller 4 RAM
5 Instruction ROM
6 Buffer memory 7 Flash memory 31 Microprocessor (MPU)
41 Work RAM
42 Block Management Table

Claims (2)

書き換え可能な不揮発性メモリを搭載したメモリカードであって、前記不揮発性メモリのデータ書き込み状態を管理する管理テーブルと、前記管理テーブルに基づき前記不揮発性メモリへブロック単位でデータを書き込む手段と、前記データの書き込みが正常に実行されたか否かを判定する判定手段と、前記判定手段によって前記データの書き込みが正常に実行されたと判断された場合に、書き込みを行ったブロックの再書き込みを禁止するよう前記管理テーブルを更新し正常終了する手段と、前記判定手段によって前記データの書き込みが正常に実行されなかったと判断された場合に、前記不揮発性メモリの異なるブロックへデータの書き込みをリトライする手段と、前記リトライによるデータの書き込みが前記判定手段により正常に実行されなかったと判断された場合は、前記リトライに時に書き込みを行ったブロックからデータを読み出し誤り訂正を行う誤り訂正手段と、前記誤り訂正手段によって訂正能力を超えるエラーと判断された場合のみリトライに使用したブロックを不良ブロックとして前記管理テーブルを更新し、訂正能力内のエラーと判断された場合には不良ブロックとせずにエラー終了する手段を有するメモリカード。A memory card equipped with a rewritable nonvolatile memory, a management table for managing a data write state of the nonvolatile memory, and a unit for writing data to the nonvolatile memory in block units based on the management table, Determining means for determining whether or not the data writing has been normally performed; and prohibiting rewriting of the written block when the determining means determines that the data writing has been normally performed. Means for updating the management table and terminating normally, and means for retrying data writing to a different block of the nonvolatile memory when the determining means determines that the data writing has not been executed normally, The data writing by the retry is normally executed by the determination unit. If it is determined that the error has not been corrected, the error correction means for reading out data from the block in which the data was written at the time of the retry and performing error correction, and the error correction means uses the error only when it is determined that the error exceeds the correction capability. A memory card having means for updating the management table with a block that has been determined as a bad block and terminating the error without determining the block as a bad block when the error is determined to be within the correction capability. 書き換え可能な不揮発性メモリへのデータ書き込み方法であって、前記不揮発性メモリのデータ書き込み状態を管理する管理テーブルに基づき、前記不揮発性メモリへブロック単位でデータを書き込むステップと、前記データの書き込みが正常に実行されたか否かを判定する判定ステップと、前記判定ステップによって前記データの書き込みが正常に実行されたと判断された場合に、書き込みを行ったブロックの再書き込みを禁止するよう前記管理テーブルを更新し正常終了するステップと、前記判定ステップによって前記データの書き込みが正常に実行されなかったと判断された場合に、前記不揮発性メモリの異なるブロックへデータの書き込みをリトライするステップと、前記リトライによるデータの書き込みが前記判定ステップにより正常に実行されなかったと判断された場合は、前記リトライに時に書き込みを行ったブロックからデータを読み出し誤り訂正を行う誤り訂正ステップと、前記誤り訂正ステップによって訂正能力を超えるエラーと判断された場合のみリトライに使用したブロックを不良ブロックとして前記管理テーブルを更新し、訂正能力内のエラーと判断された場合には不良ブロックとせずにエラー終了するステップを有するメモリへのデータ書き込み方法。A method for writing data to a rewritable nonvolatile memory, comprising: writing data in block units to the nonvolatile memory based on a management table for managing a data writing state of the nonvolatile memory; A judgment step of judging whether or not the data has been normally executed; and, when it is judged by the judgment step that the data writing has been executed normally, the management table is configured to prohibit rewriting of the written block. Updating and terminating normally; retrying to write data to a different block of the nonvolatile memory when the determining step determines that the data writing was not performed normally; Is determined by the determination step. If it is determined that the error was not always performed, an error correction step of reading data from the block where the write was performed at the time of the retry and error correction, and a retry is performed only when the error correction step determines that the error exceeds the correction capability. And updating the management table with the block used in step (1) as a bad block and terminating the error without determining the block as an error if the error is within the correction capability.
JP2003003016A 2003-01-09 2003-01-09 Memory card and data writing method to memory Expired - Fee Related JP4158526B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003003016A JP4158526B2 (en) 2003-01-09 2003-01-09 Memory card and data writing method to memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003003016A JP4158526B2 (en) 2003-01-09 2003-01-09 Memory card and data writing method to memory

Publications (3)

Publication Number Publication Date
JP2004220068A true JP2004220068A (en) 2004-08-05
JP2004220068A5 JP2004220068A5 (en) 2006-02-23
JP4158526B2 JP4158526B2 (en) 2008-10-01

Family

ID=32894400

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003003016A Expired - Fee Related JP4158526B2 (en) 2003-01-09 2003-01-09 Memory card and data writing method to memory

Country Status (1)

Country Link
JP (1) JP4158526B2 (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007119485A1 (en) * 2006-04-06 2007-10-25 Advantest Corporation Test device and test method
US7352630B2 (en) 2005-07-26 2008-04-01 Samsung Electronics Co., Ltd. Non-volatile memory device having improved program speed and associated programming method
JPWO2006040900A1 (en) * 2004-10-14 2008-05-15 株式会社アドバンテスト Test apparatus and test method
WO2008078529A1 (en) * 2006-12-26 2008-07-03 Advantest Corporation Test equipment and test method
JP2008287798A (en) * 2007-05-17 2008-11-27 Yokogawa Electric Corp Semiconductor test device
JP2009517786A (en) * 2005-11-30 2009-04-30 株式会社アドバンテスト Test apparatus and test method
US7554859B2 (en) 2006-09-22 2009-06-30 Samsung Electronics Co., Ltd. Nonvolatile memory system and associated programming methods
US7602642B2 (en) 2006-10-19 2009-10-13 Samsung Electronics Co., Ltd. Nonvolatile memory system and associated programming methods
US7657697B2 (en) * 2005-01-11 2010-02-02 Kabushiki Kaisha Toshiba Method of controlling a semiconductor memory device applied to a memory card
JP2010118104A (en) * 2008-11-12 2010-05-27 Yokogawa Electric Corp Redundancy operation method and device, and memory test device
JP2012507108A (en) * 2008-12-18 2012-03-22 インテル コーポレイション Data error recovery in non-volatile memory
JP2014110071A (en) * 2012-11-30 2014-06-12 Taiwan Semiconductor Manufactuaring Co Ltd Method and device for mram smart bit writing algorithm by error correction parity bit
US9152416B2 (en) 2012-04-24 2015-10-06 Sony Corporation Storage control device, memory system, information processing system and storage control method
US9478298B2 (en) 2013-06-24 2016-10-25 Samsung Electronics Co., Ltd. Memory system and method of reading data thereof

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2006040900A1 (en) * 2004-10-14 2008-05-15 株式会社アドバンテスト Test apparatus and test method
JP4585520B2 (en) * 2004-10-14 2010-11-24 株式会社アドバンテスト Test apparatus and test method
US7657697B2 (en) * 2005-01-11 2010-02-02 Kabushiki Kaisha Toshiba Method of controlling a semiconductor memory device applied to a memory card
US7352630B2 (en) 2005-07-26 2008-04-01 Samsung Electronics Co., Ltd. Non-volatile memory device having improved program speed and associated programming method
JP2009517786A (en) * 2005-11-30 2009-04-30 株式会社アドバンテスト Test apparatus and test method
US7984345B2 (en) 2006-04-06 2011-07-19 Advantest Corporation Test apparatus and test method
WO2007119485A1 (en) * 2006-04-06 2007-10-25 Advantest Corporation Test device and test method
JP4864006B2 (en) * 2006-04-06 2012-01-25 株式会社アドバンテスト Test apparatus and test method
US7554859B2 (en) 2006-09-22 2009-06-30 Samsung Electronics Co., Ltd. Nonvolatile memory system and associated programming methods
US7602642B2 (en) 2006-10-19 2009-10-13 Samsung Electronics Co., Ltd. Nonvolatile memory system and associated programming methods
WO2008078529A1 (en) * 2006-12-26 2008-07-03 Advantest Corporation Test equipment and test method
US7945826B2 (en) 2006-12-26 2011-05-17 Advantest Corporation Test apparatus and test method
JP2008287798A (en) * 2007-05-17 2008-11-27 Yokogawa Electric Corp Semiconductor test device
JP2010118104A (en) * 2008-11-12 2010-05-27 Yokogawa Electric Corp Redundancy operation method and device, and memory test device
JP2012507108A (en) * 2008-12-18 2012-03-22 インテル コーポレイション Data error recovery in non-volatile memory
US9152416B2 (en) 2012-04-24 2015-10-06 Sony Corporation Storage control device, memory system, information processing system and storage control method
JP2014110071A (en) * 2012-11-30 2014-06-12 Taiwan Semiconductor Manufactuaring Co Ltd Method and device for mram smart bit writing algorithm by error correction parity bit
US9478298B2 (en) 2013-06-24 2016-10-25 Samsung Electronics Co., Ltd. Memory system and method of reading data thereof

Also Published As

Publication number Publication date
JP4158526B2 (en) 2008-10-01

Similar Documents

Publication Publication Date Title
US7849382B2 (en) Memory control circuit, nonvolatile storage apparatus, and memory control method
KR101557736B1 (en) Emerging bad block detection
EP0862762B1 (en) Semiconductor memory device having error detection and correction
US8055957B2 (en) Semiconductor integrated circuit device having fail-safe mode and memory control method
US6601132B2 (en) Nonvolatile memory and method of writing data thereto
US8271515B2 (en) System and method for providing copyback data integrity in a non-volatile memory system
US8621139B2 (en) Data writing method for writing data into block of multi-level cell NAND flash memory by skipping a portion of upper page addresses and storage system and controller using the same
US7290097B2 (en) Nonvolatile memory
US8453021B2 (en) Wear leveling in solid-state device
TWI633428B (en) Data storage device and methods for processing data in the data storage device
US11068177B2 (en) Data storage devices and data processing methods for shortening time required for a host device to wait for initialization of the data storage device
JP4158526B2 (en) Memory card and data writing method to memory
US9383929B2 (en) Data storing method and memory controller and memory storage device using the same
US20050283647A1 (en) External storage device
JP4655034B2 (en) Memory controller, flash memory system, and flash memory control method
JP2010079371A (en) Storage device and electronic equipment

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051227

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051227

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20060112

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080620

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20080624

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080707

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110725

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120725

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130725

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees