JPH10105533A - Microcomputer with built-in flash memory - Google Patents

Microcomputer with built-in flash memory

Info

Publication number
JPH10105533A
JPH10105533A JP25341796A JP25341796A JPH10105533A JP H10105533 A JPH10105533 A JP H10105533A JP 25341796 A JP25341796 A JP 25341796A JP 25341796 A JP25341796 A JP 25341796A JP H10105533 A JPH10105533 A JP H10105533A
Authority
JP
Japan
Prior art keywords
data
flash memory
writing
time
microcomputer
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
JP25341796A
Other languages
Japanese (ja)
Inventor
Hiroshi Sugimoto
博司 杉本
Satoshi Yabuta
聡 薮田
Yuji Tanigawa
裕二 谷川
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electronics 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 Matsushita Electronics Corp filed Critical Matsushita Electronics Corp
Priority to JP25341796A priority Critical patent/JPH10105533A/en
Publication of JPH10105533A publication Critical patent/JPH10105533A/en
Pending legal-status Critical Current

Links

Landscapes

  • Microcomputers (AREA)
  • Read Only Memory (AREA)

Abstract

PROBLEM TO BE SOLVED: To shorten the time for writing data into the flash memory of a microcomputer with built-in flash memory or sampling a gate voltage. SOLUTION: An initial value is set (S11). The data of a designated address value is confirmed. When it is '0', '1' is added to the address value, and it is repeated until data '1' are detected (S12). When '1' is detected in processing S12, '0' is written and its time is measured (S13). When time (n)×(t) for completing write through (n) times of loops is maximum in processing S13, it is preserved in maximum time Tmax (S14). The processings S12-S14 are repeated for the number of samples [ (m) pieces of samples ] and its completion is discriminated (S15). The batch write of data '0' is performed while using the maximum write time Tmax ($16). Because of these processings, the time required for write is found, the data '0' are simultaneously written in remaining areas within that time, and the time for write can be shortened.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、フラッシュメモリ
の内容を書き換える際の処理時間を短縮する書き込み手
段や、フラッシュメモリ内のデータ保護のための手段を
備えるフラッシュメモリ内蔵マイクロコンピュータに関
するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer with a built-in flash memory which has a writing means for shortening the processing time when rewriting the contents of the flash memory and a means for protecting data in the flash memory.

【0002】[0002]

【従来の技術】昨今の情報機器製品において、特にその
商品開発および情報機器に関する各種規格のバージョン
アップ等のサイクルは非常に早くなっている。そのた
め、システムの立ち上げ時に用られる、マイクロコンピ
ュータ等のシステム制御ソフト(以下、ファームウエア
という)をシステム装置内にもしくはマイクロコンピュ
ータ内部に組み込んだフラッシュメモリに格納させるこ
とで、容易にシステム開発後のファームウエア変更等の
データ書き換えができるようにシステム装置は設計され
ている。ここで、従来のフラッシュメモリ内蔵クロコン
ピュータのフラッシュメモリへのデータ書き込みについ
て、図を用いて説明する。
2. Description of the Related Art In recent information equipment products, the cycle of product development and version upgrade of various standards relating to information equipment has become very fast. Therefore, by storing system control software (hereinafter referred to as firmware) such as a microcomputer used when starting up the system in the system device or in a flash memory incorporated in the microcomputer, the system can be easily developed. The system device is designed so that data rewriting such as firmware change can be performed. Here, data writing to a flash memory of a conventional flash memory built-in microcomputer will be described with reference to the drawings.

【0003】図9はフラッシュメモリへデータを書き込
む処理について説明したフローチャートである。フラッ
シュメモリへの書き込みは、特定データの書き込み後、
データを消去してから新しいデータを書き込むことによ
り行われる。まず、フラッシュメモリのすべての領域に
特定データとしての“0”データの書き込みを行う(S
1)。次に一定時間ゲート電圧を下げることでデータの
消去を行う(S2)。この処理S2において、ゲート電圧
を下げすぎた場合にはゲート電圧を上げて再度消去の作
業を行う(S3)。以上のような処理工程によりすべての
旧データを消去した後、新しいデータの書き込みを行う
(S4)。
FIG. 9 is a flowchart illustrating a process of writing data to a flash memory. When writing to flash memory, after writing specific data,
This is performed by erasing data and then writing new data. First, “0” data as specific data is written to all areas of the flash memory (S
1). Next, data is erased by lowering the gate voltage for a certain period of time (S2). In this process S2, if the gate voltage is excessively lowered, the gate voltage is increased and the erasing operation is performed again (S3). After erasing all old data by the above processing steps, write new data
(S4).

【0004】また、図10は前記の処理を模式的に示した
もので、1は旧データ、2は“0”データ、3は消去完
了データ、4は新規データである。まず、特定データの
“0”を書き込むことにより旧データ1が“0”データ
2に書き換えられる(S1)。次にゲート電圧を下げるこ
とによりFFhの消去完了データ3に書き換えられる(S
2)。最後に新しい新規データ4が書き込まれる(S
4)。これらの処理は、一括では実行せずに少しずつ同
作業を繰り返し実行することで実現されている。
FIG. 10 schematically shows the above-mentioned processing, wherein 1 is old data, 2 is "0" data, 3 is erasure completed data, and 4 is new data. First, by writing "0" of specific data, old data 1 is rewritten to "0" data 2 (S1). Next, by lowering the gate voltage, FFh is rewritten to the erase completion data 3 (S
2). Finally, new new data 4 is written (S
4). These processes are realized by repeatedly executing the same work little by little, without executing them collectively.

【0005】さらに、図11はフラッシュメモリへのデー
タ書き込みの処理手順について説明したフローチャート
である。まず、フラッシュメモリの書き込み開始アドレ
スをセットする(S5)。時間tの間だけ電圧をかけてデ
ータを書き込む。データの書き込みが完了するまで時間
tで書き込みを繰り返し続ける(S6)。処理S6の作業
を全領域への書き込みが終了する(最終アドレスに達す
る)まで繰り返す(S7)。 なお、前記の処理手順は特
定データや新規データにおいても、データを書き込む際
には同様の手順が繰り返される。
FIG. 11 is a flowchart for explaining a procedure for writing data to the flash memory. First, a write start address of the flash memory is set (S5). Data is written by applying a voltage only during time t. The writing is repeated at time t until the data writing is completed (S6). The operation of the processing S6 is repeated until the writing to all the areas is completed (the final address is reached) (S7). Note that the above procedure is repeated for writing specific data or new data when writing data.

【0006】図12はフラッシュメモリ全領域に特定デー
タ“0”が書き込まれた後、データを消去する処理手順
について説明したフローチャートである。まず、メモリ
の消去開始アドレスをセットする(S8)。時間tの間だ
けゲート電圧を下げる。つまりデータがFFhに変化す
るまで、時間tでゲート電圧の抜き取りを繰り返し続け
る(S9)。処理S9の作業を最終アドレスに達するまで
繰り返す(S10)。
FIG. 12 is a flowchart for explaining a processing procedure for erasing data after specific data "0" is written in the entire area of the flash memory. First, the erase start address of the memory is set (S8). The gate voltage is reduced only during the time t. That is, until the data changes to FFh, sampling of the gate voltage is repeated at time t (S9). The operation of the processing S9 is repeated until the operation reaches the final address (S10).

【0007】[0007]

【発明が解決しようとする課題】しかしながら、このよ
うな構成のフラッシュメモリ内蔵マイクロコンピュータ
における、特にフラッシュメモリのデータ書き込み方法
として、前記のような手順を踏んで行われるデータの書
き換えでは、書き込みに要する時間が書き込み電圧や温
度により変化し、さらに同作業を繰り返し実行するため
非常に時間を要するという問題があった。
However, in a flash memory built-in microcomputer having such a configuration, in particular, as a data writing method of the flash memory, the data rewriting performed according to the above-described procedure requires writing. There is a problem that the time varies depending on the writing voltage and the temperature, and it takes much time to repeat the same operation.

【0008】本発明は、前記従来技術の問題を解決する
ものであり、フラッシュメモリの書き込み方法として、
書き込み時間のサンプリングやゲート電圧抜き取り時間
の変動性および書き込み時間と電圧の関係等を利用する
手順を導入したもので、これにより、フラッシュメモリ
へのデータの書き込みやゲート電圧の抜き取り時間を高
速化したフラッシュメモリ内蔵マイクロコンピュータを
提供することを目的とする。
The present invention solves the above-mentioned problem of the prior art.
It introduces a procedure that uses the sampling time of the write time, the variability of the gate voltage extraction time, and the relationship between the write time and the voltage, thereby shortening the time for writing data to the flash memory and extracting the gate voltage. It is an object to provide a microcomputer with a built-in flash memory.

【0009】[0009]

【課題を解決するための手段】この目的を達成するため
に、本発明に係るフラッシュメモリ内蔵マイクロコンピ
ュータは、外部より入力されるデータをフラッシュメモ
リにローディングするソフトウエアを格納したROM
と、データを書き換える際に全領域への特定データの書
き込み後、データの消去、次いで新規データの書き込み
という手順を踏むフラッシュメモリとを内蔵したマイク
ロコンピュータであって、本発明の請求項1に記載のも
のは、フラッシュメモリ上の複数個のデータを特定デー
タに書き換える時間を測定し、その測定時間より決定し
たデータ書き込み時間で全領域へ特定データの書き込み
を行う手段を備えたことを特徴とする。
To achieve this object, a microcomputer with a built-in flash memory according to the present invention comprises a ROM storing software for loading externally input data into the flash memory.
And a flash memory having a procedure of writing specific data to all areas when rewriting data, erasing data, and then writing new data. Is characterized in that it comprises means for measuring a time for rewriting a plurality of data on the flash memory to specific data and writing the specific data to the entire area with a data write time determined from the measured time. .

【0010】また、本発明の請求項2に記載のものは、
全領域に特定データが書き込まれたフラッシュメモリの
データを消去するため、フラッシュメモリのゲート電圧
を下げる時間が指数関数の曲線となる制御を行う手段を
備えたことを特徴とする。
[0010] Further, the second aspect of the present invention provides
In order to erase the data of the flash memory in which the specific data has been written in the entire area, a means for controlling the time for lowering the gate voltage of the flash memory to be an exponential function curve is provided.

【0011】また、本発明の請求項3に記載のものは、
測定により得られた特定データを書き込むのに要した時
間を用いて、フラッシュメモリに一括で新規データを書
き込む手段を備えたことを特徴とする。
[0011] Further, according to claim 3 of the present invention,
There is provided a means for writing new data to the flash memory all at once using the time required to write the specific data obtained by the measurement.

【0012】また、本発明の請求項4に記載のものは、
フラッシュメモリへデータを書き込む電圧の大きさをア
ナログデジタル変換機能により測定し、フラッシュメモ
リへの書き込みの電圧−時間特性より書き込み時間を決
定して、データ書き込みを行う手段を備えたことを特徴
とする。
[0012] Further, according to a fourth aspect of the present invention,
Means for measuring a magnitude of a voltage for writing data to the flash memory by an analog-to-digital conversion function, determining a writing time from a voltage-time characteristic of writing to the flash memory, and performing data writing. .

【0013】また、本発明の請求項5に記載のものは、
フラッシュメモリへの新規データの書き込みにおいて旧
データの値により、全領域への特定データの書き込み
後、データの消去、次いで新規データの書き込みという
手順の一部を省略する手段を備えたことを特徴とする。
[0013] Further, according to claim 5 of the present invention,
In the writing of new data to the flash memory, there is provided a means for omitting a part of a procedure of erasing data, and then writing new data after writing specific data to all areas, according to the value of old data. I do.

【0014】また、本発明の請求項6に記載のものは、
1バイトもしくは複数バイトを1ブロックとしてブロッ
ク単位でデータの制御をして、フラッシュメモリの一方
のブロックの消去と他方のブロックの読み出しの処理を
同時に行う手段を備えたことを特徴とする。
Further, according to a sixth aspect of the present invention,
It is characterized by comprising means for controlling data on a block basis with one byte or a plurality of bytes as one block, and simultaneously erasing one block of the flash memory and reading the other block.

【0015】また、本発明の請求項7に記載のものは、
フラッシュメモリへの書き込み可否の判定を行う手段を
備えたことを特徴とするように構成したものである。
Further, the present invention according to claim 7 is
The present invention is characterized in that it is provided with means for determining whether writing to the flash memory is possible.

【0016】前記請求項1に記載の構成によれば、測定
により得られる書き込みに要した最大の時間を利用する
ことで一括で特定データの書き込みを行うことができ
る。
According to the configuration of the first aspect, specific data can be written collectively by using the maximum time required for writing obtained by measurement.

【0017】また、請求項2に記載の構成によれば、ゲ
ート電圧を下げる時間を指数関数の曲線となるように変
化させて制御することにより、データの消去完了までの
時間を短縮することができる。
According to the second aspect of the present invention, the time until the data erasure is completed can be shortened by changing and controlling the time for lowering the gate voltage so as to form an exponential function curve. it can.

【0018】また、請求項3に記載の構成によれば、一
定時間の間隔で繰り返し書き込み続ける必要もなく、一
括で新規データを書き込むことができるため書き込み時
間の短縮ができる。
Further, according to the configuration of the third aspect, it is not necessary to repeatedly write at predetermined time intervals, and new data can be written at once, so that the writing time can be reduced.

【0019】また、請求項4に記載の構成によれば、検
出した書き込み電圧から必要な書き込み時間を算出する
ことで、繰り返し作業をせずに一括でデータの書き換え
ができる。
Further, according to the configuration of the fourth aspect, the required write time is calculated from the detected write voltage, so that the data can be rewritten collectively without repeating the operation.

【0020】また、請求項5に記載の構成によれば、一
部の手順、特に時間を要する特定データの書き込みやデ
ータの消去が省略できる。
Further, according to the configuration of the fifth aspect, it is possible to omit some procedures, particularly, writing and erasing of specific data which requires time.

【0021】また、請求項6に記載の構成によれば、処
理時間の長いデータの消去中に、次のブロックの旧デー
タと新規データが同じかどうか判定でき、新規データが
旧データと異なるときのみデータの書き込みを行うこと
ができる。
According to the configuration of the present invention, it is possible to determine whether the old data and the new data of the next block are the same while erasing data having a long processing time, and when the new data is different from the old data. Only data can be written.

【0022】また、請求項7に記載の構成によれば、外
部から指定できる可否判定によりフラッシュメモリ内の
データが不必要に書き換えられることがなく、データを
保護することができる。
Further, according to the configuration of the seventh aspect, the data in the flash memory can be protected without being unnecessarily rewritten by the determination as to whether it can be designated from the outside.

【0023】[0023]

【発明の実施の形態】以下、図面を参照して本発明の実
施の形態を詳細に説明する。図1は本発明の実施の形態
1におけるフラッシュメモリの全領域に特定データ
“0”の書き込みの処理手順を示したフローチャートで
ある。まず、開始状態の初期値をセットする(S11)。指
定されたアドレス値のデータを確認し、“0”ならばア
ドレス値を1つ加算してデータの“1”を検出するまで
繰り返す(S12)。処理S12において“1”が検出される
と“0”の書き込みを行いその書き込み時間の測定を行
う(S13)。処理S13において、書き込み完了に要する完
了時間(nt)が最大であれば最大時間Tmaxに保存する(S
14)。処理S12〜S14を繰り返し必要サンプル数の取り
込み完了を判定する(S15)。サンプリングした最大書き
込み時間Tmaxを用いて一括書き込みをする(S16)。以
上の工程から構成されている。
Embodiments of the present invention will be described below in detail with reference to the drawings. FIG. 1 is a flowchart showing a processing procedure for writing the specific data “0” to the entire area of the flash memory according to the first embodiment of the present invention. First, an initial value of the start state is set (S11). The data of the designated address value is confirmed, and if it is "0", the address value is incremented by one and the process is repeated until the data "1" is detected (S12). When "1" is detected in step S12, "0" is written, and the writing time is measured (S13). In the process S13, if the completion time (nt) required for the completion of the writing is the maximum, it is stored in the maximum time Tmax (S
14). The processes S12 to S14 are repeated to determine the completion of capturing the required number of samples (S15). Batch writing is performed using the sampled maximum writing time Tmax (S16). It consists of the above steps.

【0024】処理S13でのn回のループによりn×tの
時間で“0”データの書き込みが完了することが計測さ
れる。この計測を必要サンプル数(m個)だけ繰り返すこ
とにより最大の書き込み時間Tmaxが検出される。この
ようにして求められた時間Tmaxで残りの全領域に
“0”データを一括で書き込むことができる。
It is measured that the writing of "0" data is completed in n × t times by the n loops in the process S13. By repeating this measurement for the required number of samples (m), the maximum writing time Tmax is detected. At the time Tmax obtained in this manner, "0" data can be collectively written to all the remaining areas.

【0025】以上のように本実施の形態1によれば、サ
ンプリングの数だけ書き込みを繰り返して書き込みに必
要な時間を得ることにより、残りの領域において書き込
み完了の確認をすることはなく書き込みができ、“0”
データを書き込む時間は短縮されることとなる。
As described above, according to the first embodiment, writing is repeated by the number of samplings to obtain the time required for writing, so that writing can be performed without confirming the completion of writing in the remaining area. , “0”
The time for writing data is reduced.

【0026】次に、図2は、本発明の実施の形態2にお
けるフラッシュメモリ全領域に“0”データが書き込ま
れた後、消去する処理手順について説明したフローチャ
ートである。まず、開始状態の初期値をセットする(S1
7)。データがFFhになるまでゲート電圧の抜き取りを
繰り返す(S18)。すべてのセルに対して実行できたかど
うか判断する(S19)。以上の工程から構成されている。
Next, FIG. 2 is a flowchart illustrating a processing procedure for erasing data after “0” data has been written to the entire area of the flash memory according to the second embodiment of the present invention. First, an initial value of the start state is set (S1
7). The sampling of the gate voltage is repeated until the data becomes FFh (S18). It is determined whether the process has been executed for all cells (S19). It consists of the above steps.

【0027】本実施の形態2の場合、処理S18における
繰り返し部分でのゲート電圧の抜き取りにかける時間を
フラッシュメモリに対する書き込み電圧と書き込み時間
の特性により、1回目は10msでゲート電圧の抜き取りを
行い、2回目は20ms、3回目
In the case of the second embodiment, the time for extracting the gate voltage in the repetition part in step S18 is determined by the characteristics of the write voltage and the write time for the flash memory. The second time is 20ms, the third time

【0028】[0028]

【外1】 [Outside 1]

【0029】ように増加させていき、640ms以上は640ms
一定で実行する。
640 ms for 640 ms or more
Run at a constant.

【0030】また、図3はフラッシュメモリの書き込み
の電圧−時間特性を示す図である。なお、本実施の形態
2においては、全領域に“0”データが書き込まれた
後、データの消去の処理を行うため、消去を行う単位は
アドレス毎ではなく1ラインのセル毎に行うものであ
る。
FIG. 3 is a diagram showing voltage-time characteristics of writing in a flash memory. In the second embodiment, after "0" data is written in all the areas, the data is erased. Therefore, the unit of erasing is performed not for each address but for each cell of one line. is there.

【0031】以上のように本実施の形態2によれば、一
定間隔に実施した場合と異なり、ゲート電圧の抜き取り
完了に到達する時間は短縮されることとなる。
As described above, according to the second embodiment, the time required to complete the extraction of the gate voltage is shortened, unlike the case where the processing is performed at regular intervals.

【0032】次に、図4は本発明の実施の形態3におけ
るフラッシュメモリに必要なデータを書き込む処理手順
を示すフローチャートである。開始状態の初期値をセッ
トする(S20)。“0”データ書き込み時には、前記実施
の形態1で測定された書き込み最大時間Tmaxでデータ
書き込みをする(S21)。最終データの書き込みが完了し
たかどうか判定する(S22)。以上の工程から構成されて
いる。
FIG. 4 is a flowchart showing a processing procedure for writing necessary data to a flash memory according to the third embodiment of the present invention. The initial value of the start state is set (S20). When writing "0" data, data writing is performed for the maximum writing time Tmax measured in the first embodiment (S21). It is determined whether the writing of the final data has been completed (S22). It consists of the above steps.

【0033】本実施の形態3では、フラッシュメモリの
データ更新には一度データを消去することから、前記消
去処理(特定データの書き込み処理)で得られる書き込み
に要する最大時間Tmaxを利用することにより、データ
を一括で書き込むことができる。
In the third embodiment, since data is erased once in updating data in the flash memory, the maximum time Tmax required for writing obtained in the erasing process (writing process of specific data) is used. Data can be written collectively.

【0034】以上のように本実施の形態3によれば、書
き込み持ち時間の不足によりデータ書き込みができない
場合の繰り返し書き込みが不要となるため、データ書き
込みに要する時間は短縮されることになる。
As described above, according to the third embodiment, the time required for data writing is reduced because repeated writing is not required when data cannot be written due to insufficient writing time.

【0035】次に、図5は本発明の実施の形態4におけ
るフラッシュメモリへの書き込み電圧の測定を実施して
データの書き込みを行う処理手順を示すフローチャート
である。フラッシュメモリへの書き込み電圧をアナログ
/デジタル変換機能により測定する(S23)。書き込み電
圧から書き込みに要する時間をデータテーブルを参照し
て算出する(S24)。算出された時間Taでデータの書き
込みを行う(S25)。以上の工程から構成されている。
Next, FIG. 5 is a flowchart showing a processing procedure for measuring the write voltage to the flash memory and writing data in the fourth embodiment of the present invention. The write voltage to the flash memory is measured by the analog / digital conversion function (S23). The time required for writing is calculated from the writing voltage with reference to the data table (S24). Data writing is performed at the calculated time Ta (S25). It consists of the above steps.

【0036】フラッシュメモリの書き込み電圧は、内部
に組み込んだアナログ/デジタル変換機能を利用して測
定する。また、図3に示したフラッシュメモリへの書き
込みの電圧−時間特性より、書き込み電圧と書き込み時
間の特性表を基にしたデータテーブル(対応表)を用意す
ることで、測定された電圧で書き込みに必要な時間は算
出される。このように算出された時間を用いることで一
括でデータを書き込むことができる。
The write voltage of the flash memory is measured using an analog / digital conversion function incorporated therein. In addition, by preparing a data table (correspondence table) based on a characteristic table of the write voltage and the write time from the voltage-time characteristic of writing to the flash memory shown in FIG. The required time is calculated. By using the time calculated in this way, data can be written collectively.

【0037】以上のように本実施の形態4によれば、書
き込みに要する時間の測定のために繰り返し書き込み作
業を行う必要性が無く、データ書き込みに要する時間は
短縮されることになる。
As described above, according to the fourth embodiment, there is no need to repeatedly perform a writing operation for measuring the time required for writing, and the time required for writing data is reduced.

【0038】次に、図6は本発明の実施の形態5におけ
るフラッシュメモリにデータを書き込む処理について説
明したフローチャートである。まず、フラッシュメモリ
のデータがFFh(消去完了データ)かどうかを判断する
(S26)。フラッシュメモリのデータが“0”データかど
うかを判断する(S27)。処理S27において“0”データ
でない場合“0”データを書き込む(S28)。ゲート電圧
を抜き取りデータの消去を行う(S29)。ゲート電圧を抜
き取りすぎた場合の再度消去作業を行う(S30)。新規デ
ータの書き込みを行う(S31)。以上の工程から構成され
ている。
Next, FIG. 6 is a flowchart illustrating a process of writing data to a flash memory according to the fifth embodiment of the present invention. First, determine whether the data in the flash memory is FFh (erase completed data)
(S26). It is determined whether the data in the flash memory is "0" data (S27). If the data is not "0" data in process S27, "0" data is written (S28). The gate voltage is extracted and the data is erased (S29). The erasing operation is performed again when the gate voltage is excessively extracted (S30). New data is written (S31). It consists of the above steps.

【0039】通常、フラッシュメモリに書き込まれるフ
ァームウエアのデータは“0”もしくはFFhが多く存
在する。このような既にデータが“0”である場合には
“0”データを書く必要もなく、特にFFhの場合には
時間のかかる特定データの書き込みやデータの消去を行
う必要もない。
Normally, firmware data written to the flash memory often has "0" or FFh. When the data is already “0”, there is no need to write “0” data. In particular, in the case of FFh, there is no need to perform time-consuming specific data writing or data erasing.

【0040】以上のように本実施の形態5によれば、
“0”であるメモリエリアに“0”データを書き込む時
間、FFhであるメモリエリアに“0”データの書き込
みやデータの消去をする時間等を省くことができ、デー
タ書き込みに要する時間は短縮されることになる。
As described above, according to the fifth embodiment,
The time required to write "0" data in the memory area "0" and the time required to write or erase the data "0" in the memory area FFh can be omitted, and the time required for data writing can be reduced. Will be.

【0041】次に、図7は本発明の実施の形態6におけ
る新・旧データの判定を行いフラッシュメモリへデータ
を書き込む処理について説明したフローチャートであ
る。フラッシュメモリの旧データが新規データと同じか
どうかを判断する(S32)、処理S32において同じでない
場合“0”データの書き込みをする(S33)。さらに、ゲ
ート電圧を抜き取りデータの消去を行う(S34)。ゲート
電圧を抜き取りすぎた場合の再度の消去作業を行う(S3
5)。新規データの書き込みを行う(S36)。以上の工程か
ら構成されている。
Next, FIG. 7 is a flowchart for explaining a process of determining new / old data and writing data to the flash memory according to the sixth embodiment of the present invention. It is determined whether the old data in the flash memory is the same as the new data (S32), and if it is not the same in process S32, "0" data is written (S33). Further, the gate voltage is extracted and the data is erased (S34). Perform the erasing operation again when the gate voltage is excessively extracted (S3
Five). New data is written (S36). It consists of the above steps.

【0042】なお、処理S32の読み出しと処理S33〜処
理S35の消去の処理は同時に行われる。かつデータはブ
ロック単位で制御される。
The reading of step S32 and the erasing of steps S33 to S35 are performed simultaneously. Data is controlled in block units.

【0043】フラッシュメモリ内蔵マイクロコンピュー
タにおけるフラッシュメモリを用いる用途は、システム
開発後にファームウエアの変更等により変更データの書
き換えを行い、システムのバージョンアップを容易に実
現することにある。このような場合、フラッシュメモリ
の全領域に以前のデータと全く異なるデータを書き込む
ことは考えにくいため、新・旧データの異なる部分だけ
を書き換えることが最も効率的であり、書き換えに要す
る時間も短くすることが可能である。
The purpose of using a flash memory in a microcomputer with a built-in flash memory is to rewrite the changed data by changing the firmware after the system is developed, thereby easily realizing the system version upgrade. In such a case, it is difficult to write completely different data from the previous data in the entire area of the flash memory, so it is most efficient to rewrite only the different parts of the new and old data, and the rewriting time is short. It is possible to

【0044】以上のように本実施の形態6によれば、一
方のブロックの旧データの消去と他方のブロックの旧デ
ータが新規データと同じかどうかの判定とを同時に行
い、データの異なるブロックだけを消去して書き換える
ため、データ書き込みに要する時間は短縮されることに
なる。これにより、フラッシュメモリ内蔵マイクロコン
ピュータのフラッシュメモリに書き込まれたファームウ
エアの一部変更の場合には書き込み時間を大幅に短縮で
きる。
As described above, according to the sixth embodiment, the erasure of the old data in one block and the determination as to whether the old data in the other block are the same as the new data are performed at the same time. Is erased and rewritten, the time required for data writing is reduced. As a result, when the firmware written in the flash memory of the microcomputer with the built-in flash memory is partially changed, the writing time can be greatly reduced.

【0045】次に、図8は本発明の実施の形態7におけ
るフラッシュメモリ内蔵マイクロコンピュータの構成を
示すブロック図である。図8において、5はマイクロプ
ロセッサ(MPU)、6はROM、7はフラッシュメモ
リ、8はフラッシュメモリ7の書き込み制御用の端子、
9はホストバスである。
FIG. 8 is a block diagram showing a configuration of a microcomputer with a built-in flash memory according to the seventh embodiment of the present invention. 8, 5 is a microprocessor (MPU), 6 is a ROM, 7 is a flash memory, 8 is a write control terminal of the flash memory 7,
9 is a host bus.

【0046】マイクロプロセッサ(MPU)5は、内蔵さ
れたROM6に書かれたソフトウエアに従って、ホスト
バス9からフラッシュメモリ7に新しいファームウエア
のデータをダウンロードする。このデータのダウンロー
ドの実施において、フラッシュメモリ7への書き込み制
御用の端子8の状態により書き込みの許可を与えること
ができる。このことから、フラッシュメモリ7への書き
込みに保護をかけることができる。
The microprocessor (MPU) 5 downloads new firmware data from the host bus 9 to the flash memory 7 in accordance with software written in the built-in ROM 6. In the execution of this data download, writing permission can be given depending on the state of the terminal 8 for writing control to the flash memory 7. For this reason, writing to the flash memory 7 can be protected.

【0047】以上のように本実施の形態7によれば、フ
ラッシュメモリ7へのデータの書き込みには書き込み制
御用の端子8による制御が可能であり、これにより、簡
単にデータの書き換え変更ができるフラッシュメモリ7
の内容が不必要に書き換えられることが無くなり、ファ
ームウエアに対してより高い安全性が確保されることに
なる。
As described above, according to the seventh embodiment, the writing of data to the flash memory 7 can be controlled by the write control terminal 8, thereby easily rewriting and changing the data. Flash memory 7
Will not be unnecessarily rewritten, and higher security for the firmware will be ensured.

【0048】なお、前記の各実施の形態における構成の
うち、何れか1つ、あるいはいくつかの組合せによって
も有利な効果が得られることはいうまでもない。
It is needless to say that an advantageous effect can be obtained by any one or some of the configurations in the above embodiments.

【0049】[0049]

【発明の効果】以上説明したように、本発明によれば、
フラッシュメモリ内蔵マイクロコンピュータのフラッシ
ュメモリのデータの書き換えに対してその書き換え処理
時間の短縮化と、書き換えに対するファームウエアの安
全性が確保できるという効果を奏する。
As described above, according to the present invention,
This has the effect of shortening the rewriting processing time for rewriting data in the flash memory of a microcomputer with a built-in flash memory and ensuring the security of the firmware against rewriting.

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

【図1】本発明の実施の形態1におけるフラッシュメモ
リの全領域に特定データ“0”の書き込みの処理手順を
示したフローチャートである。
FIG. 1 is a flowchart showing a processing procedure for writing specific data “0” to an entire area of a flash memory according to a first embodiment of the present invention.

【図2】本発明の実施の形態2におけるフラッシュメモ
リ全領域に“0”データが書き込まれた後、消去する処
理手順について説明したフローチャートである。
FIG. 2 is a flowchart illustrating a processing procedure for erasing data after “0” data is written in the entire area of a flash memory according to a second embodiment of the present invention;

【図3】フラッシュメモリの書き込みの電圧−時間特性
を示す図である。
FIG. 3 is a diagram showing voltage-time characteristics of writing in a flash memory.

【図4】本発明の実施の形態3におけるフラッシュメモ
リに必要なデータを書き込む処理手順を示すフローチャ
ートである。
FIG. 4 is a flowchart showing a processing procedure for writing necessary data to a flash memory according to a third embodiment of the present invention.

【図5】本発明の実施の形態4におけるフラッシュメモ
リへの書き込み電圧の測定を実施してデータの書き込み
を行う処理手順を示すフローチャートである。
FIG. 5 is a flowchart illustrating a processing procedure for measuring a write voltage to a flash memory and writing data according to a fourth embodiment of the present invention;

【図6】本発明の実施の形態5におけるフラッシュメモ
リにデータを書き込む処理について説明したフローチャ
ートである。
FIG. 6 is a flowchart illustrating a process of writing data to a flash memory according to a fifth embodiment of the present invention.

【図7】本発明の実施の形態6における新・旧データの
判定を行いフラッシュメモリへデータを書き込む処理に
ついて説明したフローチャートである。
FIG. 7 is a flowchart illustrating a process of determining new / old data and writing data to a flash memory according to a sixth embodiment of the present invention.

【図8】本発明の実施の形態7におけるフラッシュメモ
リ内蔵マイクロコンピュータの構成を示すブロック図で
ある。
FIG. 8 is a block diagram showing a configuration of a microcomputer with a built-in flash memory according to a seventh embodiment of the present invention.

【図9】従来のフラッシュメモリへデータを書き込む処
理について説明したフローチャートである。
FIG. 9 is a flowchart illustrating a conventional process of writing data to a flash memory.

【図10】従来のフラッシュメモリへデータを書き込む
処理を模式的に示した図である。
FIG. 10 is a diagram schematically showing a conventional process of writing data to a flash memory.

【図11】従来のフラッシュメモリへのデータ書き込み
の処理手順について説明したフローチャートである。
FIG. 11 is a flowchart illustrating a processing procedure for writing data to a conventional flash memory.

【図12】従来のフラッシュメモリ全領域に特定データ
“0”が書き込まれた後、データを消去する処理手順に
ついて説明したフローチャートである。
FIG. 12 is a flowchart illustrating a conventional procedure for erasing data after specific data “0” is written in the entire area of the flash memory.

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

1…旧データ、 2…“0”データ、 3…消去完了デ
ータ、 4…新規データ、 5…マイクロプロセッサ
(MPU)、 6…ROM、 7…フラッシュメモリ、
8…書き込み制御用の端子、 9…ホストバス。
1: old data, 2: "0" data, 3: erasure completed data, 4: new data, 5: microprocessor
(MPU), 6… ROM, 7… Flash memory,
8: Terminal for writing control, 9: Host bus.

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 外部より入力されるデータをフラッシュ
メモリにローディングするソフトウエアを格納したRO
Mと、データを書き換える際に全領域への特定データの
書き込み後、データの消去、次いで新規データの書き込
みという手順を踏むフラッシュメモリとを内蔵したマイ
クロコンピュータであって、 前記フラッシュメモリの複数個のデータを特定データに
書き換える時間を測定し、該測定した時間により決定し
たデータ書き込み時間で全領域へ特定データの書き込み
を行う手段を備えたことを特徴とするフラッシュメモリ
内蔵マイクロコンピュータ。
An RO storing software for loading externally input data into a flash memory.
A microcomputer having a built-in M and a flash memory that performs a procedure of writing specific data to all areas when rewriting data, erasing data, and then writing new data, wherein a plurality of flash memories are provided. A microcomputer with a built-in flash memory, comprising: means for measuring a time for rewriting data to specific data and writing specific data to all areas in a data writing time determined by the measured time.
【請求項2】 外部より入力されるデータをフラッシュ
メモリにローディングするソフトウエアを格納したRO
Mと、データを書き換える際に全領域への特定データの
書き込み後、データの消去、次いで新規データの書き込
みという手順を踏むフラッシュメモリとを内蔵したマイ
クロコンピュータであって、 全領域に特定データが書き込まれた前記フラッシュメモ
リのデータを消去するため、前記フラッシュメモリのゲ
ート電圧を下げる時間が指数関数の曲線となる制御を行
う手段を備えたことを特徴とするフラッシュメモリ内蔵
マイクロコンピュータ。
2. An RO storing software for loading externally input data into a flash memory.
A microcomputer having a built-in M and a flash memory that performs a procedure of writing specific data to all areas when rewriting data, erasing data, and then writing new data, wherein specific data is written to all areas. A flash memory built-in microcomputer comprising means for performing control so that the time for lowering the gate voltage of the flash memory becomes an exponential function curve in order to erase the data in the flash memory.
【請求項3】 外部より入力されるデータをフラッシュ
メモリにローディングするソフトウエアを格納したRO
Mと、データを書き換える際に全領域への特定データの
書き込み後、データの消去、次いで新規データの書き込
みという手順を踏むフラッシュメモリとを内蔵したマイ
クロコンピュータであって、 前記フラッシュメモリの複数個のデータを特定データに
書き換える時間を測定し、該測定により決定した時間を
用いて一括で新規データを書き込む手段を備えたことを
特徴とするフラッシュメモリ内蔵マイクロコンピュー
タ。
3. An RO storing software for loading externally input data into a flash memory.
A microcomputer having a built-in M and a flash memory that performs a procedure of writing specific data to all areas when rewriting data, erasing data, and then writing new data, wherein a plurality of flash memories are provided. A microcomputer with a built-in flash memory, comprising: means for measuring a time for rewriting data to specific data and writing new data in a lump using the time determined by the measurement.
【請求項4】 外部より入力されるデータをフラッシュ
メモリにローディングするソフトウエアを格納したRO
Mと、データを書き換える際に全領域への特定データの
書き込み後、データの消去、次いで新規データの書き込
みという手順を踏むフラッシュメモリとを内蔵したマイ
クロコンピュータであって、 前記フラッシュメモリへデータを書き込む電圧の大きさ
をアナログデジタル変換機能により測定し、フラッシュ
メモリへの書き込みの電圧−時間特性より書き込み時間
を決定して、データ書き込みを行う手段を備えたことを
特徴とするフラッシュメモリ内蔵マイクロコンピュー
タ。
4. An RO storing software for loading externally input data into a flash memory.
A microcomputer having a built-in M and a flash memory that performs a procedure of writing specific data to all areas when rewriting data, erasing data, and then writing new data, and writes data to the flash memory. A microcomputer with built-in flash memory, comprising: means for measuring the magnitude of a voltage by an analog-to-digital conversion function, determining a writing time from a voltage-time characteristic of writing to the flash memory, and writing data.
【請求項5】 外部より入力されるデータをフラッシュ
メモリにローディングするソフトウエアを格納したRO
Mと、データを書き換える際に全領域への特定データの
書き込み後、データの消去、次いで新規データの書き込
みという手順を踏むフラッシュメモリとを内蔵したマイ
クロコンピュータであって、 前記フラッシュメモリへの新規データの書き込みにおい
て旧データの値により、全領域への特定データの書き込
み後、データの消去、次いで新規データの書き込みとい
う手順の一部を省略する手段を備えたことを特徴とする
フラッシュメモリ内蔵マイクロコンピュータ。
5. An RO storing software for loading externally input data into a flash memory.
A microcomputer having a built-in M and a flash memory that performs a procedure of writing specific data to all areas when rewriting data, erasing data, and then writing new data, wherein a new data is written to the flash memory. A microcomputer with built-in flash memory, characterized by comprising means for omitting a part of the procedure of writing specific data to the entire area, erasing data, and then writing new data after writing the specific data to the entire area by writing the old data .
【請求項6】 外部より入力されるデータをフラッシュ
メモリにローディングするソフトウエアを格納したRO
Mと、データを書き換える際に全領域への特定データの
書き込み後、データの消去、次いで新規データの書き込
みという手順を踏むフラッシュメモリとを内蔵したマイ
クロコンピュータであって、 1バイトもしくは複数バイトを1ブロックとしてブロッ
ク単位でデータの制御をして、前記フラッシュメモリの
一方のブロックの消去と他方のブロックの読み出しの処
理を同時に行う手段を備えたことを特徴とするフラッシ
ュメモリ内蔵マイクロコンピュータ。
6. An RO storing software for loading externally input data into a flash memory.
A microcomputer having a built-in M and a flash memory that performs a procedure of writing specific data to all areas when rewriting data, erasing data, and then writing new data, wherein 1 byte or a plurality of bytes is 1 byte. A microcomputer with a built-in flash memory, comprising means for controlling data in units of blocks as a block and simultaneously executing erasing of one block of the flash memory and reading of the other block.
【請求項7】 外部より入力されるデータをフラッシュ
メモリにローディングするソフトウエアを格納したRO
Mと、データを書き換える際に全領域への特定データの
書き込み後、データの消去、次いで新規データの書き込
みという手順を踏むフラッシュメモリとを内蔵したマイ
クロコンピュータであって、 前記フラッシュメモリへの書き込み可否の判定を行う手
段を備えたことを特徴とするフラッシュメモリ内蔵マイ
クロコンピュータ。
7. An RO storing software for loading externally input data into a flash memory.
A microcomputer having a built-in M and a flash memory that performs a procedure of writing specific data to all areas when rewriting data, erasing the data, and then writing new data, comprising: A microcomputer with a built-in flash memory, characterized by comprising means for making a determination.
JP25341796A 1996-09-25 1996-09-25 Microcomputer with built-in flash memory Pending JPH10105533A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25341796A JPH10105533A (en) 1996-09-25 1996-09-25 Microcomputer with built-in flash memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25341796A JPH10105533A (en) 1996-09-25 1996-09-25 Microcomputer with built-in flash memory

Publications (1)

Publication Number Publication Date
JPH10105533A true JPH10105533A (en) 1998-04-24

Family

ID=17251109

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25341796A Pending JPH10105533A (en) 1996-09-25 1996-09-25 Microcomputer with built-in flash memory

Country Status (1)

Country Link
JP (1) JPH10105533A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022041957A1 (en) * 2020-08-27 2022-03-03 长鑫存储技术有限公司 Adjustment method and adjustment system for memory, and semiconductor device
US20220068321A1 (en) 2020-08-27 2022-03-03 Changxin Memory Technologies, Inc. Method and system for adjusting memory, and semiconductor device
US11886721B2 (en) 2020-08-27 2024-01-30 Changxin Memory Technologies, Inc. Method and system for adjusting memory, and semiconductor device
US11928357B2 (en) 2020-08-27 2024-03-12 Changxin Memory Technologies, Inc. Method and system for adjusting memory, and semiconductor device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022041957A1 (en) * 2020-08-27 2022-03-03 长鑫存储技术有限公司 Adjustment method and adjustment system for memory, and semiconductor device
US20220068321A1 (en) 2020-08-27 2022-03-03 Changxin Memory Technologies, Inc. Method and system for adjusting memory, and semiconductor device
US11735233B2 (en) 2020-08-27 2023-08-22 Changxin Memory Technologies, Inc. Method and system for regulating memory, and semiconductor device
US11886721B2 (en) 2020-08-27 2024-01-30 Changxin Memory Technologies, Inc. Method and system for adjusting memory, and semiconductor device
US11928357B2 (en) 2020-08-27 2024-03-12 Changxin Memory Technologies, Inc. Method and system for adjusting memory, and semiconductor device
US11984190B2 (en) 2020-08-27 2024-05-14 Changxin Memory Technologies, Inc. Method and system for adjusting memory, and semiconductor device

Similar Documents

Publication Publication Date Title
US7920425B2 (en) Differential flash memory programming technique
US5835933A (en) Method and apparatus for updating flash memory resident firmware through a standard disk drive interface
US20050144366A1 (en) Data management apparatus and method, non-volatile memory, storage device having the non-volatile memory and data processing system
JP2004095029A (en) Nonvolatile memory and method for writing to the same
CN101398765A (en) Method for updating firmware and firmware updating device
US9786373B2 (en) EEPROM backup method and device
US7590793B2 (en) Data access controlling method in flash memory and data access controlling program
JPH10105533A (en) Microcomputer with built-in flash memory
CN106980513A (en) A kind of switching method and device of dual boot file
KR20070048384A (en) Method of processing bad block in memory map
JPH1064288A (en) Flash erasure type non-volatile memory and its erasing method
CN113766554A (en) Method and device for acquiring WiFi calibration data and WiFi equipment calibration test system
JP2000243093A (en) Data storing method for flash memory and data reading out method from flash memory
JP4910402B2 (en) Nonvolatile memory rewriting device and rewriting method
CN110795275A (en) Abnormal block identification method and device based on abnormal power failure process
JP4433763B2 (en) Field device memory update method and system
JP2008146341A (en) Nonvolatile semiconductor storage device, and processing method for the same
CN111863081A (en) Method and device for controlling programming verification of NOR flash memory
JP2001092713A (en) Device and method for writing data
JPH07296591A (en) Electronic equipment
JPH0512511A (en) Ic card and method for changing application program for ic card
WO2019042546A1 (en) Method for improving the robustness of in-place firmware update
CN116132971A (en) OTA upgrading method and system for Bluetooth sound equipment
JP2738611B2 (en) Electronic equipment
CN117289974A (en) FPGA programming file trusted update loading system and method for DCS controller