JPH0950698A - Data rewriting method for microcomputer incorporated with flash memory together - Google Patents

Data rewriting method for microcomputer incorporated with flash memory together

Info

Publication number
JPH0950698A
JPH0950698A JP13348196A JP13348196A JPH0950698A JP H0950698 A JPH0950698 A JP H0950698A JP 13348196 A JP13348196 A JP 13348196A JP 13348196 A JP13348196 A JP 13348196A JP H0950698 A JPH0950698 A JP H0950698A
Authority
JP
Japan
Prior art keywords
data
flash memory
microcomputer
area
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.)
Granted
Application number
JP13348196A
Other languages
Japanese (ja)
Other versions
JP3641066B2 (en
Inventor
Akihiro Yamazaki
昭浩 山崎
Hisamichi Kasai
央倫 葛西
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 JP13348196A priority Critical patent/JP3641066B2/en
Publication of JPH0950698A publication Critical patent/JPH0950698A/en
Application granted granted Critical
Publication of JP3641066B2 publication Critical patent/JP3641066B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To prevent degradation of holding data caused by driving memory by providing a refresh mode in which data transfer is performed between a flash memory and a RAM. SOLUTION: A refresh mode is selected by a mode register 3, a start address and a finish address of area in which refresh is performed is generated by a flash mode control circuit 4, and an address counter 7 is set. Next, data is read out from a flash memory 1 according to a counter value of a counter 7, it is transferred to a RAM 2 and compared. Successively, after block erasing is performed by an erasing/writing control circuit 9, data evacuated to a RAM 2 is transferred to the memory 1, and rewriting is performed. Thereby, degradation by disturbance and stress generated by operation of reading out and rewriting data stored in the memory 1 can be prevented, reliability and a holding characteristic of a holding data can be improved.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、不揮発性メモリと
して、メモリセルアレイが分割されているフラッシュメ
モリを混載するマイクロコンピュータのデータ書換え方
法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data rewriting method for a microcomputer in which a flash memory having a divided memory cell array is mixedly mounted as a nonvolatile memory.

【0002】[0002]

【従来の技術】従来、マイクロコンピュータに搭載され
る不揮発性メモリとして、データ書き換え可能なEPR
OMやEEPROM等が用られる場合がある。このEP
ROMは、紫外線を所定の位置に照射して、それまでの
保持データを消去し、新たにデータを書き込むことがで
きる。このメモリは、書換える場合には、紫外線が他の
部品へ影響したり、紫外線を照射できない位置に実装さ
れている場合があるため、実装している基板等から取り
外して、メモリ単体で書換える必要がある。
2. Description of the Related Art Conventionally, a data rewritable EPR is used as a nonvolatile memory mounted in a microcomputer.
OM, EEPROM, etc. may be used. This EP
The ROM can irradiate a predetermined position with ultraviolet rays to erase the stored data up to that point and write new data. When this memory is rewritten, it may be affected by ultraviolet rays on other parts or it may be mounted at a position where it cannot be irradiated with ultraviolet light. Therefore, remove it from the board on which it is mounted and rewrite it with the memory alone. There is a need.

【0003】しかし、EEPROMは、所定の電気信号
を印加することにより、それまで保持しているデータを
消去し、新たなデータに書換えることができる。つま
り、EEPROMは、実装する際に配線基板に消去・書
き込み用のパターン配線を形成しておき、所定の電気信
号を印加することにより、実装したままで、メモリを取
り出すこと無く保持データの消去、新たなデータの書き
込みができる。
However, the EEPROM can erase the data held up to that point and rewrite it with new data by applying a predetermined electric signal. That is, in the EEPROM, when mounted, a wiring pattern for erasing / writing is formed on the wiring board, and a predetermined electric signal is applied to the EEPROM to erase the retained data without removing the memory, You can write new data.

【0004】しかし、EEPROMには、選択トランジ
スタを設けているため、全体としてのセルサイズがEP
ROMに比べて、数倍大きくなり、集積化させることが
難しい。そこで、近年、電気的に書換えが可能で、1つ
のトランジスタでメモリセルが構成されるフラッシュE
EPROMが利用されている。このフラッシュEEPR
OMは、配線基板に実装された状態で、所定の電気信号
により書換えが可能であり、メモリ容量の大容量化が実
現できる。
However, since the EEPROM is provided with a selection transistor, the overall cell size is EP.
It is several times larger than ROM and difficult to integrate. Therefore, in recent years, a flash E that is electrically rewritable and has a memory cell composed of one transistor
EPROM is used. This flash EEPR
The OM can be rewritten by a predetermined electric signal in a state of being mounted on the wiring board, and a large memory capacity can be realized.

【0005】[0005]

【発明が解決しようとする課題】しかし、前述したフラ
ッシュEEPROMは、図7に示すように、例えば、N
OR型フラッシュEEPROMであれば、データ書込み
は、EPROMと同様であって、ドレインの近傍で発生
したホットエレクトロンを、コントロールゲートに印加
した高電圧を用いて、フローティングゲートに注入する
という原理である。また、データ消去は、コントロール
ゲートを接地し、ソースに印加した高電圧により発生し
たトンネル電流を利用して、フローティングゲートから
ホットエレクトロンを引き抜くという原理である。
However, as shown in FIG. 7, the above-mentioned flash EEPROM has, for example, an N-type flash EEPROM.
In the case of an OR flash EEPROM, data writing is the same as in EPROM, and the principle is that hot electrons generated near the drain are injected into the floating gate by using the high voltage applied to the control gate. Data erasing is based on the principle that the control gate is grounded and the tunnel current generated by the high voltage applied to the source is used to extract hot electrons from the floating gate.

【0006】従って、フローティングゲート下の酸化膜
は、トンネル酸化膜という10nm程度の薄い膜に形成
されている。このためにフラッシュEEPROMのメモ
リセルは、技術的に解決することが難しい種々のディス
ターブ(disturb) の問題が発生する。例えば、技術的ア
プローチとしては、形成技術面からトンネル酸化膜の膜
質を高品位化させて欠陥をなくす。また、回路を構成し
た場合には、部位に掛かるストレスを可能なかぎり回避
する等である。
Therefore, the oxide film under the floating gate is formed as a thin film of about 10 nm called a tunnel oxide film. Therefore, the memory cells of the flash EEPROM have various disturb problems which are technically difficult to solve. For example, as a technical approach, from the viewpoint of forming technology, the quality of the tunnel oxide film is improved to eliminate defects. Further, when the circuit is configured, the stress applied to the parts is avoided as much as possible.

【0007】図8には、フラッシュEEPROMに生じ
る種々のディスターブについて示す。この構成におい
て、メモリセル1は書込み時にメモリセル2はワードラ
インが共通のため、ゲートが高電位になるというゲート
ディスターブが発生する。さらに、メモリセル3には、
逆にビットラインが共通のために、ドレインに高電位が
印加されるというドレインディスターブが発生する。ま
た、ブロック1を消去時にブロック2は、ソースが高電
位になるというソースディスターブが発生する。
FIG. 8 shows various disturbs that occur in the flash EEPROM. In this configuration, when writing to the memory cell 1, the memory cell 2 has a common word line, so that a gate disturbance occurs in which the gate is at a high potential. Furthermore, in the memory cell 3,
On the contrary, since the bit lines are common, a drain disturb in which a high potential is applied to the drain occurs. Further, when the block 1 is erased, the source disturb of the block 2 in which the source becomes a high potential occurs.

【0008】これらのディスターブ若しくはストレス
は、全ブロックを一括消去する場合には、時間的に比較
的短くなり問題とはならない。特にソースディスターブ
は、一括消去の場合には発生しない。
[0008] These disturbances or stresses are relatively short in time when erasing all blocks at once, and are not a problem. In particular, source disturb does not occur in the case of batch erase.

【0009】しかし、実際に利用される場合には、ブロ
ック消去が利用される場合が多く、通常、104 〜10
6 回の書込み・消去が要求されている。特に、使用状況
によっては、特定のブロックのみが繰り返し使用され、
104〜106 回の書込み・消去が行われてしまう場合
がある。この時、全く書換えされないブロックも存在し
ており、そのブロックは他のブロックが書換える際のス
トレスを一括消去の場合に比べて、104 〜106 回受
けることになり記憶されるデータに影響を与える場合も
ある。
However, when it is actually used, block erasing is often used, usually 10 4 to 10
Writing / erasing 6 times is required. Especially, depending on the usage situation, only certain blocks are used repeatedly,
Writing and erasing may be performed 10 4 to 10 6 times. At this time, there is a block that is not rewritten at all, and that block receives 10 4 to 10 6 times more stress when rewriting other blocks than in the case of batch erasing, affecting the stored data. May be given.

【0010】また、長期間に渡って記憶されるデータの
状態を良好に保持させる点から考えると、読み出し時に
かかるドレイン電圧及びゲート電圧でのディターブも問
題ととなる。
Further, considering that the state of the data stored for a long period of time is favorably maintained, the disturbance in the drain voltage and the gate voltage applied during reading also poses a problem.

【0011】そこで本発明は、簡単な構成により、メモ
リの駆動により生じる保持データの劣化を防止するフラ
ッシュメモリを混載するマイクロコンピュータのデータ
書換え方法を提供することを目的とする。
Therefore, an object of the present invention is to provide a data rewriting method of a microcomputer having a flash memory for preventing deterioration of held data caused by driving the memory with a simple structure.

【0012】[0012]

【課題を解決するための手段】本発明は上記目的を達成
するために、電気的にデータ書換え可能でメモリセルエ
リアが複数のブロックに分割されたフラッシュメモリ及
び、データの書込み読出し可能な記憶装置を混載するマ
イクロコンピュータにおいて、前記ブロックを基準とす
るエリアのデータをフラッシュメモリから前記記憶装置
に退避させ、フラッシュメモリの退避させたエリア部分
のデータを消去し、再度、前記記憶装置からフラッシュ
メモリに前記退避させたエリアのデータを再書き込みし
て、フラッシュメモリに保持されるデータを前記ブロッ
クを基準とするエリア毎にリフレッシュするデータ書換
え方法を提供する。
In order to achieve the above object, the present invention provides a flash memory in which data can be electrically rewritten and a memory cell area is divided into a plurality of blocks, and a memory device in which data can be written and read. In a microcomputer in which the blocks are mixed, the data in the area based on the block is saved from the flash memory to the storage device, the data in the saved area part of the flash memory is erased, and the data is again stored in the flash memory from the storage device. A data rewriting method of rewriting the data in the saved area and refreshing the data held in the flash memory for each area based on the block.

【0013】以上のような構成のフラッシュメモリを混
載するマイクロコンピュータのデータ書換え方法は、フ
ラッシュメモリに保持されるデータを記憶装置(RA
M)にデータ転送して一時的に退避させ、フラッシュメ
モリの退避させたエリアのデータを消去する。そして、
再度、記憶装置からフラッシュメモリのエリアに退避さ
せたデータを再書込みすることにより、保持データがリ
フレッシュされる。
According to the data rewriting method of the microcomputer having the flash memory having the above-mentioned configuration embedded therein, the data retained in the flash memory is stored in the storage device (RA).
Data is transferred to M) and temporarily saved, and the data in the saved area of the flash memory is erased. And
The retained data is refreshed by rewriting the data saved in the area of the flash memory from the storage device again.

【0014】[0014]

【発明の実施の形態】以下、図面を参照して本発明の実
施形態について詳細に説明する。図1には、本発明によ
る実施例としてのフラッシュメモリを混載するマイクロ
コンピュータの書換え方法を実施するための概略的な構
成を示し説明する。
DETAILED DESCRIPTION OF THE INVENTION Embodiments of the present invention will be described in detail below with reference to the drawings. FIG. 1 shows a schematic configuration for carrying out a rewriting method of a microcomputer including a flash memory as an embodiment according to the present invention.

【0015】この構成において、メモリセルアレイが複
数のブロックに分割されたフラッシュメモリ1と、マイ
クロコンピュータ内に内蔵するRAM2と、リフレッシ
ュモードを指定するためのモードレジスタ3と、リフレ
ッシュのための電圧が印加されているか否か判定するリ
フレッシュモード制御回路4と、リフレッシュを行うエ
リア(1ブロック若しくは数ブロック)の開始アドレス
を生成する開始アドレスレジスタ5と、終了アドレスを
生成する終了アドレスレジスタ6と、前記開始アドレス
及び終了アドレスに基づいてカウントを行うアドレスカ
ウンタ7と、前記アドレスカウンタ7にリフレッシュを
行ったアドレスのカウント数と前記終了アドレス数とを
比較し前記リフレッシュモード制御回路4にリフレッシ
ュ完了の指示を行うコンパレータ8と、前記前記リフレ
ッシュモード制御回路4からの制御信号に基づき、フラ
ッシュメモリ1とRAM2との間で保持されるデータの
転送(書込み)及び、フラッシュメモリ1の保持データ
をブロック単位で消去する消去・書込み制御回路9とで
構成される。
In this structure, the flash memory 1 in which the memory cell array is divided into a plurality of blocks, the RAM 2 incorporated in the microcomputer, the mode register 3 for designating the refresh mode, and the voltage for refresh are applied. A refresh mode control circuit 4 for determining whether or not the start is performed, a start address register 5 for generating a start address of an area (one block or several blocks) to be refreshed, an end address register 6 for generating an end address, and the start An address counter 7 that counts based on an address and an end address, compares the count number of the address refreshed in the address counter 7 with the end address number, and instructs the refresh mode control circuit 4 to complete the refresh. Based on a control signal from the comparator 8 and the refresh mode control circuit 4, transfer (writing) of data held between the flash memory 1 and the RAM 2 and erasing data held in the flash memory 1 in block units. It is composed of an erase / write control circuit 9.

【0016】本実施例においては、通常の動作からリフ
レッシュモードに切り換えるためにモードレジスタ3に
よりリフレッシュモードを選択する。その方法として
は、(1)ハードウエアモード,(2)モニタモード,
(3)ソフトウエアモード等が考えられる。 (1)ハードウエアモード 図2に示すように、マイクロコンピュータにリフレッシ
ュモードとして機能させるための入力端子を設ける。こ
の入力端子の電位をHighレベルにすることにより、
モードレジスタへリフレッシュモードが設定される。
In this embodiment, the refresh mode is selected by the mode register 3 in order to switch from the normal operation to the refresh mode. The methods are (1) hardware mode, (2) monitor mode,
(3) Software mode and the like are possible. (1) Hardware Mode As shown in FIG. 2, the microcomputer is provided with an input terminal for functioning as a refresh mode. By setting the potential of this input terminal to High level,
The refresh mode is set in the mode register.

【0017】このモードが設定されると、図3に示すよ
うに、予め設定されたリフレッシュブロックの先頭アド
レス及び終了アドレスが、各々モードレジスタへ設定さ
れ、先頭アドレスから終了アドレスまでのデータがフラ
ッシュメモリ1から読み出され、RAMに一時的に待避
される。
When this mode is set, as shown in FIG. 3, the preset start address and end address of the refresh block are set in the mode register respectively, and the data from the start address to the end address is stored in the flash memory. It is read from 1, and temporarily saved in the RAM.

【0018】この後に、待避したエリアのブロックを消
去する。消去動作完了の後、再び、フラッシュメモリ1
の元のエリアへRAM2から読み出したデータを再書き
込みすることにより、一連のリフレッシュ処理が終了す
る。 (2)モニタモード 図4に示すように、データや制御プログラム等を記憶す
るための本体メモリのマトリックス(ブロック分割され
たエリア)とは別に、モニタ用の数ビット以上のセルを
含むマトリックスを設ける。
After this, the blocks in the saved area are erased. After the erase operation is completed, the flash memory 1 is restarted.
By rewriting the data read from the RAM 2 to the original area of the above, the series of refresh processing is completed. (2) Monitor mode As shown in FIG. 4, in addition to a matrix (block-divided area) of the main body memory for storing data, control programs, etc., a matrix including cells of several bits or more for monitoring is provided. .

【0019】例えば、モニタ用の少なくとも2bit以
上のマトリックスを設ける。これは、DATAの”0”
と”1”の両方をモニタするためである。また、モニタ
セルの感度の関係から、例えば、1,0のDATAにそ
れぞれ3bitを用いた、計6bitによる構成であっ
ても良い。この構成によれば、各DATAに対して、多
数決の判定ができる。即ち、最初からモニタセルに1b
itの欠陥があっても使用できる。あるいは、モニタセ
ルにウィークなものがあっても使用できる。
For example, a matrix of at least 2 bits or more for monitoring is provided. This is "0" of DATA
This is because both "1" and "1" are monitored. Further, in consideration of the sensitivity of the monitor cell, for example, a configuration with a total of 6 bits using 3 bits for DATA of 1 and 0 may be used. According to this configuration, a majority decision can be made for each DATA. That is, from the beginning, the monitor cell has 1b
It can be used even if it has a defect. Alternatively, a weak monitor cell can be used.

【0020】このマトリックスのセルへ印加される読出
し時の電圧を本体メモリの各セルに印加される電圧より
厳しく管理する。例えば、読出し時にセルのドレインへ
印加される電圧aを高めにする、又はゲート電圧bを高
めにする、又は常に読み続ける等により、データリテン
ションのモニタとして利用する。このモニタセルのデー
タが1ビットでも反転していれば、前記モードレジスタ
へ自動的にリフレッシュモードが設定され、前述したと
同様な一連のリフレッシュ処理が開始される。 (3)ソフトウエアモード 図5に示すように、本体メモリの適当なアドレス(1by
te若しくは、数byte)へパスワードを書き込み、予め作
成したソフトウエアにより、データの読出し時にパスワ
ードが書き込まれたものと同じか否か定期的にモニタ
し、もし不一致が確認されたならば、前記モードレジス
タへ自動的にリフレッシュモードが設定されるようなソ
フトウエアを書き込んでおき、前述したと同様な一連の
リフレッシュ処理を開始させる。
The read voltage applied to the cells of this matrix is controlled more strictly than the voltage applied to each cell of the main body memory. For example, it is used as a data retention monitor by increasing the voltage a applied to the drain of the cell at the time of reading, by increasing the gate voltage b, or by always continuing reading. If even one bit of data in the monitor cell is inverted, the refresh mode is automatically set in the mode register, and a series of refresh processing similar to that described above is started. (3) Software mode As shown in Fig. 5, an appropriate address (1by
te or several bytes), write the password to the software created in advance, and periodically monitor whether the password is the same as the one written when reading the data. Software for automatically setting the refresh mode is written in the register, and a series of refresh processes similar to those described above is started.

【0021】図6に示すフローチャートを参照して、こ
のように構成されたフラッシュメモリを混載するマイク
ロコンピュータの書換え方法について説明する。まず、
モードレジスタ3によりリフレッシュモードが選択され
ると、フレッシュモード制御回路4は書込み/消去のた
めの指示電圧(リフレッシュのための電圧)VPPが印加
されているか否か判定し(ステップS2)、印加されて
いれば(YES)、最初にリフレッシュを行うエリア
(1ブロック若しくは数ブロック)の開始アドレス及び
終了アドレスを生成し、開始アドレスをアドレスカウン
タ7に設定する(ステップS3)。もし、指示電圧VPP
が印加されていなければ(NO)、リフレッシュモード
にはエントリーされない。
A method of rewriting a microcomputer in which the flash memory having the above-described configuration is mounted will be described with reference to the flowchart shown in FIG. First,
When the refresh mode is selected by the mode register 3, the fresh mode control circuit 4 determines whether or not the instruction voltage (voltage for refresh) VPP for writing / erasing is applied (step S2) and is applied. If so (YES), the start address and end address of the area (one block or several blocks) to be refreshed first are generated, and the start address is set in the address counter 7 (step S3). If the indicated voltage VPP
If is not applied (NO), the refresh mode is not entered.

【0022】次にアドレスカウンタ7のカウンタ値に従
って、順次、フラッシュメモリ1から保持されるデータ
を読出し、RAM2へ順番に書き込むデータ転送を行う
(ステップS4)。この時、RAM2へ書き込むアドレ
スは、通常のメモリマップ上のアドレスと異なり、0番
地から割り当てており、フラッシュメモリ1から最初に
読出したデータをRAM2の0番地、次に読出したデー
タをRAM2の1番地、以後同様にデータを転送する。
このようにフラッシュメモリ1のリフレッシュするブロ
ックのエリアと、そのデータが書き込まれるRAM2の
エリアが一対一に対応している。
Next, in accordance with the counter value of the address counter 7, the data held in the flash memory 1 is sequentially read and the data is sequentially written into the RAM 2 (step S4). At this time, unlike the address on the normal memory map, the address to be written to the RAM 2 is assigned from address 0, the data read first from the flash memory 1 is the address 0 of RAM 2, and the next read data is the address of RAM 2 1. Address, and data is transferred in the same manner thereafter.
In this way, the area of the block to be refreshed of the flash memory 1 and the area of the RAM 2 in which the data is written have a one-to-one correspondence.

【0023】そして、コンパレータ8において、前記フ
ラッシュメモリ1のリフレッシュされるデータのアドレ
スと前記終了アドレスとを比較して、同じになった場合
には(YES)、リフレッシュモード制御回路4に転送
終了の指示を行い、前記RAM2へのデータ転送(一時
的な退避)が終了する。
Then, the comparator 8 compares the address of the data to be refreshed in the flash memory 1 with the end address, and if they are the same (YES), the refresh mode control circuit 4 is informed of the end of the transfer. The instruction is given, and the data transfer (temporary saving) to the RAM 2 is completed.

【0024】次に、リフレッシュモード制御回路4から
のRAM2に退避させたデータブロックの消去実行を指
示により、消去・書き込み制御回路9は、ブロック消去
を実施し(ステップS6)、その消去を終了した場合に
は、終了の指示をリフレッシュモード制御回路4に出力
する。
Next, in response to an instruction from the refresh mode control circuit 4 to erase the data block saved in the RAM 2, the erase / write control circuit 9 performs block erase (step S6), and the erase is completed. In this case, the end instruction is output to the refresh mode control circuit 4.

【0025】そしてリフレッシュモード制御回路4は、
終了の指示に従って、アドレスカウンタ7に再度、RA
M2からフラッシュメモリ1にデータ転送を行うエリア
の開始アドレスを設定し(ステップS7)、消去・書き
込み制御回路9に再書き込みを指示し、RAM2へ退避
させたデータをフラッシュメモリ1に転送させる(ステ
ップS8)。そして全データの再書き込みが終了すると
(ステップS9)、リフレッシュすべきデータが記憶さ
れるエリア(ブロック)に対して、リフレッシュ動作が
完了したか否か判定し(ステップS10)、終了するま
で前記ステップS3に戻り、前述したと同様なリフレッ
シュ動作を繰り返し行う。フラッシュメモリの全エリア
のブロックのリフレッシュが終了すると、このモードの
動作は終了する。
The refresh mode control circuit 4 is
In accordance with the end instruction, the address counter 7 is again set to RA
The start address of the area for transferring data from M2 to the flash memory 1 is set (step S7), the erase / write control circuit 9 is instructed to rewrite, and the data saved in the RAM 2 is transferred to the flash memory 1 (step S7). S8). Then, when the rewriting of all data is completed (step S9), it is judged whether or not the refresh operation is completed for the area (block) in which the data to be refreshed is stored (step S10), and the steps are performed until the completion. Returning to S3, the same refresh operation as described above is repeated. When the blocks of all areas of the flash memory are refreshed, the operation in this mode ends.

【0026】また、このリフレッシュモードは、全エリ
アに対して行うだけではなく、任意のブロックを指定し
て行ってもよい。また、RAM2は、マイクロコンピュ
ータに内蔵するRAMを利用したが、ポートを介して、
DAM等を用いて外部メモリに退避させてもよい。また
リフレッシュモードは、モードレジスタによる設定では
なく、外部端子による設定もしくは命令に追加しても良
い。また従来のプログラム、消去のモードと同様にリフ
レッシュコマンドとして登録してもよい。
The refresh mode may be performed not only for all areas but also for any block. Further, as the RAM2, the RAM built in the microcomputer was used, but through the port,
It may be saved in an external memory using DAM or the like. Further, the refresh mode may be set by an external terminal or added to an instruction instead of being set by the mode register. It may also be registered as a refresh command as in the conventional program and erase modes.

【0027】以上説明したように本実施例によれば、フ
ラッシュメモリとRAMとの間で、データ転送を行うリ
フレッシュモードを設けることにより、フラッシュメモ
リに保持され、読み出し動作や書換え動作により発生す
るディスターブやストレスにより劣化する保持データを
一時的に転送させて退避し、再書き込みを行うことによ
り保持データのリフレッシュを図ることができる。この
リフレッシュにより保持されるデータの信頼性及び保持
特性の向上を実施できる。従来のプロセス的アプローチ
と併せて非常に有効である。また、このリフレッシュモ
ードを実行させるために必要とする回路は極僅かで済
み、フラッシュメモリのセル面積やデバイス構造に影響
しない。
As described above, according to the present embodiment, by providing the refresh mode for transferring data between the flash memory and the RAM, the disturb which is held in the flash memory and is generated by the read operation or the rewrite operation is performed. It is possible to refresh the held data by temporarily transferring and saving the held data that deteriorates due to the stress and by rewriting. The reliability and retention characteristics of the data retained by this refresh can be improved. It is very effective in combination with the conventional process approach. Moreover, the circuit required for executing this refresh mode is extremely small, and does not affect the cell area of the flash memory or the device structure.

【0028】[0028]

【発明の効果】以上詳述したように本発明によれば、簡
単な構成により、メモリの駆動により生じる保持データ
の劣化を防止するフラッシュメモリを混載するマイクロ
コンピュータのデータ書換え方法を提供することができ
る。
As described above in detail, according to the present invention, it is possible to provide a data rewriting method for a microcomputer having a flash memory in which the deterioration of the held data caused by the driving of the memory is prevented by a simple structure. it can.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の実施例としてのフラッシュメモリを混
載するマイクロコンピュータの書換え方法を実施するた
めの概略的な構成を示す図である。
FIG. 1 is a diagram showing a schematic configuration for carrying out a rewriting method of a microcomputer including a flash memory as an embodiment of the present invention.

【図2】データ書き換えを開始するためのハードウエア
モードを設定するための構成例を示す図である。
FIG. 2 is a diagram showing a configuration example for setting a hardware mode for starting data rewriting.

【図3】本実施例のハードウエアモードによるデータ書
き換えを説明するためのタイミングチャートである。
FIG. 3 is a timing chart for explaining data rewriting in the hardware mode of the present embodiment.

【図4】本実施例のデータ書き換えを開始するためのモ
ニタモードを説明するための構成例を示す図である。
FIG. 4 is a diagram showing a configuration example for explaining a monitor mode for starting data rewriting according to the present embodiment.

【図5】本実施例のデータ書き換えを開始するためのソ
フトウエアモードを説明するための図である。
FIG. 5 is a diagram for explaining a software mode for starting data rewriting according to the present embodiment.

【図6】本実施例のデータ書換え方法を説明するための
フローチャートである。
FIG. 6 is a flowchart for explaining the data rewriting method of the present embodiment.

【図7】従来のフラッシュEEPROMへのデータ書込
み及びデータ消去を説明するための図である。
FIG. 7 is a diagram for explaining data writing and data erasing in a conventional flash EEPROM.

【図8】従来のフラッシュEEPROMに生じる種々の
ディスターブについて説明するための図である。
FIG. 8 is a diagram for explaining various disturbances that occur in a conventional flash EEPROM.

【符号の説明】[Explanation of symbols]

1…フラッシュメモリ 2…RAM 3…モードレジスタ 4…リフレッシュモード制御回路 5…開始アドレスレジス 6…終了アドレスレジスタ 7…アドレスカウンタ 8…コンパレータ 9…消去・書込み制御回路 1 ... Flash memory 2 ... RAM 3 ... Mode register 4 ... Refresh mode control circuit 5 ... Start address register 6 ... End address register 7 ... Address counter 8 ... Comparator 9 ... Erase / write control circuit

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 電気的にデータ書換え可能でメモリセル
エリアが複数のブロックに分割されたフラッシュメモリ
及び、データの書込み読出し可能な記憶装置を混載する
マイクロコンピュータにおいて、 前記ブロック単位で、任意のエリアのデータをフラッシ
ュメモリから前記記憶装置に退避させ、フラッシュメモ
リの退避させたエリアのデータを消去し、再度、前記記
憶装置から前記退避させたデータを元のエリアに再書き
込みして、フラッシュメモリに保持されるデータを前記
ブロックを基準とするエリア毎にリフレッシュすること
を特徴とするフラッシュメモリを混載するマイクロコン
ピュータのデータ書換え方法。
1. A microcomputer in which a flash memory in which data is electrically rewritable and a memory cell area is divided into a plurality of blocks and a storage device in which data can be written and read are mounted together are provided in an arbitrary area for each block. Data in the flash memory to the storage device, erase the data in the saved area of the flash memory, rewrite the saved data from the storage device to the original area again, and write it to the flash memory. A data rewriting method for a microcomputer including a flash memory, characterized in that retained data is refreshed for each area based on the block.
【請求項2】 電気的にデータ書換え可能でメモリセル
エリアが複数のブロックに分割されたフラッシュメモリ
及び、データの書込み読出し可能な記憶装置を混載する
マイクロコンピュータにおいて、 予め設定されたリフレッシュモードの指定により、前記
フラッシュメモリに設定されたモードレジスタに対し
て、リフレッシュ動作を開始させるための指示電圧が印
加され、リフレッシュモードの実行を開始する第1ステ
ップと、 リフレッシュ動作を行う1ブロック若しくは数ブロック
からなるエリアの第1開始アドレス及び第1終了アドレ
スを生成し、第1開始アドレスをカウンタに設定する第
2ステップと、 前記フラッシュメモリに保持されるデータを前記第1開
始アドレスから、順次読出し、一対一に対応する記憶装
置のエリアにデータを書き込むデータ転送を行う第3ス
テップと、 前記開始アドレスからアドレス値を更新しつつ、フラッ
シュメモリから前記記憶装置へデータ転送を行い、前記
終了アドレスに到達した際に、データ転送を終了させる
第4ステップと、 前記フラッシュメモリのデータ転送させたエリアのデー
タを消去する第5ステップと、 データ消去された前記エリアの第2開始アドレスと第2
終了アドレスを生成し、第2開始アドレスをカウンタに
設定する第6ステップと、 前記記憶装置から一時退避させたデータを読出し、前記
第2開始アドレスから順次、該データを再書き込みする
データ転送を行う第7ステップと、 前記第2終了アドレスに到達した際に、データの再書き
込みを終了させ、該データのリフレッシュ動作を完了す
る第8ステップと、で構成されることを特徴とするフラ
ッシュメモリを混載するマイクロコンピュータのデータ
書換え方法。
2. In a microcomputer in which a flash memory in which data is electrically rewritable and a memory cell area is divided into a plurality of blocks and a storage device in which data can be written and read are mixedly mounted, a preset refresh mode is designated. As a result, an instruction voltage for starting the refresh operation is applied to the mode register set in the flash memory, and the first step of starting the execution of the refresh mode and one block or several blocks performing the refresh operation are performed. Second step of generating a first start address and a first end address of the area, and setting the first start address in a counter, and reading the data held in the flash memory sequentially from the first start address. Data in the area of the storage device corresponding to A third step of performing data transfer to write data, and a step of updating the address value from the start address, transferring data from the flash memory to the storage device, and ending the data transfer when the end address is reached. 4th step, 5th step of erasing the data in the area of the flash memory to which the data is transferred, 2nd start address of the area whose data has been erased and 2nd
A sixth step of generating an end address and setting a second start address in a counter, reading data temporarily saved from the storage device, and performing data transfer of sequentially rewriting the data from the second start address A flash memory, comprising: a seventh step; and an eighth step of ending rewriting of data and completing a refresh operation of the data when the second end address is reached. Data rewriting method for microcomputer.
【請求項3】 前記マイクロコンピュータにおいて、 予め設定されたリフレッシュモードの指定は、該マイク
ロコンピュータにリフレッシュ動作を開始させるめの入
力端子を設け、前記入力端子の電位を予め定めたレベル
に設定することにより、前記モードレジスタに対して、
割り込み信号となるフラグをたて、リフレシュを開始さ
せることを特徴とする請求項1記載のフラッシュメモリ
を混載するマイクロコンピュータのデータ書換え方法。
3. In the microcomputer, the preset refresh mode is designated by providing the microcomputer with an input terminal for starting a refresh operation and setting the potential of the input terminal to a predetermined level. To the mode register,
2. A data rewriting method for a microcomputer having a flash memory according to claim 1, wherein refreshing is started by setting a flag as an interrupt signal.
【請求項4】 前記マイクロコンピュータにおいて、 前記ブロック分割されたメモリセルのエリア以外で、少
なくとも2ビット以上10以上のセルを含むマトリック
スセルを設け、 データの読出し時に、前記メモリセルに印加される電圧
より高い電圧を前記マトリックスのセルのドレインに印
加させて、データリテンションを監視し、前記マトリッ
クスのセルのデータが1ビットでも反転していれば、リ
フレッシュ動作を開始させることを特徴とする請求項1
記載のフラッシュメモリを混載するマイクロコンピュー
タのデータ書換え方法。
4. In the microcomputer, a matrix cell including at least 2 bits or more and 10 or more cells is provided outside the area of the memory cells divided into blocks, and a voltage applied to the memory cells at the time of reading data. 2. A higher voltage is applied to the drain of the cell of the matrix to monitor data retention, and if even one bit of data in the cell of the matrix is inverted, the refresh operation is started.
A data rewriting method for a microcomputer in which the flash memory described above is embedded.
【請求項5】 前記マイクロコンピュータにおいて、 前記ブロック分割されたメモリセルのエリア以外で、少
なくとも2ビット以上のセルを含むマトリックスセルを
設け、 データの読出し時に、前記メモリセルに印加される電圧
より高い電圧を前記マトリックスのセルのゲートに印加
させて、データリテンションを監視し、前記マトリック
スのセルのデータが1ビットでも反転していれば、リフ
レッシュ動作を開始させることを特徴とする請求項1記
載のフラッシュメモリを混載するマイクロコンピュータ
のデータ書換え方法。
5. In the microcomputer, a matrix cell including cells of at least 2 bits is provided in areas other than the area of the memory cells divided into blocks, and the voltage is higher than the voltage applied to the memory cells when reading data. 2. A voltage is applied to the gate of the cell of the matrix to monitor the data retention, and if the data of the cell of the matrix is inverted by one bit, the refresh operation is started. A data rewriting method for a microcomputer having a flash memory embedded therein.
【請求項6】 前記マイクロコンピュータにおいて、 前記ブロック分割されたメモリセルのエリア内で任意の
複数のアドレスへパスワードを書き込み、前記マイクロ
コンピュータの動作中、該パスワードを監視し、前記パ
スワードの不一致があったならば、リフレッシュ動作を
開始させることを特徴とする請求項1記載のフラッシュ
メモリを混載するマイクロコンピュータのデータ書換え
方法。
6. In the microcomputer, a password is written to an arbitrary plurality of addresses in the area of the memory cell divided into blocks, the password is monitored during the operation of the microcomputer, and the password does not match. 2. A data rewriting method for a microcomputer having a flash memory according to claim 1, wherein the refresh operation is started.
JP13348196A 1995-05-30 1996-05-28 Microcomputer data rewriting method with embedded flash memory Expired - Fee Related JP3641066B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13348196A JP3641066B2 (en) 1995-05-30 1996-05-28 Microcomputer data rewriting method with embedded flash memory

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP13178795 1995-05-30
JP7-131787 1995-05-30
JP13348196A JP3641066B2 (en) 1995-05-30 1996-05-28 Microcomputer data rewriting method with embedded flash memory

Publications (2)

Publication Number Publication Date
JPH0950698A true JPH0950698A (en) 1997-02-18
JP3641066B2 JP3641066B2 (en) 2005-04-20

Family

ID=26466523

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13348196A Expired - Fee Related JP3641066B2 (en) 1995-05-30 1996-05-28 Microcomputer data rewriting method with embedded flash memory

Country Status (1)

Country Link
JP (1) JP3641066B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007334533A (en) * 2006-06-14 2007-12-27 Hitachi Ltd Storage system
JP2008192266A (en) * 2007-02-07 2008-08-21 Megachips Lsi Solutions Inc Memory controller
JP2009140564A (en) * 2007-12-06 2009-06-25 Toshiba Corp Nand flash memory and memory system
JP2015030394A (en) * 2013-08-05 2015-02-16 日本精機株式会社 Vehicle display device
KR20150053324A (en) * 2013-11-08 2015-05-18 (주)피델릭스 Flash memory device having efficient refresh operation
EP3496103A1 (en) 2017-12-05 2019-06-12 Renesas Electronics Corporation Semiconductor memory device and refreshing method of semiconductor memory device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2077559B1 (en) 2007-12-27 2012-11-07 Hagiwara Solutions Co., Ltd. Refresh method of a flash memory

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007334533A (en) * 2006-06-14 2007-12-27 Hitachi Ltd Storage system
JP2008192266A (en) * 2007-02-07 2008-08-21 Megachips Lsi Solutions Inc Memory controller
JP2009140564A (en) * 2007-12-06 2009-06-25 Toshiba Corp Nand flash memory and memory system
JP2015030394A (en) * 2013-08-05 2015-02-16 日本精機株式会社 Vehicle display device
KR20150053324A (en) * 2013-11-08 2015-05-18 (주)피델릭스 Flash memory device having efficient refresh operation
US9312024B2 (en) 2013-11-08 2016-04-12 Fidelix Co., Ltd. Flash memory device having efficient refresh operation
EP3496103A1 (en) 2017-12-05 2019-06-12 Renesas Electronics Corporation Semiconductor memory device and refreshing method of semiconductor memory device
KR20190066549A (en) 2017-12-05 2019-06-13 르네사스 일렉트로닉스 가부시키가이샤 Semiconductor memory device and refreshing method of semiconductor memory device
US10892018B2 (en) 2017-12-05 2021-01-12 Renesas Electronics Corporation Semiconductor memory device and refreshing method of semiconductor memory device

Also Published As

Publication number Publication date
JP3641066B2 (en) 2005-04-20

Similar Documents

Publication Publication Date Title
US5699297A (en) Method of rewriting data in a microprocessor additionally provided with a flash memory
US6553510B1 (en) Memory device including redundancy routine for correcting random errors
JP3599541B2 (en) Nonvolatile semiconductor memory device
JP3941149B2 (en) Semiconductor nonvolatile memory device
US7457168B2 (en) Non-volatile memory device and associated method of erasure
US6614689B2 (en) Non-volatile memory having a control mini-array
JP3450625B2 (en) Nonvolatile semiconductor memory device and operation method thereof
JP3672435B2 (en) Nonvolatile memory device
JP3411186B2 (en) Nonvolatile semiconductor memory device
JP2000228094A (en) Non-volatile semiconductor memory
KR960005355B1 (en) Nonvolatile semiconductor storage and storage system using that
JPH05182479A (en) Nonolatile semiconductor memory writing and erasing en bloc electrically
US5544117A (en) Non-volatile semiconductor memory device with improved collective erasing operation
US6128224A (en) Method and apparatus for writing an erasable non-volatile memory
US6781882B2 (en) Nonvolatile semiconductor storage device having a shortened time required for a data erasing operation and data erasing method thereof
JP4373057B2 (en) Sector protection circuit and method for flash memory device
JP3143161B2 (en) Non-volatile semiconductor memory
JP3725581B2 (en) CELL DISCRIMINATION METHOD AND ERASE METHOD, MEMORY DEVICE USED FOR THEM, AND INTEGRATED CIRCUIT USING THE MEMORY DEVICE
JP3641066B2 (en) Microcomputer data rewriting method with embedded flash memory
JPH1064288A (en) Flash erasure type non-volatile memory and its erasing method
JPH0528788A (en) Nonvolatile memory device
EP1260989A2 (en) Method to prevent disturbances during the erasing phase in a non-volatile memory device
JPH0750096A (en) Semiconductor memory device
JPH05290585A (en) Nonvolatile memory writable electrically
JP2000315392A (en) Non-volatile semiconductor memory

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040113

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040315

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050120

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

Free format text: PAYMENT UNTIL: 20080128

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20090128

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100128

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees