JPH11141391A - Controller for automobile - Google Patents

Controller for automobile

Info

Publication number
JPH11141391A
JPH11141391A JP30393597A JP30393597A JPH11141391A JP H11141391 A JPH11141391 A JP H11141391A JP 30393597 A JP30393597 A JP 30393597A JP 30393597 A JP30393597 A JP 30393597A JP H11141391 A JPH11141391 A JP H11141391A
Authority
JP
Japan
Prior art keywords
data
turned
volatile memory
key switch
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP30393597A
Other languages
Japanese (ja)
Inventor
Masayoshi Hayasaka
正義 早坂
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.)
Hitachi Ltd
Hitachi Automotive Systems Engineering Co Ltd
Original Assignee
Hitachi Ltd
Hitachi Car Engineering Co Ltd
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 Hitachi Ltd, Hitachi Car Engineering Co Ltd filed Critical Hitachi Ltd
Priority to JP30393597A priority Critical patent/JPH11141391A/en
Publication of JPH11141391A publication Critical patent/JPH11141391A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To write data in a nonvolatile memory only when there are difference in both data and prohibit the writing of unnecessary data in the volatile memory by comparing the data in a volatile memory with the data in the nonvolatile memory, when a key switch is turned off. SOLUTION: An electronic control unit (ECU) 5 is provided with an input interface part 11, a nonvolatile memory (EEPROM) 17 which is nonvolatile and can electrically read and write, a volatile and read-write memory (RAM) 18, a nonvolatile and read-only memory (ROM) 19, etc. When data is transmitted to RAM 18, a microcomputer calculates the sum value of all the transmitted data, this value and a sum value stored in a prescribed address of the EEPROM 17 are compared with each other and, if the both values do not coincide with each other, it is regarded that the data stored in the EEPROM 17 is broken and the value is not used for the control.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、車両を制御するた
めの制御量を格納したり、自己診断結果を格納する機能
を有する自動車用制御装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a control apparatus for a vehicle having a function of storing a control amount for controlling a vehicle and a function of storing a self-diagnosis result.

【0002】[0002]

【従来の技術】従来より、自動車用制御装置に揮発性メ
モリと、不揮発性メモリとを用い、エンジン始動後に
は、学習情報などを不揮発性メモリから揮発性メモリに
移し、この値を自己修正した後、不揮発性メモリに戻す
ことにより、不揮発性メモリへの書き込み回数を減らす
といった方法がある。例えば、特開昭61−171864号公報
は、これについて提案したものである。また、特開平5
−289949 号公報では、データの更新があった場合の不
揮発性メモリへの書き込みをキー・スイッチがオンの時
に限定して提案している。
2. Description of the Related Art Conventionally, a volatile memory and a non-volatile memory have been used for an automobile control device, and after starting an engine, learning information and the like have been transferred from the non-volatile memory to the volatile memory, and this value has been self-corrected. After that, there is a method of reducing the number of times of writing to the nonvolatile memory by returning to the nonvolatile memory. For example, Japanese Patent Application Laid-Open No. Sho 61-171864 proposes this. In addition, JP-A-5
Japanese Patent Application No. 289949 proposes that writing to a nonvolatile memory when data is updated is limited to a time when a key switch is turned on.

【0003】[0003]

【発明が解決しようとする課題】上記公報特開昭61−17
1864号公報では、揮発性メモリと不揮発性メモリ間のデ
ータの授受について述べられているが、不揮発性メモリ
は、一般的に書き込み回数に上限があり、所定回数以上
の書き込み動作が行われた場合には、データの信頼性が
得られなくなると言う問題がある。例えば、極短期間で
イグニッション・キーのオン,オフ動作が繰り返し行わ
れた場合、揮発性メモリの内容と、不揮発性メモリの内
容が全く同等であるにも関わらず、不揮発性メモリへの
データの書き込みが行われ、不必要な書き込み動作が行
われてしまう。
DISCLOSURE OF THE INVENTION Problems to be Solved by the Invention
In the 1864 publication, the transfer of data between the volatile memory and the nonvolatile memory is described, but the nonvolatile memory generally has an upper limit on the number of times of writing, and when the writing operation is performed more than a predetermined number of times. Has a problem that data reliability cannot be obtained. For example, if the ignition key is repeatedly turned on and off in a very short period of time, the contents of the volatile memory and the contents of the non-volatile memory are completely the same, even though the contents of the non-volatile memory are completely the same. Writing is performed, and an unnecessary writing operation is performed.

【0004】一方、上記公報特開平5−289949 号公報で
は、キー・スイッチがオンの状態において、不揮発性メ
モリと揮発性メモリのデータを逐次比較して、相違が検
出されたときに不揮発性メモリへの書き込みを許可する
方法を提案しているが、対象となるデータが数百バイト
以上ある場合には、其のデータが書き変わったかどうか
を所定期間内(例えば10ms周期内)に全数チェック
することは困難である。
On the other hand, in the above-mentioned Japanese Patent Application Laid-Open No. 5-289949, data in a nonvolatile memory and data in a volatile memory are sequentially compared while a key switch is turned on. Has been proposed, but if the target data is several hundred bytes or more, it is checked within a predetermined period (for example, within a 10 ms period) whether or not the data has been rewritten. It is difficult.

【0005】本発明の目的は、上記課題に鑑み、不揮発
性メモリへの不必要なデータの書き込みを禁止する自動
車用制御装置を提供することにある。また、データ更新
の有無を逐次、個別にチェックするのではなく、キー・
スイッチがオフになった直後に一括して、複数の算術手
法により求められたサム値を用いることで、データの更
新があったかどうかを確実に検証すると共に、最新のデ
ータを、不揮発性メモリ上に残すことができる装置を提
供することを目的とする。
An object of the present invention is to provide an automobile control device which inhibits unnecessary data writing to a nonvolatile memory in view of the above-mentioned problems. Also, instead of checking for data updates one by one,
Immediately after the switch is turned off, by using the sum values obtained by multiple arithmetic methods collectively, it is possible to reliably verify whether data has been updated and to store the latest data in the nonvolatile memory. The purpose is to provide a device that can be left behind.

【0006】[0006]

【課題を解決するための手段】上記目的は、キー・スイ
ッチがオフになったときに、揮発性メモリ内のデータ
と、前回格納された不揮発性メモリ内のデータ双方を比
較することで、達成される。
The above object is achieved by comparing both the data in the volatile memory and the previously stored data in the nonvolatile memory when the key switch is turned off. Is done.

【0007】データの更新があったかどうかを早く、確
実に検証する手段として、不揮発性メモリと、揮発性メ
モリにあるデータの双方に対して、少なくとも2つ以上
の異なる演算式によるサム値の計算を行い等価性の検証
を行う。
As a means for quickly and surely verifying whether or not data has been updated, calculation of a sum value using at least two or more different arithmetic expressions for both data in a nonvolatile memory and data in a volatile memory. And verify equivalence.

【0008】イグニッション・キー・スイッチがオンに
なってからの経過時間を計測し、頻繁なキー・スイッチ
のオン,オフを検知する。
[0008] The elapsed time from when the ignition key switch is turned on is measured to detect frequent key switch on / off.

【0009】即ち、キー・スイッチがオフになったとき
に、これから書き込もうとする揮発性メモリ内のデータ
と、前回格納された不揮発性メモリ内のデータの内容を
比較する。その結果、データの相違があった場合にのみ
データの書き込みを行い、データの相違がなかった場合
は、書き込みを行わない様にする。
That is, when the key switch is turned off, the data in the volatile memory to be written from now on is compared with the contents of the data in the nonvolatile memory stored previously. As a result, data is written only when there is a difference between the data, and is not written when there is no difference between the data.

【0010】上記で述べたデータの更新があったかどう
かを確実に検証する手段として、キー・スイッチがオン
になった際に、不揮発性メモリ上に格納しておいた全対
象データの単純加算値と、排他的論理和を揮発性メモリ
内の所定のアドレスに格納しておくようにする。キー・
スイッチがオフになったときには、これから書き込もう
とする揮発性メモリの全対象データに対して単純論理和
と、排他的論理和とを計算する。結果、キー・オン時に
格納しておいた値と、今回計算した揮発性メモリ上デー
タから求めた値とを比較し、単純加算値,排他的論理和
の値が共に、完全に合致した場合には、不揮発性メモリ
への書き込みを行わないが、何れか一方でも合致しない
場合は、不揮発性メモリに対して、揮発性メモリ上デー
タの書き込みを行う。尚、データの等価性を評価する手
法としては、論理積など、データの更新を検証するため
に有用な上記以外の算術的手法を用いてもよい。
As a means for reliably verifying whether or not the data has been updated as described above, when a key switch is turned on, a simple addition value of all target data stored in a nonvolatile memory and The exclusive OR is stored at a predetermined address in the volatile memory. Key·
When the switch is turned off, a simple logical sum and an exclusive logical sum are calculated for all target data in the volatile memory to be written. As a result, the value stored at the time of key-on is compared with the value calculated from the volatile memory data calculated this time. Does not write to the non-volatile memory, but if either one does not match, writes the data on the volatile memory to the non-volatile memory. As a method for evaluating data equivalence, an arithmetic method other than the above, such as a logical product, which is useful for verifying update of data may be used.

【0011】イグニッション・キー・スイッチがオンに
なってからの経過時間が所定値以下の場合にキー・スイ
ッチがオフとなった場合は、不揮発性メモリへのデータ
の書き込みを禁止することで、頻繁なキー・スイッチの
オン,オフ操作による不必要な書き込みを防止できる。
When the key switch is turned off when the elapsed time since the ignition key switch is turned on is equal to or less than a predetermined value, writing of data to the nonvolatile memory is prohibited by frequently prohibiting writing. Unnecessary writing due to the on / off operation of the key switch can be prevented.

【0012】[0012]

【発明の実施の形態】以下本発明を図面により説明す
る。図1は本発明の実施例における装置の全体構成を示
す。1はエンジンの回転数を検出するための回転センサ
である。2はエンジンを冷却するための冷却水の温度を
検出する水温センサである。3はアクセルペダルの踏み
込み量を検出するためのスロットルセンサである。4は
外部にある他の制御装置との情報のやりとりをするため
のシリアル通信線である。5は電子制御装置(以下、E
CUと称す)であり、上記1〜4の情報を元にエンジン
の動作状態を検知し、アクチュエータ6を制御する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below with reference to the drawings. FIG. 1 shows an overall configuration of an apparatus according to an embodiment of the present invention. Reference numeral 1 denotes a rotation sensor for detecting the number of rotations of the engine. Reference numeral 2 denotes a water temperature sensor for detecting the temperature of cooling water for cooling the engine. Reference numeral 3 denotes a throttle sensor for detecting the amount of depression of the accelerator pedal. Reference numeral 4 denotes a serial communication line for exchanging information with another external control device. 5 is an electronic control unit (hereinafter referred to as E
CU), and detects the operating state of the engine on the basis of the above information 1-4, and controls the actuator 6.

【0013】ECU5は上記入力センサ信号やアクチュ
エータの異常を検知する自己診断機能を持っている。異
常が検出されるとECU5は、故障情報を内部に格納す
ると共に、診断警告灯7を点灯させる。8はECU6の
電源となるバッテリーであるが、イグニッション・キー
・スイッチがオフになっても所定時間はECU5への通
電は継続される。
The ECU 5 has a self-diagnosis function for detecting the input sensor signal and abnormality of the actuator. When an abnormality is detected, the ECU 5 stores the failure information therein and turns on the diagnosis warning light 7. Reference numeral 8 denotes a battery serving as a power supply for the ECU 6, and the power supply to the ECU 5 is continued for a predetermined time even when the ignition key switch is turned off.

【0014】通電は、ECU自体に組み込まれた自滅回
路の機能により遮断される場合もあるし、ECU外部で
供給が遮断される場合がある。図1はECUの自滅回路
により遮断されるシステムの場合の例を示している。
尚、イグニッション・キーの情報は、外部から直接スイ
ッチ信号で伝えられる場合もあるが、図1は、シリアル
通信線を通じて他の制御装置から伝えられるシステムの
場合の例を示している。図2は、上記ECU5の内部構
成について示したものである。ECU5は、各種センサ
やスイッチ情報を処理する入力インターフェイス部11
と、シリアル通信用インターフェイス12,入力インタ
ーフェイス部11を出たアナログ信号をデジタル信号に
変換するA/D変換部13,各種入力信号を演算するマ
イコン14,前述した通信インターフェイス12を介し
て伝えられるイグニッション・キー情報を元にマイコン
14に供給される電源を遮断する自滅回路15と、外部
に接続される各種アクチュエータを制御するための信号
を出力するための出力インターフェイス16,不揮発性
で電気的に読み出し、書き込みが可能な不揮発性メモリ
17(以下、EEPROM)、揮発性で読み書きが可能なメモ
リ18(以下、RAM)、不揮発性で読み出し専用のメ
モリ19(以下、ROM)から構成されている。
The energization may be interrupted by the function of a self-destruct circuit incorporated in the ECU itself, or the supply may be interrupted outside the ECU. FIG. 1 shows an example of a system that is shut off by a self-destructing circuit of an ECU.
It should be noted that the ignition key information may be transmitted directly from the outside by a switch signal, but FIG. 1 shows an example of a system transmitted from another control device through a serial communication line. FIG. 2 shows an internal configuration of the ECU 5. The ECU 5 includes an input interface unit 11 that processes various sensors and switch information.
, A serial communication interface 12, an A / D converter 13 for converting an analog signal output from the input interface 11 into a digital signal, a microcomputer 14 for calculating various input signals, and an ignition transmitted through the communication interface 12 described above. A self-destruction circuit 15 for shutting off the power supplied to the microcomputer 14 based on the key information; an output interface 16 for outputting signals for controlling various actuators connected to the outside; , A writable nonvolatile memory 17 (hereinafter referred to as EEPROM), a volatile readable / writable memory 18 (hereinafter referred to as RAM), and a nonvolatile read-only memory 19 (hereinafter referred to as ROM).

【0015】マイコン14とRAM18,ROM19と
は、アドレスバス20、並びにデータバス21を介して
結ばれており、このバスライン上で各種情報のやりとり
を行う。尚、EEPROM17とマイコン14は、バスラインで
はなくシリアル通信線22を介し、情報のやりとりを行
う。尚、不揮発性メモリには、EEPROMではなく、フラッ
シュメモリも使われることがある。
The microcomputer 14, the RAM 18, and the ROM 19 are connected via an address bus 20 and a data bus 21, and various kinds of information are exchanged on this bus line. Note that the EEPROM 17 and the microcomputer 14 exchange information via the serial communication line 22 instead of the bus line. Note that a flash memory instead of an EEPROM may be used as the nonvolatile memory.

【0016】図3は、イグニッション・キー・スイッチ
がオン,オフした際のRAM18とEEPROM17との間で行
われるデータのやりとりについてそのタイミングを示し
たものである。イグニッション・キー・スイッチがオン
すると、EEPROM17に格納されていたデータ(例えば、学
習値や、故障診断情報)は、RAM18に転送される。
一方、キー・スイッチがオフすると、それまでRAM1
8に格納され、制御に使われていたデータが、EEPROM17
に格納される。このとき、格納されるデータを全て合算
したサム値を同じEEPROM17の所定のアドレスに格納する
ものとする。
FIG. 3 shows the timing of data exchange between the RAM 18 and the EEPROM 17 when the ignition key switch is turned on and off. When the ignition key switch is turned on, data (for example, learning values and failure diagnosis information) stored in the EEPROM 17 is transferred to the RAM 18.
On the other hand, when the key switch is turned off, the RAM 1
The data stored in EEPROM 8 and used for control is stored in EEPROM 17
Is stored in At this time, it is assumed that a sum value obtained by summing all the stored data is stored at a predetermined address of the same EEPROM 17.

【0017】このサム値は次回キー・スイッチオン時
に、EEPROM17からRAM18へデータが転送された際、
転送されたデータが、正しいかどうかを検証するために
用いられる。即ち、RAM18へデータが転送された
際、マイコンはこの転送された全データの合算値の計算
を行い、その値とEEPROM17の所定のアドレスに格納され
ているサム値との間で比較を行い、もし両者の値が合致
しなかった場合にはEEPROM18に格納されていたデータに
破壊があったと見なし、その値を制御には用いない。
This sum value is used when data is transferred from the EEPROM 17 to the RAM 18 at the next key switch-on.
Used to verify that the transferred data is correct. That is, when the data is transferred to the RAM 18, the microcomputer calculates the total value of all the transferred data, and compares the calculated value with the sum value stored at a predetermined address of the EEPROM 17, If the values do not match, it is assumed that the data stored in the EEPROM 18 has been destroyed, and that value is not used for control.

【0018】その場合、予め設けておいたデフォルト値
を制御に使うものとする。ところで、転送されるデータ
は、エンジンの状態を示す学習値や、自己診断の結果
(エラーコードなど)が一般的であるが、それぞれEEPR
OM18上の予め定められたアドレスに格納される。
In this case, a default value provided in advance is used for control. By the way, the transferred data is generally a learning value indicating the state of the engine and the result of self-diagnosis (such as an error code).
It is stored at a predetermined address on the OM18.

【0019】次に、請求項1にて記載した技術につい
て、図4を用いて説明する。図4に示すフローチャート
は、10ms毎に実行されるルーチンである。又、この
処理は、キー・スイッチがオフとなり、通常のエンジン
制御やトランスミッション制御が終了した後に実行され
るものである。従って、マイコン自体の負荷は軽くなっ
た状態で行われる処理である。
Next, the technique described in claim 1 will be described with reference to FIG. The flowchart shown in FIG. 4 is a routine executed every 10 ms. This process is executed after the key switch is turned off and normal engine control and transmission control are completed. Therefore, the processing is performed in a state where the load on the microcomputer itself is reduced.

【0020】先ず、イグニッション・キー・スイッチが
オフとなり、自滅処理が行われるモードに入ったかどう
かの判定が処理100〜102にて行われる。自滅処理
に入るトリガは、処理101に示したキー・スイッチの
オフ判定であり、これにより処理102に示したセルフ
シャットオフ・フラグがセットされる。セルフシャット
オフ・フラグがセットされると、処理103が実行され
る。即ち、EEPROM17上のデータと、それに該当するRA
M18上のデータとの等価性がチェックされる。
First, in steps 100 to 102, it is determined whether or not the ignition key switch is turned off and a mode for performing self-destruction processing is entered. The trigger to enter the self-destruction process is the key switch off determination shown in process 101, whereby the self-shut-off flag shown in process 102 is set. When the self-shutoff flag is set, the process 103 is executed. That is, the data on the EEPROM 17 and the corresponding RA
The equivalence with the data on M18 is checked.

【0021】処理104で、データの等価判定が行わ
れ、両者のデータが相違していると判定された場合に
は、データの更新があったと見做し、RAM18上のデ
ータがEEPROM17に上書きされる処理105が実行され
る。
In process 104, the data is determined to be equal, and if it is determined that the two data are different, it is determined that the data has been updated, and the data in the RAM 18 is overwritten in the EEPROM 17. Is performed 105.

【0022】処理106では、書き込み対象となるデー
タ数のチェックが行われ、所定回数分処理103〜10
6の処理が繰り返される。尚、処理104でデータが一
致していると判定された場合には、EEPROM17への書き込
み処理は行われず、処理を終了する。上記の処理によ
り、EEPROM17への書き込み処理は、キー・スイッチがオ
フになった後に、更新のあったデータのみを対象に実行
されることになる。
In the process 106, the number of data to be written is checked, and the processes 103 to 10 are performed a predetermined number of times.
Step 6 is repeated. If it is determined in step 104 that the data matches, the process of writing to the EEPROM 17 is not performed, and the process ends. By the above processing, the writing processing to the EEPROM 17 is executed only for the updated data after the key switch is turned off.

【0023】次に請求項2にて記載した事項について説
明する。図5は、データの構成をイメージ化したもので
ある。マップ200はRAM18上におけるデータの構
成を示す。又、マップ201はEEPROM17上におけるデー
タの構成を示す。イグニッション・キー・スイッチがオ
ンになるとEEPROM17に格納されていたデータ1〜nが、
RAM18に全て転送される。尚、そのときSUM X
並びにSUM Yの値もRAM18に転送される。
Next, the matter described in claim 2 will be described. FIG. 5 is an image of the data configuration. The map 200 shows the structure of data on the RAM 18. The map 201 shows the structure of data on the EEPROM 17. When the ignition key switch is turned on, the data 1 to n stored in the EEPROM 17 are
All are transferred to the RAM 18. At that time, SUM X
The value of SUM Y is also transferred to the RAM 18.

【0024】SUM Xは、前回キー・スイッチがオフ
となり、RAM18の中身がEEPROM17に格納された際に
計算されたサム値であり、データ1からnまでの値を単
純合算した結果の下位1バイトの値である。SUM Y
も同じタイミングで計算されたサム値であるが、こちら
はデータ1からn迄を排他的論理和で計算した結果の下
位1バイトである。これらのサム値は、次回キー・スイ
ッチがオフとなった際に、RAM18上のデータの更新
が行われたかどうかの検証に用いられる。
SUM X is a sum value calculated when the contents of the RAM 18 were stored in the EEPROM 17 the last time the key switch was turned off, and the lower 1 byte of the result obtained by simply summing the values of data 1 to n Is the value of SUM Y
Is the sum value calculated at the same timing, but this is the lower 1 byte of the result obtained by calculating exclusive OR of data 1 to n. These sum values are used to verify whether the data on the RAM 18 has been updated the next time the key switch is turned off.

【0025】ところで、このように2種類のサム値を設
ける理由は、一般に良く用いられる単純合算の値(ここ
ではSUM X)だけではデータの等価性の検証に信頼
がおけないからである。例えば、データ1で+1ビット
の変化があったとしても、データ2で−1ビットの変化
があると、データは更新されているにも関わらず、単純
合算の値に変化はなく、あたかもデータの更新がなかっ
たかの様に判定されてしまうからである。従って、これ
と併用して、排他的論理和によるサム値SUMYを用い
るとデータの更新の有無が確実に分かる。
The reason for providing two kinds of sum values in this way is that it is not reliable to verify the equivalence of data with only a commonly used simple sum value (here, SUM X). For example, if there is a +1 bit change in data 1 and a -1 bit change in data 2, the value of the simple sum does not change even though the data has been updated. This is because the judgment is made as if there was no update. Therefore, if the sum value SUMY by exclusive OR is used in combination with this, it is possible to surely determine whether or not data has been updated.

【0026】図6は、イグニッション・キー・スイッチ
のオン,オフ時におけるデータの転送処理について示し
たタイミングチャートである。図7は、キー・スイッチ
がオフになった際の処理について詳しく示したフローチ
ャートである。処理300では、RAM18上のデータ
1〜nに基づきSUM X1並びにSUM Y1が計算
される。SUM X1,SUM Y1の値は、図5に示
した式と同様の方法により演算される。
FIG. 6 is a timing chart showing a data transfer process when the ignition key switch is turned on and off. FIG. 7 is a flowchart showing details of the processing when the key switch is turned off. In the process 300, SUM X1 and SUM Y1 are calculated based on the data 1 to n on the RAM 18. The values of SUM X1 and SUM Y1 are calculated by a method similar to the equation shown in FIG.

【0027】処理301と302では、SUM X1と
SUM Y1の値と、SUM X,SUM Yの値が比
較される。結果、SUM X=SUM X1 で且つS
UMY=SUM Y1であると判断された場合には、前
回キー・スイッチがオンして以来、RAM18上のデー
タの更新はなかったものと判断され、EEPROM17へのデー
タの書き込みは行われない。
In steps 301 and 302, the values of SUM X1 and SUM Y1 are compared with the values of SUM X and SUM Y. As a result, SUM X = SUM X1 and S
If it is determined that UMY = SUM Y1, it is determined that the data in the RAM 18 has not been updated since the last time the key switch was turned on, and no data is written to the EEPROM 17.

【0028】一方、処理302,303でデータの更新
があったと判定された場合には、処理304で、RAM
18上データのEEPROM17への書き込みと、上記で計算さ
れたSUM X1並びにSUM Y1を新しいサム値S
UM X,SUM YとしてEEPROM17に格納する。これ
により、データ更新の有無を高速に判定し、データの更
新があったときのみEEPROM17への書き込みを許可するこ
とができる。
On the other hand, if it is determined in steps 302 and 303 that the data has been updated,
18 is written to the EEPROM 17 and the calculated SUM X1 and SUM Y1 are replaced with the new sum value S.
Store them in the EEPROM 17 as UM X, SUM Y. This makes it possible to determine at a high speed whether or not data has been updated, and to permit writing to the EEPROM 17 only when data has been updated.

【0029】次に請求項3にて記載した事項について説
明する。図8は、当該処理について示したフローチャー
トである。このフローは、イグニッション・キー・スイ
ッチがオフとなってから処理される。先ず、処理400
では、イグニッション・キー・スイッチがオンとなって
から所定期間、例の場合は1秒経過したかがチェックさ
れる。
Next, the matter described in claim 3 will be described. FIG. 8 is a flowchart showing the processing. This flow is processed after the ignition key switch is turned off. First, process 400
Then, it is checked whether or not a predetermined period has elapsed since the ignition key switch was turned on, in this case, one second in the example.

【0030】もし、1秒以上経過していれば、通常のキ
ー操作による始動であると見なすが、1秒経過しないで
キー・スイッチがオフとなった場合には、頻繁なキー・
オン,オフ操作と判断し、RAM18からEEPROM17への
データの転送処理を禁止する(処理401)。
If one second or more has elapsed, it is considered that the operation is started by normal key operation. However, if the key switch is turned off without elapse of one second, frequent key operations are performed.
It is determined that the operation is an on / off operation, and the process of transferring data from the RAM 18 to the EEPROM 17 is prohibited (process 401).

【0031】[0031]

【発明の効果】本発明によれば、正常なキー操作があっ
たときで且つ、データの更新があった場合にのみ不揮発
性メモリへのデータの書き込みが許可されるので、不揮
発性メモリへの書き込み回数の削減と、書き込みデータ
の信頼性の確保が図れる。
According to the present invention, data writing to the nonvolatile memory is permitted only when a normal key operation is performed and when data is updated. The number of times of writing can be reduced, and the reliability of write data can be ensured.

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

【図1】本発明の実施例における自動車用制御装置の全
体構成を示す図。
FIG. 1 is a diagram showing an overall configuration of a vehicle control device according to an embodiment of the present invention.

【図2】図1に示したECUの内部構成について示した
図。
FIG. 2 is a diagram showing an internal configuration of an ECU shown in FIG.

【図3】イグニッション・キー・スイッチがオン,オフ
した際のデータ転送についてそのタイミングを示したタ
イミングチャート。
FIG. 3 is a timing chart showing the timing of data transfer when an ignition key switch is turned on and off.

【図4】処理工程を説明したフローチャート。FIG. 4 is a flowchart illustrating processing steps.

【図5】図1のRAMとEEPROM上のデータに関するイメ
ージ図とサム値の計算方法について示した図。
5 is a diagram showing an image diagram of data on a RAM and an EEPROM of FIG. 1 and a method of calculating a sum value.

【図6】請求項2の処理について説明したタイミングチ
ャート。
FIG. 6 is a timing chart illustrating the processing of claim 2;

【図7】請求項2の処理について説明したフローチャー
ト。
FIG. 7 is a flowchart illustrating a process according to claim 2;

【図8】請求項3について説明したフローチャート。FIG. 8 is a flowchart for explaining the third embodiment.

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

5…ECU(制御装置)、14…マイコン、15…電源自
滅回路、17…EEPROM、18…RAM、19…ROM。
5: ECU (control device), 14: microcomputer, 15: power supply self-destructing circuit, 17: EEPROM, 18: RAM, 19: ROM.

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】自動車を制御するマイコンと、書き換え可
能な揮発性メモリと、書き換え可能な不揮発性メモリ
と、イグニッション・キーがオフしても所定期間マイコ
ンへの通電が維持される回路とを具備し、イグニッショ
ン・キー・スイッチがオンの時には、上記揮発性メモリ
に車両の動作状態(学習値)や自己診断情報を記憶し、
キー・スイッチがオフになった直後には、上記揮発性メ
モリに格納された値を、上記不揮発性メモリに格納する
機構を持った装置において、キー・スイッチがオフにな
った際、上記揮発性メモリの内容と、上記不揮発性メモ
リの内容とを比較し、両者のデータに相違があった場合
のみ不揮発性メモリへのデータの書き込みを行うことを
特徴とする自動車用制御装置。
1. A microcomputer for controlling an automobile, a rewritable volatile memory, a rewritable nonvolatile memory, and a circuit for maintaining power supply to the microcomputer for a predetermined period even when an ignition key is turned off. When the ignition key switch is turned on, the operating state (learning value) of the vehicle and self-diagnosis information are stored in the volatile memory,
Immediately after the key switch is turned off, when the key switch is turned off in a device having a mechanism for storing the value stored in the volatile memory in the nonvolatile memory, An automotive control device comprising comparing the contents of a memory with the contents of the non-volatile memory, and writing data to the non-volatile memory only when there is a difference between the two data.
【請求項2】請求項1において、データの等価性の検証
に、対象データの単純合算によるサム値の計算の他、排
他的論理和による合算値を計算するなど少なくとも2つ
以上の複数の演算結果を用いることで、揮発性メモリ
と、不揮発性メモリ間のデータの等価性を検証すること
を特徴とした自動車用制御装置。
2. The method according to claim 1, wherein the verification of the equivalence of the data includes at least two or more operations such as calculating a sum value by an exclusive OR operation in addition to calculating a sum value by a simple summation of the target data. A control device for a vehicle, characterized by verifying data equivalence between a volatile memory and a nonvolatile memory by using a result.
【請求項3】イグニッション・キー・スイッチがオフか
ら、オンになって所定期間経過していないときに再び、
キー・オフになった場合、不揮発性メモリへのデータの
格納を禁止することを特徴とする自動車用制御装置。
3. When the ignition key switch has been turned on and not turned on for a predetermined period of time,
A control device for a vehicle, wherein when a key is turned off, storage of data in a nonvolatile memory is prohibited.
JP30393597A 1997-11-06 1997-11-06 Controller for automobile Pending JPH11141391A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP30393597A JPH11141391A (en) 1997-11-06 1997-11-06 Controller for automobile

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30393597A JPH11141391A (en) 1997-11-06 1997-11-06 Controller for automobile

Publications (1)

Publication Number Publication Date
JPH11141391A true JPH11141391A (en) 1999-05-25

Family

ID=17927061

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30393597A Pending JPH11141391A (en) 1997-11-06 1997-11-06 Controller for automobile

Country Status (1)

Country Link
JP (1) JPH11141391A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008015651A (en) * 2006-07-04 2008-01-24 Auto Network Gijutsu Kenkyusho:Kk Onboard database distribution node, electronic control unit, and onboard database system
JP2010013004A (en) * 2008-07-04 2010-01-21 Denso Corp Electronic control device for vehicle
JP2010176200A (en) * 2009-01-27 2010-08-12 Tokai Rika Co Ltd Flash memory operation protective device and flash memory operation protective method
US7788005B2 (en) 2007-08-03 2010-08-31 Denso Corporation Electronic control system and method for vehicle diagnosis
US8190321B2 (en) 2007-08-03 2012-05-29 Denso Corporation Electronic control unit with permission switching
CN105144299A (en) * 2013-03-21 2015-12-09 日立汽车系统株式会社 Electronic control device and method for rewriting data
JP2017141731A (en) * 2016-02-10 2017-08-17 本田技研工業株式会社 Idling stop device
JP2020077192A (en) * 2018-11-07 2020-05-21 日立オートモティブシステムズ株式会社 Electronic control device for automobile
US10956090B2 (en) 2017-06-20 2021-03-23 Kyocera Document Solutions Inc. Memory system and electronic apparatus

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008015651A (en) * 2006-07-04 2008-01-24 Auto Network Gijutsu Kenkyusho:Kk Onboard database distribution node, electronic control unit, and onboard database system
US7788005B2 (en) 2007-08-03 2010-08-31 Denso Corporation Electronic control system and method for vehicle diagnosis
US8190321B2 (en) 2007-08-03 2012-05-29 Denso Corporation Electronic control unit with permission switching
US8412405B2 (en) 2007-08-03 2013-04-02 Denso Corporation Electronic control system and method for vehicle diagnosis
JP2010013004A (en) * 2008-07-04 2010-01-21 Denso Corp Electronic control device for vehicle
US8306688B2 (en) 2008-07-04 2012-11-06 Denso Corporation Electronic control device
JP2010176200A (en) * 2009-01-27 2010-08-12 Tokai Rika Co Ltd Flash memory operation protective device and flash memory operation protective method
CN105144299A (en) * 2013-03-21 2015-12-09 日立汽车系统株式会社 Electronic control device and method for rewriting data
CN105144299B (en) * 2013-03-21 2021-01-12 日立汽车系统株式会社 Electronic control device and data rewriting method
JP2017141731A (en) * 2016-02-10 2017-08-17 本田技研工業株式会社 Idling stop device
US10956090B2 (en) 2017-06-20 2021-03-23 Kyocera Document Solutions Inc. Memory system and electronic apparatus
JP2020077192A (en) * 2018-11-07 2020-05-21 日立オートモティブシステムズ株式会社 Electronic control device for automobile

Similar Documents

Publication Publication Date Title
US4402057A (en) Method of and apparatus for ensuring correct operation of a microcomputer in the event of power outage
JP3491419B2 (en) Electronic control unit
JP4803168B2 (en) Vehicle information storage device
US5394327A (en) Transferable electronic control unit for adaptively controlling the operation of a motor vehicle
US6401163B1 (en) Apparatus and method for rewriting data from volatile memory to nonvolatile memory
US6546321B1 (en) Method and apparatus for rewriting data of control unit for vehicle
EP0065703A2 (en) Electronic control method and apparatus for internal combustion engine
JP4552982B2 (en) Electronic control unit
JPH11141391A (en) Controller for automobile
JP3870563B2 (en) Electronic control device and non-volatile memory rewrite count method
JP4475345B2 (en) Electronic control unit
JP2002041367A (en) Vehicle controller
JP2830302B2 (en) Automotive control device
JPH0633828A (en) On-vehicle electronic control
JP2009042850A (en) Control device for vehicle, and device for updating vehicle control program
JP6663371B2 (en) Electronic control unit
JP3296043B2 (en) Vehicle electronic control unit
JP2008118400A (en) Controller for automobile
JP5406689B2 (en) Control apparatus and control method
JP2009026183A (en) Electronic control apparatus for automobile
JP2502968B2 (en) Vehicle control device
JPH05289949A (en) Vehicle control device
JP2001182607A (en) Vehicle controlling device
JPH09171459A (en) Electronic control equipment
JP2000257502A (en) Electronic controller for automobile