JPH1139897A - Stored data inspection of digital memory means - Google Patents

Stored data inspection of digital memory means

Info

Publication number
JPH1139897A
JPH1139897A JP9197053A JP19705397A JPH1139897A JP H1139897 A JPH1139897 A JP H1139897A JP 9197053 A JP9197053 A JP 9197053A JP 19705397 A JP19705397 A JP 19705397A JP H1139897 A JPH1139897 A JP H1139897A
Authority
JP
Japan
Prior art keywords
data
rom
stored
check
storage means
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
JP9197053A
Other languages
Japanese (ja)
Inventor
Teru Kawamoto
輝 川本
Hideji Azuma
秀治 我妻
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.)
Denso Corp
Original Assignee
Denso 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 Denso Corp filed Critical Denso Corp
Priority to JP9197053A priority Critical patent/JPH1139897A/en
Publication of JPH1139897A publication Critical patent/JPH1139897A/en
Pending legal-status Critical Current

Links

Landscapes

  • Detection And Correction Of Errors (AREA)
  • For Increasing The Reliability Of Semiconductor Memories (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce changes, as much as possible, required for check with a check program when the stored data is changed by changing a check sum adjustment data so that the total sum adding all stored data including the check sum adjustment data written together with the write data. SOLUTION: In the case of checking an error of stored data of EPROM3 with a check program of a personal computer 9 by storing a check sum adjustment data to a digital storing means EPROM storing the control program, checking is made by determining whether the total sum of the stored data of EPROM3 including the check sum adjustment data becomes a constant value or not. When the control program is corrected, the check sum adjustment data is changed to make constant the total sum. Thereby, even if the control program is corrected, it is not required to change the check program of the personal computer 9 and thereby check can be conducted easily.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、デジタル記憶手段
に記憶された記憶データを検査プログラムによって検査
するデジタル記憶手段の記憶データ検査方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for inspecting stored data of digital storage means for inspecting stored data stored in digital storage means by an inspection program.

【0002】[0002]

【発明が解決しようとする課題】デジタル記憶手段たる
例えばROMの記憶データの記憶エラーの有無を検査プ
ログラムによって検査する場合には、そのROMの記憶
データを順次読出して加算した総和であるチェックサム
を用いて検査することが良く行われている。
When an inspection program is used to check the presence or absence of a storage error in data stored in, for example, a ROM, which is a digital storage means, a checksum, which is a total sum obtained by sequentially reading and adding the data stored in the ROM, is used. Inspection is often performed using such a method.

【0003】例えば、ROMの記憶データがマイクロコ
ンピュータの制御プログラムデータなどである場合は、
仕様の変更などによって制御プログラムデータが修正さ
れることが良くあり、また、場合によってはROMが増
設されることもある。すると、制御プログラムデータの
チェックサムも変化するため、それに応じて検査プログ
ラムの内容をも変更する必要がある。
For example, when data stored in a ROM is control program data of a microcomputer, etc.,
The control program data is often modified due to a change in specifications, and in some cases, a ROM may be added. Then, since the checksum of the control program data also changes, it is necessary to change the contents of the inspection program accordingly.

【0004】斯様な場合に必要とされる変更をできるだ
け少なくする従来技術として、特開昭57−37797
号公報に開示されているものがある。これは、複数個の
ROMが存在することを前提とし、チェックサムを用い
た検査に使用するデータのみを記憶させる専用のROM
を別個に設けて、各ROM毎の先頭アドレス及びバイト
数並びにチェックサムを夫々記憶させるようにしてい
る。
As a prior art for minimizing the change required in such a case, Japanese Patent Application Laid-Open No. 57-37797 discloses a conventional technique.
Is disclosed in Japanese Unexamined Patent Application Publication No. 2000-205,878. This is based on the premise that there are a plurality of ROMs and a dedicated ROM that stores only data used for inspection using checksums.
Are separately provided, and the head address, the number of bytes, and the checksum of each ROM are stored, respectively.

【0005】しかしながら、この方法では、何れかのR
OMの記憶データを変更すると、チェックサム専用RO
Mの記憶データをも変更しなければならない。また、R
OMが増設されると、チェックサム専用ROMの容量を
より多く必要とすることになる。更に、例えば、マイク
ロコンピュータの制御対象、即ち製品が異なる場合に
は、チェックサム検査用のプログラムを変更する必要は
ないが、制御プログラムの変更に伴って、やはり、チェ
ックサム専用ROMの記憶データの変更が必要となる。
However, in this method, any of R
When the OM storage data is changed, the checksum dedicated RO
The stored data of M must also be changed. Also, R
When the number of OMs is increased, the capacity of the dedicated ROM for the checksum becomes larger. Furthermore, for example, when the control target of the microcomputer, that is, the product is different, it is not necessary to change the program for the checksum inspection. However, with the change of the control program, the data stored in the dedicated ROM for the checksum is also changed. Changes need to be made.

【0006】本発明は上記事情に鑑みてなされたもので
あり、その目的は、デジタル記憶手段の記憶データが変
更された場合に、検査プログラムによって検査を行うの
に必要となる変更を極力少なくすることができるデジタ
ル記憶手段の記憶データ検査方法を提供することにあ
る。
The present invention has been made in view of the above circumstances, and an object of the present invention is to minimize a change necessary for performing an inspection by an inspection program when data stored in a digital storage unit is changed. It is an object of the present invention to provide a method for inspecting stored data of digital storage means.

【0007】[0007]

【課題を解決するための手段】請求項1記載のデジタル
記憶手段の記憶データ検査方法によれば、デジタル記憶
手段の記憶データについて記憶エラーの有無を検査プロ
グラムで検査する場合は、書込みデータと共に書込まれ
たチェックサム調整用データを含む全記憶データを加算
した総和を得る。そして、その総和が予め定められた一
定値と一致するか否かによって、記憶エラーの有無を判
断する。
According to the storage data inspection method of the digital storage means according to the first aspect of the present invention, when the storage data of the digital storage means is inspected by the inspection program for the presence or absence of a storage error, the data is written together with the write data. A total sum of all stored data including the inserted checksum adjustment data is obtained. Then, the presence or absence of a storage error is determined based on whether or not the sum matches a predetermined constant value.

【0008】従って、デジタル記憶手段の記憶データを
修正したり、或いは新たな記憶データを記憶する場合
は、それに伴って前記総和が一定値となるようにチェッ
クサム調整用データを変更すれば良く、検査プログラム
自体は変更する必要がないので、記憶データが変更され
ても検査を容易に行うことができる。
Therefore, when the storage data of the digital storage means is corrected or new storage data is stored, the checksum adjustment data may be changed so that the sum becomes a constant value. Since the inspection program itself does not need to be changed, the inspection can be easily performed even if the stored data is changed.

【0009】請求項2記載のデジタル記憶手段の記憶デ
ータ検査方法によれば、デジタル記憶手段を、書換え可
能なROMとしたので、例えばEPROMなどのよう
に、記憶データが修正されて書換えられるまでは、その
内容を安定した状態(不揮発性)で記憶しているものに
ついて記憶エラーの有無を検査する場合に、有効に適用
が可能である。
According to the storage data inspection method of the digital storage means according to the second aspect, the digital storage means is a rewritable ROM. Therefore, until the storage data is modified and rewritten, such as an EPROM, for example. It can be effectively applied to the case where the contents of the contents stored in a stable state (non-volatile) are checked for the presence or absence of a storage error.

【0010】請求項3または4記載のデジタル記憶手段
の記憶データ検査方法によれば、マイクロコントローラ
またはワンチップマイクロコントローラに内蔵されてい
るデジタル記憶手段の記憶データを検査するので、マイ
クロコントローラの制御プログラムが変更された時に、
それに伴うデジタル記憶手段の記憶データの検査を容易
に行うことができる。
According to the third aspect of the present invention, the stored data of the digital storage means incorporated in the microcontroller or the one-chip microcontroller is inspected. Is changed,
Inspection of the data stored in the digital storage means can be performed easily.

【0011】[0011]

【発明の実施の形態】以下、本発明を自動車のエンジン
を制御するECUについて適用した場合の一実施例につ
いて図面を参照して説明する。図1は、要部の電気的構
成を示す機能ブロック図である。この図1において、E
CU(マイクロコントローラ)1は、CPU(マイクロ
プロセッサ)2を中心として構成されており、そのCP
U2は、制御プログラム(書込みデータ)が書込まれて
記憶されているEPROM(以下、単にROMと称す)
3及びCPU2のワークエリアとして使用されるRAM
4に書込み及び読出し可能に接続されている。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment in which the present invention is applied to an ECU for controlling an engine of an automobile will be described below with reference to the drawings. FIG. 1 is a functional block diagram showing an electrical configuration of a main part. In FIG. 1, E
The CU (microcontroller) 1 is configured around a CPU (microprocessor) 2 and its CP
U2 is an EPROM (hereinafter simply referred to as ROM) in which a control program (write data) is written and stored.
3 and RAM used as a work area for CPU 2
4 is connected so as to be able to write and read.

【0012】ROM3の記憶領域の末尾には、例えば1
6ビット(1ワード)のチェックサム調整用データが記
憶されている。尚、ROM3は、以上の内容が予めRO
Mライタなどによって書込まれてから、ECU1に搭載
されているものとする。また、ROM3の書込を行わな
い領域は初期値(例えば、オール“F”)とする。
At the end of the storage area of the ROM 3, for example, 1
Six bits (one word) of checksum adjustment data are stored. The above contents are stored in the ROM 3 in advance as RO
It is assumed that the data is written in an M writer or the like and then mounted on the ECU 1. The area of the ROM 3 where writing is not performed is set to an initial value (for example, all “F”).

【0013】CPU2は、ROM3から読出した制御プ
ログラムに従って、各種センサから得られる自動車のエ
ンジン(何れも図示せず)に関する情報を、A/Dコン
バータ5を介して得ると、その情報に基づきポート6を
介してエンジンの制御を行うようになっている。タイマ
7は、CPU2に対して一定時間毎にタイマ割込みを発
生させるシステムタイマである。
When the CPU 2 obtains information on the engine (not shown) of the vehicle obtained from various sensors via the A / D converter 5 in accordance with the control program read from the ROM 3, the CPU 2 receives the information from the port 6 based on the information. The engine is controlled via the. The timer 7 is a system timer that generates a timer interrupt for the CPU 2 at regular intervals.

【0014】また、CPU2には、シリアル通信用のイ
ンターフェイス8を介して外部にパーソナルコンピュー
タ(以下、パソコンと称す)9が接続可能となってい
る。尚、A/Dコンバータ5,ポート6,タイマ7及び
インターフェイス8は、周辺回路に対応する。
Further, a personal computer (hereinafter, referred to as a personal computer) 9 can be connected to the CPU 2 via an interface 8 for serial communication. The A / D converter 5, port 6, timer 7, and interface 8 correspond to peripheral circuits.

【0015】パソコン9は、本体9a,ディスプレイ9
b及びキーボード9cから構成されており、本体9aの
内部には、ECU1についての各種検査を行う検査プロ
グラムが内蔵されている。そして、パソコン9は、CP
U2と通信しながら検査プログラムを実行するようにな
っている。
The personal computer 9 comprises a main body 9a, a display 9
The main body 9a includes a test program for performing various tests on the ECU 1. And the personal computer 9
The inspection program is executed while communicating with U2.

【0016】次に、本実施例の作用について図2をも参
照して説明する。図2は、パソコン9に内蔵されてい
る、ROM3の記憶データについて記憶エラーの有無を
検査するための検査プログラムの内容を示すフローチャ
ートである。
Next, the operation of this embodiment will be described with reference to FIG. FIG. 2 is a flowchart showing the contents of an inspection program built in the personal computer 9 for inspecting the data stored in the ROM 3 for a storage error.

【0017】先ず、パソコン9において検査プログラム
を立ち上げると、ROM3の領域が00000H〜1F
FFFHであれば、作業者に、ROM3の先頭アドレス
(通常、“0”番地)及び領域終了アドレス(ROM3
の最終(ワード)アクセスアドレスが1FFFEHであ
るので、20000H)をキーボード9cから入力させ
るようになっており、その入力後、検査を開始させるコ
マンドが入力されると、図2に示すフローチャートが実
行されるようになっている。
First, when the inspection program is started in the personal computer 9, the area of the ROM 3 becomes 00000H-1F.
If it is FFFH, the operator is notified to the start address (usually, “0”) and the end address of the area (ROM 3
Since the last (word) access address is 1FFFEH, 20000H) is input from the keyboard 9c. After that, when a command to start the test is input, the flowchart shown in FIG. 2 is executed. It has become so.

【0018】この図2では、先ず、「アドレスカウン
タ,アキュムレータクリア」の処理ステップS1におい
て、パソコン9の本体9aに内蔵されている図示しない
プロセッサは、内部のアドレスカウンタとして使用する
作業領域或いはレジスタ及びデータ値を累算するのに使
用するアキュムレータの内容をゼロクリアする。そし
て、「ROMデータ読込み」の処理ステップS2に移行
する。
In FIG. 2, first, in a processing step S1 of "address counter, accumulator clear", a processor (not shown) built in the main body 9a of the personal computer 9 includes a work area or a register used as an internal address counter. Clears accumulator contents used to accumulate data values to zero. Then, the processing shifts to the processing step S2 of “ROM data reading”.

【0019】処理ステップS2において、プロセッサ
は、ECU1側のCPU2を介して、ROM3に記憶さ
れているROMデータ(記憶データ)を先頭アドレスか
ら1ワード分読込む。すると、次の「データ値累算」の
処理ステップS3に移行する。処理ステップS3におい
て、プロセッサは、ステップS2で読込んだ制御プログ
ラムのデータをアキュムレータに加えると、次の「アド
レスカウンタ・カウントアップ」の処理ステップS4に
移行する。尚、アキュムレータのビット幅は、16ビッ
トとする。
In step S2, the processor reads one word of the ROM data (stored data) stored in the ROM 3 from the head address via the CPU 2 of the ECU 1. Then, the processing shifts to the next “data value accumulation” processing step S3. In processing step S3, when the processor adds the data of the control program read in step S2 to the accumulator, the processor shifts to the next "address counter / count-up" processing step S4. The bit width of the accumulator is 16 bits.

【0020】処理ステップS3において、プロセッサ
は、アドレスカウンタの値をカウントアップするが、こ
の場合、ROMデータをワード単位で読込んでいるので
“2”ずつカウントアップさせる。そして「終了?」の
判断ステップS5に移行する。
In the processing step S3, the processor counts up the value of the address counter. In this case, since the ROM data is read in word units, the processor counts up by "2". Then, the processing shifts to the judgment step S5 of “end?”.

【0021】判断ステップS5において、プロセッサ
は、アドレスカウンタの値がROM3の領域終了アドレ
スに一致したか否かによって終了か否かを判断する。
「NO」と判断した場合はステップS2に移行して、ア
ドレスカウンタの値に従って次のROMデータを読込
む。
In the judging step S5, the processor judges whether or not the processing is to be finished based on whether or not the value of the address counter matches the area end address of the ROM 3.
If the determination is "NO", the flow shifts to step S2 to read the next ROM data according to the value of the address counter.

【0022】即ち、判断ステップS5において、プロセ
ッサが「YES」と判断するまではステップS2〜S5
を繰返すことにより、ROM3の制御プログラムデータ
が1ワードずつ順次読込まれてアキュムレータに加算さ
れる。そして、最終領域アドレスまでのデータ値の累算
が終了すると、その時点で、ROMデータの総和たるチ
ェックサムデータが得られる。
That is, in the judgment step S5, steps S2 to S5 are performed until the processor judges "YES".
Is repeated, the control program data in the ROM 3 is sequentially read word by word and added to the accumulator. Then, when the accumulation of the data values up to the last area address is completed, at that time, the checksum data which is the sum total of the ROM data is obtained.

【0023】但し、制御プログラムデータの総和がアキ
ュムレータのビット幅(16)をオーバーフローした場
合、その部分は切り捨てられて、アキュムレータのビッ
ト幅で示される部分のみがチェックサムデータとなる。
However, when the total sum of the control program data overflows the bit width (16) of the accumulator, the portion is truncated, and only the portion indicated by the bit width of the accumulator becomes the checksum data.

【0024】ここで、例えば、ROMデータの総和が5
AA5Hであれば正常であると判断した場合を仮定し、
以下に説明する。判断ステップS5でプロセッサが「Y
ES」と判断する直前には、アドレスカウンタのカウン
ト値は、ROM3の最終アクセスアドレス(1FFFE
H)を示しており、この時ステップS2で読込むプログ
ラムデータは、チェックサム調整用データとなる。ステ
ップS3において、アキュムレータにあるチェックサム
調整用データを除く累算値が3AA5Hであった場合、
チェックサム調整用データは、2000Hとなる。そこ
で、チェックサム調整用データを除く累算値にチェック
サム調整用データを加算した総和は、5AA5Hとな
る。
Here, for example, the sum of the ROM data is 5
Assuming that AA5H is normal,
This will be described below. In decision step S5, the processor sets "Y
Immediately before determining “ES”, the count value of the address counter is the last access address (1FFFE) in the ROM 3.
H), and at this time, the program data read in step S2 is checksum adjustment data. In step S3, if the accumulated value excluding the checksum adjustment data in the accumulator is 3AA5H,
The checksum adjustment data is 2000H. Therefore, the total sum of the accumulated value excluding the checksum adjustment data and the checksum adjustment data is 5AA5H.

【0025】次のステップS4では、アドレスカウンタ
に“2”が加算され、カウンタの値は20000Hとな
って領域終了アドレスを示す。すると、次のステップS
5において、プロセッサは「YES」と判断するので、
「照合結果一致?」の判断ステップS6に移行する。
In the next step S4, "2" is added to the address counter, and the value of the counter becomes 20000H, indicating the area end address. Then, the next step S
At 5, the processor determines "YES",
The process proceeds to the judgment step S6 of "matching of matching result?"

【0026】判断ステップS6において、プロセッサ
は、予め記憶されている検査値5AA5Hとアキュムレ
ータの内容とを比較して、両者が一致するか否かを判断
する。両者が一致すれば、プロセッサは「YES」と判
断して「正常出力」の処理ステップS6aに移行する。
この場合は、ROM3の記憶データに記憶エラーがなく
正常であるとして、ディスプレイ9bにその旨を表示さ
せた後処理を終了する。
In the judgment step S6, the processor compares the test value 5AA5H stored in advance with the contents of the accumulator to judge whether or not they match. If they match, the processor determines "YES" and shifts to the "normal output" processing step S6a.
In this case, it is determined that there is no storage error in the data stored in the ROM 3 and that the data is normal, and the fact is displayed on the display 9b, and then the processing is terminated.

【0027】また、判断ステップS6において、予め記
憶されている検査値とアキュムレータの内容とが一致し
なければ、プロセッサは「NO」と判断して「異常出
力」の処理ステップS7に移行する。この場合は、RO
M3の記憶データには記憶エラーが存在し異常であると
して、ディスプレイ9bにその旨を表示させた後、処理
を終了する。
If it is determined in step S6 that the test value stored in advance does not match the contents of the accumulator, the processor makes a "NO" determination and shifts to "abnormal output" processing step S7. In this case, RO
It is determined that the storage data of M3 has a storage error and is abnormal, and the fact is displayed on the display 9b, and then the processing is terminated.

【0028】而して、例えば、制御プログラムの内容が
修正された場合は、それに併せてチェックサム調整用デ
ータの内容も変更し、ROMデータの総和が検査値5A
A5Hに一致するようにする。例えば、修正後のチェッ
クサム調整用データを除くROMデータのチェックサム
データの値が4AA5Hであれば、チェックサム調整用
データの値を1000Hとすれば良い。そして、ROM
3の記憶データの検査は、図2のフローチャートに従っ
て同様に実行することができる。
Thus, for example, if the contents of the control program are modified, the contents of the checksum adjustment data are also changed accordingly, and the sum of the ROM data is changed to the inspection value 5A.
A5H. For example, if the value of the checksum data of the ROM data excluding the corrected checksum adjustment data is 4AA5H, the value of the checksum adjustment data may be 1000H. And ROM
The inspection of the stored data of No. 3 can be similarly executed according to the flowchart of FIG.

【0029】以上のように本実施例によれば、ECU1
に内蔵されているCPU2の制御プログラムが記憶され
たROM3にチェックサム調整用データを記憶させ、R
OM3の記憶データの記憶エラーの有無をパソコン9の
検査プログラムの実行により検査する場合は、チェック
サム調整用データ2000Hを含むROMデータの総和
5AA5Hを以て記憶エラーの有無を判断するようにし
た。
As described above, according to this embodiment, the ECU 1
The checksum adjustment data is stored in the ROM 3 in which the control program of the CPU 2 built in the ROM is stored.
When the presence or absence of the storage error of the storage data of the OM 3 is checked by executing the check program of the personal computer 9, the presence or absence of the storage error is determined based on the total 5AA5H of the ROM data including the checksum adjustment data 2000H.

【0030】従って、制御プログラムが修正されるのに
伴ってチェックサム調整用データの変更も同時に行え
ば、パソコン9の検査プログラム自体は変更する必要が
ないので、ROM3の記憶データが変更されてもそれに
伴って必要とされる変更を極力少なくし得て、検査を容
易に行うことができる。
Therefore, if the checksum adjustment data is also changed at the same time as the control program is corrected, the inspection program itself of the personal computer 9 does not need to be changed, and therefore, even if the data stored in the ROM 3 is changed. As a result, necessary changes can be minimized, and the inspection can be performed easily.

【0031】また、EPROM3は、書込まれたデータ
を不揮発性の安定した状態で記憶するので、斯様なEP
ROM3に対する記憶エラーの有無の検査に、本実施例
の適用は有効である。
The EPROM 3 stores the written data in a nonvolatile and stable state.
The application of this embodiment is effective for checking the presence or absence of a storage error in the ROM 3.

【0032】本発明は上記し且つ図面に記載した実施例
にのみ限定されるものではなく、次のような変形または
拡張が可能である。制御プログラムの一部を修正する場
合に限らず、制御プログラムの全体を新たに書替えた場
合でも適用が可能である。即ち、マイクロコントローラ
の制御対象が自動車のエンジンとは異なるもの(例え
ば、家電,音響,医療機器やコンピュータ周辺機器な
ど)であっても、検査プログラムを変更することなく適
用が可能である。また、デジタル記憶手段は、マイクロ
コントローラに内蔵されているものに限らず、その他の
CPUを用いたシステムに使用されているものであれば
良い。そして、書込みデータは制御プログラムに限ら
ず、その他のプログラム或いはデータであっても良い。
The present invention is not limited to the embodiment described above and shown in the drawings, and the following modifications or extensions are possible. The present invention is not limited to the case where a part of the control program is modified, and is applicable even when the entire control program is newly rewritten. In other words, even if the control target of the microcontroller is different from that of an automobile engine (for example, home appliances, audio, medical equipment, computer peripherals, and the like), it can be applied without changing the inspection program. Further, the digital storage means is not limited to the one built in the microcontroller, but may be any one used in a system using another CPU. The write data is not limited to the control program but may be another program or data.

【0033】チェックサム調整用データは、ROM3の
末尾に配置するものに限らず、ROM3の領域内であれ
ば任意のアドレスに配置して良い。デジタル記憶手段
は、EPROM3に限らず、EEPROM,OTPRO
MやフラッシュROMでも良い。また、ROMに限ら
ず、SRAMやDRAMに書込んだ既知のデータを記憶
データとして本発明を適用しても良い。制御プログラム
のデータ値を累算する場合は、バイト単位、或いはロン
グワード(32ビット)単位で累算しても良い。その場
合、ステップS4においてアドレスカウンタをカウント
アップするには+1、或いは+4すれば良い。検査プロ
グラムをROM3の内部に配置して、CPU2に実行さ
せるようにしても良い。この場合、検査結果を外部に知
らせることができる。
The checksum adjustment data is not limited to the data arranged at the end of the ROM 3, but may be arranged at any address within the area of the ROM 3. The digital storage means is not limited to the EPROM 3, but may be an EEPROM, an OTPRO.
M or a flash ROM may be used. The present invention is not limited to ROM, and the present invention may be applied as storage data using known data written in SRAM or DRAM. When accumulating the data values of the control program, the data values may be accumulated in byte units or long words (32 bits). In that case, to increment the address counter in step S4, it is sufficient to add +1 or +4. The inspection program may be arranged in the ROM 3 and executed by the CPU 2. In this case, the inspection result can be notified to the outside.

【0034】もし、ROMが増設された場合であって
も、各ROMについて夫々の先頭アドレス及び領域終了
アドレスを入力することにより、夫々検査を実行するよ
うにする。或いは、各領域が連続となるように設定され
ていれば、最後のROMの領域終了アドレスを与えるこ
とにより、一括して検査することもできる。また、RO
Mが増設される場合は、増設されるROMにもチェック
サム調整用データを設けることによって、内容が変更さ
れても各ROMに対しての修正で済むようにできる。E
CU1は、全ての要素をワンチップで構成したワンチッ
プマイクロコントローラであっても良い。
Even if additional ROMs are added, each ROM is checked by inputting its start address and area end address. Alternatively, if each area is set to be continuous, the inspection can be performed collectively by giving the area end address of the last ROM. Also, RO
When M is added, the checksum adjustment data is also provided in the added ROM, so that even if the contents are changed, it is possible to correct each ROM. E
The CU1 may be a one-chip microcontroller in which all elements are configured on one chip.

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

【図1】本発明の電気的構成を示す機能ブロック図FIG. 1 is a functional block diagram showing an electrical configuration of the present invention.

【図2】検査プログラムの内容を示すフローチャートFIG. 2 is a flowchart showing the contents of an inspection program.

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

1はECU(マイクロコントローラ)、2はCPU、3
はEPROM(デジタル記憶手段)、4はRAM、5は
A/Dコンバータ(周辺回路)、6はポート(周辺回
路)、7はタイマ(周辺回路)、8はインターフェイス
(周辺回路)を示す。
1 is an ECU (microcontroller), 2 is a CPU, 3
Denotes an EPROM (digital storage means), 4 denotes a RAM, 5 denotes an A / D converter (peripheral circuit), 6 denotes a port (peripheral circuit), 7 denotes a timer (peripheral circuit), and 8 denotes an interface (peripheral circuit).

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 デジタル記憶手段に記憶されている記憶
データの記憶エラーの有無を検査プログラムにより検査
する方法であって、 前記デジタル記憶手段に書込みデータを書込んで記憶さ
せる時は、当該書込みデータを含む全記憶データの総和
が予め定められた一定値となるチェックサム調整用デー
タを前記デジタル記憶手段に共に書込んで記憶させ、 前記検査プログラムの実行により、前記デジタル記憶手
段に記憶された全記憶データの総和を求め、その総和が
前記一定値と一致しなかった時は記憶エラーと判断する
ことを特徴とするデジタル記憶手段の記憶データ検査方
法。
1. A method for checking the presence or absence of a storage error of storage data stored in a digital storage means using a test program, wherein when writing and storing write data in the digital storage means, The checksum adjustment data in which the sum of all the storage data including the data becomes a predetermined constant value is written and stored in the digital storage means together, and by executing the inspection program, all the data stored in the digital storage means are stored. A storage data inspection method for digital storage means, wherein a total sum of storage data is obtained, and when the total does not match the predetermined value, a storage error is determined.
【請求項2】 前記デジタル記憶手段は、書換え可能な
ROMであることを特徴とする請求項1記載のデジタル
記憶手段の記憶データ検査方法。
2. The method according to claim 1, wherein said digital storage means is a rewritable ROM.
【請求項3】 前記デジタル記憶手段は、マイクロプロ
セッサ(CPU),RAM及び周辺回路を含んで構成さ
れるマイクロコントローラに内蔵されていることを特徴
とする請求項1または2記載のデジタル記憶手段の記憶
データ検査方法。
3. The digital storage means according to claim 1, wherein said digital storage means is incorporated in a microcontroller including a microprocessor (CPU), a RAM, and peripheral circuits. Storage data inspection method.
【請求項4】 前記マイクロコントローラは、ワンチッ
プで構成されていることを特徴とする請求項3記載のデ
ジタル記憶手段の記憶データ検査方法。
4. The method according to claim 3, wherein the microcontroller is formed of a single chip.
JP9197053A 1997-07-23 1997-07-23 Stored data inspection of digital memory means Pending JPH1139897A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9197053A JPH1139897A (en) 1997-07-23 1997-07-23 Stored data inspection of digital memory means

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9197053A JPH1139897A (en) 1997-07-23 1997-07-23 Stored data inspection of digital memory means

Publications (1)

Publication Number Publication Date
JPH1139897A true JPH1139897A (en) 1999-02-12

Family

ID=16367938

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9197053A Pending JPH1139897A (en) 1997-07-23 1997-07-23 Stored data inspection of digital memory means

Country Status (1)

Country Link
JP (1) JPH1139897A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7216239B2 (en) 2001-08-14 2007-05-08 Nissan Motor Co., Ltd. Counterfeit detecting program, method, and apparatus of digital data
JP2012076706A (en) * 2010-10-05 2012-04-19 Ngk Spark Plug Co Ltd Control device of electric equipment for vehicle and control method therefor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7216239B2 (en) 2001-08-14 2007-05-08 Nissan Motor Co., Ltd. Counterfeit detecting program, method, and apparatus of digital data
JP2012076706A (en) * 2010-10-05 2012-04-19 Ngk Spark Plug Co Ltd Control device of electric equipment for vehicle and control method therefor

Similar Documents

Publication Publication Date Title
US8135991B2 (en) Semiconductor device and processing method for starting the same
JP2990181B1 (en) Flash memory, microcomputer having flash memory, and method of storing program in flash memory
US6336176B1 (en) Memory configuration data protection
US6546517B1 (en) Semiconductor memory
US6604214B1 (en) One-chip microcomputer capable of internally producing ECC data
US20050207232A1 (en) Access method for a NAND flash memory chip, and corresponding NAND flash memory chip
US9721665B2 (en) Data writing method and system
US7596036B2 (en) Memory control circuit, microcomputer, and data rewriting method
JP3371682B2 (en) Semiconductor storage device
JPH1139897A (en) Stored data inspection of digital memory means
EP1168172A2 (en) Contents check method, contents renewal method and processing apparatus
JPH0476681A (en) Microcomputer
JP3358214B2 (en) Electronic equipment
US7490232B2 (en) Disk device using disk to rewrite firmware and firmware determination method
JP2701591B2 (en) Self-diagnosis method for car telephone equipment
JP2000293376A (en) Circuit and method for switching boot program
JP2000194605A (en) Refreshing device of flash memory, its refreshing method, and flash memory
JPH1069399A (en) Microcomputer
JP2853774B2 (en) Programmable controller
JPH03110650A (en) Eeprom check system
JP3110222B2 (en) Microcomputer
JPH0793505A (en) Count integrating device
JP2907114B2 (en) Method and apparatus for correcting 1-bit error in EEPROM
US20060064572A1 (en) Automatic initialization
JPH0443447A (en) Rom diagnosis device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060418

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060425

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060822