JP2002334024A - Electronic controller - Google Patents

Electronic controller

Info

Publication number
JP2002334024A
JP2002334024A JP2001141572A JP2001141572A JP2002334024A JP 2002334024 A JP2002334024 A JP 2002334024A JP 2001141572 A JP2001141572 A JP 2001141572A JP 2001141572 A JP2001141572 A JP 2001141572A JP 2002334024 A JP2002334024 A JP 2002334024A
Authority
JP
Japan
Prior art keywords
data
memory
inspection
area
electronic control
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
JP2001141572A
Other languages
Japanese (ja)
Inventor
Tsutomu Tsuruta
勉 鶴田
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 JP2001141572A priority Critical patent/JP2002334024A/en
Publication of JP2002334024A publication Critical patent/JP2002334024A/en
Pending legal-status Critical Current

Links

Landscapes

  • Read Only Memory (AREA)
  • For Increasing The Reliability Of Semiconductor Memories (AREA)
  • Combined Controls Of Internal Combustion Engines (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

PROBLEM TO BE SOLVED: To improve the precision of detection of data abnormality of a nonvolatile memory. SOLUTION: An ECU 10 is equipped with a known microcomputer 11, which has a CPU 12, a RAM 13, and a flash ROM 14 inside. The CPU 12 inspects the data in the flash ROM 14 by a check-sum method. Further, the CPU 12 copies data in a specified area among all the data in the flash ROM to the EEPROM 15. After the data are copied, identical data in the flash ROM 14 and EEPROM 15 are sequentially compared with each other and the data inspection is carried out according to the respective pieces of data match each other.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、電気的に書き換え
可能な不揮発性メモリを備える電子制御装置に係り、不
揮発性メモリのデータ化けを確実に検出するための改良
技術に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an electronic control device having an electrically rewritable nonvolatile memory, and more particularly to an improved technique for reliably detecting data corruption in the nonvolatile memory.

【0002】[0002]

【従来の技術】従来より、電気的に書き換え可能な不揮
発性メモリとしてフラッシュメモリ(フラッシュRO
M)が用いられており、該フラッシュメモリに記憶され
ているデータの化けを検出する手法として、チェックサ
ム等のデータ検査が実施されている。このチェックサム
によるデータ検査とは、フラッシュメモリの記憶領域全
て若しくはその一部分を対象に全データを加算してい
き、その加算結果と予め定義された値とを比較し、それ
らが異なる場合にデータ化けが発生していると判断する
方法である。
2. Description of the Related Art Conventionally, a flash memory (flash RO) has been used as an electrically rewritable nonvolatile memory.
M) is used, and a data check such as a checksum is performed as a technique for detecting a garbled data stored in the flash memory. This checksum data inspection means that all data is added to all or a part of the storage area of the flash memory, the addition result is compared with a predefined value, and if the values are different, the data is garbled. This is a method for determining that the error has occurred.

【0003】[0003]

【発明が解決しようとする課題】しかしながら上記従来
技術では、フラッシュメモリの複数箇所でデータ化けが
発生した場合、極稀にチェックサムの演算結果が予め定
義された値と一致してしまうことがある。このような状
況下ではデータ化けが検出できないという問題が生じ
る。
However, in the above-mentioned prior art, when data corruption occurs at a plurality of locations in the flash memory, the calculation result of the checksum may rarely coincide with a predefined value. . In such a situation, there is a problem that data corruption cannot be detected.

【0004】この問題の対策として、フラッシュメモリ
と同じデータを別の記憶領域にバックアップさせてお
き、そのバックアップデータを用いてデータ化けを検出
する技術が考えられる。実際には、フラッシュメモリと
同じ領域を持つ別の記憶領域を設けてその別の記憶領域
に同様のデータをバックアップさせておく。しかしなが
ら、データバックアップ用の別の記憶領域を要すること
から、コストが高くなる、或いはソフト処理が増加する
という別の不都合を招く。
As a countermeasure against this problem, a technique of backing up the same data as the flash memory in another storage area and using the backup data to detect data corruption can be considered. Actually, another storage area having the same area as the flash memory is provided, and similar data is backed up in the other storage area. However, since another storage area for data backup is required, another disadvantage such as an increase in cost or an increase in software processing is caused.

【0005】本発明は、上記問題に着目してなされたも
のであって、その目的とするところは、不揮発性メモリ
のデータ異常についてその検出精度を向上させることが
できる電子制御装置を提供することである。
SUMMARY OF THE INVENTION The present invention has been made in view of the above problems, and an object of the present invention is to provide an electronic control device capable of improving the detection accuracy of a data abnormality in a nonvolatile memory. It is.

【0006】[0006]

【課題を解決するための手段】請求項1に記載の発明に
おいて、電子制御装置には、電気的に書き換え可能な不
揮発性メモリと、この不揮発性メモリとは異なる別メモ
リとが用意されている。そして、不揮発性メモリ内のデ
ータについてチェックサムによるデータ検査が実施され
る(第1のデータ検査手段)。また、不揮発性メモリの
全データのうち、指定された一部領域のデータが前記別
メモリに複写される(データ複写手段)。更にそのデー
タ複写の後、不揮発性メモリ及び別メモリ内の同一デー
タを対象に両メモリのデータが逐次比較され、各データ
が一致するかどうかによりデータ検査が実施される(第
2のデータ検査手段)。
According to the first aspect of the present invention, the electronic control unit includes an electrically rewritable nonvolatile memory and another memory different from the nonvolatile memory. . Then, the data in the non-volatile memory is subjected to a data check using a checksum (first data check means). Further, of all the data in the non-volatile memory, data in a specified partial area is copied to the another memory (data copying means). Further, after copying the data, the data in both memories are sequentially compared with respect to the same data in the non-volatile memory and another memory, and a data inspection is performed based on whether each data matches (second data inspection means). ).

【0007】要するに、本発明では、チェックサムによ
るデータ検査(第1のデータ検査手段による検査)に加
え、不揮発性メモリの指定領域についてデータの逐次比
較によるデータ検査(第2のデータ検査手段による検
査)が実施される。この場合、仮に複数箇所でデータ化
けが発生し、そのデータ化けがチェックサムによるデー
タ検査では検出できないとしても、データの逐次比較に
より検出できる。その結果、不揮発性メモリのデータ異
常についてその検出精度を向上させることができる。ま
たこの場合、逐次比較されるデータは、不揮発性メモリ
の一部領域のみに限定されるため、データの複写先であ
る別メモリとしても大領域を要することはなく、コスト
的にも有利である。
In short, according to the present invention, in addition to the data check by the checksum (the check by the first data check means), the data check by the successive comparison of the data in the designated area of the nonvolatile memory (the check by the second data check means) ) Is implemented. In this case, even if data corruption occurs at a plurality of locations and the data corruption cannot be detected by the data inspection using the checksum, it can be detected by successive comparison of data. As a result, it is possible to improve the detection accuracy of the data abnormality of the nonvolatile memory. Further, in this case, since the data to be sequentially compared is limited to only a part of the non-volatile memory, there is no need for a large area as another memory to which data is copied, which is advantageous in cost. .

【0008】請求項2に記載の発明では、不揮発性メモ
リが複数の記憶領域に分割されている。そして、不揮発
性メモリの各分割領域について個々にチェックサムによ
るデータ検査が実施される(第1のデータ検査手段)。
また、不揮発性メモリの何れかの分割領域のデータが選
択的に前記別メモリに複写される(データ複写手段)。
この場合、不揮発性メモリの分割領域毎にチェックサム
によるデータ検査が行われるため、その検査精度が向上
する。また、不揮発性メモリから別メモリへのデータ複
写も好適に実施できるようになる。
[0008] In the second aspect of the present invention, the nonvolatile memory is divided into a plurality of storage areas. Then, data inspection is individually performed on each of the divided areas of the nonvolatile memory by the checksum (first data inspection means).
Further, data in any of the divided areas of the nonvolatile memory is selectively copied to the separate memory (data copying means).
In this case, since the data inspection is performed by the checksum for each divided area of the nonvolatile memory, the inspection accuracy is improved. In addition, data can be preferably copied from a nonvolatile memory to another memory.

【0009】上記請求項2の発明では、請求項3に記載
したように、不揮発性メモリは、前記データ複写手段に
よる複写先である別メモリの領域に合わせて均等な領域
に分割されていると良い。この場合、別メモリは記憶領
域の大きさが規定されることはなく、任意の記憶領域を
持つ別メモリを用いることができる。そのため、コスト
面でのメリットが得られる。
According to the second aspect of the present invention, as described in the third aspect, the nonvolatile memory is divided into equal areas in accordance with an area of another memory to which data is copied by the data copying means. good. In this case, the size of the storage area is not specified for the separate memory, and another memory having an arbitrary storage area can be used. Therefore, a merit in cost can be obtained.

【0010】また、請求項4に記載の発明では、不揮発
性メモリのデータについて複写対象となる指定領域を決
定するための領域指定データが設定されており、第2の
データ検査手段によるデータ検査の後、前記領域指定デ
ータが更新される。この場合、上記の通り領域指定デー
タを設定し適宜更新することで、不揮発性メモリの指定
領域(データ検査領域)が容易に設定でき、ひいては第
2のデータ検査手段によるデータ検査が適正に実施でき
るようになる。
According to the present invention, the area designation data for determining the designated area to be copied with respect to the data in the non-volatile memory is set, and the data inspection by the second data inspection means is performed. Thereafter, the area designation data is updated. In this case, by setting and appropriately updating the area designation data as described above, the designated area (data inspection area) of the nonvolatile memory can be easily set, and the data inspection by the second data inspection means can be appropriately performed. Become like

【0011】請求項5に記載の発明では、前記第1のデ
ータ検査手段によるデータ検査で異常が確認されなかっ
た場合のみ、その後前記第2のデータ検査手段によるデ
ータ検査が実施される。この場合、異常発生後における
処理負荷が軽減されるようになる。
According to the fifth aspect of the present invention, only when no abnormality is confirmed in the data inspection by the first data inspection means, the data inspection by the second data inspection means is performed thereafter. In this case, the processing load after the occurrence of the abnormality is reduced.

【0012】また、請求項6に記載の発明では、電源投
入時の初期化処理にて不揮発性メモリのデータが別メモ
リに複写され、電源投入後の時間同期処理にて不揮発性
メモリ及び別メモリの各データが逐次比較される。この
場合、データ複写の処理は電源投入時にのみ実施される
ので、仮にデータ複写に時間を要するとしても、他の演
算処理への影響を抑制することができる。
According to the present invention, the data in the non-volatile memory is copied to another memory in the initialization processing at the time of power-on, and the nonvolatile memory and the other memory are copied in the time synchronization processing after the power-on. Are sequentially compared. In this case, since the data copying process is performed only when the power is turned on, even if the data copying requires time, it is possible to suppress the influence on other arithmetic processing.

【0013】[0013]

【発明の実施の形態】以下、この発明を具体化した一実
施の形態を図面に従って説明する。本実施の形態では、
車載ディーゼルエンジンの燃料噴射制御を実施するため
のエンジンECUとして本発明を具体化しており、以下
にはECUの構成及び作用を詳細に説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below with reference to the drawings. In the present embodiment,
The present invention is embodied as an engine ECU for performing fuel injection control of a vehicle-mounted diesel engine, and the configuration and operation of the ECU will be described in detail below.

【0014】図1は、ECUの構成を示す図面である。
図1に示すように、ECU10は周知のマイコン11を
備え、そのマイコン11にはCPU12、RAM13及
びフラッシュROM14が内蔵されている。またその他
に、ECU10はEEPROM15を備える。フラッシ
ュROM14には、各種の制御プログラムやデータが格
納されており、このフラッシュROM14が特許請求の
範囲に記載の「不揮発性メモリ」に相当する。また、E
EPROM15には、異常診断情報(ダイアグデータ)
や各種判定値等が格納されており、このEEPROM1
5が同「別メモリ」に相当する。CPU12は、フラッ
シュROM14に格納された各種制御プログラムに従
い、ディーゼルエンジンに対する燃料噴射量や燃料噴射
時期等を制御する。
FIG. 1 is a diagram showing the configuration of the ECU.
As shown in FIG. 1, the ECU 10 includes a well-known microcomputer 11, and the microcomputer 11 includes a CPU 12, a RAM 13, and a flash ROM 14. In addition, the ECU 10 includes an EEPROM 15. The flash ROM 14 stores various control programs and data, and the flash ROM 14 corresponds to a “non-volatile memory” described in the claims. Also, E
The EPROM 15 has abnormality diagnosis information (diag data)
And various judgment values are stored in the EEPROM 1.
5 corresponds to the “separate memory”. The CPU 12 controls the fuel injection amount and the fuel injection timing for the diesel engine according to various control programs stored in the flash ROM 14.

【0015】次に、フラッシュROM14及びEEPR
OM15の構成を図2を用いて詳細に説明する。図2に
示すように、フラッシュROM14は、複数の記憶領域
に分割されており、それら各記憶領域が例えばA〜E領
域としてそれぞれ設定されている。このA〜E領域は各
々均等な記憶領域を構成しており、その大きさは、後述
するEEPROM15のmemchk領域に合わせて設
けられている。
Next, the flash ROM 14 and the EEPROM
The configuration of the OM 15 will be described in detail with reference to FIG. As shown in FIG. 2, the flash ROM 14 is divided into a plurality of storage areas, and these storage areas are respectively set as, for example, A to E areas. The areas A to E each constitute an equal storage area, and the size thereof is provided in accordance with the memchk area of the EEPROM 15 described later.

【0016】また、EEPROM15には、memch
k、a〜e、memcnt、chklogの各領域が設
けられている。memchk領域には、フラッシュRO
M14のA〜E領域の何れかのデータが選択的に複写さ
れる。a〜e領域には、フラッシュROM14のA〜E
領域それぞれに対応するチェックサムの比較判定値が予
め格納されている。また、memcnt領域には、フラ
ッシュROM14のA〜E領域のうち何れか一つを選択
するための数値(領域指定カウンタ)が保管され、ch
klog領域には、フラグ等の異常情報、すなわちデー
タ化けの検証結果が保管されている。
The EEPROM 15 has a memch
Each area of k, a to e, memcnt, and chklog is provided. In the memchk area, flash RO
Any data in the A to E areas of M14 is selectively copied. A to E areas of the flash ROM 14 are
A comparison determination value of the checksum corresponding to each area is stored in advance. In the memcnt area, a numerical value (area designation counter) for selecting any one of the areas A to E of the flash ROM 14 is stored.
In the klog area, abnormal information such as flags, that is, verification results of garbled data are stored.

【0017】次に、CPU12により実施されるフラッ
シュROM14のデータ化け検出手順を詳しく説明す
る。ここでは、電源投入時に実施される初期化処理と、
その後の一定周期で実施される時間同期処理と、電源遮
断時に実施される電源遮断処理とに分けて、各処理を図
3〜図5のフローチャートを参照しながら詳しく説明す
る。
Next, a procedure for detecting data corruption in the flash ROM 14 performed by the CPU 12 will be described in detail. Here, the initialization process performed when the power is turned on,
Each process will be described in detail below with reference to flowcharts of FIGS. 3 to 5, separately into a time synchronization process performed at a fixed period and a power shutdown process performed at the time of power shutdown.

【0018】さて、CPU12は、電源投入に伴い図3
の初期化処理を起動し、ステップ101では、フラッシ
ュROM14の全領域、すなわち前記図2のA〜Eの記
憶領域全てを対象にチェックサムを計算する。これによ
り、A〜Eの記憶領域毎にチェックサムが算出される。
続くステップ102では、前記計算した記憶領域毎のチ
ェックサムと、各記憶領域に対応するEEPROM15
内の比較値(図2のa〜eの値)とを比較し、各々一致
するか否かによりデータ検査を実施する。このとき、チ
ェックサムの計算値と比較値とが一致すれば、そのまま
後続ステップ104に進む。これに対し、チェックサム
の計算値と比較値とが不一致であればデータ化けが発生
したとみなし、ステップ103でフラグ等の異常情報
(chklog=1)をEEPROM15に記憶する。
When the power is turned on, the CPU 12 operates as shown in FIG.
In step 101, a checksum is calculated for the entire area of the flash ROM 14, that is, for all of the storage areas A to E in FIG. Thus, the checksum is calculated for each of the storage areas A to E.
In the following step 102, the calculated checksum for each storage area and the EEPROM 15 corresponding to each storage area are stored.
Are compared with each other (values a to e in FIG. 2), and a data inspection is performed depending on whether or not they match. At this time, if the calculated value of the checksum matches the comparison value, the process directly proceeds to the subsequent step 104. On the other hand, if the calculated value of the checksum does not match the comparison value, it is considered that data corruption has occurred, and abnormal information such as a flag (chklog = 1) such as a flag is stored in the EEPROM 15 in step 103.

【0019】その後、フラッシュROM14の何れかの
記憶領域(A〜Eの何れか)のデータをEEPROM1
5へ複写する。すなわち、ステップ104では、EEP
ROM15内の領域指定カウンタ(memcntの値)
に基づいてフラッシュROM14のどの領域を複写する
かを指定する。また、ステップ105では、前記指定し
た領域のフラッシュROMデータをEEPROM15の
memchk領域へ複写し、その後本処理を終了する。
Thereafter, the data in any one of the storage areas (A to E) of the flash ROM 14 is stored in the EEPROM 1
Copy to 5. That is, in step 104, the EEP
Area designation counter (value of memcnt) in ROM 15
Which area of the flash ROM 14 is to be copied based on the In step 105, the flash ROM data in the specified area is copied to the memchk area of the EEPROM 15, and the process is terminated.

【0020】一方、CPU12は、電源投入後、所定の
時間周期で図4の時間同期処理を起動し、ステップ20
1〜203では、前記図3のステップ101〜103と
同様に、フラッシュROM14の全領域についてチェッ
クサムによるデータ検査を実施する。そして、チェック
サムの計算値と所定の比較値とが不一致であればデータ
化けが発生したとみなし、フラグ等の異常情報(chk
log=1)をEEPROM15に記憶する。
On the other hand, after the power is turned on, the CPU 12 starts the time synchronization process of FIG.
In steps 1 to 203, data inspection is performed by using a checksum on the entire area of the flash ROM 14, as in steps 101 to 103 in FIG. If the calculated value of the checksum does not match the predetermined comparison value, it is determined that data corruption has occurred, and abnormal information (chk
(log = 1) is stored in the EEPROM 15.

【0021】その後、フラッシュROM14及びEEP
ROM15の同一データを対象にこれら両メモリのデー
タを逐次比較してデータ検査を実施する。すなわち、ス
テップ204では、EEPROM15内の領域指定カウ
ンタ(memcntの値)に基づき、フラッシュROM
14のA〜Eの各領域のうちどの領域を比較対象とする
かを指定する。また、ステップ205では、前記指定し
た領域のフラッシュROMデータと、EEPROM15
のmemchk領域に複写したデータ(前記図3のステ
ップ105での複写データ)とを逐次比較する。具体的
には、各データをアドレスポイント毎に指定して読み出
しそれらを比較する。このとき、フラッシュROM14
内のデータとEEPROM15の複写データとが一致す
れば、そのまま本処理を終了する。これに対し、フラッ
シュROM14内のデータとEEPROM15の複写デ
ータとが不一致であればデータ化けが発生したとみな
し、ステップ206でフラグ等の異常情報(chklo
g=1)をEEPROM15に記憶する。
Thereafter, the flash ROM 14 and the EEP
Data inspection is performed by sequentially comparing the data in both memories with respect to the same data in the ROM 15. That is, in step 204, the flash ROM is determined based on the area designation counter (the value of memcnt) in the EEPROM 15.
It designates which of the fourteen areas A to E is to be compared. In step 205, the flash ROM data in the specified area is stored in the EEPROM 15.
Are sequentially compared with the data copied in the memchk area (the copied data in step 105 in FIG. 3). Specifically, each data is designated for each address point, read, and compared. At this time, the flash ROM 14
If the data in the data matches the copy data in the EEPROM 15, the process is terminated. On the other hand, if the data in the flash ROM 14 and the copy data in the EEPROM 15 do not match, it is considered that data corruption has occurred, and in step 206, the abnormality information (chklo
g = 1) is stored in the EEPROM 15.

【0022】また更に、CPU12は、電源遮断時にお
ける周知のメインリレー制御等において図5の電源遮断
処理を起動する。図5において、先ずステップ301〜
303では、前記図4のステップ204〜206と同様
に、フラッシュROM14及びEEPROM15の同一
データを対象にこれら両メモリのデータを逐次比較して
データ検査を実施する。そして、フラッシュROM14
内のデータ(図2のA〜Eの何れかのデータ)とEEP
ROM15の複写データとが不一致であればデータ化け
が発生したとみなし、フラグ等の異常情報(chklo
g=1)をEEPROM15に記憶する。
Further, the CPU 12 activates the power-off process shown in FIG. 5 in a well-known main relay control or the like when the power is turned off. Referring to FIG.
In step 303, data inspection is performed by sequentially comparing the data in both memories with respect to the same data in the flash ROM 14 and the EEPROM 15 as in steps 204 to 206 in FIG. And the flash ROM 14
(Any data of A to E in FIG. 2) and EEP
If the copy data in the ROM 15 does not match, it is considered that data corruption has occurred, and abnormality information (chklo
g = 1) is stored in the EEPROM 15.

【0023】最後に、ステップ304では、次回の電源
投入時におけるフラッシュROMデータの複写領域を変
更するため、EEPROM15内の領域指定カウンタ
(memcntの値)を次領域を示す値に設定する。但
し、複写領域を指定する順序は任意で良く、フラッシュ
ROM14のA〜E領域についてそのアルファベット順
に複写領域を指定しても良いし、特定領域を重点的に指
定しても良い。
Finally, in step 304, the area designation counter (memcnt value) in the EEPROM 15 is set to a value indicating the next area in order to change the flash ROM data copy area at the next power-on. However, the order in which the copy areas are specified may be arbitrary, and the copy areas may be specified in alphabetical order for the A to E areas of the flash ROM 14, or the specific area may be specified with emphasis.

【0024】なお本実施の形態では、図3のステップ1
01〜103及び図4のステップ201〜203が特許
請求の範囲に記載の「第1のデータ検査手段」に、図3
のステップ105が同「データ複写手段」に、図4のス
テップ204〜206及び図5のステップ301〜30
3が同「第2のデータ検査手段」にそれぞれ該当する。
In this embodiment, step 1 in FIG.
Steps 01 to 103 and steps 201 to 203 in FIG. 4 correspond to “first data inspection means” described in the claims.
Step 105 of FIG. 4 corresponds to the "data copying means", and steps 204 to 206 of FIG. 4 and steps 301 to 30 of FIG.
3 corresponds to the “second data inspection means”.

【0025】以上詳述した本実施の形態によれば、以下
に示す効果が得られる。チェックサムによるデータ検査
に加え、データの逐次比較によるデータ検査が実施され
るので、仮に複数箇所でデータ化けが発生してもそのデ
ータ化けの検出が可能となる。その結果、フラッシュR
OM14のデータ異常についてその検出精度を向上させ
ることができる。またこの場合、逐次比較されるデータ
は、フラッシュROM14の一部領域のみに限定される
ため、データの複写先であるEEPROM15(実際に
はmemchk領域)としても大領域を要することはな
く、処理負荷の軽減とコスト低減とが実現できる。
According to the embodiment described above, the following effects can be obtained. Since the data inspection is performed by successive comparison of data in addition to the data inspection using the checksum, even if data corruption occurs at a plurality of locations, the data corruption can be detected. As a result, Flash R
The detection accuracy of the data abnormality of the OM 14 can be improved. In this case, since the data to be successively compared is limited to only a part of the area of the flash ROM 14, the EEPROM 15 (actually, memchk area) to which the data is copied does not require a large area, and the processing load is reduced. Reduction and cost reduction can be realized.

【0026】特に、フラッシュROM14はデータ複写
先であるEEPROM15のmemchk領域に合わせ
て均等な領域に分割されるので、処理負荷の軽減及びコ
スト低減の効果は顕著である。また、フラッシュROM
14の分割領域(A〜E領域)毎にチェックサムによる
データ検査が行われるため、その検査精度が向上する。
In particular, since the flash ROM 14 is divided into equal areas in accordance with the memchk area of the EEPROM 15 to which data is copied, the effects of reducing the processing load and cost are remarkable. Also, flash ROM
Since the data inspection is performed by the checksum for each of the 14 divided regions (A to E regions), the inspection accuracy is improved.

【0027】また、フラッシュROM14の記憶領域が
「領域指定データ」としての領域指定カウンタ(EEP
ROM15内のmemcntの値)に基づき指定され、
同カウンタが電源遮断時に更新される。そのため、フラ
ッシュROM14の指定領域(データ検査領域)が容易
に設定できる。
The storage area of the flash ROM 14 has an area designation counter (EEP) as "area designation data".
Is specified based on the value of memcnt in the ROM 15)
This counter is updated when the power is turned off. Therefore, the designated area (data inspection area) of the flash ROM 14 can be easily set.

【0028】また、電源投入時の初期化処理にてフラッ
シュROM14のデータをEEPROM15に複写する
ので、データ複写の処理は電源投入時にのみ実施され、
仮にデータ複写に時間を要するとしても、他の演算処理
への影響を抑制することができる。
Also, since the data in the flash ROM 14 is copied to the EEPROM 15 in the initialization processing at the time of power-on, the data copy processing is performed only at the time of power-on.
Even if it takes time to copy data, it is possible to suppress the influence on other arithmetic processing.

【0029】なお本発明は、上記以外に次の形態にて具
体化できる。チェックサムによるデータ検査で異常が確
認されなかった場合のみ、その後データの逐次比較によ
るデータ検査が実施されるよう構成する。具体的には、
例えば図4の時間同期処理において、ステップ202が
NGとなった場合(chklogに1がセットされた場
合)には、後続のステップ204〜206を実施しな
い。またその時は、図5の電源遮断処理においても、ス
テップ301〜303を実施しないよう構成する。一
方、図3の初期化処理の時点で、chklogに1がセ
ットされた場合には、データ複写を含む、データ検査に
関する全ての後続処理(図3のステップ104,10
5、図4及び図5)を実施しないようにしても良い。こ
の場合、異常発生後における処理負荷が軽減されるよう
になる。
The present invention can be embodied in the following modes other than the above. Only when no abnormality is confirmed in the data inspection by the checksum, the data inspection by the successive comparison of the data is performed thereafter. In particular,
For example, in the time synchronization process of FIG. 4, if step 202 is determined to be NG (when chklog is set to 1), subsequent steps 204 to 206 are not performed. At that time, the configuration is such that steps 301 to 303 are not performed even in the power cutoff process of FIG. On the other hand, if chklog is set to 1 at the time of the initialization processing in FIG. 3, all subsequent processing related to data inspection including data copying (steps 104 and 10 in FIG. 3)
5, FIG. 4 and FIG. 5) may not be performed. In this case, the processing load after the occurrence of the abnormality is reduced.

【0030】上記実施の形態では、ECU10の電源投
入時においてフラッシュROM14の一つの記憶領域を
指定し、その一つの記憶領域についてデータ複写及びデ
ータ検査を実施した。すなわち、車両走行の1トリップ
に1領域のデータ比較検査を実施した。この構成を変更
し、車両走行の1トリップに複数の記憶領域についてデ
ータ比較検査を実施するようにしても良い。
In the above embodiment, when the power of the ECU 10 is turned on, one storage area of the flash ROM 14 is designated, and data copying and data inspection are performed on the one storage area. That is, the data comparison inspection of one area was performed for one trip of the vehicle traveling. This configuration may be modified so that data comparison inspection is performed on a plurality of storage areas in one trip of vehicle travel.

【0031】上記実施の形態では、フラッシュROM1
4(不揮発性メモリ)を予め複数の均等な記憶領域に分
割しておき、その分割領域を一単位として順にデータ複
写及びデータ検査(データの逐次比較)を実施したが、
この構成を変更しても良い。例えば、データ複写の対象
となる少なくとも一つの記憶領域をフラッシュROM1
4に予め指定しておき、この指定領域についてデータ複
写及びデータ検査(データの逐次比較)を実施する。指
定領域としては、制御プログラムの重要部分を設定して
おけば良い。因みに、チェックサムによるデータ検査
は、既述の通りフラッシュROM14の全領域を対象に
実施する。
In the above embodiment, the flash ROM 1
4 (non-volatile memory) was divided into a plurality of uniform storage areas in advance, and data copying and data inspection (sequential comparison of data) were sequentially performed using the divided areas as one unit.
This configuration may be changed. For example, at least one storage area to be copied is stored in a flash ROM 1
4, data copying and data inspection (sequential comparison of data) are performed on the designated area. An important part of the control program may be set as the designated area. Incidentally, the data inspection using the checksum is performed on the entire area of the flash ROM 14 as described above.

【0032】更に、上記実施の形態では、「不揮発性メ
モリ」としてフラッシュROMを用い、「別メモリ」と
してEEPROMを用いたが、これに限定されない。例
えば、不揮発性メモリとして比較的大容量のEEPRO
Mを用いても良い。また、別メモリとしてRAM(一時
記憶メモリ)を用いても良い。
Further, in the above embodiment, the flash ROM is used as the "non-volatile memory" and the EEPROM is used as the "separate memory", but the present invention is not limited to this. For example, a relatively large-capacity EEPRO as a nonvolatile memory
M may be used. Further, a RAM (temporary storage memory) may be used as another memory.

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

【図1】発明の実施の形態における電子制御装置の概要
を示す構成図。
FIG. 1 is a configuration diagram showing an outline of an electronic control device according to an embodiment of the present invention.

【図2】フラッシュROMとEEPROMの構成を示す
図。
FIG. 2 is a diagram showing a configuration of a flash ROM and an EEPROM.

【図3】初期化処理を示すフローチャート。FIG. 3 is a flowchart illustrating initialization processing.

【図4】時間同期処理を示すフローチャート。FIG. 4 is a flowchart illustrating a time synchronization process.

【図5】電源遮断処理を示すフローチャート。FIG. 5 is a flowchart illustrating a power cutoff process.

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

10…ECU(電子制御装置)、12…CPU、14…
フラッシュROM、15…EEPROM。
10 ECU (electronic control device), 12 CPU, 14
Flash ROM, 15 ... EEPROM.

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】電気的に書き換え可能な不揮発性メモリ
と、この不揮発性メモリとは異なる別メモリとを備える
電子制御装置に適用され、 前記不揮発性メモリ内のデータについてチェックサムに
よるデータ検査を実施する第1のデータ検査手段と、 前記不揮発性メモリの全データのうち、指定された一部
領域のデータを前記別メモリに複写するデータ複写手段
と、 前記データ複写手段によるデータ複写の後、前記不揮発
性メモリ及び別メモリ内の同一データを対象に両メモリ
のデータを逐次比較し、各データが一致するかどうかに
よりデータ検査を実施する第2のデータ検査手段と、を
備えることを特徴とする電子制御装置。
The present invention is applied to an electronic control device including an electrically rewritable non-volatile memory and a memory different from the non-volatile memory, and performs a data test by a checksum on data in the non-volatile memory. First data checking means for performing data copying, copying data in a specified partial area of the entire data in the nonvolatile memory to the separate memory, and copying the data by the data copying means. Second data inspection means for sequentially comparing data in both memories with respect to the same data in the non-volatile memory and another memory, and performing a data inspection depending on whether each data matches. Electronic control unit.
【請求項2】前記不揮発性メモリが複数の記憶領域に分
割されており、前記第1のデータ検査手段は、不揮発性
メモリの各分割領域について個々にチェックサムによる
データ検査を実施し、前記データ複写手段は、前記不揮
発性メモリの何れかの分割領域のデータを選択的に前記
別メモリに複写する請求項1に記載の電子制御装置。
2. The non-volatile memory is divided into a plurality of storage areas, and the first data inspection means individually performs a data inspection by a checksum on each of the divided areas of the non-volatile memory, 2. The electronic control device according to claim 1, wherein the copying unit selectively copies data in any one of the divided areas of the nonvolatile memory to the another memory.
【請求項3】請求項2に記載の電子制御装置において、
前記不揮発性メモリは、前記データ複写手段による複写
先である別メモリの領域に合わせて均等な領域に分割さ
れている電子制御装置。
3. The electronic control device according to claim 2, wherein
An electronic control unit, wherein the nonvolatile memory is divided into equal areas in accordance with an area of another memory to which data is copied by the data copying unit.
【請求項4】前記不揮発性メモリのデータについて複写
対象となる指定領域を決定するための領域指定データを
設定しておき、前記第2のデータ検査手段によるデータ
検査の後、前記領域指定データを更新する請求項1〜3
の何れかに記載の電子制御装置。
4. Area setting data for determining a specified area to be copied with respect to the data in the nonvolatile memory is set, and after the data inspection by the second data inspection means, the area specification data is set. Claims 1-3 to be updated
An electronic control device according to any one of the above.
【請求項5】前記第1のデータ検査手段によるデータ検
査で異常が確認されなかった場合のみ、その後前記第2
のデータ検査手段によるデータ検査を実施する請求項1
〜4の何れかに記載の電子制御装置。
5. Only when no abnormality is confirmed in data inspection by said first data inspection means, said second data inspection means
2. A data inspection by said data inspection means.
An electronic control unit according to any one of claims 1 to 4.
【請求項6】前記データ複写手段は、電源投入時の初期
化処理にて不揮発性メモリのデータを別メモリに複写
し、前記第2のデータ検査手段は、電源投入後の時間同
期処理にて不揮発性メモリ及び別メモリの各データを逐
次比較する請求項1〜5の何れかに記載の電子制御装
置。
6. The data copying means copies data in a non-volatile memory to another memory in an initialization process at power-on, and the second data inspection device performs time synchronization processing after power-on. 6. The electronic control device according to claim 1, wherein each data of the nonvolatile memory and the data of another memory are sequentially compared.
JP2001141572A 2001-05-11 2001-05-11 Electronic controller Pending JP2002334024A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001141572A JP2002334024A (en) 2001-05-11 2001-05-11 Electronic controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001141572A JP2002334024A (en) 2001-05-11 2001-05-11 Electronic controller

Publications (1)

Publication Number Publication Date
JP2002334024A true JP2002334024A (en) 2002-11-22

Family

ID=18988008

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001141572A Pending JP2002334024A (en) 2001-05-11 2001-05-11 Electronic controller

Country Status (1)

Country Link
JP (1) JP2002334024A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2848327A1 (en) * 2002-12-06 2004-06-11 Thales Sa Method for managing the write operation in a memory store, where the writing is done on the former line, and each line comprises a one-bit cursor
JP2005050184A (en) * 2003-07-30 2005-02-24 Hitachi Ltd Device and program for detecting code modification and equipment loan system using them
JP2006291829A (en) * 2005-04-08 2006-10-26 Toyota Motor Corp Vehicle state determination device
JP2008257850A (en) * 2007-04-04 2008-10-23 Samsung Electronics Co Ltd Flash memory device and method for driving the same
JP2009083777A (en) * 2007-10-02 2009-04-23 Denso Corp Vehicle control device and program
US7610436B2 (en) 2005-03-18 2009-10-27 Nec Electronics Corporation Semiconductor device having flash memory with a data length table
KR101008446B1 (en) 2008-07-29 2011-01-14 콘티넨탈 오토모티브 시스템 주식회사 Method for controlling operation of an ECU
JP2014075732A (en) * 2012-10-05 2014-04-24 Dainippon Printing Co Ltd Mobile communication terminal
US10877837B2 (en) 2018-11-27 2020-12-29 Lsis Co., Ltd. Method for recovering EEPROM of slave device by PLC communication module

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2848327A1 (en) * 2002-12-06 2004-06-11 Thales Sa Method for managing the write operation in a memory store, where the writing is done on the former line, and each line comprises a one-bit cursor
WO2004053884A1 (en) * 2002-12-06 2004-06-24 Thales Method for the management of writing in a memory element
JP2005050184A (en) * 2003-07-30 2005-02-24 Hitachi Ltd Device and program for detecting code modification and equipment loan system using them
US7610436B2 (en) 2005-03-18 2009-10-27 Nec Electronics Corporation Semiconductor device having flash memory with a data length table
JP2006291829A (en) * 2005-04-08 2006-10-26 Toyota Motor Corp Vehicle state determination device
JP2008257850A (en) * 2007-04-04 2008-10-23 Samsung Electronics Co Ltd Flash memory device and method for driving the same
JP2009083777A (en) * 2007-10-02 2009-04-23 Denso Corp Vehicle control device and program
US8095262B2 (en) 2007-10-02 2012-01-10 Denso Corporation Vehicular control apparatus and program storage medium
KR101008446B1 (en) 2008-07-29 2011-01-14 콘티넨탈 오토모티브 시스템 주식회사 Method for controlling operation of an ECU
JP2014075732A (en) * 2012-10-05 2014-04-24 Dainippon Printing Co Ltd Mobile communication terminal
US10877837B2 (en) 2018-11-27 2020-12-29 Lsis Co., Ltd. Method for recovering EEPROM of slave device by PLC communication module

Similar Documents

Publication Publication Date Title
JP4803168B2 (en) Vehicle information storage device
JP4065790B2 (en) In-vehicle electronic control unit
US8090494B2 (en) Electronic apparatus and program storage medium
US6401163B1 (en) Apparatus and method for rewriting data from volatile memory to nonvolatile memory
JP4552982B2 (en) Electronic control unit
JP2002334024A (en) Electronic controller
GB2244161A (en) Method and apparatus for inspecting microprocessor-based unit and/or component thereof
JP2002041367A (en) Vehicle controller
JPH0633828A (en) On-vehicle electronic control
JP2002091834A (en) Rom diagnostic device
JP4041216B2 (en) Abnormality detection method and abnormality detection device
WO2018079537A1 (en) Electronic control unit and data protection method therefor
JP7172748B2 (en) Electronic controller and inspection system
JPH1049205A (en) Operating method for control unit having control function equipped with programmable storage device
JP4543317B2 (en) Nonvolatile memory data control method
JPH05171998A (en) Failure diagnosing system for vehicle
JP2007192167A (en) Internal combustion engine control device
JP3419060B2 (en) Diagnostic device for vehicles
JP2502968B2 (en) Vehicle control device
JP7200883B2 (en) electronic controller
JP2001182607A (en) Vehicle controlling device
JP4639920B2 (en) Electronic control unit
JP4308349B2 (en) Control method and control apparatus for internal combustion engine
JPH11143784A (en) Display device for programmable controller
JPH07210215A (en) Data check method for eeprom