JP2007328824A - Memory card, nonvolatile memory, data writing method of nonvolatile memory and data writing device - Google Patents

Memory card, nonvolatile memory, data writing method of nonvolatile memory and data writing device Download PDF

Info

Publication number
JP2007328824A
JP2007328824A JP2007239602A JP2007239602A JP2007328824A JP 2007328824 A JP2007328824 A JP 2007328824A JP 2007239602 A JP2007239602 A JP 2007239602A JP 2007239602 A JP2007239602 A JP 2007239602A JP 2007328824 A JP2007328824 A JP 2007328824A
Authority
JP
Japan
Prior art keywords
data
block
management table
writing
error management
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
JP2007239602A
Other languages
Japanese (ja)
Other versions
JP4602387B2 (en
Inventor
Katsuyuki Nomura
勝幸 野村
Teruhisa Fujimoto
曜久 藤本
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2007239602A priority Critical patent/JP4602387B2/en
Publication of JP2007328824A publication Critical patent/JP2007328824A/en
Application granted granted Critical
Publication of JP4602387B2 publication Critical patent/JP4602387B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To surely prevent the lifetime of a nonvolatile memory from becoming short by preventing management data from being rewritten when determining a defective block resulting from a systematic factor. <P>SOLUTION: This nonvolatile memory card comprises the means for: updating a block use management table for managing a data writing state of a memory and inhibiting rewriting to the block when data writing of a block unit is normally executed; selecting an empty block and retrying data with reference to an error management table (143) in which error management data is registered about the block when writing of the data is not normally executed and the error management table according to a rewriting request from a host; and clearing the error management data registered in the error management table when data writing is normally executed by retrying. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、不揮発性メモリへのデータ書き込み時のエラーにより不良ブロックを判定し、続く書き込み処理が正しく実行されたことを確認して先行のブロックを不良ブロックとして管理するメモリカード、不揮発性メモリ、不揮発性メモリのデータ書込み方法及びデータ書き込み装置に関する。   The present invention determines a defective block based on an error when writing data to a nonvolatile memory, confirms that the subsequent writing process has been executed correctly, and manages the preceding block as a defective block, a nonvolatile memory, The present invention relates to a data writing method and a data writing apparatus for a nonvolatile memory.

近年、画像データや音楽データに代表される種々のデジタル情報を保存する記憶装置として、電源がオフされても保存情報が消失する虞のない書き換え可能な不揮発性メモリを搭載したメモリカードが広まってきている。   In recent years, memory cards equipped with a rewritable nonvolatile memory that does not have a risk of losing stored information even when the power is turned off are spreading as a storage device for storing various digital information represented by image data and music data. ing.

書き換え可能な不揮発性メモリの代表的なものにNAND型フフラッシュメモリがある。この種のフラッシュメモリはブロック単位で管理され、未使用のブロックに対しては管理データとして“1”が書き込まれている。そして、データの書き込みを行なった場合に、管理データを“1”から“0”に書き換えている。また、データの書き込みを行なった際に書き込みが正常に行なわれたか否かを判別し、エラーが発生すると、そのブロックの管理データを“1”から“0”に書き換えている。また、書き込みエラーが発生した場合は、不揮発性メモリの異なるブロックに対してリトライ処理を行なう。このリトライ処理において、エラーが発生すれば、そのブロックの管理データを“0”に書き換える(例えば、特許文献1参照)。   A typical type of rewritable nonvolatile memory is a NAND flash memory. This type of flash memory is managed in units of blocks, and “1” is written as management data for unused blocks. When data is written, the management data is rewritten from “1” to “0”. Further, when data is written, it is determined whether or not the data has been normally written. When an error occurs, the management data of the block is rewritten from “1” to “0”. When a write error occurs, retry processing is performed on different blocks of the nonvolatile memory. In this retry process, if an error occurs, the management data of the block is rewritten to “0” (see, for example, Patent Document 1).

上記のようにデータ書き込みの際にエラーが発生すると、その都度、対応するブロックの管理データを“1”から“0”に書き換えている。なお、不揮発性メモリにデータを書き込む動作として2つの状態があり、書き込み最小単位により完結するシングルライトと、これを複数回実施して完結するマルチプルライトがある。
特開平6−332806号公報
As described above, whenever an error occurs during data writing, the management data of the corresponding block is rewritten from “1” to “0”. Note that there are two states for writing data to the nonvolatile memory, and there are a single write that is completed by a minimum writing unit and a multiple write that is completed by performing this multiple times.
JP-A-6-3232806

上記のようにデータの書き込みを行なった際には、そのブロックが不良ブロックであるか否かを判定しているが、不良ブロックであるという判定は、メモリ自身の要因だけでなく、システム的な要因に起因する場合が存在する。従って、上記従来のようにデータ書き込みの際に不良ブロックであると判定された場合に、対応するブロックの管理データを“1”から“0”に書き換え、不良と判定されたブロックを直ちに利用できないようにすると、メモリ自身が不良でなくても、そのブロックは使用できないようになる。このため従来の不揮発性メモリのデータ書き込み方法では、メモリカードの寿命が短くなるという問題があった。   When data is written as described above, it is determined whether or not the block is a bad block. The determination that the block is a bad block is not only a factor of the memory itself but also a systematic There may be cases caused by factors. Therefore, when it is determined that the block is defective when data is written as in the conventional case, the management data of the corresponding block is rewritten from “1” to “0”, and the block determined to be defective cannot be used immediately. By doing so, the block cannot be used even if the memory itself is not defective. Therefore, the conventional nonvolatile memory data writing method has a problem that the life of the memory card is shortened.

本発明は上記の課題を解決するためになされたもので、システム的な要因に起因する不良ブロックの判定に対しては、管理データの書き換えを阻止し、不揮発性メモリの寿命が短くなることを確実に防止し得ることを目的とする。   The present invention has been made in order to solve the above-described problem. For the determination of a bad block due to system factors, rewriting of management data is prevented, and the lifetime of the nonvolatile memory is shortened. It aims to be able to prevent reliably.

本発明の一実施態様によれば、書き換え可能な不揮発性メモリを搭載したメモリカードにおいて、上記不揮発性メモリのデータ書き込み状態を管理するブロック使用管理テーブルと、上記不揮発性メモリへブロック単位でデータを書き込む手段と、上記データの書き込みが正常に実行されたか否かを判定し、データの書き込みが正常に実行された場合に上記ブロック使用管理テーブルを更新し、対応するブロックへの再書き込みを禁止する手段と、上記データの書き込みが正常に実行されなかった場合に当該ブロックについてエラー管理データが登録されるエラー管理テーブルと、ホストデバイスからの再書き込み要求により上記エラー管理テーブルを参照して空きブロックを選択しデータの書き込みをリトライする手段と、上記リトライによってデータの書き込みが正常に実行された場合に上記エラー管理テーブルに登録されているエラー管理データをクリアする手段とを具備するものである。   According to one embodiment of the present invention, in a memory card equipped with a rewritable nonvolatile memory, a block usage management table for managing a data writing state of the nonvolatile memory, and data in a block unit to the nonvolatile memory. The writing means and whether or not the data writing has been normally executed are determined. When the data writing has been normally executed, the block use management table is updated, and rewriting to the corresponding block is prohibited. Means, an error management table in which error management data is registered for the block when the data writing is not executed normally, and an empty block by referring to the error management table by a rewrite request from the host device. The means to select and retry writing data and the above retry What the data writing is intended and means for clearing the error management data registered in the error management table when it is executed successfully.

本発明の他の実施態様によれば、不揮発性メモリへデータを書き込む第1のステップと、データの書き込みが正常に実行されたか否かを判定する第2のステップと、上記データの書き込みが正常に実行された場合にブロック使用管理テーブルを更新し、そのブロックへの再書き込みを禁止する第3のステップと、上記データの書き込みが正常に実行されなかった場合に当該ブロックについてエラー管理データをエラー管理テーブルに登録する第4のステップと、ホストデバイスからの再書き込み要求により上記エラー管理テーブルを参照して空きブロックを選択してリトライする第5のステップと、上記リトライによってデータの書き込みが正常に実行された場合に上記エラー管理テーブルに登録されているエラー管理データをクリアする第6のステップとを具備する不揮発性メモリのデータ書き込み方法が提供される。   According to another embodiment of the present invention, a first step of writing data to the nonvolatile memory, a second step of determining whether or not the data writing has been normally executed, and the data writing is normal The third step of updating the block usage management table when it is executed and prohibiting rewriting to that block, and error management data for the block if the data writing is not executed normally A fourth step of registering in the management table, a fifth step of selecting and retrying a free block by referring to the error management table in response to a rewrite request from the host device, and writing of data normally by the retry When executed, the error management data registered in the error management table is cleared. Data writing method for a nonvolatile memory comprising the steps is provided.

本発明の他の実施態様によれば、不揮発性メモリのデータ書き込み状態を管理するブロック使用管理テーブルと、上記不揮発性メモリへブロック単位でデータを書き込む手段と、上記データの書き込みが正常に実行されたか否かを判定し、データの書き込みが正常に実行された場合に上記ブロック使用管理テーブルを更新し、対応するブロックへの再書き込みを禁止する手段と、上記データの書き込みが正常に実行されなかった場合に当該ブロックについてエラー管理データが登録されるエラー管理テーブルと、ホストデバイスからの再書き込み要求により上記エラー管理テーブルを参照して空きブロックを選択しデータの書き込みをリトライする手段と、上記リトライによってデータの書き込みが正常に実行された場合に上記エラー管理テーブルに登録されているエラー管理データをクリアする手段とを具備する不揮発性メモリが提供される。   According to another embodiment of the present invention, a block use management table for managing a data write state of the nonvolatile memory, means for writing data to the nonvolatile memory in units of blocks, and the data writing is executed normally. Means for updating the block usage management table when data writing is executed normally and prohibiting rewriting to the corresponding block, and the data writing is not executed normally. An error management table in which error management data is registered for the block, a means for selecting an empty block by referring to the error management table in response to a rewrite request from the host device, and retrying data writing, and the retry If the data is successfully written by Non-volatile memory and means for clearing the error management data registered in the table is provided.

本発明の他の実施態様によれば、書き換え可能な不揮発性メモリにデータを書き込む装置において、上記不揮発性メモリのデータ書き込み状態を管理するブロック使用管理テーブルと、上記不揮発性メモリへブロック単位でデータを書き込む手段と、上記データの書き込みが正常に実行されたか否かを判定し、データの書き込みが正常に実行された場合に上記ブロック使用管理テーブルを更新し、対応するブロックへの再書き込みを禁止する手段と、上記データの書き込みが正常に実行されなかった場合に当該ブロックについてエラー管理データが登録されるエラー管理テーブルと、ホストデバイスからの再書き込み要求により上記エラー管理テーブルを参照して空きブロックを選択しデータの書き込みをリトライする手段と、上記リトライによってデータの書き込みが正常に実行された場合に上記エラー管理テーブルに登録されているエラー管理データをクリアする手段とを具備する。   According to another embodiment of the present invention, in a device for writing data to a rewritable nonvolatile memory, a block usage management table for managing a data writing state of the nonvolatile memory, and data in blocks to the nonvolatile memory , And whether or not the data writing has been executed normally, and if the data writing has been executed normally, the block usage management table is updated and rewriting to the corresponding block is prohibited. An error management table in which error management data is registered for the block when the data writing is not executed normally, and an empty block referring to the error management table by a rewrite request from the host device. Means to select data and retry writing data, and the retry Therefore and means for clearing the error management data writing of data is registered in the error management table when it is executed successfully.

本発明によれば、システム的な要因に起因する不良ブロックの判定に対しては、管理データの書き換えを阻止し、不揮発性メモリの寿命が短くなることを確実に防止し得る。   According to the present invention, it is possible to prevent management data from being rewritten and to prevent the lifetime of the nonvolatile memory from being shortened with respect to the determination of a defective block due to system factors.

以下、図面を参照して本発明の一実施形態を説明する。図1は本発明の一実施形態に係るメモリカードの全体構成を示すブロック図である。   Hereinafter, an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing the overall configuration of a memory card according to an embodiment of the present invention.

図1のメモリカードは、例えばパーソナルコンピュータ、電子カメラ、ゲーム機を始めとする各種電子機器に装着して使用されるもので、ホストインタフェース11と、コントローラ12と、ROM13と、RAM14と、書き換え可能な不揮発性メモリ、例えばフラッシュメモリ15とを備えている。   The memory card shown in FIG. 1 is used by being mounted on various electronic devices such as a personal computer, an electronic camera, and a game machine, and is rewritable with a host interface 11, a controller 12, a ROM 13, and a RAM 14. A non-volatile memory such as a flash memory 15 is provided.

ホストインタフェース11は、上記メモリカードが装着される電子機器本体(以下、ホストデバイスと称する)とのインタフェースをなす。コントローラ12は、カード全体の制御を司るもので、マイクロプロセッサ(MPU)121と、レジスタ(REG)122とを有している。上記マイクロプロセッサ121は、ホストインタフェース11を介して受信されるコマンドをROM13に格納されている制御プログラム(ファームウェア)に従って解釈して実行する。   The host interface 11 serves as an interface with an electronic device main body (hereinafter referred to as a host device) to which the memory card is mounted. The controller 12 controls the entire card, and has a microprocessor (MPU) 121 and a register (REG) 122. The microprocessor 121 interprets and executes a command received via the host interface 11 in accordance with a control program (firmware) stored in the ROM 13.

ROM13は、読み出し専用の不揮発性メモリである。ROM13は、上記制御プログラム、及び管理用の固定データ等を予め格納するのに用いられる。RAM14は、揮発性メモリであり、コントローラ12の作業用領域141の他、ブロック使用管理テーブル142、エラー管理テーブル143、書き込みデータバッファ144等が設けられる。上記ブロック使用管理テーブル142は、図2に示すようにフラッシュメモリ15の各ブロックに対し、それぞれ未使用状態と使用又は不良ブロック状態を記憶してブロックの使用状態を管理する。上記ブロック使用管理テーブル142は、図3(a)に示すようにフラッシュメモリ15の各ブロックが未使用の場合には、各ブロックに対して“1”が書き込まれている。そして、ブロック単位でデータの書き込みが行なわれると、図3(b)に示すように“1”が“0”に書き換えられ、そのブロックが使用状態であることが示される。また、不良ブロックに対しても“0”が書き込まれ、その後の使用が禁止される。   The ROM 13 is a read-only nonvolatile memory. The ROM 13 is used to store the control program and management fixed data in advance. The RAM 14 is a volatile memory and includes a work area 141 of the controller 12, a block use management table 142, an error management table 143, a write data buffer 144, and the like. As shown in FIG. 2, the block usage management table 142 stores an unused state and a used or defective block state for each block of the flash memory 15 to manage the block usage state. In the block usage management table 142, as shown in FIG. 3A, when each block of the flash memory 15 is unused, “1” is written to each block. When data is written in units of blocks, “1” is rewritten to “0” as shown in FIG. 3B, indicating that the block is in use. Further, “0” is also written to the defective block, and the subsequent use is prohibited.

また、上記エラー管理テーブル143は、マルチプルライト処理の場合に使用されるもので、データ書き込みの際にエラーが発生すると、不良データとして登録される。   The error management table 143 is used in the case of multiple write processing, and is registered as defective data when an error occurs during data writing.

フラッシュメモリ15の各ブロックは、一定サイズの複数のセクタから構成される。また、フラッシュメモリ15の領域は、システム管理情報等が保存される管理領域151と、画像データ、音楽データ等のデジタルコンテンツを保存するデータ領域152からなっている。管理領域151には、データ領域152に保存されているディジタルコンテンツを使用するのに必要な、コンテンツ復号キー、コピー制御情報、移動制御情報等の重要な情報が保存されている。   Each block of the flash memory 15 is composed of a plurality of sectors of a certain size. The area of the flash memory 15 includes a management area 151 for storing system management information and the like, and a data area 152 for storing digital contents such as image data and music data. The management area 151 stores important information such as a content decryption key, copy control information, and movement control information necessary for using the digital contents stored in the data area 152.

次に上記メモリカードに対するデータ書き込み処理について説明する。最初に、シングルライト処理について、図4に示すフローチャートを参照して説明する。コントローラ12は、ホストデバイスからの指令に従ってシングルライト処理を行なう場合、まず、書き込みアドレスを計算する(ステップA1)。すなわち、ブロック使用管理テーブル142に書き込まれているブロック使用管理データを参照して書き込み可能な領域を見つける。この場合、不良ブロックは使用済みとして管理されているので、再度利用することはない。   Next, a data writing process for the memory card will be described. First, the single write process will be described with reference to the flowchart shown in FIG. When performing a single write process according to a command from the host device, the controller 12 first calculates a write address (step A1). That is, a writable area is found by referring to the block usage management data written in the block usage management table 142. In this case, since the bad block is managed as used, it is not used again.

そして、上記書き込みアドレスに対してデータの書き込みを行なう(ステップA2)。この場合、ホストデバイスから送られてくるデータをRAM14の書き込みデータバッファ144にブロック単位で保持し、上記書き込みアドレスに対して書き込みを行なう。その後、ライトステータス、つまり、データ書き込みの処理ステータスが正常か否かを判別する(ステップA3)。   Then, data is written to the write address (step A2). In this case, data sent from the host device is held in block units in the write data buffer 144 of the RAM 14 and written to the write address. Thereafter, it is determined whether or not the write status, that is, the data write processing status is normal (step A3).

上記ステップA3で、異常ステータスが見つかっても不良ブロックをブロック使用管理テーブル142に直ちに登録することはしない。すなわち、上記ステップA3で、ライトステータスが異常であると判定された場合には、先行状態が異常であるとし(ステップA4)、リトライを継続するか終了するかをリトライ回数から判別する(ステップA5)。このステップA5では、予め設定されたリトライ回数に達したか否かによってリトライを継続するか終了するかを判別し、リトライ回数が設定値に達していなければ、ステップA1に戻り、異なるブロックを見つけてデータの再書き込みを行なう。上記ステップA5で、リトライ回数が設定値に達したと判定された場合には、ステップA6に進んでエラー終了とし、シングルライト処理を終了する。   Even if an abnormal status is found in step A3, the defective block is not immediately registered in the block usage management table 142. That is, if it is determined in step A3 that the write status is abnormal, the preceding state is determined to be abnormal (step A4), and it is determined from the number of retries whether the retry is continued or terminated (step A5). ). In this step A5, it is determined whether or not to continue the retry depending on whether or not the preset number of retries has been reached. If the number of retries has not reached the set value, the process returns to step A1 to find a different block. To rewrite the data. If it is determined in step A5 that the number of retries has reached the set value, the process proceeds to step A6 to end the error, and the single write process ends.

また、上記ステップA3でライトステータスが正常であると判定された場合には、上記のデータ書き込みがリトライ処理であるか否かを判別し(ステップA7)、リトライ処理であった場合には、先行状態、つまり、前回の書き込みが正常か否かを判別する(ステップA8)。書き込み異常の場合には、不良データと判断し、前回のライト時に利用したアドレスを不良ブロックとし(ステップA9)、ステップA10で先行状態を正常にした後、ブロック使用管理テーブル142を更新する(ステップA11)。例えば図3(a)に示すようにブロック使用管理テーブル142が全て未使用状態となっているとき、最初のデータ書き込みがエラーとなってリトライ処理を行ない、その結果、データを正しく書けた場合には、図3(b)に示すように、そのブロックに対する管理データを“0”に書き換えて使用状態とすると共に、その1つ前に書き込みを行なったブロックを不良ブロックとして“0”に書き換える。   If it is determined in step A3 that the write status is normal, it is determined whether or not the data writing is a retry process (step A7). The state, that is, whether or not the previous writing is normal is determined (step A8). In the case of writing abnormality, it is determined as defective data, the address used at the time of the previous write is set as a defective block (step A9), and after the preceding state is made normal at step A10, the block usage management table 142 is updated (step A11). For example, as shown in FIG. 3A, when all of the block usage management table 142 is in an unused state, the first data write results in an error and retry processing is performed, and as a result, data can be written correctly. As shown in FIG. 3B, the management data for the block is rewritten to “0” to be used, and the block written immediately before is rewritten to “0” as a defective block.

また、上記のようにリトライ処理によってデータの書き込みが正常に行なわれた場合において、図3(c)に示すように1つ前のブロックが既に使用状態となっており、その前のブロックが前回書き込みを行なったブロックであった場合には、図3(d)に示すように正常に書き込みができた今回のブロックに“0”を書き込むと共に、前回書き込みを行なった2つ前のブロックを不良ブロックとして“0”を書き込む。   Further, when data is normally written by retry processing as described above, the previous block is already in use as shown in FIG. 3C, and the previous block is the previous one. If the block has been written, as shown in FIG. 3 (d), "0" is written to the current block that has been normally written, and the previous block to which the previous writing was performed is defective. Write “0” as a block.

また、上記ステップA7でリトライ処理ではないと判定された場合、あるいはステップA8で先行状態が正常であると判定された場合には、ステップA10で先行状態を正常にした後、ブロック使用管理テーブル142を更新する(ステップA11)。この場合には、データの書き込みが正常に行なわれたブロックに対して“0”を書き込んで使用状態とする。   If it is determined in step A7 that it is not a retry process, or if it is determined in step A8 that the preceding state is normal, the block use management table 142 is set after the preceding state is made normal in step A10. Is updated (step A11). In this case, “0” is written to the block in which the data has been normally written to make it in use.

その後、正常終了(ステップA12)としてシングルライト処理を終了する。   Thereafter, the single write process is terminated as normal termination (step A12).

上記のようにシングルライトにおいては、データ書き込みを行なった際にエラーが発生してもブロック使用管理テーブル142に不良ブロックの登録は行なわず、その後、リトライ処理によって正常に処理を終了した場合に、前回の書き込み時に利用したアドレスを不良ブロックとしてブロック使用管理テーブル142を更新するようにしているので、メモリ自身の要因によってエラーが発生した場合のみブロック使用管理テーブル142が更新される。従って、システム的な要因によるエラーの場合には、ブロック使用管理テーブル142が更新されることはなく、リトライを繰り返して実施した場合においても、再書き込み実施試行分の不良ブロック判定を回避することが可能であり、不揮発性メモリの寿命が短くなることを確実に防止することができる。   As described above, in the single write, even if an error occurs when data is written, the bad block is not registered in the block use management table 142, and then the process is normally terminated by the retry process. Since the block usage management table 142 is updated with the address used at the previous writing as a bad block, the block usage management table 142 is updated only when an error occurs due to the cause of the memory itself. Therefore, in the case of an error due to a system factor, the block usage management table 142 is not updated, and even when retry is repeatedly performed, it is possible to avoid bad block determination for the rewrite execution attempt. It is possible to reliably prevent the lifetime of the nonvolatile memory from being shortened.

次に、マルチプルライトによるデータ書き込み処理について図5に示すフローチャートを参照して説明する。   Next, data write processing by multiple write will be described with reference to the flowchart shown in FIG.

ホストデバイスからマルチプルライトによる書き込みが指示されると、コントローラ12は、まず、ブロック使用管理テーブル142に書き込まれている管理データを利用して、フラッシュメモリ15の書き込み可能な空きブロックを選択し(ステップB1)、この空きブロックに対してデータの書き込みを行なう(ステップB2)。この場合、ホストデバイスから送られてくるデータがRAM14の書き込みデータバッファ144に順次書き込まれ、このデータが上記空きブロックに書き込まれる。その後、ライトステータス、つまり、データ書き込みの処理ステータスが正常か否かを判別する(ステップB3)。   When a write by multiple write is instructed from the host device, the controller 12 first selects an available writable block in the flash memory 15 using the management data written in the block use management table 142 (step B1) Data is written to this empty block (step B2). In this case, data sent from the host device is sequentially written to the write data buffer 144 of the RAM 14, and this data is written to the empty block. Thereafter, it is determined whether or not the write status, that is, the data write processing status is normal (step B3).

上記ステップB3で、ライトステータスが異常であると判定された場合には、先行状態が異常であるとし、エラーデータをRAM14のエラー管理テーブル143に登録する(ステップB4)。書き込みエラーが発生した場合、コントローラ12からホストインタフェース11を介してホストデバイスに書き込みエラーの発生を示すデータが送られる。これによりホストデバイスから再書き込み要求が指示される(ステップB5)。   If it is determined in step B3 that the write status is abnormal, it is determined that the preceding state is abnormal, and error data is registered in the error management table 143 of the RAM 14 (step B4). When a write error occurs, data indicating the occurrence of the write error is sent from the controller 12 to the host device via the host interface 11. Thereby, a rewrite request is instructed from the host device (step B5).

コントローラ12は、再書き込み要求により、エラー管理テーブル143を参照して他の空きブロックの選択動作を行ない(ステップB6)、その空きブロックに対してリトライ処理を行なう(ステップB7)。すなわち、ホストデバイスから送られてくるデータを書き込みデータバッファ144に順次保持し、上空きブロックへの書き込みを行なう。   In response to the rewrite request, the controller 12 refers to the error management table 143, selects another free block (step B6), and performs a retry process on the free block (step B7). That is, the data sent from the host device is sequentially held in the write data buffer 144 and written to the free block.

そして、上記リトライ処理に対してデータの書き込みが正常に行なわれたか否かを判別し(ステップB8)、書き込み異常が発生した場合にはステップB5に戻り、上記した処理を繰り返して実行する。   Then, it is determined whether or not the data has been normally written for the retry process (step B8). If a write error has occurred, the process returns to step B5 and the above process is repeated.

また、上記ステップB8で正常に書き込み処理を終了したと判定された場合には、上記エラー管理テーブル143に登録されているエラー管理データをクリアすると共にブロック使用管理テーブル142を更新し(ステップB9)、正常終了(ステップB10)としてマルチプルライト処理を終了する。   If it is determined in step B8 that the writing process has been completed normally, the error management data registered in the error management table 143 is cleared and the block usage management table 142 is updated (step B9). Then, the multiple write process is terminated as normal termination (step B10).

マルチプルライト時にエラーが発生した場合、RAM14の書き込みデータバッファ144には書き込みデータの一部しか保持されていない。このため書き込みデータバッファ144の保持データに基づくリトライを実施することができず、上記シングルライトの場合のようにリトライによって正常に書き込みができたという行為によって1つ前に書き込みを行なったブロックを不良ブロックであると判断することはできない。また、ホストデバイスからの書き込み再要求によって再度不良ブロック化できない事態が考えられる。   When an error occurs during multiple write, only a part of the write data is held in the write data buffer 144 of the RAM 14. For this reason, the retry based on the data held in the write data buffer 144 cannot be performed, and the block that was previously written by the act of being able to write normally by the retry as in the case of the single write is defective. It cannot be determined to be a block. Further, there may be a situation in which a defective block cannot be formed again due to a write re-request from the host device.

このため本発明によるマルチプルライト処理においては、上記したように書き込みエラーを発生したブロックについてエラー管理テーブル143に登録し、ブロック使用管理テーブル142とは別管理にする。その後、ホストデバイスからの再書き込み要求により、上記エラー管理テーブル143に登録されたエラー管理データに基づいて空きブロックを選択することでリトライ動作を可能としている。そして、リトライ動作が正しく実施されたことで上記エラー管理テーブル143に登録されているエラー管理データをクリアする。   Therefore, in the multiple write processing according to the present invention, as described above, the block in which a write error has occurred is registered in the error management table 143 and is managed separately from the block use management table 142. Thereafter, in response to a rewrite request from the host device, a retry operation can be performed by selecting an empty block based on the error management data registered in the error management table 143. The error management data registered in the error management table 143 is cleared when the retry operation is correctly performed.

上記マルチプルライトの場合には、エラーが発生した場合、そのエラーがメモリ自身の要因であるか、システム的な要因に起因するものか判断できないので、ブロック使用管理テーブル142の更新は行なわない。このようにエラーが発生したと判断されたブロックをそのまま未使用領域として残しておいても、その後、図5で説明したシングルライト処理において、そのエラーがメモリ自身の要因であるか、システム的な要因に起因するものかを判断できるので問題はない。上記したようにマルチプルライト処理の場合には、エラーが発生してもブロック使用管理テーブル142が更新されることはなく、不揮発性メモリの寿命が短くなることを確実に防止することができる。   In the case of the multiple write, if an error occurs, it cannot be determined whether the error is caused by the memory itself or caused by a system factor, and therefore the block usage management table 142 is not updated. Even if a block in which an error has been determined to be left is left as an unused area as it is, in the single write processing described with reference to FIG. There is no problem because it can be judged whether it is caused by the factor. As described above, in the case of multiple write processing, the block usage management table 142 is not updated even if an error occurs, and it is possible to reliably prevent the lifetime of the nonvolatile memory from being shortened.

なお、上記実施形態では、不揮発性メモリを備えたメモリカードに実施した場合について説明したが、その他、例えばコンピュータが内蔵する不揮発性メモリに対しても、上記実施形態と同様にして実施し得るものである。   In the above embodiment, the case where the present invention is applied to a memory card including a nonvolatile memory has been described. However, for example, the present invention can also be applied to a nonvolatile memory built in a computer in the same manner as in the above embodiment. It is.

以上詳記したように本発明によれば、シングルライト処理により不揮発性メモリへデータ書き込みを行なった際にエラーが発生しても不良ブロックを直ちにブロック使用管理テーブルに登録することはせず、その後、リトライ処理によって正常に書き込みができた場合に、前回の書き込み時に利用したアドレスを不良ブロックとしてブロック使用管理テーブルを更新するようにしているので、メモリ自身の要因によってエラーが発生した場合のみブロック使用管理テーブルが更新される。従って、システム的な要因によるエラーの場合には、ブロック使用管理テーブルが更新されることはなく、不揮発性メモリの寿命が短くなることを確実に防止することができる。また、マルチプルライト処理においては、書き込みエラーが発生した場合に、エラーデータをエラー管理テーブルに登録し、ホストデバイスからの再書き込み要求により上記エラー管理テーブルに登録されたエラー管理データに基づいて空きブロックを選択してリトライ処理を行ない、リトライ動作が正しく実施されたことでエラー管理テーブルをクリアするようにしたので、システム的な要因によるエラーによってブロック使用管理テーブルが更新されることはなく、不揮発性メモリを効率的に使用して長寿命化を図ることができる。   As described above in detail, according to the present invention, even if an error occurs when data is written to the nonvolatile memory by the single write process, the defective block is not immediately registered in the block use management table. When the writing is successful by retry processing, the block usage management table is updated with the address used at the previous writing as a bad block, so the block is used only when an error occurs due to the cause of the memory itself. The management table is updated. Therefore, in the case of an error due to system factors, the block usage management table is not updated, and it is possible to reliably prevent the lifetime of the nonvolatile memory from being shortened. In the multiple write processing, when a write error occurs, error data is registered in the error management table, and a free block is created based on the error management data registered in the error management table by a rewrite request from the host device. The error management table is cleared when the retry operation is performed correctly, and the block usage management table is not updated due to an error due to system factors. The memory can be used efficiently to extend the life.

なお、この発明は、上記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合せにより種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。更に、異なる実施形態に亘る構成要素を適宜組み合せてもよい。   Note that the present invention is not limited to the above-described embodiment as it is, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. In addition, various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the embodiment. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, you may combine suitably the component covering different embodiment.

本発明の一実施形態に係るメモリカードの全体構成を示すブロック図。1 is a block diagram showing an overall configuration of a memory card according to an embodiment of the present invention. 同実施形態におけるブロック使用管理テーブルの構成例を示す図。The figure which shows the structural example of the block use management table in the same embodiment. 同実施形態におけるブロック使用管理テーブルの管理データ例を示す図。The figure which shows the management data example of the block use management table in the embodiment. 同実施形態におけるシングルライト処理の動作を示すフローチャート。6 is a flowchart showing an operation of single write processing in the embodiment. 同実施形態におけるマルチプルライト処理の動作を示すフローチャート。6 is a flowchart showing the operation of multiple write processing in the embodiment.

符号の説明Explanation of symbols

11…ホストインタフェース、12…コントローラ、121…マイクロプロセッサ(MPU)、122…レジスタ(REG)、13…ROM、14…RAM、141…作業用領域、142…ブロック使用管理テーブル、143…エラー管理テーブル、144…書き込みデータバッファ、15…フラッシュメモリ、151…管理領域   DESCRIPTION OF SYMBOLS 11 ... Host interface, 12 ... Controller, 121 ... Microprocessor (MPU), 122 ... Register (REG), 13 ... ROM, 14 ... RAM, 141 ... Working area, 142 ... Block use management table, 143 ... Error management table 144: Write data buffer, 15 ... Flash memory, 151 ... Management area

Claims (4)

書き換え可能な不揮発性メモリを搭載したメモリカードにおいて、
上記不揮発性メモリのデータ書き込み状態を管理するブロック使用管理テーブルと、
上記不揮発性メモリへブロック単位でデータを書き込む手段と、
上記データの書き込みが正常に実行されたか否かを判定し、データの書き込みが正常に実行された場合に上記ブロック使用管理テーブルを更新し、対応するブロックへの再書き込みを禁止する手段と、
上記データの書き込みが正常に実行されなかった場合に当該ブロックについてエラー管理データが登録されるエラー管理テーブルと、
ホストデバイスからの再書き込み要求により上記エラー管理テーブルを参照して空きブロックを選択しデータの書き込みをリトライする手段と、
上記リトライによってデータの書き込みが正常に実行された場合に上記エラー管理テーブルに登録されているエラー管理データをクリアする手段と
を具備することを特徴とするメモリカード。
In memory cards with rewritable nonvolatile memory,
A block use management table for managing the data write state of the nonvolatile memory;
Means for writing data in block units to the non-volatile memory;
Means for determining whether or not the data writing has been normally executed, and updating the block use management table when the data writing has been normally executed, and prohibiting rewriting to the corresponding block;
An error management table in which error management data is registered for the block when the above data writing is not executed normally;
Means for referring to the error management table in response to a rewrite request from the host device, selecting a free block, and retrying data writing;
A memory card comprising: means for clearing error management data registered in the error management table when data writing is normally executed by the retry.
不揮発性メモリへデータを書き込む第1のステップと、
データの書き込みが正常に実行されたか否かを判定する第2のステップと、
上記データの書き込みが正常に実行された場合にブロック使用管理テーブルを更新し、そのブロックへの再書き込みを禁止する第3のステップと、
上記データの書き込みが正常に実行されなかった場合に当該ブロックについてエラー管理データをエラー管理テーブルに登録する第4のステップと、
ホストデバイスからの再書き込み要求により上記エラー管理テーブルを参照して空きブロックを選択してリトライする第5のステップと、
上記リトライによってデータの書き込みが正常に実行された場合に上記エラー管理テーブルに登録されているエラー管理データをクリアする第6のステップと
を具備することを特徴とする不揮発性メモリのデータ書き込み方法。
A first step of writing data to the non-volatile memory;
A second step of determining whether or not data writing has been executed normally;
A third step of updating the block use management table when the data writing is normally executed and prohibiting rewriting to the block;
A fourth step of registering error management data for the block in the error management table when the data writing is not executed normally;
A fifth step of selecting a free block by referring to the error management table in response to a rewrite request from the host device and retrying;
And a sixth step of clearing the error management data registered in the error management table when the data writing is normally executed by the retry.
不揮発性メモリのデータ書き込み状態を管理するブロック使用管理テーブルと、
上記不揮発性メモリへブロック単位でデータを書き込む手段と、
上記データの書き込みが正常に実行されたか否かを判定し、データの書き込みが正常に実行された場合に上記ブロック使用管理テーブルを更新し、対応するブロックへの再書き込みを禁止する手段と、
上記データの書き込みが正常に実行されなかった場合に当該ブロックについてエラー管理データが登録されるエラー管理テーブルと、
ホストデバイスからの再書き込み要求により上記エラー管理テーブルを参照して空きブロックを選択しデータの書き込みをリトライする手段と、
上記リトライによってデータの書き込みが正常に実行された場合に上記エラー管理テーブルに登録されているエラー管理データをクリアする手段と
を具備することを特徴とする不揮発性メモリ。
A block usage management table for managing the data write state of the nonvolatile memory;
Means for writing data in block units to the non-volatile memory;
Means for determining whether or not the data writing has been normally executed, and updating the block use management table when the data writing has been normally executed, and prohibiting rewriting to the corresponding block;
An error management table in which error management data is registered for the block when the above data writing is not executed normally;
Means for referring to the error management table in response to a rewrite request from the host device, selecting a free block, and retrying data writing;
A non-volatile memory comprising: means for clearing error management data registered in the error management table when data writing is normally executed by the retry.
書き換え可能な不揮発性メモリにデータを書き込む装置において、
上記不揮発性メモリのデータ書き込み状態を管理するブロック使用管理テーブルと、
上記不揮発性メモリへブロック単位でデータを書き込む手段と、
上記データの書き込みが正常に実行されたか否かを判定し、データの書き込みが正常に実行された場合に上記ブロック使用管理テーブルを更新し、対応するブロックへの再書き込みを禁止する手段と、
上記データの書き込みが正常に実行されなかった場合に当該ブロックについてエラー管理データが登録されるエラー管理テーブルと、
ホストデバイスからの再書き込み要求により上記エラー管理テーブルを参照して空きブロックを選択しデータの書き込みをリトライする手段と、
上記リトライによってデータの書き込みが正常に実行された場合に上記エラー管理テーブルに登録されているエラー管理データをクリアする手段と
を具備することを特徴とするデータ書き込み装置。
In a device for writing data to a rewritable nonvolatile memory,
A block use management table for managing the data write state of the nonvolatile memory;
Means for writing data in block units to the non-volatile memory;
Means for determining whether or not the data writing has been normally executed, and updating the block use management table when the data writing has been normally executed, and prohibiting rewriting to the corresponding block;
An error management table in which error management data is registered for the block when the above data writing is not executed normally;
Means for referring to the error management table in response to a rewrite request from the host device, selecting a free block, and retrying data writing;
A data writing apparatus comprising: means for clearing error management data registered in the error management table when data writing is normally executed by the retry.
JP2007239602A 2007-09-14 2007-09-14 MEMORY CARD, NONVOLATILE MEMORY, NONVOLATILE MEMORY DATA WRITE METHOD AND DATA WRITE DEVICE Expired - Fee Related JP4602387B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007239602A JP4602387B2 (en) 2007-09-14 2007-09-14 MEMORY CARD, NONVOLATILE MEMORY, NONVOLATILE MEMORY DATA WRITE METHOD AND DATA WRITE DEVICE

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007239602A JP4602387B2 (en) 2007-09-14 2007-09-14 MEMORY CARD, NONVOLATILE MEMORY, NONVOLATILE MEMORY DATA WRITE METHOD AND DATA WRITE DEVICE

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2000301521A Division JP4031190B2 (en) 2000-09-29 2000-09-29 MEMORY CARD, NONVOLATILE MEMORY, NONVOLATILE MEMORY DATA WRITE METHOD AND DATA WRITE DEVICE

Publications (2)

Publication Number Publication Date
JP2007328824A true JP2007328824A (en) 2007-12-20
JP4602387B2 JP4602387B2 (en) 2010-12-22

Family

ID=38929185

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007239602A Expired - Fee Related JP4602387B2 (en) 2007-09-14 2007-09-14 MEMORY CARD, NONVOLATILE MEMORY, NONVOLATILE MEMORY DATA WRITE METHOD AND DATA WRITE DEVICE

Country Status (1)

Country Link
JP (1) JP4602387B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8417988B2 (en) 2009-05-26 2013-04-09 Samsung Electronics Co., Ltd. Memory systems and defective block management methods related thereto
US11016703B2 (en) 2016-09-16 2021-05-25 Sony Corporation Memory controller, memory system, information system, and memory control method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6481028A (en) * 1987-09-22 1989-03-27 Fanuc Ltd Data memory system
JPH06332806A (en) * 1993-05-25 1994-12-02 Hitachi Ltd Storage system with flash memory as storage medium and control method therefor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6481028A (en) * 1987-09-22 1989-03-27 Fanuc Ltd Data memory system
JPH06332806A (en) * 1993-05-25 1994-12-02 Hitachi Ltd Storage system with flash memory as storage medium and control method therefor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8417988B2 (en) 2009-05-26 2013-04-09 Samsung Electronics Co., Ltd. Memory systems and defective block management methods related thereto
US11016703B2 (en) 2016-09-16 2021-05-25 Sony Corporation Memory controller, memory system, information system, and memory control method

Also Published As

Publication number Publication date
JP4602387B2 (en) 2010-12-22

Similar Documents

Publication Publication Date Title
JP4031190B2 (en) MEMORY CARD, NONVOLATILE MEMORY, NONVOLATILE MEMORY DATA WRITE METHOD AND DATA WRITE DEVICE
US8914702B2 (en) Bit error repair method and information processing apparatus
JP5831271B2 (en) Method and system for starting refresh operation of semiconductor nonvolatile memory device
US20070055969A1 (en) System and method for updating firmware
WO2011024688A1 (en) Firmware update system, and information apparatus, as well as program
US20060018227A1 (en) Controller, data memory system, data rewriting method, and computer program product
JPWO2005111812A1 (en) MEMORY CONTROL CIRCUIT, NONVOLATILE MEMORY DEVICE, AND MEMORY CONTROL METHOD
JP2000105694A (en) Flash memory, microcomputer equipped with flash memory, and method for storing program in flash memory
US20080098388A1 (en) Safe Flashing
JP4843222B2 (en) Semiconductor memory device control method, memory card, and host device
JP3830867B2 (en) Single-chip microcomputer and its boot area switching method
JP4158526B2 (en) Memory card and data writing method to memory
JP4602387B2 (en) MEMORY CARD, NONVOLATILE MEMORY, NONVOLATILE MEMORY DATA WRITE METHOD AND DATA WRITE DEVICE
JP2009151386A (en) Image processor
US7257030B2 (en) Operating a storage component
JP2007133512A (en) Information processor with flash rom, and data erasing method for flash rom
JP3651886B2 (en) Electronic system
JP2011081641A (en) Memory controller
US7313648B2 (en) Corruption tolerant method and system for deploying and modifying data in flash memory
JP2005128613A (en) Image forming device
JP5821788B2 (en) Electronic control unit
JP2005316667A (en) Method for updating firmware
JP6401070B2 (en) Software rewriting device
JP2011123560A (en) Flash disk device
JP2004094820A (en) Electronic device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070914

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: 20100907

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: 20100929

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

Free format text: PAYMENT UNTIL: 20131008

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20131008

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees