JP3576625B2 - Data management method for flash memory card and data processing device using the data management method - Google Patents

Data management method for flash memory card and data processing device using the data management method Download PDF

Info

Publication number
JP3576625B2
JP3576625B2 JP4089495A JP4089495A JP3576625B2 JP 3576625 B2 JP3576625 B2 JP 3576625B2 JP 4089495 A JP4089495 A JP 4089495A JP 4089495 A JP4089495 A JP 4089495A JP 3576625 B2 JP3576625 B2 JP 3576625B2
Authority
JP
Japan
Prior art keywords
block
page
erase
flash memory
memory card
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.)
Expired - Lifetime
Application number
JP4089495A
Other languages
Japanese (ja)
Other versions
JPH08235028A (en
Inventor
英順 田沼
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 JP4089495A priority Critical patent/JP3576625B2/en
Publication of JPH08235028A publication Critical patent/JPH08235028A/en
Application granted granted Critical
Publication of JP3576625B2 publication Critical patent/JP3576625B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Debugging And Monitoring (AREA)
  • Read Only Memory (AREA)

Description

【0001】
【産業上の利用分野】
この発明は、フラッシュEEPROMから構成されるコモンメモリと、カード属性情報を格納するアトリビュートメモリとを内蔵し、データ処理装置に着脱自在に装着されるフラッシュメモリカードのデータ管理方法、およびそのデータ管理方法を使用したデータ処理装置に関する。
【0002】
【従来の技術】
従来、パーソナルコンピュータやワークステーション等のデータ処理装置の外部記憶装置としては、通常、ハードディスク装置やフロッピーディスク装置などのディスク装置が用いられていた。
【0003】
最近では、それらディスク装置に代わる外部記憶装置として、フラッシュEEPROMを内蔵したフラッシュメモリカードが使用されるようになり、カード装着用のスロットが標準装備されたパーソナルコンピュータや、パーソナルコンピュータに外付けされて使用されるメモリカードリーダ/ライタなどの周辺装置も開発されている。
【0004】
フラッシュメモリカードは携帯性に富んでおり、またフロッピーディスクよりも大きな容量のファイルを取り扱う事ができる。このため、特にノートブック型のポータブルコンピュータ、PDA、電子スチルカメラなどの外部記憶装置として有効である。
【0005】
【発明が解決しようとする課題】
しかし、フラッシュメモリカードは、書き換え回数の制限という固有の問題を有しており、新たなメモリ技術の採用によって改良が続けられてはいるものの、外部記憶装置として使用する上では、データ記憶の信頼性の面で完全ではない。このため、フラッシュメモリカードにおいては、データのリード/ライトだけでなく、データの信頼性についてもソフトウェアで管理することが必要である。
【0006】
この発明はこのような点に鑑みてなされたものであり、フラッシュEEPROMのエラー発生状況に係る情報を効率良く管理できるようにして、フラッシュメモリカードの信頼性を十分に向上させることができるデータ管理方法およびそのデータ管理方法を使用したデータ処理装置を提供することを目的とする。
【0007】
【課題を解決するための手段および作用】
この発明は、データ記憶用の複数のブロックを有するフラッシュEEPROMを内蔵し、データ処理装置に着脱自在に装着されるフラッシュメモリカードのデータ管理方法において、前記各ブロックはページ毎にデータ記憶領域および冗長領域を有し、ブロックイレーズ処理が実行される度、該当するブロックのイレーズ回数をカウントアップし、そのカウントアップされたイレーズ回数の値が所定のしきい値を越えているか否かを検出するステップと、各ページに対するアクセス処理を実行する度、そのアクセス処理において発生されたエラー内容を示すページステータス情報を、該当するページの冗長領域に書き込むステップであって、前記イレーズ回数の値が所定のしきい値を越えていることが検出された際、イレーズ回数がイレーズ限界回数を越えたことを示すイレーズ回数オーバーフラグを前記ページステータス情報として該当するブロックの所定ページの冗長領域に書き込むステップとを具備することを特徴とする。
【0008】
このデータ管理方法によれば、フラッシュEEPROMが持つ冗長部を使用して、データの信頼性向上に必要なページステータス情報が管理される。ページステータス情報は、フラッシュEEPROMをアクセスした際に発生したエラーの内容を示すものであり、これによって各ページのデータ領域の現在の状態および過去のエラーの内容を認識することができるようになり、フラッシュメモリカードの信頼性を高めることができる。
【0009】
特に、各ぺージの冗長領域を使用してページステータス情報を管理しているので、アクセス対象のページの状態を即座に認識することができる。
ページステータス情報としては、ブロックイレーズ処理が実行される度、該当するブロックのイレーズ回数をカウントアップし、そのカウントアップされたイレーズ回数の値が所定のしきい値を越えているか否かを検出することで、イレーズ回数が所定の回数を越えたことを示すイレーズ回数オーバーフラグを管理することが好ましい。
【0010】
また、この発明は、データ記憶用の複数のブロックを有するデータブロック領域およびスペアブロックを有するスペアブロック領域とを含むフラッシュEEPROMを内蔵し、データ処理装置に着脱自在に装着されるフラッシュメモリカードのデータ管理方法において、前記各ブロックはページ毎にデータ記憶領域および冗長領域を有し、その冗長領域には、対応するページに対するアクセス処理において発生されたエラーの内容を管理するためのページステータス情報を記憶する領域が割り当てられており、ブロックイレーズ処理が実行される度、該当するブロックのイレーズ回数をカウントアップし、そのカウントアップされたイレーズ回数の値が所定のしきい値を越えているか否かを検出するイレーズ回数検出ステップと、イレーズ回数の値が所定のしきい値を越えていることが検出された際、イレーズ回数がイレーズ限界回数を越えたことを示すイレーズ回数オーバーフラグを、前記ページステータス情報の1つとして該当するブロックの所定ページの冗長領域に書き込むステップと、ページライト、ページリード、またはブロックイレーズ処理でエラーが発生された時、その処理をリトライするステップと、このリトライ処理が正常実行されない時、または前記イレーズ回数検出ステップによってイレーズ回数がしきい値を越えていることが検出された時に、該当するブロックを不良ブロックとし、その不良ブロックを前記スペアブロックによって代替するステップとを具備することを特徴とする。
【0011】
このデータ管理方法においては、イレーズ回数が所定のしきい値に達すると、リトライエラーの発生を引き起こすブロック不良が検出された場合と同様にして、スペアブロックを利用したブロック代替が行われる。
【0012】
この場合、そのブロックの所定ページの冗長領域にはイレーズ回数オーバーフラグが設定される。このため、そのイレーズ回数オーバーフラグを参照することにより、代替された原因がイレーズ回数オーバーによるものか否かを検出することができる。
【0013】
イレーズ回数オーバーが原因で不良ブロックとされたブロックは、実際には何等不良が発生されていない。したがって、例えば不良ブロック数が増え、代替対象のスペアブロックが不足した場合などには、イレーズ回数オーバーフラグがセットされている不良ブロックを検出し、それを正常なブロックとして利用するなどの運用形態をとることが可能となる。これにより、結果としてフラッシュメモリカードの寿命を延ばすことができる。
【0014】
また、イレーズ回数オーバーフラグに加え、発生したエラーに応じてプログラムエラーフラグ、イレーズエラーフラグ、ベリファイエラーフラグなどを冗長領域にセットすることが好ましい。これにより、ページの状態を管理することができるので、代替の原因をさらに詳しく調べることが可能となる。
【0015】
【実施例】
以下、図面を参照して、この発明の実施例を説明する。
図1には、この発明の一実施例に係るデータ管理方法によって制御されるフラッシュメモリカード11の構成とそのカード11をアクセス制御するポータブルパーソナルコンピュータのハードウェアおよびソフトウェア構成が示されている。
【0016】
フラッシュメモリカード11はJEIDA/PCMCIAに準拠した物理的および電気的仕様を持つPCカードであり、他のPCカード12と同様に、パーソナルコンピュータのPCカードホストアダプタ13が提供するカードスロットに取り外し自在に装着される。
【0017】
フラッシュメモリカード11の認識およびアクセスは、パーソナルコンピュータのシステムメモリにロードされて実行されるフラッシュメモリカードドライバ14、カードサービス15、ソケットサービス16、およびメモリテクノロジトライバ17などによって制御される。
【0018】
フラッシュメモリカードドライバ14は、フラッシュメモリカード11に対応したデバイスドライバプログラムであり、JEIDA/PCMCIAで規定されているクライアントドライバとして使用される。このフラッシュメモリカードドライバ14は、オペレーティングシステム18やアプリケーションプログラム19からのコマンドをフラッシュメモリカード11用のコマンド(ページライトコマンド、ページリードコマンド、ブロックイレーズコマンドなど)に変換して、フラッシュメモリカード11をアククセス制御する。
【0019】
また、フラッシュメモリカードドライバ14は、フラッシュメモリカード11の信頼性を向上させるために、フラッシュメモリカード11に対するアクセスで発生したエラー履歴の管理機能や、不良ブロックの代替機能などを有している。
【0020】
カードサービス15、ソケットサービス16、およびメモリテクノロジドライバ17は、それぞれJEIDA/PCMCIAによって規定されたドライバプログラム群であり、PCカードのリソース管理、PCカード認識などに利用される。
【0021】
フラッシュメモリカード11は、パーソナルコンピュータの2次記憶装置として利用されるPCカードであり、アトリビュートメモリ111と、コモンメモリ112を内蔵している。
【0022】
アトリビュートメモリ111は、EEPROMなどから構成される不揮発性メモリであり、ここにはカード属性情報が格納されている。カード属性情報は、コモンメモリ112のメモリの種類、メモリサイズ、アクセス速度等の情報と、フラッシュメモリカード11の用途(ディスクとして使用するか、メモリとして使用するかなど)に関する情報を含んでいる。
【0023】
さらに、このフラッシュメモリカード11においては、コモンメモリ112に使用されているNAND型フラッシュEEPROMのイレーズ限界回数を示す値もカード属性情報の1つとしてアトリビュートメモリ111に格納されている。
【0024】
コモンメモリ12は、パーソナルコンピュータから供給されるユーザデータなどを記憶するためのメモリデバイスであり、複数のNAND型フラッシュEEPROMから構成されている。
【0025】
NAND型フラッシュEEPROMにおいては、書き込みや消去を行う際に扱うデータ量に最低単位が定まっており、消去はブロック単位で実行され、データ書き込み、および読み出しはページ単位で実行される。
【0026】
この実施例では、NAND型フラッシュEEPROMとして、例えば、16MビットのNAND型フラッシュEEPROMが使用される場合を想定する。
この16MビットのNAND型フラッシュEEPROMは、図2に示されているように、メモリセルアレイ21とデータレジスタ22を備えている。メモリセルアレイ21は、8K行×264列×8ビットのメモリ構成を有し、512個のブロックに分割されている。データ消去はこのブロック単位で実行することができる。各ブロックは16ページ(行)から構成されており、各ページは、256バイトのデータ記憶領域と8バイトの冗長領域を備えている。
【0027】
データの書込みと読み出しは、256+8バイトのデータレジスタ22を介して、ページ単位(256+8バイト)で実行される。また、指定したページ内の冗長領域(8バイト)だけをリード/ライトアクセスすることもできる。
【0028】
図1のコモンメモリ12のデータ記憶空間は、多数のブロックを含むユーザデータ格納領域と、不良ブロック代替用のいくつかのスペアブロックを含むスペアブロック領域と、ブロック管理情報を記憶するブロックを含むブロック管理領域とに分割されている。
【0029】
ブロック管理情報は、データ書き込みや消去などを正常に実行することができない不良ブロックの物理ブロック番号(物理ブロックアドレス)を管理する不良ブロック管理テーブル、およびスペアブロックの物理ブロック番号毎にそれが代替する不良ブロックの物理ブロック番号(物理ブロックアドレス)を管理するスペアブロック管理テーブルなどを含んでいる。
【0030】
これら不良ブロック管理テーブルおよびスペアブロック管理テーブルの内容を書き換えることにより、不良ブロックをスペアブロックによって代替することができる。すなわち、エラー発生したブロックはその物理ブロック番号が不良ブロック管理テーブルに登録されることによって不良ブロックとして扱われる。アクセス対象のブロックが不良ブロックならば、スペアブロック管理テーブルが参照され、これによって代替先のスペアブロックが認識される。これによって、不良ブロックの代りに、スペアブロックがアクセスされる。
【0031】
また、コモンメモリ112においては、各ページの8バイトの冗長領域は、ページステータス情報などの管理データの格納に利用されている。この管理データは、フラッシュメモリカード11の信頼性を高めるために、前述のフラッシュメモリカードドライバ14によって管理されている。
【0032】
ページステータス情報は、対応するページに対するアクセスで発生したエラー内容を識別するための複数のフラグから構成されている。フラッシュメモリカードドライバ14は、各冗長領域のフラグを参照することにより、ページ単位でエラー発生履歴などを認識することができる。
【0033】
冗長領域を利用したコモンメモリ112のデータ管理はこの発明の特徴とする部分であり、以下、図3を参照して、コモンメモリ112上におけるユーザデータおよび管理データの記憶形式について具体的に説明する。
【0034】
1ページのデータ領域は256バイトであるので、フラッシュメモリカード11をフロッピーディスクまたはハードディスクとして使用する場合には、1セクタ分のユーザデータは図示のように連続する2ページに亙って記憶される。
【0035】
各ブロックの先頭ページ(ページ0)の8バイトの冗長領域には、次のような管理データが格納される。
ページデータ用LRC(2バイト)
イレーズカウンタ(4バイト)
イレーズカウンタ用LRC(1バイト)
ページステータス情報(1バイト)
ページデータ用LRCは、水平冗長検査(LRC)の手法を利用して、ページ0の256バイトのデータ領域に格納されたユーザデータ(セクタ0の上位256バイト)を計算することによって得られたエラー訂正符号である。
【0036】
このページデータ用LRCは、データライト時に作成され、データリード時に参照される。フラッシュメモリカードドライバ14は、その上位ソフトウェア(OS、アプリケーションプログラム)にデータを渡すときには、ページデータ用LRCを利用して、そのデータの有効性を確認する。
【0037】
イレーズカウンタは、対応するブロックの消去回数(データ書換え回数)を示すものであり、各ブロックの先頭ページにのみ書き込まれる。イレーズカウンタのデータ長は4バイトであり、最大で4G(ギガ)回数分を表記できる。このように大きなデータ長を確保したのは、これからのフラッシュメモリデバイス技術の進歩により、消去限界回数が増えていくことを考慮したためである。
【0038】
イレーズカウンタの値は、対応するブロックが消去される度に+1カウントアップされる。イレーズカウンタの値がアトリビュートメモリ111に格納されている消去限界回数を越えると、そのブロックをスペアブロックによって代替するための処理がフラッシュメモリカードドライバ14によって実行される。
【0039】
アトリビュートメモリ111に格納されている消去限界回数の値は、マージンを確保するために、フラッシュEEPROM自体の実際の消去限界回数よりも小さな値に設定されている。
【0040】
イレーズカウンタ用LRCは、その上位4バイトのイレーズカウンタから水平冗長検査(LRC)によって計算されたエラー訂正符号である。イレーズカウンタは、ブロック全体のデータ管理に影響を及ぼす重要なデータであり、イレーズカウンタ用LRCはそのイレーズカウンタの信頼性を担保するために使用される。
【0041】
ページステータス情報は対応するページの状態を示すものであり、その1バイト中の8ビットにそれぞれに意味を持たせることにより、対応するページの状態を8つのフラグによって表す。
【0042】
ページ1〜ページ16それぞれの冗長領域には、ページデータ用LRCとページステータス情報だけが格納され、イレーズカウンタおよびイレーズカウンタ用LRCは格納されない。
【0043】
次に、ページステータス情報の詳細を説明する。ページステータス情報は8つのフラグを持つことができるが、この実施例では、次の5つのフラグが定義されている。
【0044】
プログラムフラグ(b7)

Figure 0003576625
イレーズ回数オーバーフラグ(b6)
b6=0(イレーズ回数がしきい値を超過)
ベリファイエラーフラグ(b2)
b2=0(リードベリファイエラー)
プログラムエラーフラグ(b1)
b1=0(プログラムエラー)
イレーズエラーフラグ(b0)
b0=0(イレーズエラー)
通常状態(工場出荷時も含む)においては、ページステータス情報の1バイトは、FFh(8ビットがすべて1)で表現される。以下、各フラグの説明を行う。
【0045】
プログラムフラグ(b7)は、対応するページにデータを書き込む場合にブロックイレーズを実行する必要があるか否かを判断するために使用されるものであり、対応するページを含むブロックが消去済で、そのページに対する書き込みがまだ実行されてない状態(プログラムフラグ=1)と、対応するページに対する書き込みが実行済みである状態(プログラムフラグ=0)のいずれかを示す。
【0046】
消去のみのコマンドが発行された直後か、初期状態である場合は、プログラムフラグは“1”である。この場合、書き込む際に再度消去する必要は無い。
イレーズ回数オーバーフラグ(b6)は、対応するページを含むブロックの消去回数がアトリビュートメモリ111に記録されている消去限界回数の値を超過しているか否かを示すフラグである。
【0047】
すなわち、フラッシュメモリカードデバイスドライバ14は、ブロックイレーズを実行する度に対応するイレーズカウンタの値を+1インクリメントし、そのインクリメントされたイレーズカウンタの値がアトリビュートメモリ111の消去限界回数を越えているか否かを調べる。越えていたならば、該当するブロックに含まれる全ページの冗長領域、またはそのブロックの先頭ページの冗長領域に、“0”のイレーズ回数オーバーフラグがセットされる。また、この場合には、そのブロックはその時点で劣化を起こして無くても不良ブロックとして扱われ、スペアブロックとの代替処理が行われる。フラッシュメモリカードデバイスドライバ14は、各不良ブロックのイレーズ回数オーバーフラグを参照することにより、実際にエラーを起こしているブロックか、イレーズ回数オーバーによって不良として扱われているブロックかを識別することができる。
【0048】
ベリファイエラーフラグ(b2)は、対応するページに対するページリード時に実行されるリードベリファイ作業でエラーが発生したか否かを示すフラグである。
【0049】
すなわち、フラッシュメモリカードデバイスドライバ14は、指定されたページからデータをリードした後、そのリードデータの正当性を対応するページデータLRCを利用して検証する。リードデータにエラーが検出されたならば、ベリファイエラーフラグが“0”にセットされる。この場合、ページリードはリトライされるが、リトライ処理で再度エラーが発生されると、そのページを含むブロックは不良ブロックとして扱われ、スペアブロックとの代替が行われる。ベリファイエラーが原因で代替された不良ブロックは、以降、使用されることはない。
【0050】
プログラムエラーフラグ(b1)は、対応するページに対するページライト(プログラム)実行後にそのライトデータの正当性を検証するために実行されるプログラムベリファイ作業でエラーが発生したか否かを示すフラグである。
【0051】
すなわち、フラッシュメモリカードデバイスドライバ14は、指定されたページにライトデータを書き込んだ後、そのページからデータを一旦リードして、ライトデータと比較する。不一致であれば、プログラムエラーフラグが“0”にセットされる。この場合、ページライトはリトライされるが、リトライ処理で再度エラーが発生されると、そのページを含むブロックは不良ブロックとして扱われ、スペアブロックと代替される。この代替処理では、不良ブロックの内容が読み出されてスペアブロックにコピーされた後、スペアブロックに対するライトデータの書き込みが実行される。プログラムエラーが原因で代替された不良ブロックは、以降、使用されることはない。
【0052】
イレーズエラーフラグ(b0)は、対応するページを含むブロックに対する消去動作が正常に実行されたか否かを示すフラグである。
すなわち、フラッシュメモリカードデバイスドライバ14は、指定されたブロックに対するイレーズ処理を実行した後、イレーズ処理が正常に実行されたか否かを調べる。イレーズが失敗した場合には、そのブロックに含まれる全ページの冗長領域、またはそのブロックの先頭ページの冗長領域に、“0”のイレーズエラーフラグがセットされる。この場合、ブロックイレーズ処理はリトライされるが、リトライ処理で再度エラーが発生されると、そのブロックは不良ブロックとして扱われ、スペアブロックと代替される。イレーズエラーが原因で代替された不良ブロックは、以降、使用されることはない。
【0053】
次に、図4〜図6のフローチャートを参照して、フラッシュメモリカードデバイスドライバ14によって実行されるページリード、ページライト、およびブロックイレーズ処理について説明する。
【0054】
まず、図4のフローチャートを参照して、OS18やアプリケーションプログラム19からリードコマンドが発行された場合に実行されるページリード処理の手順を説明する。
【0055】
OS18やアプリケーションプログラム19からリード要求コマンドを受け取ると、フラッシュメモリカードデバイスドライバ14は、ページリージコマンドを発行することによって、リード要求コマンドによって指定されたページに対するリードアクセスを開始し、そのページから256バイトのユーザデータと8バイトの管理データを同時にリードする(ステップS101)。
【0056】
この後、フラッシュメモリカードデバイスドライバ14は、リードされたページデータに含まれる256バイトのユーザデータに従ってLRCを計算し(ステップS102)、その計算されたLRCと、リードされたページデータに含まれるページデータ用LRCとの一致の有無に従ってページリードが成功したか否かを判断する(ステップS103)。
【0057】
計算されたLRCが、リードされたページデータに含まれるページデータ用LRCと一致したならば、ページリードが正常に実行されたことが確認され、リードされたページデータに含まれる256バイトのユーザデータが有効データとして、OS18やアプリケーションプログラム19に渡される。
【0058】
一方、不一致であれば、ページリードが失敗したと認識され、ベリファイエラーフラグが“0”にセットされた後、ページリードがリトライされる(ステップS105)。このリトライで再度リード処理のエラーが発生されると、フラッシュメモリカードデバイスドライバ14は、ブロック代替処理を行う(ステップS106)。
【0059】
このブロック代替処理では、スペアブロック管理テーブルが書き替えられ、エラー発生したブロックの物理ブロック番号が所定のスペアブロックに対応するエントリに登録される。この後、フラッシュメモリカードデバイスドライバ14は、エラー発生したブロックの物理ブロック番号を不良ブロック管理テーブルに登録してそれを不良ブロックにする(ステップS107)。
【0060】
これらステップS106,S107の処理により、以降は、不良ブロックを指定するブロック番号がスペアブロックのブロック番号に変換され、不良ブロックの代りに、スペアブロックがアクセスされることになる。なお、ステップS106とS107はどちらを先に実行しても良い。
【0061】
次に、図5のフローチャートを参照して、OS18やアプリケーションプログラム19からライトコマンドが発行された場合に実行されるページライト処理の手順を説明する。
【0062】
OS18やアプリケーションプログラム19からライト要求コマンドを受け取ると、フラッシュメモリカードデバイスドライバ14は、まず、冗長領域だけをリードする専用コマンドをフラッシュEEPROMに発行して、ライトアクセス対象のページから8バイトの管理データをリードする(ステップS201)。次いで、フラッシュメモリカードデバイスドライバ14は、リードした管理データに含まれるプログラムフラグを参照して、該当するページが消去済か否かを調べる(ステップS202)。
【0063】
該当するページが消去済で無い(プログラムフラグ=“1”)ならば、フラッシュメモリカードデバイスドライバ14は、ステップS205以降のページライト処理の実行に先だって、次の処理を行う。
【0064】
すなわち、フラッシュメモリカードデバイスドライバ14は、まず、ライト対象のページを含むブロックに対するイレーズ処理を実行し(ステップS203)、その後、ステップS201でリードした管理データに含まれるイレーズカウンタの値を+1カウントアップする(ステップS204)。
【0065】
このようにしてプログラム可能状態になると、フラッシュメモリカードデバイスドライバ14は、256バイトのライトデータからページデータ用LRCなどを計算によって求め、256バイトのライトデータと8バイトの管理データを含むページライトデータを生成する(ステップS205)。
【0066】
次に、フラッシュメモリカードデバイスドライバ14は、ページライトコマンドを発行してページライトデータのライトアクセスを実行し(ステップS206)、その後、書き込んだデータを即座にフラッシュEEPROMから読み出して、それをページライトデータと比較するライトベリファイを実行する(ステップS207)。
【0067】
リードデータとページライトデータが一致せず、ページライトが失敗したと判断されると、フラッシュメモリカードデバイスドライバ14は、プログラムエラーフラグを“0”にセットした後、ページライト処理をリトライする(ステップS209)。このリトライで再度ページライト処理のエラーが発生されると、フラッシュメモリカードデバイスドライバ14は、ブロック代替処理を行う(ステップS215)。
【0068】
このブロック代替処理では、まず、エラー発生したブロックの記憶内容がそれを代替するスペアブロックにコピーされた後、ライトデータがスペアブロックに書き込まれる。この後、スペアブロック管理テーブルが書き替えられて、エラー発生したブロックの物理ブロック番号がそれを代替するスペアブロックのエントリに登録される。この後、フラッシュメモリカードデバイスドライバ14は、エラー発生したブロックの物理ブロック番号を不良ブロック管理テーブルに登録してそれを不良ブロックにする(ステップS216)。
【0069】
これらステップS215,S216の処理により、以降は、不良ブロックの代りに、スペアブロックがアクセスされることになる。なお、ステップS106とS107はどちらを先に実行しても良い。
【0070】
リードデータとページライトデータが一致し、ページライトが成功したと判断された場合には(リトライ成功も含む)、フラッシュメモリカードデバイスドライバ14は、ステップS204でカウントアップされたイレーズカウンタの値がアトリビュートメモリ111の消去限界回数を越えたか否かを調べる(ステップS210)。消去限界回数を越えている場合には、フラッシュメモリカードデバイスドライバ14は、ブロック代替処理を行う(ステップS211)。
【0071】
このブロック代替処理では、まず、消去限界回数を越えたブロックの記憶内容がそれを代替するスペアブロックにコピーされた後、スペアブロックの先頭ページのイレーズカウンタの値が初期値(=0)に設定し直される。そして、スペアブロック管理テーブルが書き替えられて、消去限界回数を越えたブロックの物理ブロック番号がそれを代替するスペアブロックのエントリに登録される。
【0072】
この後、フラッシュメモリカードデバイスドライバ14は、エラー発生したブロックの物理ブロック番号を不良ブロック管理テーブルに登録してそれを不良ブロックにし(ステップS212)、次いで、不良ブロックの先頭ページに“0”のイレーズ回数オーバーフラグをセットする(ステップS213)。
【0073】
これらステップS212,S212の処理により、以降は、不良ブロックの代りに、スペアブロックがアクセスされることになる。また、ステップS213の処理により、不良ブロックにされた原因(代替の原因)がイレーズ回数オーバーによるものであることを、知ることができる。
【0074】
なお、ステップS211とS213はどちらを先に実行しても良い。また、ステップS210〜S213の処理は、ステップS202でプログラムフラグ=1であることが検出された場合には実行する必要はない。これは、プログラムフラグ=1ならば、イレーズカウンタのカウントアップは実行されないからである。
【0075】
次に、図6のフローチャートを参照して、OS18やアプリケーションプログラム19からイレーズコマンドが発行された場合に実行されるブロックイレーズ処理の手順を説明する。
【0076】
OS18やアプリケーションプログラム19からイレーズコマンドを受け取ると、フラッシュメモリカードデバイスドライバ14は、まず、冗長領域だけをリードする専用コマンドをフラッシュEEPROMに発行して、ブロックイレーズ対象の先頭ページから8バイトの管理データをリードする(ステップS301)。次いで、フラッシュメモリカードデバイスドライバ14は、リードした管理データに含まれるプログラムフラグを参照して、該当するページがプログラムされている状態か否かを調べる(ステップS302)。
【0077】
該当するページがプログラムされている(プログラムフラグ=“0”)ならば、フラッシュメモリカードデバイスドライバ14は、ブロックイレーズコマンドを発行して、イレーズ対象のブロックに対するイレーズ処理を実行し(ステップS303)、その後、ステップS301でリードした管理データに含まれるイレーズカウンタの値を+1カウントアップする(ステップS304)。
【0078】
次いで、フラッシュメモリカードデバイスドライバ14は、例えば、イレーズしたブロックの記憶データが初期値(各ビット=“1”)か否かを調べることなどにより、ブロックイレーズが正常に実行されたか否かを検出する(ステップS305)。
【0079】
ブロックイレーズが失敗したと判断されると、フラッシュメモリカードデバイスドライバ14は、イレーズ対象ブロックの先頭ページの冗長領域に“0”のイレーズフラグをセットした後、ブロックイレーズ処理をリトライする(ステップS306)。このリトライで再度ブロックイレーズ処理のエラーが発生されると、フラッシュメモリカードデバイスドライバ14は、ブロック代替処理を行う(ステップS312)。
【0080】
このブロック代替処理では、まず、スペアブロック管理テーブルが書き替えられて、エラー発生したブロックの物理ブロック番号がそれを代替するスペアブロックのエントリに登録される。この後、フラッシュメモリカードデバイスドライバ14は、エラー発生したブロックの物理ブロック番号を不良ブロック管理テーブルに登録してそれを不良ブロックにする(ステップS313)。
【0081】
これらステップS312,S313の処理により、以降は、不良ブロックの代りに、スペアブロックがアクセスされることになる。なお、ステップS312とS313はどちらを先に実行しても良い。
【0082】
ブロックイレーズが成功したと判断された場合には(リトライ成功も含む)、フラッシュメモリカードデバイスドライバ14は、ステップS304でカウントアップされたイレーズカウンタの値がアトリビュートメモリ111の消去限界回数を越えたか否かを調べる(ステップS307)。消去限界回数を越えている場合には、フラッシュメモリカードデバイスドライバ14は、ブロック代替処理を行う(ステップS308)。
【0083】
このブロック代替処理では、消去限界回数を越えたブロックの物理ブロック番号がそれを代替するスペアブロックのエントリに登録される。この後、フラッシュメモリカードデバイスドライバ14は、エラー発生したブロックの物理ブロック番号を不良ブロック管理テーブルに登録してそれを不良ブロックにし(ステップS309)、次いで、不良ブロックの先頭ページに“0”のイレーズ回数オーバーフラグをセットする(ステップS310)。
【0084】
これらステップS308,S309の処理により、以降は、不良ブロックの代りに、スペアブロックがアクセスされることになる。また、ステップS310の処理により、不良ブロックにされた原因(代替の原因)がイレーズ回数オーバーによるものであることを、知ることができる。なお、ステップS308とS309はどちらを先に実行しても良い。
【0085】
一方、ステップS307で消去限界回数を越えていないことが検出された場合には、フラッシュメモリカードデバイスドライバ14は、イレーズしたブロックの先頭ページに、ステップS304でカウントアップしたイレーズカウンタの値を書き込み、そして各ページのプログラムフラグを“1”にリセットとして終了する(ステップS311)。
【0086】
以上説明したように、この実施例においては、フラッシュEEPROMが持つ冗長部を使用して、データの信頼性向上に必要なページステータス情報が管理される。ページステータス情報は、フラッシュEEPROMをアクセスした際に発生したエラーの内容などを示すものであり、これによって各ページのデータ領域の現在の状態および過去のエラー履歴などを認識することができるようになり、フラッシュメモリカード11の信頼性を高めることができる。
【0087】
また、イレーズ回数が消去限界回数を越えると、ページライトリトライ、ページリードリトライ、またはブロックイレーズリトライのエラーを引き起こすブロック不良が発生された場合と同様にして、スペアブロックを利用したブロック代替が行われる。この場合、そのブロックの先頭ページの冗長領域にはイレーズ回数オーバーフラグが設定される。このため、そのイレーズ回数オーバフラグを参照することにより、代替された原因がイレーズ回数オーバーによるものか、あるいはプログラムエラー、リードベリファイエラー、イレーズエラーなど、他の原因によるものかを検出することができる。
【0088】
イレーズ回数オーバーが原因で不良ブロックとされたブロックは、実際には何等不良が発生されていない。したがって、例えば不良ブロック数が増え、代替対象のスペアブロックが不足した場合などには、イレーズ回数オーバフラグがセットされている不良ブロックを検出し、それを正常なブロックとして利用するなどの運用形態をとることが可能となる。これにより、結果としてフラッシュメモリカード11の寿命を延ばすことができる。
【0089】
なお、この実施例では、プログラムエラー、リードベリファイエラー、イレーズエラーのリトライで再度エラーが発生した時に直ぐに該当のブロックを不良ブロックにして代替処理を行ったが、リトライ回数を複数回に設定し、複数回リトライしても正常に処理が実行されない場合に代替処理を実行するようにしても良い。
【0090】
また、この実施例では、フラッシュEEPROM上のスペアブロック管理テーブル上に各スペアブロックの代替先を登録することによってブロック代替を実行したが、この代替処理は、フラッシュメモリカードドライバ14が論理ブロック番号と物理ブロック番号との対応関係を示すアドレス変換テーブルをメモリ上にに作成し、不良ブロックの物理ブロック番号をそれを代替するスペアブロックの物理ブロック番号に変更することによって行うこともできる。
【0091】
また、この実施例では各ページが256バイトのデータ領域と8バイトの冗長領域とから構成される16MビットタイプのフラッシュEEPROMを使用する場合を例示したが、例えば、各ページが512バイトのデータ領域と8バイトの冗長領域とから構成される32MビットタイプのフラッシュEEPROMを使用すれば、ページステータス情報を含む管理データは512バイトのセクタのステータスを示すことになるので、ページステータス情報を含む管理データを、セクタ単位でのデータ管理にさらに有効に利用することが可能となる。
【0092】
また、この実施例のデータ管理方法は、パーソナルコンピュータに限らず、フラッシュメモリカード11をアクセス制御できる装置であればPDAなど他の全てのデータ処理装置に適用することができる。
【0093】
さらに、この実施例ではフラッシュメモリカード11を制御するドライバ14にデータ管理機能を設けたが、フラッシュEEPROMとプロセッサとを内蔵するインテリジェントなフラッシュディスク装置を使用する場合には、そのフラッシュディスク装置自体に同様のデータ管理機能を持たせることもできる。
【0094】
【発明の効果】
以上説明したように、この発明によれば、フラッシュEEPROMのエラー発生状況に係る情報を効率良く管理できるようなり、フラッシュメモリカードの信頼性を十分に向上させることが可能となる。特に、各ぺージの冗長領域を使用してページステータス情報を管理しているので、アクセス対象のページの状態を即座に認識することができる。
【図面の簡単な説明】
【図1】この発明の一実施例に係るフラッシュメモリカードのデータ管理方法を使用したパーソナルコンピュータのハードウェアおよびソフトウェア構成を示すブロック図。
【図2】同実施例で使用されるフラッシュメモリカードに設けられたフラッシュEEPROMの回路構成を示す図。
【図3】同実施例で使用されるフラッシュメモリカードに格納される管理データのデータ構造を説明するための図。
【図4】同実施例のデータ管理方法が適用されたページリード処理の手順を説明するフローチャート。
【図5】同実施例のデータ管理方法が適用されたページライト処理の手順を説明するフローチャート。
【図6】同実施例のデータ管理方法が適用されたブロックイレーズ処理の手順を説明するフローチャート。
【符号の説明】
11…フラッシュメモリカード、12…他のPCカード、13…PCカードホストアダプタ、14…フラッシュメモリカードドライバ、15…カードサービス、16…ソケットサービス、17…メモリテクノロジドライバ、18…OS、10…アプリケーションプログラム。[0001]
[Industrial applications]
The present invention has a built-in common memory including a flash EEPROM and an attribute memory for storing card attribute information, and has a data management method for a flash memory card detachably mounted on a data processing device, and a data management method for the same. And a data processing device using the same.
[0002]
[Prior art]
Conventionally, as an external storage device of a data processing device such as a personal computer or a workstation, a disk device such as a hard disk device or a floppy disk device has been usually used.
[0003]
Recently, a flash memory card with a built-in flash EEPROM has been used as an external storage device to replace the disk device, and a personal computer equipped with a card mounting slot as a standard, or an externally mounted personal computer. Peripheral devices such as a memory card reader / writer used have also been developed.
[0004]
Flash memory cards are portable and can handle files larger than floppy disks. Therefore, it is particularly effective as an external storage device such as a notebook-type portable computer, a PDA, and an electronic still camera.
[0005]
[Problems to be solved by the invention]
However, flash memory cards have an inherent problem of limiting the number of times of rewriting, and although they have been continuously improved by the adoption of new memory technology, the reliability of data storage is not sufficient for use as an external storage device. Not perfect in terms of sex. For this reason, in a flash memory card, it is necessary to manage not only data read / write but also data reliability by software.
[0006]
SUMMARY OF THE INVENTION The present invention has been made in view of the above points, and has been made in view of the above circumstances, and has been made in consideration of the above circumstances, and has been made in consideration of the above circumstances. It is an object of the present invention to provide a method and a data processing device using the data management method.
[0007]
Means and action for solving the problem
The present inventionIn a data management method for a flash memory card having a built-in flash EEPROM having a plurality of blocks for data storage and detachably mounted in a data processing apparatus, each block has a data storage area and a redundant area for each page. Each time a block erase process is executed, counting up the number of times of erasure of the corresponding block, detecting whether or not the value of the number of times of erasure exceeds a predetermined threshold value; Writing the page status information indicating the content of the error generated in the access processing to the redundant area of the corresponding page each time the access processing is performed. Is detected, the number of erases exceeds the erase limit. Characterized by comprising the step of writing the erase count over flag in the redundant area of a predetermined page of a block corresponding as the page status information indicating that the.
[0008]
According to this data management method, the page status information necessary for improving the reliability of data is managed using the redundant portion of the flash EEPROM. The page status information indicates the content of an error that has occurred when accessing the flash EEPROM, and thereby, the current state of the data area of each page and the pastError descriptionCan be recognized, and the reliability of the flash memory card can be improved.
[0009]
In particular, since the page status information is managed using the redundant area of each page, the state of the page to be accessed can be immediately recognized.
As page status information,Each time the block erase process is executed, the number of times of erasure of the corresponding block is counted up, and it is detected whether or not the value of the counted up number of erases exceeds a predetermined threshold value. It is preferable to manage an erase count over flag indicating that a predetermined count has been exceeded.
[0010]
In addition, the present inventionA flash EEPROM including a data block area having a plurality of blocks for data storage and a spare block area having a spare block;In a data management method for a flash memory card detachably mounted on a data processing device, each block has a data storage area and a redundant area for each page, and the redundant area is generated in an access process for a corresponding page. Was doneError descriptionAn area for storing page status information for managing the block is allocated, and every time the block erase process is executed, the number of times of erasing of the corresponding block is counted up, and the value of the counted number of times of erasing is set to a predetermined value. An erasure count detecting step for detecting whether or not the number of erasures has exceeded a threshold value; Writing the erase count over flag shown as one of the page status information into a redundant area of a predetermined page of a corresponding block; and, when an error occurs in page write, page read, or block erase processing, the processing is executed. Steps to retry and when this retry processing is not executed normally or before When it is detected that the erase count by erase count detection step exceeds the threshold value, the corresponding block is a defective block, replacing the defective block with the spare block stepAnd characterized in that:
[0011]
In this data management method, when the number of times of erasure reaches a predetermined threshold value, block replacement using a spare block is performed in the same manner as when a block failure causing a retry error is detected.
[0012]
In this case, an erase count over flag is set in a redundant area of a predetermined page of the block. Therefore, by referring to the erase count over flag, it is possible to detect whether or not the substitute cause is due to the erase count over.
[0013]
No defective block has actually occurred in the block that was determined to be a bad block due to the erase count over. Therefore, for example, when the number of defective blocks increases and the number of spare blocks to be replaced becomes insufficient, an operation mode in which a defective block with the erase count over flag set is detected and used as a normal block is adopted. It is possible to take. As a result, the life of the flash memory card can be extended.
[0014]
In addition, it is preferable to set a program error flag, an erase error flag, a verify error flag, and the like in the redundant area in accordance with the generated error, in addition to the erase count over flag. As a result, the state of the page can be managed, and the cause of the substitution can be examined in more detail.
[0015]
【Example】
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 shows a configuration of a flash memory card 11 controlled by a data management method according to an embodiment of the present invention, and a hardware and software configuration of a portable personal computer for controlling access to the card 11.
[0016]
The flash memory card 11 is a PC card having physical and electrical specifications conforming to JEIDA / PCMCIA. Like the other PC cards 12, the flash memory card 11 is detachably inserted into a card slot provided by a PC card host adapter 13 of a personal computer. Be attached.
[0017]
Recognition and access of the flash memory card 11 is controlled by a flash memory card driver 14, a card service 15, a socket service 16, a memory technology driver 17, and the like which are loaded into a system memory of a personal computer and executed.
[0018]
The flash memory card driver 14 is a device driver program corresponding to the flash memory card 11, and is used as a client driver specified by JEIDA / PCMCIA. The flash memory card driver 14 converts a command from the operating system 18 or the application program 19 into a command (a page write command, a page read command, a block erase command, etc.) for the flash memory card 11, and converts the flash memory card 11 into a command. Access control.
[0019]
The flash memory card driver 14 has a function of managing an error history generated by accessing the flash memory card 11 and a function of replacing a bad block in order to improve the reliability of the flash memory card 11.
[0020]
The card service 15, the socket service 16, and the memory technology driver 17 are driver program groups defined by JEIDA / PCMCIA, respectively, and are used for PC card resource management, PC card recognition, and the like.
[0021]
The flash memory card 11 is a PC card used as a secondary storage device of a personal computer, and includes an attribute memory 111 and a common memory 112.
[0022]
The attribute memory 111 is a non-volatile memory such as an EEPROM, and stores card attribute information. The card attribute information includes information such as a memory type, a memory size, and an access speed of the common memory 112, and information on a use of the flash memory card 11 (whether to use as a disk or as a memory).
[0023]
Further, in this flash memory card 11, a value indicating the erase limit number of the NAND flash EEPROM used for the common memory 112 is also stored in the attribute memory 111 as one of card attribute information.
[0024]
The common memory 12 is a memory device for storing user data and the like supplied from a personal computer, and includes a plurality of NAND flash EEPROMs.
[0025]
In a NAND flash EEPROM, a minimum unit is determined for the amount of data to be handled when performing writing or erasing, erasing is performed in units of blocks, and data writing and reading are performed in units of pages.
[0026]
In this embodiment, it is assumed that, for example, a 16-Mbit NAND flash EEPROM is used as the NAND flash EEPROM.
This 16-Mbit NAND flash EEPROM includes a memory cell array 21 and a data register 22, as shown in FIG. The memory cell array 21 has a memory configuration of 8K rows × 264 columns × 8 bits, and is divided into 512 blocks. Data erasure can be performed in this block unit. Each block is composed of 16 pages (rows), and each page has a data storage area of 256 bytes and a redundant area of 8 bytes.
[0027]
Writing and reading of data are executed in page units (256 + 8 bytes) via the 256 + 8-byte data register 22. Further, only the redundant area (8 bytes) in the designated page can be read / written.
[0028]
The data storage space of the common memory 12 in FIG. 1 includes a user data storage area including a large number of blocks, a spare block area including several spare blocks for replacing bad blocks, and a block including blocks for storing block management information. It is divided into a management area.
[0029]
The block management information is replaced by a bad block management table for managing a physical block number (physical block address) of a bad block in which data writing or erasing cannot be normally executed, and for each physical block number of a spare block. It includes a spare block management table for managing a physical block number (physical block address) of a defective block.
[0030]
By rewriting the contents of the defective block management table and the spare block management table, a defective block can be replaced by a spare block. That is, a block in which an error has occurred is treated as a bad block by registering its physical block number in the bad block management table. If the block to be accessed is a defective block, the spare block management table is referred to, thereby identifying the spare block of the replacement destination. Thus, a spare block is accessed instead of a defective block.
[0031]
In the common memory 112, an 8-byte redundant area of each page is used for storing management data such as page status information. The management data is managed by the above-described flash memory card driver 14 in order to increase the reliability of the flash memory card 11.
[0032]
The page status information is composed of a plurality of flags for identifying the content of an error that has occurred in accessing the corresponding page. The flash memory card driver 14 can recognize an error occurrence history or the like in page units by referring to the flags of the respective redundant areas.
[0033]
The data management of the common memory 112 using the redundant area is a feature of the present invention. Hereinafter, the storage format of the user data and the management data on the common memory 112 will be specifically described with reference to FIG. .
[0034]
Since the data area of one page is 256 bytes, when the flash memory card 11 is used as a floppy disk or a hard disk, user data for one sector is stored over two consecutive pages as shown. .
[0035]
The following management data is stored in the 8-byte redundant area of the first page (page 0) of each block.
LRC for page data (2 bytes)
Erase counter (4 bytes)
LRC for erase counter (1 byte)
Page status information (1 byte)
The LRC for page data uses the horizontal redundancy check (LRC) technique to calculate an error obtained by calculating user data (upper 256 bytes of sector 0) stored in a 256-byte data area of page 0. It is a correction code.
[0036]
The LRC for page data is created at the time of data writing and is referred to at the time of data reading. The flash memory card driver 14 checks the validity of the data using the page data LRC when transferring the data to the upper software (OS, application program).
[0037]
The erase counter indicates the number of times of erasing (the number of times of data rewriting) of the corresponding block, and is written only in the first page of each block. The data length of the erase counter is 4 bytes, and can express 4G (giga) times at the maximum. The reason why such a large data length is secured is to take into account that the erasing limit number will increase due to the advance of flash memory device technology in the future.
[0038]
The value of the erase counter is incremented by one each time the corresponding block is erased. When the value of the erase counter exceeds the limit number of times of erasure stored in the attribute memory 111, a process for replacing the block with a spare block is executed by the flash memory card driver 14.
[0039]
The value of the erasing limit number stored in the attribute memory 111 is set to a value smaller than the actual erasing limit number of the flash EEPROM itself in order to secure a margin.
[0040]
The erase counter LRC is an error correction code calculated by a horizontal redundancy check (LRC) from the upper 4 bytes of the erase counter. The erase counter is important data that affects the data management of the entire block, and the erase counter LRC is used to ensure the reliability of the erase counter.
[0041]
The page status information indicates the state of the corresponding page. By giving meaning to each of the eight bits in one byte, the state of the corresponding page is represented by eight flags.
[0042]
Only the LRC for the page data and the page status information are stored in the redundant areas of the pages 1 to 16, but the erase counter and the LRC for the erase counter are not stored.
[0043]
Next, details of the page status information will be described. The page status information can have eight flags. In this embodiment, the following five flags are defined.
[0044]
Program flag (b7)
Figure 0003576625
Erase count over flag (b6)
b6 = 0 (Erase count exceeds threshold)
Verify error flag (b2)
b2 = 0 (read verify error)
Program error flag (b1)
b1 = 0 (program error)
Erase error flag (b0)
b0 = 0 (erase error)
In the normal state (including the factory shipment), one byte of the page status information is represented by FFh (all eight bits are 1). Hereinafter, each flag will be described.
[0045]
The program flag (b7) is used to determine whether or not it is necessary to execute block erase when writing data to the corresponding page. If the block including the corresponding page has been erased, This indicates either a state in which writing to the page has not been executed yet (program flag = 1) or a state in which writing to the corresponding page has been executed (program flag = 0).
[0046]
Immediately after the erasure-only command is issued or in the initial state, the program flag is “1”. In this case, there is no need to erase again when writing.
The erase count over flag (b6) is a flag indicating whether or not the erase count of the block including the corresponding page exceeds the value of the erase limit count recorded in the attribute memory 111.
[0047]
That is, the flash memory card device driver 14 increments the value of the erase counter corresponding to each execution of the block erase by +1 and determines whether or not the incremented value of the erase counter exceeds the erasing limit number of times in the attribute memory 111. Find out. If it exceeds, the erase count over flag of “0” is set in the redundant area of all pages included in the corresponding block or the redundant area of the first page of the block. In this case, even if the block has not deteriorated at that time, the block is treated as a bad block, and a replacement process with a spare block is performed. The flash memory card device driver 14 can identify the block in which an error has actually occurred or the block which has been treated as defective due to the over-erasure count by referring to the erase count over flag of each defective block. .
[0048]
The verify error flag (b2) is a flag indicating whether or not an error has occurred in a read verify operation performed when a page is read from a corresponding page.
[0049]
That is, after reading data from the specified page, the flash memory card device driver 14 verifies the validity of the read data using the corresponding page data LRC. If an error is detected in the read data, the verify error flag is set to "0". In this case, the page read is retried, but if an error occurs again in the retry process, the block including the page is treated as a bad block and replaced with a spare block. The defective block replaced due to the verify error will not be used thereafter.
[0050]
The program error flag (b1) is a flag indicating whether or not an error has occurred in a program verify operation performed to verify the validity of the write data after executing a page write (program) for the corresponding page.
[0051]
That is, the flash memory card device driver 14 writes the write data to the specified page, then reads the data from the page, and compares it with the write data. If they do not match, the program error flag is set to "0". In this case, the page write is retried, but if an error occurs again in the retry process, the block including the page is treated as a bad block and replaced with a spare block. In this alternative process, after the contents of the defective block are read and copied to the spare block, writing of write data to the spare block is executed. The bad block replaced due to the program error will not be used thereafter.
[0052]
The erase error flag (b0) is a flag indicating whether or not an erase operation has been normally performed on a block including a corresponding page.
That is, the flash memory card device driver 14 executes the erasing process on the designated block, and then checks whether or not the erasing process has been normally executed. If the erasure fails, an erase error flag of “0” is set in the redundant area of all pages included in the block or the redundant area of the first page of the block. In this case, the block erase process is retried, but if an error occurs again in the retry process, the block is treated as a bad block and replaced with a spare block. The bad block replaced due to the erase error will not be used thereafter.
[0053]
Next, the page read, page write, and block erase processes executed by the flash memory card device driver 14 will be described with reference to the flowcharts of FIGS.
[0054]
First, a procedure of a page read process executed when a read command is issued from the OS 18 or the application program 19 will be described with reference to a flowchart of FIG.
[0055]
Upon receiving a read request command from the OS 18 or the application program 19, the flash memory card device driver 14 issues a page leakage command to start a read access to the page specified by the read request command, and 256 bytes from the page. The user data and the 8-byte management data are simultaneously read (step S101).
[0056]
Thereafter, the flash memory card device driver 14 calculates the LRC according to the 256-byte user data included in the read page data (step S102), and calculates the calculated LRC and the page included in the read page data. It is determined whether or not the page read has succeeded according to whether or not there is a match with the data LRC (step S103).
[0057]
If the calculated LRC matches the LRC for page data included in the read page data, it is confirmed that the page read has been normally performed, and the 256-byte user data included in the read page data Is passed to the OS 18 and the application program 19 as valid data.
[0058]
On the other hand, if they do not match, it is recognized that the page read has failed, the verify error flag is set to "0", and the page read is retried (step S105). When an error of the read process occurs again in this retry, the flash memory card device driver 14 performs a block replacement process (step S106).
[0059]
In this block replacement process, the spare block management table is rewritten, and the physical block number of the block in which the error has occurred is registered in an entry corresponding to a predetermined spare block. Thereafter, the flash memory card device driver 14 registers the physical block number of the block in which the error has occurred in the bad block management table and makes it a bad block (step S107).
[0060]
By the processes in steps S106 and S107, the block number designating the defective block is converted into the block number of the spare block, and the spare block is accessed instead of the defective block. Either step S106 or S107 may be executed first.
[0061]
Next, a procedure of a page write process executed when a write command is issued from the OS 18 or the application program 19 will be described with reference to a flowchart of FIG.
[0062]
Upon receiving a write request command from the OS 18 or the application program 19, the flash memory card device driver 14 first issues a dedicated command for reading only the redundant area to the flash EEPROM, and transmits 8 bytes of management data from the page to be written. Is read (step S201). Next, the flash memory card device driver 14 refers to the program flag included in the read management data and checks whether or not the corresponding page has been erased (step S202).
[0063]
If the corresponding page has not been erased (program flag = “1”), the flash memory card device driver 14 performs the following processing prior to execution of the page write processing after step S205.
[0064]
That is, the flash memory card device driver 14 first executes the erasing process on the block including the page to be written (step S203), and thereafter, increments the value of the erasing counter included in the management data read in step S201 by +1. (Step S204).
[0065]
When the flash memory card device driver 14 enters the programmable state in this way, the flash memory card device driver 14 calculates a page data LRC or the like from the 256 bytes of write data and calculates the page write data including 256 bytes of write data and 8 bytes of management data. Is generated (step S205).
[0066]
Next, the flash memory card device driver 14 issues a page write command to execute write access of the page write data (step S206), and then immediately reads the written data from the flash EEPROM and writes it to the page EEPROM. The write verify for comparing with the data is executed (step S207).
[0067]
If it is determined that the read data does not match the page write data and the page write has failed, the flash memory card device driver 14 sets the program error flag to “0” and then retries the page write process (step S209). When an error of the page write process occurs again in this retry, the flash memory card device driver 14 performs a block replacement process (step S215).
[0068]
In this block replacement processing, first, the storage content of the block in which an error has occurred is copied to a spare block that replaces the block, and then write data is written to the spare block. Thereafter, the spare block management table is rewritten, and the physical block number of the block in which the error has occurred is registered in the entry of the spare block that replaces the physical block number. After that, the flash memory card device driver 14 registers the physical block number of the block in which the error has occurred in the bad block management table and makes it a bad block (step S216).
[0069]
By the processing in steps S215 and S216, the spare block is accessed instead of the defective block. Either step S106 or S107 may be executed first.
[0070]
If the read data matches the page write data and it is determined that the page write has succeeded (including the success of the retry), the flash memory card device driver 14 sets the value of the erase counter counted up in step S204 to the attribute. It is checked whether the number of times of erasure of the memory 111 has been exceeded (step S210). If the number of erasures has exceeded the limit, the flash memory card device driver 14 performs a block replacement process (step S211).
[0071]
In this block replacement processing, first, the stored contents of a block exceeding the erasing limit number are copied to a spare block that replaces the block, and then the value of the erase counter of the first page of the spare block is set to an initial value (= 0). Will be reworked. Then, the spare block management table is rewritten, and the physical block number of the block that has exceeded the erasure limit number is registered in the entry of the spare block that substitutes the physical block number.
[0072]
After that, the flash memory card device driver 14 registers the physical block number of the block in which the error has occurred in the bad block management table and makes it a bad block (step S212), and then puts “0” in the first page of the bad block. An erase count over flag is set (step S213).
[0073]
By the processing in steps S212 and S212, the spare block is accessed instead of the defective block. Further, by the processing in step S213, it is possible to know that the cause of the defective block (alternative cause) is due to the erasure count being over.
[0074]
Either step S211 or S213 may be executed first. Further, the processing of steps S210 to S213 does not need to be executed when it is detected in step S202 that the program flag = 1. This is because if the program flag = 1, the erase counter is not incremented.
[0075]
Next, a procedure of a block erase process executed when an erase command is issued from the OS 18 or the application program 19 will be described with reference to a flowchart of FIG.
[0076]
Upon receiving an erase command from the OS 18 or the application program 19, the flash memory card device driver 14 first issues a dedicated command for reading only the redundant area to the flash EEPROM, and transmits 8 bytes of management data from the first page to be block erased. Is read (step S301). Next, the flash memory card device driver 14 refers to the program flag included in the read management data and checks whether or not the corresponding page is being programmed (step S302).
[0077]
If the corresponding page is programmed (program flag = "0"), the flash memory card device driver 14 issues a block erase command to execute an erase process on the block to be erased (step S303). Thereafter, the value of the erase counter included in the management data read in step S301 is incremented by +1 (step S304).
[0078]
Next, the flash memory card device driver 14 detects whether or not the block erase has been normally executed, for example, by checking whether or not the storage data of the erased block is an initial value (each bit = “1”). (Step S305).
[0079]
If it is determined that the block erase has failed, the flash memory card device driver 14 sets an erase flag of “0” in the redundant area of the first page of the block to be erased, and then retries the block erase process (step S306). . When an error of the block erase process occurs again in this retry, the flash memory card device driver 14 performs a block replacement process (step S312).
[0080]
In the block replacement processing, first, the spare block management table is rewritten, and the physical block number of the block in which the error has occurred is registered in the entry of the spare block that replaces the physical block number. After that, the flash memory card device driver 14 registers the physical block number of the block in which the error has occurred in the bad block management table and makes it a bad block (step S313).
[0081]
By the processing in steps S312 and S313, the spare block is accessed instead of the defective block. Either step S312 or S313 may be executed first.
[0082]
If it is determined that the block erase has succeeded (including a successful retry), the flash memory card device driver 14 determines whether or not the value of the erase counter counted up in step S304 has exceeded the erase limit number of the attribute memory 111. Is checked (step S307). If the number of erasures has exceeded the limit, the flash memory card device driver 14 performs a block replacement process (step S308).
[0083]
In this block replacement process, the physical block number of the block that has exceeded the erasure limit is registered in the entry of a spare block that replaces the physical block number. After that, the flash memory card device driver 14 registers the physical block number of the block in which the error has occurred in the bad block management table and makes it a bad block (step S309), and then puts “0” in the first page of the bad block. An erase count over flag is set (step S310).
[0084]
By the processing in steps S308 and S309, a spare block is accessed instead of the defective block. Further, by the processing in step S310, it is possible to know that the cause of the defective block (alternative cause) is due to the erase count being over. Either step S308 or S309 may be executed first.
[0085]
On the other hand, if it is detected in step S307 that the number of erasures has not been exceeded, the flash memory card device driver 14 writes the value of the erase counter counted up in step S304 into the first page of the erased block, Then, the program flag of each page is reset to “1”, and the process ends (step S311).
[0086]
As described above, in this embodiment, the page status information necessary for improving the reliability of data is managed using the redundant portion of the flash EEPROM. The page status information indicates the content of an error that has occurred when the flash EEPROM is accessed, so that the current state of the data area of each page and the past error history can be recognized. Thus, the reliability of the flash memory card 11 can be improved.
[0087]
When the number of times of erasing exceeds the number of times of erasing, block replacement using a spare block is performed in the same manner as when a block failure causing a page write retry, page read retry, or block erase retry error occurs. . In this case, the erase count over flag is set in the redundant area of the first page of the block. Therefore, by referring to the erase count over flag, it is possible to detect whether the replaced cause is due to the erase count over or another cause such as a program error, a read verify error, or an erase error.
[0088]
No defective block has actually occurred in the block that was determined to be a bad block due to the erase count over. Therefore, for example, when the number of defective blocks increases and the number of spare blocks to be replaced becomes insufficient, an operation mode is adopted in which a defective block with the erase count over flag set is detected and used as a normal block. It becomes possible. As a result, the life of the flash memory card 11 can be extended.
[0089]
In this embodiment, when an error occurs again in the retry of the program error, the read verify error, and the erase error, the corresponding block is replaced with the defective block immediately and the replacement process is performed. If the process is not executed normally even after retrying a plurality of times, an alternative process may be executed.
[0090]
Further, in this embodiment, the block replacement is executed by registering the replacement destination of each spare block in the spare block management table on the flash EEPROM, but this replacement process is performed by the flash memory card driver 14 by using the logical block number and the logical block number. An address conversion table indicating the correspondence relationship with the physical block numbers may be created in the memory, and the physical block number of the defective block may be changed to the physical block number of a spare block that replaces the defective block.
[0091]
Further, in this embodiment, a case where a 16-Mbit type flash EEPROM composed of a data area of 256 bytes and a redundant area of 8 bytes is used has been exemplified. For example, each page has a data area of 512 bytes. If a 32 Mbit type flash EEPROM composed of a flash memory and an 8-byte redundant area is used, the management data including page status information indicates the status of a 512-byte sector. Can be more effectively used for data management in sector units.
[0092]
Further, the data management method of this embodiment can be applied not only to a personal computer but also to any other data processing device such as a PDA as long as it can control access to the flash memory card 11.
[0093]
Furthermore, in this embodiment, the driver 14 for controlling the flash memory card 11 is provided with a data management function. However, when an intelligent flash disk device having a built-in flash EEPROM and a processor is used, the flash disk device itself is used. A similar data management function can be provided.
[0094]
【The invention's effect】
As described above, according to the present invention, it is possible to efficiently manage information on the error occurrence state of the flash EEPROM, and it is possible to sufficiently improve the reliability of the flash memory card. In particular, since the page status information is managed using the redundant area of each page, the state of the page to be accessed can be immediately recognized.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a hardware and software configuration of a personal computer using a flash memory card data management method according to an embodiment of the present invention.
FIG. 2 is a diagram showing a circuit configuration of a flash EEPROM provided in a flash memory card used in the embodiment.
FIG. 3 is an exemplary view for explaining a data structure of management data stored in a flash memory card used in the embodiment.
FIG. 4 is an exemplary flowchart illustrating the procedure of a page read process to which the data management method according to the embodiment is applied.
FIG. 5 is an exemplary flowchart illustrating the procedure of a page write process to which the data management method according to the embodiment is applied.
FIG. 6 is an exemplary flowchart illustrating the procedure of a block erase process to which the data management method according to the embodiment is applied.
[Explanation of symbols]
11 flash memory card, 12 other PC card, 13 PC card host adapter, 14 flash memory card driver, 15 card service, 16 socket service, 17 memory technology driver, 18 OS, 10 application program.

Claims (8)

データ記憶用の複数のブロックを有するフラッシュEEPROMを内蔵し、データ処理装置に着脱自在に装着されるフラッシュメモリカードのデータ管理方法において、In a data management method for a flash memory card having a built-in flash EEPROM having a plurality of blocks for data storage and detachably mounted in a data processing device,
前記各ブロックはページ毎にデータ記憶領域および冗長領域を有し、Each of the blocks has a data storage area and a redundant area for each page,
ブロックイレーズ処理が実行される度、該当するブロックのイレーズ回数をカウントアップし、そのカウントアップされたイレーズ回数の値が所定のしきい値を越えているか否かを検出するステップと、Each time the block erase process is executed, counting up the number of times of erasure of the corresponding block, and detecting whether or not the value of the number of times of erasure counted exceeds a predetermined threshold value;
各ページに対するアクセス処理を実行する度、そのアクセス処理において発生されたエラー内容を示すページステータス情報を、該当するページの冗長領域に書き込むステップであって、前記イレーズ回数の値が所定のしきい値を越えていることが検出された際、イレーズ回数がイレーズ限界回数を越えたことを示すイレーズ回数オーバーフラグを前記ページステータス情報として該当するブロックの所定ページの冗長領域に書き込むステップとを具備することを特徴とするフラッシュメモリカードのデータ管理方法。A step of writing page status information indicating the content of an error generated in the access processing to a redundant area of the corresponding page each time the access processing for each page is executed, wherein the value of the number of times of erasing is a predetermined threshold Writing the erase count over flag indicating that the erase count has exceeded the erase limit count to the redundant area of a predetermined page of the corresponding block as the page status information when it is detected that the erase count has exceeded the erase limit count. A data management method for a flash memory card, comprising:
データ記憶用の複数のブロックを有するデータブロック領域およびスペアブロックを有するスペアブロック領域とを含むフラッシュEEPROMを内蔵し、データ処理装置に着脱自在に装着されるフラッシュメモリカードのデータ管理方法において、A data management method for a flash memory card which incorporates a flash EEPROM including a data block area having a plurality of blocks for data storage and a spare block area having a spare block and is removably mounted on a data processing device,
前記各ブロックはページ毎にデータ記憶領域および冗長領域を有し、その冗長領域には、対応するページに対するアクセス処理において発生されたエラーの内容を管理するためのページステータス情報を記憶する領域が割り当てられており、Each of the blocks has a data storage area and a redundant area for each page, and an area for storing page status information for managing the content of an error generated in an access process for the corresponding page is allocated to the redundant area. Has been
ブロックイレーズ処理が実行される度、該当するブロックのイレーズ回数をカウントアップし、そのカウントアップされたイレーズ回数の値が所定のしきい値を越えているか否かを検出するイレーズ回数検出ステップと、Every time the block erase process is executed, the erase count of the corresponding block is counted up, and an erase count detection step of detecting whether or not the value of the counted erase count exceeds a predetermined threshold value;
イレーズ回数の値が所定のしきい値を越えていることが検出された際、イレーズ回数がイレーズ限界回数を越えたことを示すイレーズ回数オーバーフラグを、前記ページステータス情報の1つとして該当するブロックの所定ページの冗長領域に書き込むステップと、When it is detected that the value of the number of times of erasing exceeds a predetermined threshold value, an erasing number over flag indicating that the number of times of erasing has exceeded the erasing limit number is set as a block corresponding to one of the page status information. Writing to a redundant area of a predetermined page of
ページライト、ページリード、またはブロックイレーズ処理でエラーが発生された時、その処理をリトライするステップと、When an error occurs in the page write, page read, or block erase processing, retrying the processing;
このリトライ処理が正常実行されない時、または前記イレーズ回数検出ステップによってイレーズ回数がしきい値を越えていることが検出された時に、該当するブロックを不良ブロックとし、その不良ブロックを前記スペアブロックによって代替するステップとを具備することを特徴とするフラッシュメモリカードのデータ管理方法。When the retry process is not normally executed, or when the number of times of erasing is detected to exceed the threshold value in the erasing number detecting step, the corresponding block is regarded as a defective block, and the defective block is replaced by the spare block. A data management method for a flash memory card.
ページライト処理でエラーが発生した際、そのエラー発生を示すプログラムエラーフラグを、前記ページステータス情報の1つとして該当するページの冗長領域に書き込むステップをさらに具備することを特徴とする請求項2記載のフラッシュメモリカードのデータ管理方法。3. The method according to claim 2, further comprising, when an error occurs in the page write processing, writing a program error flag indicating the occurrence of the error to a redundant area of a corresponding page as one of the page status information. Flash memory card data management method. ブロックイレーズ処理でエラーが発生した際、そのエラー発生を示すイレーズエラーフラグを、前記ページステータス情報の1つとして該当する消去ブロックの所定ページの冗長領域に書き込むステップをさらに具備することを特徴とする請求項2記載のフラッシュメモリカードのデータ管理方法。When an error occurs in the block erase process, the method further comprises a step of writing an erase error flag indicating the occurrence of the error as one of the page status information in a redundant area of a predetermined page of a corresponding erase block. 3. The data management method for a flash memory card according to claim 2. リードベリファイ処理でエラーが発生した際、そのエラー発生を示すベリファイエラーフラグを、前記ページステータス情報の1つとして該当するページの冗長領域に書き込むステップをさらに具備することを特徴とする請求項2記載のフラッシュメモリカードのデータ管理方法。3. The method according to claim 2, further comprising, when an error occurs in the read verify process, writing a verify error flag indicating the occurrence of the error to a redundant area of a corresponding page as one of the page status information. Flash memory card data management method. データ記憶用の複数のブロックを有するデータブロック領域およびスペアブロックを有するスペアブロック領域とを含むフラッシュEEPROMを内蔵し、データ処理装置に着脱自在に装着されるフラッシュメモリカードのデータ管理方法において、A data management method for a flash memory card which incorporates a flash EEPROM including a data block area having a plurality of blocks for data storage and a spare block area having a spare block and is removably mounted on a data processing device,
前記各ブロックはページ毎にデータ記憶領域および冗長領域を有し、その冗長領域にはEach block has a data storage area and a redundant area for each page, and the redundant area includes 、対応するページに対するアクセス処理において発生されたエラーの内容を管理するためのページステータス情報を記憶する領域が割り当てられており、, An area for storing page status information for managing the content of an error generated in the access processing for the corresponding page is allocated,
ブロックイレーズ処理が実行される度、該当するブロックのイレーズ回数をカウントアップし、そのカウントアップされたイレーズ回数が所定の回数を越えているか否かを検出するイレーズ回数検出ステップと、Each time the block erase process is executed, the erase count of the corresponding block is counted up, and an erase count detection step of detecting whether the counted erase count exceeds a predetermined count,
ページライト、ページリードベリファイ、またはブロックイレーズ処理でエラーが発生された時、それらエラーを示すプログラムエラーフラグ、ベリファイエラーフラグ、またはイレーズエラーフラグを前記ページステータス情報の1つとして該当するページの冗長領域に書き込むステップと、When an error occurs in page write, page read verify, or block erase processing, a program error flag, a verify error flag, or an erase error flag indicating the error is set as one of the page status information, and the redundant area of the corresponding page. Writing to the
ページライト、ページリードベリファイ、またはブロックイレーズ処理でエラーが発生された時、その処理をリトライするステップと、When an error occurs in the page write, page read verify, or block erase processing, retrying the processing;
このリトライ処理が正常実行されない時、または前記イレーズ回数検出ステップによってイレーズ回数が所定のイレーズ回数を越えていることが検出された時に、該当するブロックを不良ブロックとし、その不良ブロックを前記スペアブロックによって代替するステップと、When the retry process is not normally executed, or when it is detected by the erasure number detection step that the number of erasures exceeds a predetermined number of erasures, the corresponding block is determined as a defective block, and the defective block is determined by the spare block. Alternative steps;
前記イレーズ回数検出ステップによってイレーズ回数が所定のイレーズ回数を越えていることが検出された時、イレーズ回数を越えたことを示すイレーズ回数オーバーフラグを、前記ページステータス情報の1つとして前記不良ブロックの所定ページの冗長領域に書き込むステップとを具備することを特徴とするフラッシュメモリカードのデータ管理方法。When the number of times of erasing is detected to exceed a predetermined number of times of erasing by the erasing number detecting step, an erasing time over flag indicating that the number of erasing times has been exceeded is set as one of the page status information, and Writing to a redundant area of a predetermined page.
データ記憶用の複数のブロックを有するデータブロック領域とスペアブロックを有するスペアブロック領域とを含むフラッシュEEPROMを内蔵したフラッシュメモリカードが着脱自在に装着されるカードスロットを有し、そのフラッシュメモリカードをアクセス制御可能なデータ処理装置において、A flash memory card having a built-in flash EEPROM including a data block area having a plurality of blocks for data storage and a spare block area having a spare block is provided with a card slot in which a flash memory card is removably mounted, and the flash memory card is accessed. In a controllable data processing device,
前記フラッシュEEPROMの各ブロックはページ毎にデータ記憶領域および冗長領域を有し、その冗長領域には、対応するページに対するアクセス処理において発生されたエラーの内容を管理するためのページステータス情報を記憶する領域が割り当てられており、Each block of the flash EEPROM has a data storage area and a redundant area for each page, and the redundant area stores page status information for managing the content of an error generated in an access process for a corresponding page. Space has been allocated,
上位プログラムからの要求に応じて、ページリード、ページライト、またはブロックイレーズを実行させるためのコマンドを前記フラッシュメモリカードに発行して、前記フラッシュメモリカードをアクセス制御する手段と、Means for controlling the access to the flash memory card by issuing a command to execute a page read, a page write, or a block erase to the flash memory card in response to a request from a host program;
ブロックイレーズのためのアクセス処理が実行される度、該当するブロックのイレーズ回数をカウントアップし、そのカウントアップされたイレーズ回数の値が所定のしきい値を越えているか否かを検出するイレーズ回数検出手段と、Each time an access process for block erase is executed, the number of times of erasure of the corresponding block is counted up, and the number of times of erasure detecting whether or not the value of the counted number of times of erasure exceeds a predetermined threshold value Detecting means;
イレーズ回数の値が所定のしきい値を越えていることが検出された際、イレーズ回数がイレーズ限界回数を越えたことを示すイレーズ回数オーバーフラグを、前記ページステータス情報の1つとして該当するブロックの所定ページの冗長領域に書き込む手段と、When it is detected that the value of the number of times of erasing exceeds a predetermined threshold value, an erasing number over flag indicating that the number of times of erasing has exceeded the erasing limit number is set as a block corresponding to one of the page status information. Means for writing to a redundant area of a predetermined page of
ページライト、ページリード、またはブロックイレーズのためのアクセス処理でエラーが発生された時、その処理をリトライする手段と、Means for retrying when an error occurs in access processing for page write, page read, or block erase,
このリトライ処理が正常実行されない時、または前記イレーズ回数検出手段によってイレーズ回数がしきい値を越えていることが検出された時に、該当するブロックを不良ブロックとし、その不良ブロックを前記スペアブロックによって代替する手段とを具備することを特徴とするデータ処理装置。When the retry process is not normally executed, or when the erase count detecting means detects that the erase count exceeds the threshold, the corresponding block is determined as a defective block, and the defective block is replaced by the spare block. A data processing apparatus comprising:
データ記憶用の複数のブロックを有するデータブロック領域とスペアブロックを有するスペアブロック領域とを含むフラッシュEEPROMを内蔵したフラッシュメモリカードが着脱自在に装着されるカードスロットを有し、そのフラッシュメモリカードをアクセス制御可能なデータ処理装置において、A flash memory card having a built-in flash EEPROM including a data block area having a plurality of blocks for data storage and a spare block area having a spare block is provided with a card slot in which a flash memory card is removably mounted, and the flash memory card is accessed. In a controllable data processing device,
前記各ブロックはページ毎にデータ記憶領域および冗長領域を有し、その冗長領域には、対応するページに対するアクセス処理において発生されたエラーの内容を管理するためのページステータス情報を記憶する領域が割り当てられており、Each of the blocks has a data storage area and a redundant area for each page, and an area for storing page status information for managing the content of an error generated in an access process for the corresponding page is allocated to the redundant area. Has been
上位プログラムからの要求に応じて、ページリード、ページライト、またはブロックイレーズを実行させるためのコマンドを前記フラッシュメモリカードに発行して、前記フラッシュメモリカードをアクセス制御する手段と、Means for controlling the access to the flash memory card by issuing a command to execute a page read, a page write, or a block erase to the flash memory card in response to a request from a host program;
ブロックイレーズのためのアクセス処理が実行される度、該当するブロックのイレーズ回数をカウントアップし、そのカウントアップされたイレーズ回数が所定の回数を越えているか否かを検出するイレーズ回数検出手段と、When the access process for block erase is performed, the number of times of erasure of the corresponding block is counted up, and the number of times of erasure detecting means for detecting whether or not the counted number of times of erasure exceeds a predetermined number,
ページライト、ページリードベリファイ、またはブロックイレーズのアクセス処理でエラーが発生された時、それらエラーを示すプログラムエラーフラグ、ベリファイエラーフラグ、またはイレーズエラーフラグを前記ページステータス情報の1つとして該当するページの冗長領域に書き込む手段と、When an error occurs in page write, page read verify, or block erase access processing, a program error flag, a verify error flag, or an erase error flag indicating the error is set as one of the page status information of the corresponding page. Means for writing to the redundant area;
ページライト、ページリードベリファイ、またはブロックイレーズのアクセス処理でエラーが発生された時、その処理をリトライする手段と、Means for retrying when an error occurs in page write, page read verify, or block erase access processing,
このリトライ処理が正常実行されない時、または前記イレーズ回数検出手段によってイレーズ回数が所定のイレーズ回数を越えていることが検出された時に、該当するブロックを不良ブロックとし、その不良ブロックを前記スペアブロックによって代替する手段と、When the retry process is not performed normally, or when the number of erasures is detected by the erasure number detecting means to be greater than a predetermined number of erasures, the corresponding block is determined as a defective block, and the defective block is determined by the spare block. Alternative means;
前記イレーズ回数検出手段によってイレーズ回数が所定のイレーズ回数を越えていることが検出された時、イレーズ回数を越えたことを示すイレーズ回数オーバーフラグを、前記ページステータス情報の1つとして前記不良ブロックの所定ページの冗長領域に書き込む手段とを具備することを特徴とするデータ処理装置。When the number of times of erasing is detected by the erasing times detecting means to exceed a predetermined number of times of erasing, an erasing time over flag indicating that the number of erasing times has been exceeded is set as one of the page status information, and Means for writing to a redundant area of a predetermined page.
JP4089495A 1995-02-28 1995-02-28 Data management method for flash memory card and data processing device using the data management method Expired - Lifetime JP3576625B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4089495A JP3576625B2 (en) 1995-02-28 1995-02-28 Data management method for flash memory card and data processing device using the data management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4089495A JP3576625B2 (en) 1995-02-28 1995-02-28 Data management method for flash memory card and data processing device using the data management method

Publications (2)

Publication Number Publication Date
JPH08235028A JPH08235028A (en) 1996-09-13
JP3576625B2 true JP3576625B2 (en) 2004-10-13

Family

ID=12593225

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4089495A Expired - Lifetime JP3576625B2 (en) 1995-02-28 1995-02-28 Data management method for flash memory card and data processing device using the data management method

Country Status (1)

Country Link
JP (1) JP3576625B2 (en)

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1185571A (en) * 1997-09-03 1999-03-30 Nec Corp System for storing log into flash memory
JP2990181B1 (en) 1998-09-28 1999-12-13 日本電気アイシーマイコンシステム株式会社 Flash memory, microcomputer having flash memory, and method of storing program in flash memory
US6438638B1 (en) 2000-07-06 2002-08-20 Onspec Electronic, Inc. Flashtoaster for reading several types of flash-memory cards with or without a PC
US7295443B2 (en) 2000-07-06 2007-11-13 Onspec Electronic, Inc. Smartconnect universal flash media card adapters
US7278051B2 (en) 2000-07-06 2007-10-02 Onspec Electronic, Inc. Field-operable, stand-alone apparatus for media recovery and regeneration
US6832281B2 (en) 2000-07-06 2004-12-14 Onspec Electronic Inc. Flashtoaster for reading several types of flash memory cards with or without a PC
US7162549B2 (en) * 2001-10-29 2007-01-09 Onspec Electronics, Inc. Multimode controller for intelligent and “dumb” flash cards
US7904635B2 (en) 2003-03-04 2011-03-08 Netac Technology Co., Ltd. Power cut data recovery and data management method for flash media
CN100377119C (en) * 2003-06-20 2008-03-26 深圳市朗科科技有限公司 Protection method for data in flash memory media
JP4679370B2 (en) * 2004-02-03 2011-04-27 パナソニック株式会社 Data processing apparatus and memory card setting method
JP4734033B2 (en) * 2005-05-30 2011-07-27 株式会社東芝 Storage device
JP4936271B2 (en) 2006-01-20 2012-05-23 株式会社メガチップス Semiconductor memory device
JP5111122B2 (en) * 2008-01-11 2012-12-26 三菱電機株式会社 Data reading apparatus and data reading method of data reading apparatus
WO2009107284A1 (en) * 2008-02-29 2009-09-03 Kabushiki Kaisha Toshiba Information processing apparatus and nonvolatile semiconductor memory drive
WO2009107286A1 (en) * 2008-02-29 2009-09-03 Kabushiki Kaisha Toshiba Information processing apparatus and nonvolatile semiconductor memory drive
US9086983B2 (en) 2011-05-31 2015-07-21 Micron Technology, Inc. Apparatus and methods for providing data integrity
JP2013171343A (en) 2012-02-17 2013-09-02 Toshiba Corp Storage device
US9142300B2 (en) 2013-09-03 2015-09-22 Kabushiki Kaisha Toshiba Memory system including nonvolatile memory
JP6395143B2 (en) * 2014-03-31 2018-09-26 株式会社三共 Gaming machine, gaming machine recycling method and data writing device
JP6231973B2 (en) * 2014-11-20 2017-11-15 株式会社三共 Game machine

Also Published As

Publication number Publication date
JPH08235028A (en) 1996-09-13

Similar Documents

Publication Publication Date Title
JP3576625B2 (en) Data management method for flash memory card and data processing device using the data management method
JP4110000B2 (en) Storage device
US6977847B2 (en) Detecting partially erased units in flash devices
US5734816A (en) Nonvolatile memory with flash erase capability
US7009896B2 (en) Apparatus and method for managing bad blocks in a flash memory
EP0619541B1 (en) Information processing system with cached flash memory
USRE40252E1 (en) Flash memory control method, flash memory system using the control method and flash memory device using the control method
JP5162535B2 (en) Method and memory system using memory system
JP5528782B2 (en) Nonvolatile memory recovery after a power failure
JP4079506B2 (en) Method for controlling nonvolatile semiconductor memory system
EP0686976B1 (en) Data management system for programming-limited type semiconductor memory and IC memory card having the data management system
JP3233079B2 (en) Data processing system and data processing method
JP3472008B2 (en) Flash memory management method
TWI447580B (en) Memory space managing method, and memory controller and memory storage device using the same
JPH05282889A (en) Nonvolatile semiconductor memory
KR20040014971A (en) Non-volatile memory control method
JPH117505A (en) Card type storage medium
TW201339835A (en) Data writing method, and memory controller and memory storage device using the same
CN109685190B (en) Power-down protection method and device for IC card
JP2004220068A (en) Memory card and method for writing data in memory
EP2264602A1 (en) Memory device for managing the recovery of a non volatile memory
CN102043724B (en) For the block management method of flash memory, controller and storage system
JPH07141479A (en) Ic memory card and file control system using ic memory card
JPH0729392A (en) Nonvolatile semiconductor memory and semiconductor disk device using the same
JP2006107363A (en) Portable electronic device and memory access method used in the same

Legal Events

Date Code Title Description
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: 20040706

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040708

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

Free format text: PAYMENT UNTIL: 20080716

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090716

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090716

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100716

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110716

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120716

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130716

Year of fee payment: 9

EXPY Cancellation because of completion of term