JP3741535B2 - Nonvolatile storage device - Google Patents

Nonvolatile storage device Download PDF

Info

Publication number
JP3741535B2
JP3741535B2 JP10614598A JP10614598A JP3741535B2 JP 3741535 B2 JP3741535 B2 JP 3741535B2 JP 10614598 A JP10614598 A JP 10614598A JP 10614598 A JP10614598 A JP 10614598A JP 3741535 B2 JP3741535 B2 JP 3741535B2
Authority
JP
Japan
Prior art keywords
sector
management information
data
replacement
storage unit
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 - Fee Related
Application number
JP10614598A
Other languages
Japanese (ja)
Other versions
JPH11306091A (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.)
Renesas Technology Corp
Hitachi KE Systems Ltd
Hitachi Solutions Technology Ltd
Original Assignee
Renesas Technology Corp
Hitachi ULSI Systems Co Ltd
Hitachi KE Systems Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renesas Technology Corp, Hitachi ULSI Systems Co Ltd, Hitachi KE Systems Ltd filed Critical Renesas Technology Corp
Priority to JP10614598A priority Critical patent/JP3741535B2/en
Publication of JPH11306091A publication Critical patent/JPH11306091A/en
Application granted granted Critical
Publication of JP3741535B2 publication Critical patent/JP3741535B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、電気的に書込み消去可能な不揮発性半導体メモリへのデータ記憶方式さらには不揮発性メモリのセクタ管理方式に適用して有効な技術に関し、例えばブロック単位で一括してデータの消去が可能な複数個のフラッシュメモリチップを内蔵したメモリカードに利用して有効な技術に関する。
【0002】
【従来の技術】
従来、複数個のフラッシュメモリチップを内蔵したメモリカードにおいては、例えば528バイトのような単位を1セクタとしてデータを記憶することが行なわれている。また、フラッシュメモリはRAMなどの揮発性メモリに比べて書換え可能な回数が少ないため、一部の記憶素子に書換えが集中するなど書換え頻度にむらがあると、それだけ早くメモリチップの寿命が切れてしまうことになる。そこで、フラッシュメモリカードにおいては、記憶素子の書換え頻度を平均化させるため、セクタの置換えという操作が行なわれている。
【0003】
また、フラッシュメモリカードにおいては、一部のセクタが書込み不良であっても充分な記憶容量を補償するため、予備のセクタを設けて不良セクタと代替えすることも行なわれている。なお、上記のようなセクタの置換えや代替えを可能にするため、セクタにはデータ領域の他に管理情報を記憶する領域が設けられ、セクタへのデータの書込みの際にはこの管理情報を読み出してセクタの管理を行なうようにしている。
【0004】
【発明が解決しようとする課題】
上記メモリカードにあっては、メモリチップへのデータの書込み中に電源が遮断されると、書込み対象セクタのデータが破壊されてしまうので管理情報が消失して当該セクタは不良セクタであると判断されてしまう。しかも、書込み対象セクタに置換えが行なわれていると、当該セクタと対をなす他のセクタをアクセスしたときにも不良セクタと判断されてしまうことがある。その結果、カードのメモリ空間が不連続になり、実記憶容量が減少するという問題点がある。
【0005】
この発明の目的は、電源遮断等によりデータが破壊されたセクタの修復を可能にしてデータ破壊による実記憶容量の低下を防止することができるメモリカードのデータ管理技術を提供することにある。
【0006】
この発明の前記ならびにそのほかの目的と新規な特徴については、本明細書の記述および添附図面から明らかになるであろう。
【0007】
【課題を解決するための手段】
本願において開示される発明のうち代表的なものの概要を説明すれば、下記のとおりである。
【0008】
すなわち、データ記憶部と管理情報記憶部とを含むセクタ単位でデータを記憶するようにされた不揮発性記憶装置において、データの書込みの際に対象セクタの管理情報の読み取りを行なっても管理情報が得られない場合には全セクタの管理情報記憶部を参照して書込み対象セクタと対をなしそれぞれのデータ記憶部には対をなす他方のセクタのデータが記憶されるようにされた置換えセクタがあるか否か判定し、置換えセクタが存在したときは当該対象セクタの管理情報記憶部にその置換えセクタを指す情報を記憶するとともに、置換えセクタのデータ記憶部にデータの書込みを行なうようにしたものである。これによって、書込み中に電源が遮断される等によってデータが破壊された不良セクタを正常セクタに修復することができ、メモリ空間が不連続になるのを回避して実記憶容量の減少を防止することができる。
【0009】
また、データの書込みの際に当該セクタの管理情報の読み取りを行なっても管理情報が得られない場合には全セクタの管理情報を参照する前に所定の記憶領域を参照して不良セクタとして登録されているか判定し、不良セクタとして登録されている場合には代替えセクタにデータの書込みを行なうようにする。これによって、予備のセクタを持つ記憶装置において、不良セクタへのアクセスがあったときに効率良く代替えセクタへの書込みを行なうことができる。
【0010】
さらに、データの書込みの際に当該セクタの管理情報の読み取りを行なっても管理情報が得られない場合であって不良セクタとしても登録されていない場合に、全セクタの管理情報を参照して置換えセクタが存在しないときには、当該セクタを不良セクタとして登録しかつ代替えセクタを設定して当該代替えセクタにデータの書込みを行なうようにする。また、この場合、当該代替えセクタの管理情報記憶部がセクタ番号が入るセクタポインタ領域を有するときは、セクタポインタ領域に自分自身を指す情報(自己のセクタ番号)を書き込むようにする。これによって、置換えがなされていないセクタのデータが破壊されて不良セクタとなった場合にも全体の記憶容量を減少させることがない。
【0011】
【発明の実施の形態】
以下、本発明の好適な実施例を図面に基づいて説明する。
【0012】
図1は、本発明を適用したフラッシュメモリカードの一実施例を示す。
【0013】
この実施例のメモリカードは、特に制限されないが、n個のフラッシュメモリチップFM1〜FMnと、外部とのインタフェースおよびバスの切換え、アドレス信号や制御信号に基づいて各メモリチップに対する選択信号の形成、ECCコードの生成、チェック等の機能を有するコントローラチップCONT、外部から供給されるコマンドに基づいてフラッシュメモリチップに対する書込み、読出し制御やメモリチップから読み出された管理情報等に基づいてセクタ番号の変更などを行なうマイクロプロセッサMPUと、マイクロプロセッサMPUの作業領域として使用されるDRAMなどからなる作業用メモリWMMとがプリント配線基板10上に搭載され、全体が樹脂等によりモールドされて構成される。
【0014】
上記コントローラチップCONTはゲートアレイで構成され、基板10上に形成されたアドレス&コントロールバス11およびデータバス12を介して上記フラッシュメモリチップFM1〜FMnおよび作業用メモリWMMに接続されるとともに、外部のパーソナルコンピュータ本体などのカードスロットに挿入される外部端子13に接続されている。また、上記作業用メモリWMMは、マイクロプロセッサMPUがフラッシュメモリのアクセスを行なう際に論理セクタ番号(論理アドレス)から実セクタ番号(物理アドレス)への変換を行なう際に参照されるアドレス変換テーブルやフラッシュメモリ内のセクタの管理を行なう際に参照される不良セクタテーブルを格納したり、書込みデータを保持したり書込みデータと管理情報とを合成したりするのに使用される。
【0015】
図2には、上記フラッシュメモリチップFL1〜FLn内に構成されるセクタの構成例と、作業用メモリWMM内に格納される不良セクタテーブルの一例とが示されている。特に制限されないが、各セクタは、図2(a)に示すように、512バイトのような記憶容量を有する本来のデータの記憶部DATAと、当該セクタの管理情報が記憶される16バイトのような管理情報記憶部MGDTとから構成され、管理情報記憶部MGDTは消去回数記憶領域、セクタの置換えの際に対になるセクタの番号が格納されるセクタポインタSP、データ記憶部内のデータのECCコードが記憶される第1のECCコード領域および当該管理情報記憶部MGDT内のデータのECCコードが記憶される第2のECCコード領域などを含んでいる。
【0016】
なお、この実施例のメモリカードにおいては、マイクロプロセッサMPUが各セクタの管理情報記憶部MGDT内の消去回数をチェックして所定回数に達したときに所定回数に満たない他のセクタを見つけてそのセクタと置換えを行なうように構成されている。セクタの置換えは、2つのセクタを対となし、図3(a)に示すように、それぞれのセクタのセクタポインタSPに互いに相手のセクタ番号を記憶するとともに、データ記憶部DATAには相手のセクタに記憶されるべきデータを記憶することにより行なわれる。また、セクタの置換えが行なわれていないセクタのセクタポインタSPには自分自身のセクタ番号が格納されるように構成されている。
【0017】
不良セクタテーブルは、この実施例では図2(b)に示すように、各セクタ番号n−1,n,n+1,n+2‥‥‥ごとに代替えセクタ番号(予備セクタの番号)を登録する欄を設けた構成にされており、代替えがなされていないセクタの欄にはオール“1”のデータ(16ビットのときはFFFF)が格納されるようにされている。従って、マイクロプロセッサMPUは、セクタ番号を用いてこの不良セクタテーブルを参照することにより、そのセクタが不良セクタか否か、また不良セクタのときは代替えセクタの番号を知ることができる。
【0018】
この作業用メモリWMM内に設けられる不良セクタテーブルは、システムの終了時にフラッシュメモリチップ内に保存し、システムの起動時にフラッシュメモリチップから読み出して作業用メモリWMM上におくようにすることができる。これによって、電源が遮断されても不良セクタの情報を保持できるとともに、システム起動中は動作速度の遅いフラッシュメモリをアクセスせずに動作速度の速いDRAMからなる作業メモリWMMをアクセスすればよいので、マイクロプロセッサによる高速な処理が可能になる。
【0019】
次に、本実施例のメモリカードに外部よりデータ書込みコマンドが入力されたときのマイクロプロセッサMPUによる処理手順を示す図4のフローチャートを用いて、正常時のセクタへのデータの書込み方法および電源遮断等によってデータが破壊されたセクタの修復方法を具体的に説明する。
【0020】
外部からメモリカードにライトコマンドが発行(入力)されると、マイクロプロセッサMPUは、作業用メモリWMM内のアドレス変換テーブルを参照して、コマンドとともに入力された論理セクタ番号をフラッシュメモリの実セクタ番号に変換する(手続きP2)。次に、この実セクタ番号を用いて当該セクタの管理情報の読み出しを行なって、管理情報が読み出せたか否か判定する(手続きP3)。ここで、管理情報が読み出せたときは、セクタポインタSPを見てセクタの置換えがあるか否か判定する(手続きP4)。セクタの置換えがあるか否かは、セクタポインタ内のセクタ番号が自己のセクタ番号と一致するか否かで判定することができる。すなわち、セクタ番号が一致しているとき置換えがなく、一致しないときは置換えがあると判定される。
【0021】
次に、置換えがあったときはセクタポインタの示す置換え先のセクタのデータ記憶部にライトデータを書き込む(手続きP5)。この書込みはまず当該セクタのデータをすべて消去してから行なう。そのため、マイクロプロセッサは書込みの前に置換え先のセクタから管理情報記憶部内の管理情報を読み出し、内蔵らMに保持しておく。そして、置換え先セクタのデータを消去し、読み出された管理情報内の消去回数等を更新してから、更新された管理情報とライトデータとを作業用メモリWMM上で合成して、フラッシュメモリチップへの書込みを行なう。
【0022】
一方、手続きP4で置換えなしと判定したときは、当該セクタのデータ記憶部へライトデータの書込みを行なう(手続きP6)。この際にも、当該セクタの管理情報を読み出しておいてデータを消去し、読み出された管理情報内の消去回数等を更新してから更新された管理情報とライトデータを当該セクタに書き込む。
【0023】
上記手続きP3でセクタから管理情報が読み出せなかったときは、当該セクタ番号が不良セクタテーブルに登録されているか調べる(手続きP7)。そして、当該セクタが不良セクタとして登録されているか判定する(手続きP8)。登録されていたときは、テーブル登録されている代替えセクタ番号を使って代替えセクタに対してライトデータの書込みを行なう(手続きP9)。この際にも、当該代替えセクタの管理情報を読み出しておいてデータを消去し、読み出された管理情報内の消去回数等を更新してから更新された管理情報とライトデータを当該セクタに書き込む。
【0024】
一方、手続きP8で、当該セクタが不良セクタとして登録されていいないと判定されたときは、すべてのセクタから管理情報の読出しを行なう(手続きP10)。そして、読み出された管理情報内のセクタポインタを調べて当該セクタを置換え先セクタとして記憶しているものがあるか否か判定する(手続きP11)。記憶しているセクタポインタを有するセクタがあったときはそのセクタのセクタ番号を当該セクタのセクタポインタに入れ、置換え先セクタのデータ記憶領域へライトデータの書込みを行なう(手続きP12)。この際にも、置換え先セクタの管理情報を読み出しておいてデータを消去し、読み出された管理情報内のセクタポインタ等を更新してから更新された管理情報とライトデータを当該セクタに書き込む。
【0025】
また、手続きP11で当該セクタの番号をセクタポインタに保持するセクタが見つからなかったときは、不良セクタとみなして予備セクタの中から未使用のものを1つ代替えセクタとして割り付け、その代替えセクタの番号を不良セクタテーブルの当該セクタの欄に登録してから、代替えセクタへライトデータを書き込む(手続きP13)。なお、この代替えセクタの管理情報内のセクタポインタには当該セクタの番号を入れる。つまり、とりあえず置換えのないセクタとしておく。
【0026】
以上の手順に従うと、例えば書込み中に電源が遮断されて図3(b)のように当該セクタ(図ではセクタj)のデータが消失したような場合でも、当該セクタと対をなす置換えセクタ(i)のセクタポインタには当該セクタのセクタ番号が残っており、これを手続きP10,P11で見つけることができ、見つかった置換えセクタの番号を当該セクタのセクタポインタに書き込むことにより、図3(c)のように、管理情報の消失したセクタを使用可能なセクタとして修復することができる。これによって、メモリ空間が不連続になるのを回避して実記憶容量の減少を防止することができる。
【0027】
以上本発明者によってなされた発明を実施例に基づき具体的に説明したが、本発明は上記実施例に限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。例えば上記実施例においては、すべてのセクタついて不良セクタテーブル上に登録欄を設けているが、不良セクタのみの番号と代替えセクタとを登録するようにしてもよい。また、実施例ではコントローラチップとマイクロプロセッサとを別個に構成しているが、これらをCPUコアをマクロセルとして内蔵したゲートアレイもしくはASIC等により1つの半導体チップとして構成することも可能である。さらに、実施例では、論理セクタ番号から実セクタ番号への変換を作業用メモリWMM内のアドレス変換テーブルを用いて行なうと説明したが、マイクロプロセッサが演算によって行なうようにすることも可能である。
【0028】
以上の説明では主として本発明者によってなされた発明をその背景となった利用分野であるフラッシュメモリを内蔵したメモリカードに適用した場合について説明したが、この発明はそれに限定されるものでなく、EEPROMチップやRAMチップを内蔵したメモリカードあるいは複数のメモリチップを1枚のボード上に搭載してなるメモリモジュールなどにも利用することができる。
【0029】
【発明の効果】
本願において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば下記のとおりである。
【0030】
すなわち、この発明は、電源遮断等によりデータが破壊されたセクタの修復が可能になり、これによってデータ破壊によるメモリカードの実記憶容量の低下を防止することができるという効果を有する。
【図面の簡単な説明】
【図1】本発明を適用したフラッシュメモリカードの一実施例を示すブロック図である。
【図2】実施例のフラッシュメモリのセクタの構成例および不良セクタテーブルの構成例を示す説明図である。
【図3】セクタの置換えおよびデータ破壊されたセクタの修復の様子を示す説明図である。
【図4】実施例のメモリカードに外部よりデータ書込みコマンドが入力されたときのマイクロプロセッサMPUによる処理手順を示すフローチャートである。
【符号の説明】
10 プリント配線基板
11 アドレスバス
12 データバス
13 外部端子
MPU マイクロプロセッサ
CONT コントローラチップ
FM1〜FMn フラッシュメモリチップ
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a technique that is effective when applied to a data storage system in an electrically writable / erasable nonvolatile semiconductor memory and a sector management system of the nonvolatile memory. For example, data can be erased collectively in units of blocks. The present invention relates to a technology that is effective when used for a memory card incorporating a plurality of flash memory chips.
[0002]
[Prior art]
Conventionally, in a memory card incorporating a plurality of flash memory chips, for example, data is stored with a unit such as 528 bytes as one sector. In addition, flash memory has fewer rewritable times than volatile memory such as RAM, so if there is uneven rewriting frequency such as concentration of rewriting on some storage elements, the life of the memory chip will be shortened that much faster. Will end up. Therefore, in the flash memory card, an operation of sector replacement is performed in order to average the rewrite frequency of the storage element.
[0003]
Further, in a flash memory card, a spare sector is provided to replace a defective sector in order to compensate for a sufficient storage capacity even if some sectors are defective in writing. In order to enable replacement and replacement of the sector as described above, the sector is provided with an area for storing management information in addition to the data area, and this management information is read when data is written to the sector. Sector management.
[0004]
[Problems to be solved by the invention]
In the above memory card, if the power is cut off while writing data to the memory chip, the data in the write target sector will be destroyed, so the management information will be lost and the sector will be judged as a bad sector. Will be. In addition, if the sector to be written is replaced, it may be determined as a bad sector even when another sector that is paired with the sector is accessed. As a result, there is a problem in that the memory space of the card becomes discontinuous and the actual storage capacity decreases.
[0005]
An object of the present invention is to provide a data management technique for a memory card that can repair a sector in which data has been destroyed due to power interruption or the like and prevent a reduction in actual storage capacity due to data destruction.
[0006]
The above and other objects and novel features of the present invention will become apparent from the description of the present specification and the accompanying drawings.
[0007]
[Means for Solving the Problems]
Outlines of representative ones of the inventions disclosed in the present application will be described as follows.
[0008]
That is, in the nonvolatile storage device configured to store data in units of sectors including the data storage unit and the management information storage unit, the management information is not read even if the management information of the target sector is read when data is written. If it is not obtained, a replacement sector that is paired with the sector to be written with reference to the management information storage section of all sectors and in which the data of the other sector forming a pair is stored in each data storage section When there is a replacement sector, information indicating the replacement sector is stored in the management information storage unit of the target sector, and data is written to the data storage unit of the replacement sector. It is. As a result, it is possible to repair a defective sector whose data has been destroyed due to, for example, the power being cut off during writing to a normal sector, and to prevent the memory space from becoming discontinuous and prevent a decrease in the actual storage capacity. be able to.
[0009]
Also, if management information cannot be obtained by reading management information of the sector at the time of data writing, it is registered as a bad sector by referring to a predetermined storage area before referring to the management information of all sectors If it is registered as a bad sector, data is written to the alternative sector. As a result, in a storage device having a spare sector, when a bad sector is accessed, writing to the replacement sector can be performed efficiently.
[0010]
Further, when the management information is not obtained even if the management information of the sector is read at the time of data writing and is not registered as a bad sector, the replacement is performed with reference to the management information of all sectors. When the sector does not exist, the sector is registered as a bad sector and a replacement sector is set and data is written to the replacement sector. Further, in this case, when the management information storage unit of the alternative sector has a sector pointer area in which the sector number is entered, information (self sector number) indicating itself is written in the sector pointer area. As a result, even if the data of the sector that has not been replaced is destroyed and becomes a defective sector, the overall storage capacity is not reduced.
[0011]
DETAILED DESCRIPTION OF THE INVENTION
Preferred embodiments of the present invention will be described below with reference to the drawings.
[0012]
FIG. 1 shows an embodiment of a flash memory card to which the present invention is applied.
[0013]
The memory card in this embodiment is not particularly limited, but the n flash memory chips FM1 to FMn, the interface and bus switching with the outside, the formation of the selection signal for each memory chip based on the address signal and the control signal, Controller chip CONT having functions such as ECC code generation and checking, sector number change based on write / read control to flash memory chip based on externally supplied command, management information read from memory chip, etc. A microprocessor MPU for performing the above and a work memory WMM made of DRAM or the like used as a work area of the microprocessor MPU are mounted on the printed wiring board 10 and are entirely molded by resin or the like.
[0014]
The controller chip CONT is composed of a gate array, and is connected to the flash memory chips FM1 to FMn and the working memory WMM via an address & control bus 11 and a data bus 12 formed on the substrate 10, and is connected to an external device. It is connected to an external terminal 13 that is inserted into a card slot such as a personal computer main body. The working memory WMM includes an address conversion table that is referenced when the microprocessor MPU performs conversion from a logical sector number (logical address) to a real sector number (physical address) when accessing the flash memory. It is used to store a bad sector table that is referred to when managing sectors in the flash memory, hold write data, and synthesize write data and management information.
[0015]
FIG. 2 shows a configuration example of sectors configured in the flash memory chips FL1 to FLn and an example of a defective sector table stored in the working memory WMM. Although not particularly limited, as shown in FIG. 2A, each sector has an original data storage unit DATA having a storage capacity of 512 bytes and 16 bytes in which management information of the sector is stored. Management information storage unit MGDT, the management information storage unit MGDT includes an erase count storage area, a sector pointer SP in which the number of a sector to be paired at the time of sector replacement is stored, and an ECC code of data in the data storage unit Includes a first ECC code area in which data is stored, a second ECC code area in which an ECC code of data in the management information storage unit MGDT is stored, and the like.
[0016]
In the memory card of this embodiment, the microprocessor MPU checks the number of erasures in the management information storage unit MGDT of each sector and finds another sector that does not reach the predetermined number when the predetermined number is reached. It is configured to replace a sector. In the sector replacement, two sectors are paired, and as shown in FIG. 3A, the sector numbers of each other are stored in the sector pointer SP of each sector, and the other sector is stored in the data storage unit DATA. This is done by storing data to be stored in. Further, the sector pointer SP of a sector that has not been replaced is stored with its own sector number.
[0017]
In this embodiment, as shown in FIG. 2B, the defective sector table includes a column for registering a replacement sector number (a spare sector number) for each sector number n-1, n, n + 1, n + 2,. The sector is provided, and all “1” data (FFFF in the case of 16 bits) is stored in the sector column that has not been replaced. Therefore, the microprocessor MPU can know whether or not the sector is a bad sector by referring to the bad sector table using the sector number, and if the sector is a bad sector, can know the number of the substitute sector.
[0018]
The defective sector table provided in the working memory WMM can be stored in the flash memory chip when the system is terminated, and read out from the flash memory chip when the system is started, and placed on the working memory WMM. As a result, information on bad sectors can be retained even when the power is cut off, and the work memory WMM composed of a DRAM having a high operation speed may be accessed without accessing a flash memory having a low operation speed during system startup. High-speed processing by a microprocessor becomes possible.
[0019]
Next, referring to the flowchart of FIG. 4 showing the processing procedure by the microprocessor MPU when a data write command is input from the outside to the memory card of the present embodiment, the method of writing data to the sector in the normal state and the power shutdown A method of repairing a sector whose data has been destroyed by the above will be described in detail.
[0020]
When a write command is issued (input) to the memory card from the outside, the microprocessor MPU refers to the address conversion table in the working memory WMM and uses the logical sector number input together with the command as the real sector number of the flash memory. (Procedure P2). Next, the management information of the sector is read using this real sector number to determine whether or not the management information has been read (procedure P3). Here, when the management information can be read, it is determined whether or not there is a sector replacement by looking at the sector pointer SP (procedure P4). Whether or not there is a sector replacement can be determined by whether or not the sector number in the sector pointer matches its own sector number. That is, it is determined that there is no replacement when the sector numbers match, and there is a replacement when they do not match.
[0021]
Next, when there is a replacement, write data is written in the data storage section of the replacement destination sector indicated by the sector pointer (procedure P5). This writing is performed after erasing all data in the sector. For this reason, the microprocessor reads the management information in the management information storage unit from the replacement destination sector before writing, and holds it in the built-in M. Then, the data in the replacement destination sector is erased, the number of times of erasure in the read management information is updated, and the updated management information and write data are synthesized on the work memory WMM, and the flash memory Write to the chip.
[0022]
On the other hand, when it is determined in the procedure P4 that there is no replacement, write data is written to the data storage section of the sector (procedure P6). Also at this time, the management information of the sector is read and the data is erased, and the updated management information and write data are written to the sector after updating the erase count in the read management information.
[0023]
When the management information cannot be read from the sector in the procedure P3, it is checked whether the sector number is registered in the bad sector table (procedure P7). Then, it is determined whether the sector is registered as a bad sector (procedure P8). If it has been registered, write data is written to the substitute sector using the substitute sector number registered in the table (procedure P9). Also in this case, the management information of the replacement sector is read to erase the data, and the updated management information and write data are written to the sector after updating the number of times of erasure in the read management information. .
[0024]
On the other hand, when it is determined in procedure P8 that the sector is not registered as a bad sector, management information is read from all sectors (procedure P10). Then, the sector pointer in the read management information is checked to determine whether or not there is one storing the sector as a replacement destination sector (procedure P11). If there is a sector having a stored sector pointer, the sector number of that sector is entered into the sector pointer of the sector, and write data is written into the data storage area of the replacement sector (procedure P12). Also in this case, the management information of the replacement destination sector is read, the data is erased, the sector pointer in the read management information is updated, and the updated management information and write data are written to the sector. .
[0025]
If the sector holding the sector number in the sector pointer is not found in the procedure P11, the spare sector is regarded as a bad sector and one unused sector is allocated as a substitute sector, and the substitute sector number is assigned. Is registered in the sector column of the bad sector table, and then write data is written to the alternative sector (procedure P13). It should be noted that the sector number in the management information of the alternative sector is set with the sector number. That is, the sector is not replaced for the time being.
[0026]
According to the above procedure, for example, even when the power is shut off during writing and data in the sector (sector j in the figure) is lost as shown in FIG. 3B, the replacement sector ( The sector pointer of i) remains in the sector pointer of i), which can be found by procedures P10 and P11. By writing the number of the replaced sector found in the sector pointer of FIG. ), The sector in which the management information is lost can be repaired as a usable sector. As a result, it is possible to prevent the memory space from becoming discontinuous and prevent a decrease in the actual storage capacity.
[0027]
The invention made by the present inventor has been specifically described based on the embodiments. However, the present invention is not limited to the above embodiments, and various modifications can be made without departing from the scope of the invention. Nor. For example, in the above-described embodiment, the registration column is provided on the bad sector table for all sectors, but the numbers of only the bad sectors and alternative sectors may be registered. In the embodiment, the controller chip and the microprocessor are separately configured. However, it is also possible to configure them as one semiconductor chip by a gate array or an ASIC or the like incorporating a CPU core as a macro cell. Further, in the embodiment, it has been described that the conversion from the logical sector number to the real sector number is performed using the address conversion table in the working memory WMM, but it is also possible for the microprocessor to perform the calculation.
[0028]
In the above description, the case where the invention made by the present inventor is applied to a memory card having a built-in flash memory, which is the field of use behind it, has been described. However, the present invention is not limited to this, and the EEPROM It can also be used for a memory card incorporating a chip or a RAM chip or a memory module in which a plurality of memory chips are mounted on a single board.
[0029]
【The invention's effect】
The effects obtained by the representative ones of the inventions disclosed in the present application will be briefly described as follows.
[0030]
In other words, the present invention has an effect that it is possible to repair a sector in which data has been destroyed due to power interruption or the like, thereby preventing a decrease in the actual storage capacity of the memory card due to data destruction.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an embodiment of a flash memory card to which the present invention is applied.
FIG. 2 is an explanatory diagram illustrating a configuration example of a sector of a flash memory and a configuration example of a bad sector table according to an embodiment.
FIG. 3 is an explanatory diagram showing a state of sector replacement and recovery of a sector whose data has been destroyed;
FIG. 4 is a flowchart illustrating a processing procedure performed by a microprocessor MPU when a data write command is input from the outside to the memory card according to the embodiment.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 10 Printed wiring board 11 Address bus 12 Data bus 13 External terminal MPU Microprocessor CONT Controller chip FM1-FMn Flash memory chip

Claims (5)

データ記憶部と管理情報記憶部とを含むセクタ単位でデータを記憶するようにされた不揮発性記憶装置において、データの書込みの際に対象セクタの管理情報の読み取りを行なっても管理情報が得られない場合には全セクタの管理情報記憶部を参照して書込み対象セクタと対をなしそれぞれのデータ記憶部には対をなす他方のセクタのデータが記憶されるようにされた置換えセクタがあるか否か判定し、置換えセクタが存在したときは当該対象セクタの管理情報記憶部にその置換えセクタを指す情報を記憶するとともに、置換えセクタのデータ記憶部にデータの書込みを行なうようにしたことを特徴とする不揮発性記憶装置。In a non-volatile storage device configured to store data in units of sectors including a data storage unit and a management information storage unit, management information can be obtained even if the management information of the target sector is read when data is written. If not, whether there is a replacement sector that is paired with the write target sector with reference to the management information storage section of all sectors and in which each data storage section stores the data of the other sector in the pair When there is a replacement sector, information indicating the replacement sector is stored in the management information storage unit of the target sector, and data is written to the data storage unit of the replacement sector. A non-volatile storage device. データの書込みの際に当該セクタの管理情報の読み取りを行なっても管理情報が得られない場合には全セクタの管理情報を参照する前に所定の記憶領域を参照して不良セクタとして登録されているか判定し、不良セクタとして登録されている場合には代替えセクタにデータの書込みを行なうようにしたことを特徴とする請求項1に記載の不揮発性記憶装置。If management information is not obtained even when reading the management information of the sector at the time of data writing, it is registered as a bad sector by referring to a predetermined storage area before referring to the management information of all sectors. 2. The non-volatile storage device according to claim 1, wherein if it is registered as a bad sector, data is written to a substitute sector. データの書込みの際に当該セクタの管理情報の読み取りを行なっても管理情報が得られない場合であって不良セクタとしても登録されていない場合に、全セクタの管理情報を参照して置換えセクタが存在しないときには、当該セクタを不良セクタとして登録しかつ代替えセクタを設定して当該代替えセクタにデータの書込みを行なうようにしたことを特徴とする請求項1または2に記載の不揮発性記憶装置。If the management information is not obtained even when reading the management information of the sector at the time of data writing, and if it is not registered as a bad sector, the replacement sector is referred to by referring to the management information of all sectors. 3. The non-volatile memory device according to claim 1, wherein when the non-existent sector does not exist, the sector is registered as a defective sector, and a replacement sector is set and data is written to the replacement sector. 上記セクタはデータ記憶部と管理情報記憶部とからなり、該管理情報記憶部に上記置換えセクタのセクタ番号が入るセクタポインタ領域が含まれていることを特徴とする請求項1、2または3に記載の不揮発性記憶装置。4. The sector according to claim 1, wherein the sector includes a data storage unit and a management information storage unit, and the management information storage unit includes a sector pointer area in which a sector number of the replacement sector is entered. The non-volatile storage device described. 置換えが行なわれていないセクタの管理情報記憶部内のセクタポインタ領域には自己のセクタ番号が格納されるようにされてなることを特徴する請求項1、2、3または4に記載の不揮発性記憶装置。5. The non-volatile storage according to claim 1, wherein the sector pointer area in the management information storage section of the sector that has not been replaced is stored with its own sector number. apparatus.
JP10614598A 1998-04-16 1998-04-16 Nonvolatile storage device Expired - Fee Related JP3741535B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10614598A JP3741535B2 (en) 1998-04-16 1998-04-16 Nonvolatile storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10614598A JP3741535B2 (en) 1998-04-16 1998-04-16 Nonvolatile storage device

Publications (2)

Publication Number Publication Date
JPH11306091A JPH11306091A (en) 1999-11-05
JP3741535B2 true JP3741535B2 (en) 2006-02-01

Family

ID=14426198

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10614598A Expired - Fee Related JP3741535B2 (en) 1998-04-16 1998-04-16 Nonvolatile storage device

Country Status (1)

Country Link
JP (1) JP3741535B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4843222B2 (en) 2005-01-11 2011-12-21 株式会社東芝 Semiconductor memory device control method, memory card, and host device

Also Published As

Publication number Publication date
JPH11306091A (en) 1999-11-05

Similar Documents

Publication Publication Date Title
US7330995B2 (en) Nonvolatile memory apparatus which prevents destruction of write data caused by power shutdown during a writing process
US6760255B2 (en) Flash EEPROM system with simultaneous multiple data sector programming and storage of physical block characteristics in other designated blocks
US5742934A (en) Flash solid state disk card with selective use of an address conversion table depending on logical and physical sector numbers
KR100622349B1 (en) Flash Memory for performing Bad Block Management and Method for performing Bad Block Management of Flash Memory
US6388919B2 (en) Memory controller for flash memory system and method for writing data to flash memory device
JP4129381B2 (en) Nonvolatile semiconductor memory device
KR100595909B1 (en) Moving sectors within a block in a flash memory
JP4058322B2 (en) Memory card
EP1228510B1 (en) Space management for managing high capacity nonvolatile memory
JP3695766B2 (en) Memory defect management method
US7117328B2 (en) Non-volatile data storage system and data storaging method
KR100906519B1 (en) Unusable block management within a non-volatile memory system
US7680977B2 (en) Page and block management algorithm for NAND flash
US7818492B2 (en) Source and shadow wear-leveling method and apparatus
US6839798B1 (en) Flash memory capable of storing frequently rewritten data
US8074128B2 (en) Block management and replacement method, flash memory storage system and controller using the same
JP4158526B2 (en) Memory card and data writing method to memory
CN101425334B (en) Method for implementing NOR FLASH bad block management and control circuit thereof
JP3981268B2 (en) Nonvolatile memory and data updating method thereof
JP4661369B2 (en) Memory controller
JP3741535B2 (en) Nonvolatile storage device
JP4433792B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP2004326523A (en) Storage device with rewritable nonvolatile memory, and control method of nonvolatile memory for storage device
KR20070024249A (en) Nand type flash memory for recording bad block information
JP2005316793A (en) Flash memory system and control method of flash memory

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20051020

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20051108

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20081118

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20091118

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20101118

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20111118

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20111118

Year of fee payment: 6

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313115

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

Free format text: PAYMENT UNTIL: 20111118

Year of fee payment: 6

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20111118

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20121118

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20121118

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20131118

Year of fee payment: 8

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees