JP2004071033A - Data writing method for flash memory - Google Patents

Data writing method for flash memory Download PDF

Info

Publication number
JP2004071033A
JP2004071033A JP2002227779A JP2002227779A JP2004071033A JP 2004071033 A JP2004071033 A JP 2004071033A JP 2002227779 A JP2002227779 A JP 2002227779A JP 2002227779 A JP2002227779 A JP 2002227779A JP 2004071033 A JP2004071033 A JP 2004071033A
Authority
JP
Japan
Prior art keywords
sector
data
memory
block
flash memory
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.)
Pending
Application number
JP2002227779A
Other languages
Japanese (ja)
Inventor
Takashi Maeda
前田 崇
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2002227779A priority Critical patent/JP2004071033A/en
Publication of JP2004071033A publication Critical patent/JP2004071033A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Memory System (AREA)
  • Read Only Memory (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a method of writing data in a flash memory, which can improve the memory's life by leveling the erasing frequencies in every memory block without requiring to record the erasing or controlling each time. <P>SOLUTION: A plurality of the memory blocks in the flash memory constitutes a logic ring buffer. When writing data in the flash memory, data are written sequentially in the sectors beginning from the first erased sector in a block which has erased sectors. After the data are written in the last sector of this block, the data are erased in the next memory block on the ring buffer, and the data are continued and sequentially written in the sectors beginning from the first sector of the erased block. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
この発明は、車両用のドライブレコーダなど、最新のデータを順次記録し、記録を更新してゆく機器に使用されるフラッシュメモリに適したデータの記録法に関するものである。
【0002】
【従来の技術】
走行する車両の各種データを順次記録する装置としてドライブレコーダが知られている。このドライブレコーダは、走行する車両の状態や走行履歴などのデータを順次収集し、収集したデータを記録・更新してゆく装置であり、記録されたデータは、例えば、事故発生時において、事故状況の解析などに使用されるものである。従って、ドライブレコーダに供給される電源が停止した状態においても記録されたデータを保持しておく必要性があり、このために、記録素子として通常はフラッシュメモリなどの不揮発性のメモリが使用される。
【0003】
このような機器にフラッシュメモリを使用する場合、フラッシュメモリは既にデータが書き込まれている領域にはこの領域を消去した後でなければ自由にデータを書き込むことができず、データの消去を行うには特定サイズのメモリブロックを一括して消去する必要がある。また、フラッシュメモリには消去回数に制限があって制限回数を超えた消去を行うことができず、特定のメモリブロックに集中して記録と消去とが行われた場合には、そのメモリブロックが他のメモリブロックより早く制限回数に達してしまい、フラッシュメモリ全体の有効利用が出来なくなって寿命が低下することになる。
【0004】
このような事態を回避する技術として、例えば、特許番号第2582487号公報が開示されている。この公報に開示された技術は、外部記憶装置が、それぞれが少なくとも一つのセクタを含む複数のメモリブロックを有するフラッシュメモリと、コマンド処理部とブロック管理手段とを備えており、ブロック管理手段が各メモリブロックの消去回数と各セクタの状況とを記録しており、コマンド処理部がブロック管理手段の記録に基づいてデータの書込や消去を行うメモリブロックを選定し、この選定による各メモリブロックや各セクタの状況変化をブロック管理手段が記録更新してゆくことにより、特定のセクタやメモリブロックのみが頻繁に書込や消去がなされないようにし、全てのメモリが長期間有効に使用されるようにしたものである。
【0005】
【発明が解決しようとする課題】
従来の技術においては上記のようにブロック管理手段がメモリブロックを管理することにより、消去回数の少ないメモリブロックが優先的に消去されるようになり、各メモリブロックの消去回数を平均化することができるが、そのために、各メモリブロック毎の消去回数を記録し、管理するブロック管理手段としてのフラッシュメモリ、もしくは、フラッシュメモリの記憶領域を必要とすると共に、書き込み不良が生じて消去回数の記録が失われた場合には消去回数の判定計算ができなくなり、消去回数の平準化がなされなくなってフラッシュメモリの長寿命化が図れないなどの欠点を有するものであった。
【0006】
この発明は、このような課題を解決するためになされたもので、消去回数を別途記録するための記録領域を必要とせず、フラッシュメモリの各メモリブロック毎の消去回数を平均化して長寿命化を図ることが可能であり、車両のドライブレコーダなど、最新のデータを順次記録・更新するような機器に適したフラッシュメモリのデータ記録法を得ることを目的とするものである。
【0007】
【課題を解決するための手段】
この発明に係わるフラッシュメモリのデータ記録法は、複数のメモリブロックを有し、各メモリブロック内が複数のセクタに分割されたフラッシュメモリを備え、このフラッシュメモリに記録されたデータの消去がメモリブロック単位でなされるものにおいて、フラッシュメモリ内の複数のメモリブロックが論理的なリングバッファを構成し、フラッシュメモリにデータを記録するときにはフラッシュメモリの消去済みセクタを有するメモリブロック内の先頭の消去済みセクタから順次データが記録されると共に、このメモリブロック内の最終セクタにデータが記録された後にはリングバッファ上における次のメモリブロックのデータが消去され、この消去されたメモリブロックの先頭セクタから順次データの記録が継続されるようにしたものである。
【0008】
また、動作開始時に、リングバッファ上の消去済みセクタを有するメモリブロックと、このメモリブロック内の先頭の消去済みセクタとが検索され、この先頭の消去済みセクタがデータ記録の先頭セクタとして設定されるようにしたものである。
さらに、リングバッファが、それぞれ複数のメモリブロックを有する複数のフラッシュメモリから形成されるようにしたものである。
【0009】
【発明の実施の形態】
実施の形態1.
図1ないし図4は、この発明の実施の形態1によるフラッシュメモリのデータ記録法を説明するものであり、図1は、車両に使用されるドライブレコーダのフラッシュメモリに対するデータ記録を行う部分を抜粋して示したブロック図、図2は、フラッシュメモリ内のメモリブロックとセクタとを示す模式図、図3は、起動時に動作して消去状態にあるメモリブロック内における先頭セクタの検出法を説明するフローチャート、図4は、データ記録時の動作を説明するフローチャートである。
【0010】
ドライブレコーダは図1に示すように、プログラムを実行するCPU1と、CPU1が実行するプログラムなどが記憶されているROM2と、プログラムやデータが一時記憶されるRAM3と、車両に関する状態や走行履歴などの各種のデータが記録され、この記録が順次最新のデータに更新されてゆくフラッシュメモリ4と、CPU1、ROM2、RAM3、フラッシュメモリ4のそれぞれを接続するバス5などから構成されている。
【0011】
フラッシュメモリ4の記憶領域は図2に示すように複数のメモリブロック(ブロック0〜ブロックm)から構成され、各ブロックは複数のセクタ(セクタ0〜セクタn)から構成されている。フラッシュメモリ4に記録されたデータを消去するときにはこのメモリブロックを最小単位として消去が行われ、記録するときにはセクタを最小単位として記録がなされる。また、メモリブロックはブロックmの次がブロック0になるようにリングバッファとして構成され、この構成は複数のフラッシュメモリを使用したときも同様であり、先頭のフラッシュメモリの先頭のメモリブロックをブロック0とし、末尾のフラッシュメモリの末尾のメモリブロックをブロックmとしてリングバッファを構成する。
【0012】
このようなフラッシュメモリ4に対するデータ記録法を図3と図4のフローチャートにより説明すると次の通りである。まず、ドライブレコーダが起動すると図3のフローチャートに従ってフラッシュメモリ4の中から消去状態にある先頭のセクタが検出される。このために、まず、ステップS301においてはCPU1の内部に有するアドレス変数(addr)にフラッシュメモリ4のブロック0にあるセクタ0のアドレスをセットする。
【0013】
続くステップS302ではアドレス変数(addr)の示すセクタにデータが記録されているかどうかを検出する。例えば、消去状態にあるセクタではフラッシュメモリの特性上、全ビットが1となっているので0のビットがあればそのセクタにはデータが記録されていると判定するものである。このセクタにデータが記録されていない場合にはアドレス変数(addr)で示されているセクタ、すなわち、この場合はブロック0にあるセクタ0をデータ記録先の先頭セクタとして設定し、処理を終了する。
【0014】
ステップS302でアドレス変数(addr)の示すセクタにデータが記録されていると判定された場合にはステップS303に進み、アドレス変数(addr)の示すセクタがそのブロックの最終セクタ(セクタn)であるかどうかを判定し、最終セクタであればステップS304に進んでアドレス変数(addr)に次のブロックの先頭セクタのアドレスをセットしてステップS302に戻る。また、ステップS303の判定にて最終セクタでなければステップS305に進み、アドレス変数(addr)に次のセクタのアドレスをセットしてステップS302に戻る。
【0015】
すなわち、ステップS302にてアドレス変数(addr)の示すセクタにデータの記録があればステップS303からステップS305での検索を繰り返して先頭になるセクタを検索し、ブロックの最終セクタまで進んだ場合にはステップS304にて次のブロックに進み、次のブロックに対してもステップS305での検索を繰り返して消去状態にある最初のセクタを検出するものである。そして、ここで検出された消去状態のセクタを先頭セクタとして後述するように順次データが記録されてゆくことになる。従って、図3のフローチャートに示された先頭セクタの検索処理はドライブレコーダの起動毎に一度だけ実行すればよいことになる。
【0016】
このようにして先頭の消去済みセクタが検索された後に、このセクタを先頭にしてフラッシュメモリ4に対するデータ記録がなされるが、その記録手順は図4のフローチャートに示す通りである。図3のフローチャートにて消去状態にある最初のセクタが検出されると、このセクタが最終的にアドレス変数(addr)にセットされたセクタであるから、図4のステップS401においてはこのセクタを先頭ブロックの先頭セクタとして車両の状態や走行履歴などに関する最初のデータを記録する。
【0017】
続くステップS402ではステップS401にてデータが書き込まれたセクタがそのメモリブロック内の最終セクタであるかどうかが判定される。ステップS402にて最終セクタでないと判定されるとステップS403に進み、次のセクタのアドレスをアドレス変数(addr)にセットして処理を終了し、次のデータ記録に備える。データが書き込まれたセクタがそのメモリブロック内の最終セクタでない限り、データ書き込み毎にステップS401からステップS403までのルーチンが繰り返されることになる。
【0018】
ステップS402の判定にてデータが書き込まれたセクタがそのメモリブロック内の最終セクタであると判定されるとステップS404に進み、ここではリングバッファ上の次のメモリブロックの記録を消去する。各メモリブロックはリングバッファを構成しているので、データ記録を完了したメモリブロックが最終ブロック(ブロックm)でない限り次のメモリブロックに進んで消去を行い、データ記録を完了したメモリブロックがブロックmである場合にはブロック0に戻って記録の消去を行うことになる。
【0019】
ステップS404にてリングバッファ上の次のメモリブロックの記録消去が行われるとステップS405に進み、アドレス変数(addr)にステップS404にて消去が完了したメモリブロック内の先頭セクタのアドレスをセットして処理を終了し、次のデータの記録に備える。
【0020】
このように、この発明の実施の形態1によるフラッシュメモリのデータ記録法によれば、論理的にリングバッファ状に配列されたメモリブロックの消去セクタを有するブロックとそのブロック内の先頭消去セクタとを検索し、このセクタを先頭として順次データを記録すると共に、そのメモリブロックの最終セクタまで記録がなされると、リングバッファ上の次のメモリブロックが消去され、そのブロックの先頭セクタからデータ記録が継続されるため、リングバッファを形成するメモリブロックは消去と記録とが均等に行われることになって、フラッシュメモリ4の長寿命化を図ることができ、そのために消去回数の記録など、特別な処理を行う必要もない。
【0021】
また、図3のフローチャートに示したように、システムの起動時に最初のデータ記録先を検索し、以降は順にセクタに記録すればよいので、データ記録毎に記録先を検索する必要がなく、さらに、複数のフラッシュメモリ4を使用する場合においても先頭のフラッシュメモリの先頭のメモリブロックをブロック0とし、末尾のフラッシュメモリの末尾のメモリブロックをブロックmとしてリングバッファを構成するので、単独のフラッシュメモリの場合と同様にデータを記録することができるものである。
【0022】
【発明の効果】
以上に説明したように、この発明によるフラッシュメモリのデータ記録法において、請求項1に記載の発明によれば、複数のメモリブロックとこのメモリブロック内が複数のセクタに分割されたフラッシュメモリを備え、フラッシュメモリ内の複数のメモリブロックが論理的なリングバッファを構成し、データを記録するときにはフラッシュメモリの消去済みセクタを有するメモリブロック内の先頭の消去済みセクタから順次データが記録され、メモリブロック内の最終セクタにデータが記録された後にはリングバッファ上における次のメモリブロックのデータが消去され、このメモリブロックの先頭セクタから順次データの記録が継続されるようにしたので、データの記録と消去とがリングバッファ上を巡回することになって、記録と消去の回数が各メモリブロック毎に平準化され、また、この平準化のために消去回数の記録や管理を必要としないので、トラブルによる平準化の崩れもなく、安定して平準化が維持できる結果、フラッシュメモリを有効に長寿命化することができるものである。
【0023】
また、請求項2に記載の発明によれば、請求項1に記載の発明において、動作開始時に、リングバッファ上の消去済みセクタを有するメモリブロックと、このメモリブロック内の先頭の消去済みセクタとを検索し、この先頭の消去済みセクタがデータ記録の先頭セクタとして設定されるようにしたので、データの記録は設定された先頭セクタから順次アドレスを進めてゆけばよく、データ記録毎に記録先のアドレス検索を行う必要がなく、動作プログラムを単純化することができるものである。
【0024】
さらに、請求項3に記載の発明によれば、請求項1および2に記載の発明において、リングバッファが、それぞれ複数のメモリブロックを有する複数のフラッシュメモリから形成されるようにしたので、記録容量を増すために複数のフラッシュメモリを使用する場合においても特別な処理を行うことなく、一つのフラッシュメモリを使用する場合と同様に記録を行うことができるものである。
【図面の簡単な説明】
【図1】この発明の実施の形態1によるフラッシュメモリのデータ記録法を説明するブロックである。
【図2】この発明の実施の形態1によるフラッシュメモリのデータ記録法を説明するフラッシュメモリの模式図である。
【図3】この発明の実施の形態1によるフラッシュメモリのデータ記録法の記録先検出動作を説明するフローチャートである。
【図4】この発明の実施の形態1によるフラッシュメモリのデータ記録法のデータ記録動作を説明するフローチャートである。
【符号の説明】
1 CPU、2 ROM、3 RAM、
4 フラッシュメモリ、5 バス。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a data recording method suitable for a flash memory used in a device that sequentially records the latest data and updates the recording, such as a drive recorder for a vehicle.
[0002]
[Prior art]
2. Description of the Related Art A drive recorder is known as a device for sequentially recording various data of a running vehicle. This drive recorder is a device that sequentially collects data such as the state of a running vehicle and a traveling history, and records and updates the collected data. It is used for the analysis of data. Therefore, it is necessary to hold recorded data even when the power supplied to the drive recorder is stopped, and for this purpose, a non-volatile memory such as a flash memory is usually used as a recording element. .
[0003]
When flash memory is used in such a device, the flash memory cannot freely write data in the area to which data has already been written unless this area is erased. Needs to erase memory blocks of a specific size at once. In addition, the flash memory has a limited number of erasures and cannot perform erasing beyond the number of erasures, and when recording and erasing are concentrated on a specific memory block, that memory block is The number of times reaches the limit number earlier than other memory blocks, so that the entire flash memory cannot be used effectively and the life is shortened.
[0004]
As a technique for avoiding such a situation, for example, Japanese Patent No. 2582487 is disclosed. In the technique disclosed in this publication, an external storage device includes a flash memory having a plurality of memory blocks each including at least one sector, a command processing unit, and a block management unit. The number of erases of the memory block and the status of each sector are recorded, and the command processing unit selects a memory block in which data is to be written or erased based on the record of the block management unit. The block management means records and updates the status change of each sector, so that only specific sectors and memory blocks are not frequently written or erased, and all memories are used effectively for a long period of time. It was made.
[0005]
[Problems to be solved by the invention]
In the prior art, the block management means manages memory blocks as described above, so that memory blocks with a small number of erases are preferentially erased, and the number of erases of each memory block can be averaged. However, for this purpose, a flash memory or a storage area of the flash memory is required as a block management means for recording and managing the number of erasures for each memory block. In the case of loss, the number of erasures cannot be determined and calculated, the number of erasures cannot be equalized, and the life of the flash memory cannot be prolonged.
[0006]
The present invention has been made to solve such a problem, and does not require a recording area for separately recording the number of erasures, and averages the number of erasures for each memory block of the flash memory to extend the life. It is an object of the present invention to obtain a flash memory data recording method suitable for a device that sequentially records and updates the latest data, such as a drive recorder of a vehicle.
[0007]
[Means for Solving the Problems]
A data recording method for a flash memory according to the present invention includes a flash memory having a plurality of memory blocks, each of which is divided into a plurality of sectors, and erasing data recorded in the flash memory. In the unit performed, a plurality of memory blocks in the flash memory constitute a logical ring buffer, and when recording data in the flash memory, the first erased sector in the memory block having the erased sector of the flash memory After the data is sequentially recorded from the first memory block and after the data is recorded in the last sector in this memory block, the data of the next memory block on the ring buffer is erased, and the data is sequentially erased from the first sector of the erased memory block. Record is continued It is.
[0008]
At the start of the operation, a memory block having an erased sector on the ring buffer and a first erased sector in the memory block are searched, and the first erased sector is set as a first sector of data recording. It is like that.
Further, the ring buffer is formed from a plurality of flash memories each having a plurality of memory blocks.
[0009]
BEST MODE FOR CARRYING OUT THE INVENTION
Embodiment 1 FIG.
FIGS. 1 to 4 illustrate a method of recording data in a flash memory according to a first embodiment of the present invention. FIG. 1 shows a portion of a drive recorder used in a vehicle that records data in the flash memory. FIG. 2 is a schematic diagram showing a memory block and a sector in a flash memory, and FIG. 3 explains a method of detecting a leading sector in a memory block which operates at the time of startup and is in an erased state. FIG. 4 is a flowchart for explaining the operation at the time of data recording.
[0010]
As shown in FIG. 1, the drive recorder includes a CPU 1 that executes a program, a ROM 2 that stores a program executed by the CPU 1, a RAM 3 that temporarily stores a program and data, and a state such as a vehicle-related state and a running history. A flash memory 4 in which various data are recorded and the recording is sequentially updated to the latest data, and a bus 5 for connecting each of the CPU 1, the ROM 2, the RAM 3, the flash memory 4, and the like.
[0011]
As shown in FIG. 2, the storage area of the flash memory 4 is composed of a plurality of memory blocks (block 0 to block m), and each block is composed of a plurality of sectors (sector 0 to sector n). When erasing data recorded in the flash memory 4, erasing is performed using this memory block as a minimum unit, and when recording, recording is performed using a sector as a minimum unit. The memory block is configured as a ring buffer so that the block next to the block m is the block 0. This configuration is the same when a plurality of flash memories are used. The ring buffer is configured by setting the last memory block of the last flash memory as the block m.
[0012]
The data recording method for the flash memory 4 will be described below with reference to the flowcharts of FIGS. First, when the drive recorder is started, the first sector in the erased state is detected from the flash memory 4 according to the flowchart of FIG. For this purpose, first, in step S301, the address of the sector 0 in the block 0 of the flash memory 4 is set to an address variable (addr) provided inside the CPU 1.
[0013]
In a succeeding step S302, it is detected whether or not data is recorded in the sector indicated by the address variable (addr). For example, in a sector in an erased state, all bits are 1 because of the characteristics of the flash memory. Therefore, if there is a 0 bit, it is determined that data is recorded in that sector. If no data is recorded in this sector, the sector indicated by the address variable (addr), that is, in this case, sector 0 in block 0 is set as the first sector of the data recording destination, and the process ends. .
[0014]
If it is determined in step S302 that data is recorded in the sector indicated by the address variable (addr), the process proceeds to step S303, and the sector indicated by the address variable (addr) is the last sector (sector n) of the block. It is determined whether or not it is the last sector. If it is the last sector, the flow advances to step S304 to set the address of the first sector of the next block in the address variable (addr), and returns to step S302. If it is not the last sector in the determination in step S303, the process proceeds to step S305, where the address of the next sector is set in the address variable (addr), and the process returns to step S302.
[0015]
That is, if data is recorded in the sector indicated by the address variable (addr) in step S302, the search from step S303 to step S305 is repeated to search for the leading sector. In step S304, the process proceeds to the next block, and the search in step S305 is repeated for the next block to detect the first sector in the erased state. Then, data is sequentially recorded as described later, with the sector in the erased state detected here as the head sector. Therefore, the search processing of the leading sector shown in the flowchart of FIG. 3 has to be executed only once every time the drive recorder is started.
[0016]
After the first erased sector is searched in this manner, data is recorded in the flash memory 4 starting from this sector. The recording procedure is as shown in the flowchart of FIG. When the first sector in the erased state is detected in the flowchart of FIG. 3, this sector is finally the sector set in the address variable (addr). Therefore, in step S401 of FIG. First data relating to the state of the vehicle, the running history, and the like are recorded as the first sector of the block.
[0017]
In the following step S402, it is determined whether or not the sector in which the data is written in step S401 is the last sector in the memory block. If it is determined in step S402 that the current sector is not the last sector, the process proceeds to step S403, where the address of the next sector is set in an address variable (addr), and the processing is terminated, thus preparing for the next data recording. Unless the sector to which data is written is the last sector in the memory block, the routine from step S401 to step S403 is repeated every time data is written.
[0018]
If it is determined in step S402 that the sector to which data is written is the last sector in the memory block, the process proceeds to step S404, where the recording of the next memory block on the ring buffer is erased. Since each memory block constitutes a ring buffer, unless the memory block on which data recording is completed is the last block (block m), the next memory block is erased, and the memory block on which data recording is completed is block m. If so, the process returns to block 0 to erase the record.
[0019]
When the recording and erasure of the next memory block on the ring buffer is performed in step S404, the process proceeds to step S405, and the address of the first sector in the memory block that has been completely erased in step S404 is set in the address variable (addr). The process is completed and the next data is recorded.
[0020]
As described above, according to the data recording method of the flash memory according to the first embodiment of the present invention, a block having an erase sector of a memory block logically arranged in a ring buffer shape and a head erase sector in the block are identified. Search and record data sequentially with this sector as the head, and when recording is performed up to the last sector of that memory block, the next memory block on the ring buffer is erased and data recording continues from the first sector of that block. Therefore, erasure and recording of the memory block forming the ring buffer are performed evenly, so that the life of the flash memory 4 can be extended, and special processing such as recording of the number of erasures can be performed. No need to do.
[0021]
Further, as shown in the flowchart of FIG. 3, the first data recording destination is searched when the system is started up, and thereafter, it is only necessary to sequentially record the data in the sector. Therefore, it is not necessary to search the recording destination for each data recording. Even when a plurality of flash memories 4 are used, the ring buffer is formed by setting the first memory block of the first flash memory as block 0 and the last memory block of the last flash memory as block m, so that a single flash memory is used. Data can be recorded in the same manner as in the above case.
[0022]
【The invention's effect】
As described above, the data recording method for a flash memory according to the present invention includes, according to the first aspect, a plurality of memory blocks and a flash memory in which the inside of the memory block is divided into a plurality of sectors. A plurality of memory blocks in the flash memory constitute a logical ring buffer, and when recording data, data is sequentially recorded from the first erased sector in the memory block having erased sectors of the flash memory, After the data is recorded in the last sector of the memory block, the data of the next memory block on the ring buffer is erased, and the recording of data is sequentially continued from the first sector of this memory block. Erasing goes around the ring buffer, recording and erasing Since the number of times is leveled for each memory block, and it is not necessary to record and manage the number of times of erasing for this leveling, leveling does not collapse due to trouble and the leveling can be stably maintained. This can effectively extend the life of the flash memory.
[0023]
According to a second aspect of the present invention, in the first aspect of the invention, at the start of the operation, a memory block having an erased sector on the ring buffer, and a first erased sector in the memory block. And the first erased sector is set as the first sector of the data recording, so that the data recording can be performed by sequentially advancing the address from the set first sector, and the recording destination is set for each data recording. It is not necessary to perform the address search, and the operation program can be simplified.
[0024]
Further, according to the third aspect of the present invention, in the first and second aspects of the present invention, the ring buffer is formed from a plurality of flash memories each having a plurality of memory blocks. Even when a plurality of flash memories are used in order to increase the number of recordings, recording can be performed in the same manner as when one flash memory is used, without performing special processing.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a data recording method of a flash memory according to a first embodiment of the present invention.
FIG. 2 is a schematic diagram of a flash memory for explaining a data recording method of the flash memory according to the first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a recording destination detection operation of the flash memory data recording method according to the first embodiment of the present invention;
FIG. 4 is a flowchart illustrating a data recording operation of the data recording method of the flash memory according to the first embodiment of the present invention;
[Explanation of symbols]
1 CPU, 2 ROM, 3 RAM,
4 Flash memory, 5 buses.

Claims (3)

複数のメモリブロックを有し、各メモリブロック内が複数のセクタに分割されたフラッシュメモリを備え、前記フラッシュメモリに記録されたデータの消去が前記メモリブロック単位でなされるものにおいて、前記フラッシュメモリ内の前記複数のメモリブロックが論理的なリングバッファを構成し、前記フラッシュメモリにデータを記録するときには前記フラッシュメモリの消去済みセクタを有するメモリブロック内の先頭の消去済みセクタから順次データが記録されると共に、このメモリブロック内の最終セクタにデータが記録された後には前記リングバッファ上における次のメモリブロックのデータが消去され、この消去されたメモリブロックの先頭セクタから順次データの記録が継続されることを特徴とするフラッシュメモリのデータ記録法。A flash memory having a plurality of memory blocks, each of the memory blocks being divided into a plurality of sectors, and erasing data recorded in the flash memory in units of the memory blocks; The plurality of memory blocks constitute a logical ring buffer, and when data is recorded in the flash memory, data is sequentially recorded from the first erased sector in a memory block having erased sectors of the flash memory. At the same time, after the data is recorded in the last sector in this memory block, the data of the next memory block on the ring buffer is erased, and the recording of data is sequentially continued from the first sector of the erased memory block. Flash memory data Recording process. 動作開始時に、前記リングバッファ上の前記消去済みセクタを有するメモリブロックと、このメモリブロック内の先頭の消去済みセクタとが検索され、この先頭の消去済みセクタがデータ記録の先頭セクタとして設定されることを特徴とする請求項1に記載のフラッシュメモリのデータ記録法。At the start of operation, a memory block having the erased sector on the ring buffer and a first erased sector in the memory block are searched, and the first erased sector is set as a first sector of data recording. 2. The data recording method for a flash memory according to claim 1, wherein: 前記リングバッファが、それぞれ複数のメモリブロックを有する複数のフラッシュメモリから形成されたことを特徴とする請求項1または請求項2に記載のフラッシュメモリのデータ記録法。3. The flash memory data recording method according to claim 1, wherein said ring buffer is formed from a plurality of flash memories each having a plurality of memory blocks.
JP2002227779A 2002-08-05 2002-08-05 Data writing method for flash memory Pending JP2004071033A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002227779A JP2004071033A (en) 2002-08-05 2002-08-05 Data writing method for flash memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002227779A JP2004071033A (en) 2002-08-05 2002-08-05 Data writing method for flash memory

Publications (1)

Publication Number Publication Date
JP2004071033A true JP2004071033A (en) 2004-03-04

Family

ID=32014710

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002227779A Pending JP2004071033A (en) 2002-08-05 2002-08-05 Data writing method for flash memory

Country Status (1)

Country Link
JP (1) JP2004071033A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006030566A1 (en) * 2004-09-17 2006-03-23 Mitsubishi Denki Kabushiki Kaisha Information writing/reading device of flash memory
JP2007251519A (en) * 2006-03-15 2007-09-27 Fujitsu Ltd Video data storage device and video data storage method
JP2009506629A (en) 2005-08-26 2009-02-12 トムソン ライセンシング Transcoded images for improved trick play
JP2009184609A (en) * 2008-02-08 2009-08-20 Nsk Ltd Electric power steering device
JP2011147180A (en) * 2011-03-30 2011-07-28 Fujitsu Ltd Data storage device and data storage method
JP2011160464A (en) * 2011-03-30 2011-08-18 Fujitsu Ltd Data storage device and data storage method
JP2011160465A (en) * 2011-03-30 2011-08-18 Fujitsu Ltd Video data storage device and video data storage method
JP2011172256A (en) * 2011-03-30 2011-09-01 Fujitsu Ltd Video data storage device, and video data storage method
JP4837731B2 (en) * 2005-06-08 2011-12-14 サンディスク アイエル リミテッド Flash memory with programmable durability
US8205037B2 (en) 2009-04-08 2012-06-19 Google Inc. Data storage device capable of recognizing and controlling multiple types of memory chips operating at different voltages
US8433845B2 (en) 2009-04-08 2013-04-30 Google Inc. Data storage device which serializes memory device ready/busy signals
US8458394B2 (en) 2009-03-18 2013-06-04 Samsung Electronics Co., Ltd. Storage device and method of managing a buffer memory of the storage device
JP2013205933A (en) * 2012-03-27 2013-10-07 Mitsubishi Electric Corp Firmware updating device and firmware updating method
JP2014142874A (en) * 2013-01-25 2014-08-07 Toyota Motor Corp Vehicle information recording device
JP2017072273A (en) * 2015-10-05 2017-04-13 三菱電機株式会社 Heating cooker

Cited By (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006030566A1 (en) * 2004-09-17 2006-03-23 Mitsubishi Denki Kabushiki Kaisha Information writing/reading device of flash memory
JP4837731B2 (en) * 2005-06-08 2011-12-14 サンディスク アイエル リミテッド Flash memory with programmable durability
JP2009506629A (en) 2005-08-26 2009-02-12 トムソン ライセンシング Transcoded images for improved trick play
US8712169B2 (en) 2005-08-26 2014-04-29 Thomson Licensing Transcoded images for improved trick play
JP2007251519A (en) * 2006-03-15 2007-09-27 Fujitsu Ltd Video data storage device and video data storage method
US8305463B2 (en) 2006-03-15 2012-11-06 Fujitsu Limited Video data saving device and video data saving method
JP2009184609A (en) * 2008-02-08 2009-08-20 Nsk Ltd Electric power steering device
US8458394B2 (en) 2009-03-18 2013-06-04 Samsung Electronics Co., Ltd. Storage device and method of managing a buffer memory of the storage device
US8566508B2 (en) 2009-04-08 2013-10-22 Google Inc. RAID configuration in a flash memory data storage device
US8639871B2 (en) 2009-04-08 2014-01-28 Google Inc. Partitioning a flash memory data storage device
US8239724B2 (en) 2009-04-08 2012-08-07 Google Inc. Error correction for a data storage device
US8244962B2 (en) 2009-04-08 2012-08-14 Google Inc. Command processor for a data storage device
US9244842B2 (en) 2009-04-08 2016-01-26 Google Inc. Data storage device with copy command
US8380909B2 (en) 2009-04-08 2013-02-19 Google Inc. Multiple command queues having separate interrupts
US8433845B2 (en) 2009-04-08 2013-04-30 Google Inc. Data storage device which serializes memory device ready/busy signals
US8447918B2 (en) 2009-04-08 2013-05-21 Google Inc. Garbage collection for failure prediction and repartitioning
US8205037B2 (en) 2009-04-08 2012-06-19 Google Inc. Data storage device capable of recognizing and controlling multiple types of memory chips operating at different voltages
US8595572B2 (en) 2009-04-08 2013-11-26 Google Inc. Data storage device with metadata command
US8566507B2 (en) 2009-04-08 2013-10-22 Google Inc. Data storage device capable of recognizing and controlling multiple types of memory chips
JP2011160464A (en) * 2011-03-30 2011-08-18 Fujitsu Ltd Data storage device and data storage method
JP2011160465A (en) * 2011-03-30 2011-08-18 Fujitsu Ltd Video data storage device and video data storage method
JP2011147180A (en) * 2011-03-30 2011-07-28 Fujitsu Ltd Data storage device and data storage method
JP2011172256A (en) * 2011-03-30 2011-09-01 Fujitsu Ltd Video data storage device, and video data storage method
JP2013205933A (en) * 2012-03-27 2013-10-07 Mitsubishi Electric Corp Firmware updating device and firmware updating method
JP2014142874A (en) * 2013-01-25 2014-08-07 Toyota Motor Corp Vehicle information recording device
JP2017072273A (en) * 2015-10-05 2017-04-13 三菱電機株式会社 Heating cooker

Similar Documents

Publication Publication Date Title
JP2004071033A (en) Data writing method for flash memory
JP4163461B2 (en) Cache buffer control method and control apparatus
US6571312B1 (en) Data storage method and data processing device using an erasure block buffer and write buffer for writing and erasing data in memory
JP2007156633A (en) Memory device and memory control method
JP2008009874A (en) Memory controller, flash memory system equipped with memory controller, and method for controlling flash memory
EP2977907B1 (en) Data storage device, method for storing data, and onboard control device
JP2004303238A (en) Flash memory access device and method
US20090195928A1 (en) Magnetic disk apparatus
JP3544476B2 (en) Creating a memory management table
JP2002318733A (en) Managing device for block erasure type storage medium
JP2003058417A (en) Storage device
KR102142675B1 (en) Apparatus for controlling eeprom and method for writing data using same
JP4594944B2 (en) Memory control device
JPH11282765A (en) External storage device using flash memory
JP4794530B2 (en) Semiconductor device and mobile phone
TWI417889B (en) Write timeout methods for a flash memory and memory device using the same
KR101083054B1 (en) Flash memory overwriting method and apparatus
JP4468342B2 (en) Data management method
JP2006085596A (en) Information recording/reading device
CN105706067A (en) Microcomputer with built-in flash memory, method for writing data to built-in flash memory of microcomputer, and program for writing data to flash memory
JP2009134513A (en) Memory controller, nonvolatile memory module, access module, and nonvolatile memory system
JP4710274B2 (en) MEMORY DEVICE, MEMORY DEVICE CONTROL METHOD, AND DATA PROCESSING SYSTEM
JPH09259046A (en) Method for storing data in flash memory and method for reading data out of flash memory
JPH07296591A (en) Electronic equipment
JP2000035916A (en) Memory operation management method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050207

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050215

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050621