JP2001073864A - Control device for vehicle - Google Patents

Control device for vehicle

Info

Publication number
JP2001073864A
JP2001073864A JP25200799A JP25200799A JP2001073864A JP 2001073864 A JP2001073864 A JP 2001073864A JP 25200799 A JP25200799 A JP 25200799A JP 25200799 A JP25200799 A JP 25200799A JP 2001073864 A JP2001073864 A JP 2001073864A
Authority
JP
Japan
Prior art keywords
data
ram
standby
standby ram
rewritable rom
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP25200799A
Other languages
Japanese (ja)
Other versions
JP3551855B2 (en
Inventor
Yasuhiro Tsuzuki
靖広 都築
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 JP25200799A priority Critical patent/JP3551855B2/en
Publication of JP2001073864A publication Critical patent/JP2001073864A/en
Application granted granted Critical
Publication of JP3551855B2 publication Critical patent/JP3551855B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To eliminate a delay in starting the control processing and perform storage and restoration of the data certainly. SOLUTION: An engine control device performs a control processing using a standby RAM (SRAM hereinafter) and a storing processing for copying the specific data in SRAM in an EEPROM, and if the first processing executed at starting the operation passes a judgement that the data in SRAM is in failure (S110: YES), only the initiation is conducted in which the initiation value data is written in the SRAM so that the data is normalized, and the hysteresis data in the SRAM to exhibit data complete/non-complete of the data restoration from the EEPROM to the SRAM is turned into 'non-complete' (S140 and S150). If then the second processing executed in parallel with the control processing passes a judgement that initialization has been conducted (S210 and 220: YES), the specific data in the EEPROM is copied in the SRAM and the data is restored, and the hysteresis data is turned into 'complete' (S240 and S250). In the storing processing, the data in SRAM is copied in the EEPROM (S330) only in the case the hysteresis data is in 'complete' (S320: YES).

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、車両内の制御対象
を制御する車両用制御装置に関し、特に、制御処理に用
いるデータのうち、恒久的に更新して保存しておく必要
がある特定のデータを、EEPROMやフラッシュRO
M等、電気的にデータの書き換えが可能な不揮発性の書
換可能ROMに保存するようにした車両用制御装置に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a vehicular control device for controlling a control object in a vehicle, and more particularly to a specific control data which needs to be permanently updated and stored among data used for control processing. Transfer data to EEPROM or flash RO
The present invention relates to a vehicular control device that is stored in an electrically rewritable nonvolatile rewritable ROM such as M.

【0002】[0002]

【従来の技術】従来より、この種の車両用制御装置とし
て、例えば特開平10−252546号公報及び特開平
10−252547号公報や特開平4−336351号
公報に記載されているように、車両に搭載されたバッテ
リから常時給電されるスタンバイRAM(バックアップ
RAMとも呼ばれる)を用いて、車両内の制御対象を制
御するための制御処理を行うと共に、その制御処理によ
り算出されるスタンバイRAM内のデータのうちで、学
習値や車両の累積走行距離データなど、恒久的に更新し
て保存しておく必要がある特定のデータを、電気的にデ
ータの書き換えが可能な不揮発性の書換可能ROMにコ
ピーして保存する保存処理を行い、更に、バッテリ外れ
等によってスタンバイRAM内のデータが異常になって
いることを検出した場合には、書換可能ROM内の上記
特定のデータをスタンバイRAMへコピーして、その特
定のデータを復元するようにしたものがある。
2. Description of the Related Art Conventionally, as a vehicle control device of this type, for example, as disclosed in Japanese Patent Application Laid-Open Nos. 10-252546, 10-25247 and 4-336351, Japanese Patent Application Laid-Open No. 4-336351. Using a standby RAM (also called a backup RAM) constantly supplied with power from a battery mounted on a vehicle, a control process for controlling a control target in the vehicle is performed, and data in the standby RAM calculated by the control process Of these, specific data that needs to be permanently updated and stored, such as learning values and vehicle cumulative mileage data, are copied to a non-volatile electrically rewritable ROM. Performs a save process, and detects that the data in the standby RAM has become abnormal due to battery disconnection or the like. Case, copy the specific data in the rewritable ROM to the standby RAM, there is that so as to restore the particular data.

【0003】そして、上記従来の車両用制御装置では、
制御処理と並行して上記保存処理(スタンバイRAM内
の特定のデータを書換可能ROMにコピーする処理)を
行い、また、当該装置が動作を開始してから制御処理に
先立ち最初に実行される処理にて、スタンバイRAM内
のデータの良否をパリティチェックやミラーリング等の
手法によってチェックし、スタンバイRAM内のデータ
が異常であると判定した場合には、書換可能ROM内の
特定のデータをスタンバイRAMへコピーして、その
後、スタンバイRAMを用いた制御処理を開始するよう
にしている。尚、ミラーリングとは、同じデータを記憶
媒体の異なる領域に夫々記憶させておき、その各領域の
データが同じ値であれば、正常と判定するものである。
In the above-described conventional vehicle control device,
The above-mentioned storage processing (processing of copying specific data in the standby RAM to the rewritable ROM) is performed in parallel with the control processing, and processing that is first executed prior to the control processing after the apparatus starts operation. Then, the quality of the data in the standby RAM is checked by a method such as parity check or mirroring, and when it is determined that the data in the standby RAM is abnormal, the specific data in the rewritable ROM is transferred to the standby RAM. After copying, the control process using the standby RAM is started. Note that mirroring is to store the same data in different areas of the storage medium and determine that the data is normal if the data in each area has the same value.

【0004】このため、バッテリの電圧低下やバッテリ
外れ等によってスタンバイRAM内のデータが破壊され
たとしても、上記保存処理によって書換可能ROM内に
バックアップされていた特定のデータ(バックアップデ
ータ)がスタンバイRAMに転送されて、それまでの経
緯を継承した制御処理を行うことができるようになる。
For this reason, even if the data in the standby RAM is destroyed due to a drop in battery voltage or the battery is disconnected, the specific data (backup data) that has been backed up in the rewritable ROM by the above-described storage processing is stored in the standby RAM. To perform a control process that inherits the process up to that point.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、上記従
来の車両用制御装置では、以下の問題がある。まず、一
般に、この種の装置において、書換可能ROMとして
は、シリアルデータラインを介してデータの読み出し及
び書き込みが行われるEEPROMが用いられるが、こ
のような書換可能ROMは、RAMやデータの書き換え
が不能な通常のROM(書換不能ROM)と比較する
と、データの読み出し及び書き込みに時間がかかる。
However, the above-described conventional vehicle control device has the following problems. First, in this type of device, generally, an EEPROM in which data is read and written through a serial data line is used as a rewritable ROM, but such a rewritable ROM has a RAM and a data rewritable. Reading and writing data takes time compared to a normal ROM (non-rewritable ROM) that cannot be used.

【0006】そして、上記従来の装置では、動作を開始
してから制御処理に先立ち最初に実行される処理にて、
書換可能ROM内のデータをスタンバイRAMへコピー
し、その後、制御処理を開始するようにしている。この
ため、上記従来の装置では、バッテリ外れ等によってス
タンバイRAM内のデータが破壊された状態で動作を開
始した場合に、制御処理が開始されるまでの遅れ時間が
長くなってしまい、その結果、制御対象を作動させるこ
とができるようになるまでの時間が通常時よりも長くな
ってしまう。
[0006] In the above-mentioned conventional apparatus, the processing executed first after the operation is started prior to the control processing is as follows.
The data in the rewritable ROM is copied to the standby RAM, and thereafter, the control process is started. For this reason, in the above-mentioned conventional device, when the operation is started in a state where the data in the standby RAM is destroyed due to the battery being disconnected or the like, the delay time until the control processing is started becomes longer, and as a result, The time until the controlled object can be operated becomes longer than usual.

【0007】そこで、本発明者は、動作を開始してから
制御処理に先立ち最初に実行される処理Aにて、スタン
バイRAM内のデータが異常であると判定した場合に
は、とりあえず、通常の書換不能ROMからスタンバイ
RAMへ制御対象の制御に支障を来さない固定の初期値
データを書き込んで該スタンバイRAM内のデータを正
常化させる初期化だけを行い、その後、制御処理と並行
して定期的に実行される処理Bにて、上記処理Aにより
スタンバイRAMの上記初期化が行われたか否かを判定
し、その判定により肯定判定すると、書換可能ROM内
の特定のデータをスタンバイRAMへコピーする、とい
ったプログラム構成を考えた。
[0007] Therefore, the present inventor, if it is determined in the process A, which is executed first before the control process after the operation is started, that the data in the standby RAM is abnormal, for the first time, Write only fixed initial value data that does not hinder the control of the control target from the non-rewritable ROM to the standby RAM, and perform only initialization to normalize the data in the standby RAM. It is determined whether or not the initialization of the standby RAM has been performed by the above-described process A in the process B which is executed in a random manner. If the determination is affirmative, the specific data in the rewritable ROM is copied to the standby RAM. I thought about a program configuration such as

【0008】つまり、スタンバイRAM内のデータが異
常であった場合には、とりあえず、制御対象の制御に最
低限必要な初期値データをスタンバイRAMに書き込ん
で制御処理を開始させ、その後で、書換可能ROM内の
本来のバックアップデータをスタンバイRAMへコピー
するようにし、これにより、動作を開始してから制御処
理を開始するまでの遅れ時間及び制御対象を作動させる
ことができるようになるまでの時間を最小限にするので
ある。
In other words, if the data in the standby RAM is abnormal, the control processing is started by writing the initial value data minimum necessary for the control of the control object into the standby RAM. The original backup data in the ROM is copied to the standby RAM, so that the delay time from the start of the operation to the start of the control processing and the time from the start of the operation of the control target can be reduced. Minimize.

【0009】しかしながら、本発明者は、上記構成を採
ったとしても、更に以下の問題があることに気付いた。
即ち、書換可能ROM内にバックアップされているデー
タを確実にスタンバイRAMへコピーして制御処理に反
映させるためには、上記処理Bにおいて、書換可能RO
M内のデータをスタンバイRAMへコピーしようとする
場合、まず、スタンバイRAMに供給されている電圧が
データの書き込みを正常に行うことが可能な電圧値であ
るか否かを判定し、その電圧判定により肯定判定した場
合にのみ、書換可能ROM内のデータをスタンバイRA
Mへコピーする、といった手順を踏む必要がある。
[0009] However, the present inventor has noticed that even if the above configuration is adopted, the following problem still arises.
That is, in order to ensure that the data backed up in the rewritable ROM is copied to the standby RAM and reflected in the control processing, the rewritable RO in the processing B is used.
When the data in M is to be copied to the standby RAM, first, it is determined whether or not the voltage supplied to the standby RAM is a voltage value at which data can be normally written. Only when the determination is affirmative, the data in the rewritable ROM is
It is necessary to take steps such as copying to M.

【0010】ところが、この種の装置において、スタン
バイRAM内の特定のデータを書換可能ROMにコピー
する保存処理は、制御処理と並行して行われるため、上
記処理AでスタンバイRAMの上記初期化が行われた後
に、上記処理Bにおける電圧判定で否定判定され続けた
場合には、書換可能ROMからスタンバイRAMへのデ
ータコピー(本来のバックアップデータのコピー)が完
了する前に、上記保存処理によってスタンバイRAM内
のデータが書換可能ROMにコピーされてしまう可能性
がある。
However, in this type of apparatus, the saving process of copying specific data in the standby RAM to the rewritable ROM is performed in parallel with the control process. If the voltage determination in the process B continues to be negative after the process is performed, the standby process is performed by the storage process before the data copy (copy of the original backup data) from the rewritable ROM to the standby RAM is completed. Data in the RAM may be copied to the rewritable ROM.

【0011】そして、このような事態が起こると、それ
までの経緯を継承していないスタンバイRAM内のデー
タが、書換可能ROMへコピーされてしまうこととな
り、その結果、データを復元させるための最後の砦であ
る書換可能ROM内の本来のバックアップデータを失っ
てしまうこととなる。
When such a situation occurs, the data in the standby RAM, which does not inherit the background, is copied to the rewritable ROM. As a result, the last data for restoring the data is restored. Thus, the original backup data in the rewritable ROM, which is the fortress, is lost.

【0012】本発明は、こうした問題に鑑みなされたも
のであり、動作を開始してから制御処理を開始するまで
の遅れ時間を最小限にすることができると共に、制御処
理で用いるデータの保存及び復元を確実に行うことがで
きる車両用制御装置を提供することを目的としている。
The present invention has been made in view of such a problem, and can minimize a delay time from the start of an operation to the start of a control process. It is an object of the present invention to provide a vehicle control device capable of reliably performing restoration.

【0013】[0013]

【課題を解決するための手段、及び発明の効果】上記目
的を達成するためになされた本発明の車両用制御装置
は、車両に搭載されたバッテリから常時給電されるスタ
ンバイRAMを用いて、車両内の制御対象を制御するた
めの制御処理を行うと共に、その制御処理によって算出
される前記スタンバイRAM内の特定のデータを電気的
にデータの書き換えが可能な不揮発性の書換可能ROM
にコピーして保存する保存処理を行い、更に、スタンバ
イRAM内のデータが異常であると判定した場合には、
書換可能ROM内の前記特定のデータをスタンバイRA
Mへコピーすることにより、前記特定のデータを復元す
るものである。
SUMMARY OF THE INVENTION In order to achieve the above object, a vehicle control apparatus according to the present invention uses a standby RAM which is always supplied with power from a battery mounted on the vehicle. A nonvolatile rewritable ROM capable of performing a control process for controlling a control target in the RAM and electrically rewriting specific data in the standby RAM calculated by the control process.
Is performed, and if it is determined that the data in the standby RAM is abnormal,
The specific data in the rewritable ROM is stored in a standby RA.
The specific data is restored by copying to the M.

【0014】ここで特に、本発明の車両用制御装置にお
いては、以下に説明する第1の処理と第2の処理とを行
うと共に、上記保存処理が以下のように行われる。ま
ず、第1の処理は、少なくとも当該装置が動作を開始し
て前記制御処理を開始する前に実行される。そして、こ
の第1の処理では、スタンバイRAM内のデータが異常
か否かを判定し、異常であると判定した場合には、デー
タの書き換えが不能な不揮発性の書換不能ROM(通常
のROM)からスタンバイRAMへ初期値データを書き
込んで該スタンバイRAM内のデータを正常化させる初
期化を行い、更に、前記書換可能ROMからスタンバイ
RAMへのデータコピーが完了しているか否かを示すス
タンバイRAMの所定領域内の履歴データを、未完了を
示す内容に設定する。
Here, in particular, in the vehicle control device of the present invention, the first processing and the second processing described below are performed, and the storage processing is performed as follows. First, the first process is executed at least before the device starts operating and before starting the control process. In the first process, it is determined whether or not the data in the standby RAM is abnormal. If it is determined that the data is abnormal, a nonvolatile non-rewritable ROM (normal ROM) in which data cannot be rewritten is determined. From the rewritable ROM to the standby RAM, indicating whether or not data copying from the rewritable ROM to the standby RAM has been completed. The history data in the predetermined area is set to contents indicating incomplete.

【0015】また、第2の処理は、前記制御処理と並行
して定期的に実行される。そして、この第2の処理で
は、スタンバイRAM内のデータが正常で且つ前記履歴
データが未完了を示す内容であるか否かを判定し、該判
定により肯定判定すると、前記第1の処理によりスタン
バイRAMの上記初期化が行われたと判断して、更に、
スタンバイRAMに供給されている電圧がデータの書き
込みを正常に行うことが可能な電圧値であるか否かを判
定し、その電圧判定により肯定判定した場合に、書換可
能ROM内の前記特定のデータをスタンバイRAMへコ
ピーすると共に、前記履歴データを、前記書換可能RO
MからスタンバイRAMへのデータコピーが完了したこ
とを示す内容に設定し直す。
The second process is periodically executed in parallel with the control process. Then, in the second process, it is determined whether or not the data in the standby RAM is normal and the history data has contents indicating incomplete, and if the determination is affirmative, the standby process is performed by the first process. Judging that the above initialization of the RAM has been performed,
It is determined whether or not the voltage supplied to the standby RAM is a voltage value at which data can be normally written. If the voltage determination is affirmative, the specific data in the rewritable ROM is determined. Is copied to the standby RAM, and the history data is copied to the rewritable RO.
The content is reset to indicate that data copying from M to the standby RAM has been completed.

【0016】そして、保存処理では、スタンバイRAM
内のデータが正常で且つ前記履歴データが書換可能RO
MからスタンバイRAMへのデータコピーが完了したこ
とを示す内容に設定されているか否かを判定し、該判定
により肯定判定した場合にのみ、スタンバイRAM内の
前記特定のデータを書換可能ROMにコピーする。
In the storing process, the standby RAM is used.
RO in which the data in is normal and the history data is rewritable
A determination is made as to whether or not the content is set to indicate that data copying from M to the standby RAM has been completed, and only when the determination is affirmative, the specific data in the standby RAM is copied to the rewritable ROM. I do.

【0017】つまり、本発明の車両用制御装置では、少
なくとも動作開始直後に制御処理に先立って実行される
第1の処理にて、スタンバイRAM内のデータが異常で
あると判定した場合には、とりあえず、通常の書換不能
ROMからスタンバイRAMへ制御対象の制御に最低限
必要な初期値データを書き込んで該スタンバイRAM内
のデータを正常化させる初期化だけを行うと共に、書換
可能ROMからスタンバイRAMへのデータコピー(即
ち、書換可能ROM内の特定のデータをスタンバイRA
Mへコピーすることであり、特定のデータの復元であ
る)が完了しているか否かを示すスタンバイRAM内の
履歴データを、未完了を示す内容に設定するようにして
いる。
That is, in the vehicle control device of the present invention, at least in the first processing executed prior to the control processing immediately after the start of the operation, if it is determined that the data in the standby RAM is abnormal, For the time being, write only the initial value data necessary for the control of the control target from the normal non-rewritable ROM to the standby RAM, and perform only the initialization for normalizing the data in the standby RAM. Data copy (that is, the specific data in the rewritable ROM is
M is copied to M, that is, restoration of specific data), and the history data in the standby RAM indicating whether or not the data has been completed is set to the content indicating incomplete.

【0018】そして、その後、制御処理と並行して定期
的に実行される第2の処理にて、スタンバイRAM内の
データが正常で且つ前記履歴データが未完了を示す内容
であると肯定判定すると、上記第1の処理によりスタン
バイRAMの上記初期化が行われたと判断し、スタンバ
イRAMに供給されている電圧がデータの書き込みを正
常に行うことが可能な電圧値であることを確認した上
で、書換可能ROM内の特定のデータをスタンバイRA
Mへコピーすると共に、スタンバイRAM内の前記履歴
データを、書換可能ROMからスタンバイRAMへのデ
ータコピーが完了したことを示す内容に設定し直すよう
にしている。
After that, in a second process which is periodically executed in parallel with the control process, when it is determined that the data in the standby RAM is normal and the history data has a content indicating incompleteness, the affirmative determination is made. After determining that the initialization of the standby RAM has been performed by the first processing, and confirming that the voltage supplied to the standby RAM is a voltage value at which data can be normally written. , Specific data in the rewritable ROM is transferred to the standby RA.
M, and the history data in the standby RAM is reset to a content indicating that the data copy from the rewritable ROM to the standby RAM is completed.

【0019】このため、本発明の車両用制御装置によれ
ば、スタンバイRAM内のデータが異常であった場合に
は、とりあえず書換不能ROM内の初期値データをスタ
ンバイRAMに書き込んで制御処理を開始させ、その後
で、書換可能ROM内の本来のバックアップデータをス
タンバイRAMへコピーすることとなる。よって、バッ
テリ外れ等によってスタンバイRAM内のデータが破壊
された状態で動作を開始した場合でも、制御処理が開始
されるまでの遅れ時間が長くならず、制御対象を作動さ
せるまでの時間を最小限にすることができる。
Therefore, according to the vehicular control apparatus of the present invention, when the data in the standby RAM is abnormal, the control processing is started by writing the initial value data in the non-rewritable ROM to the standby RAM for the time being. Then, the original backup data in the rewritable ROM is copied to the standby RAM. Therefore, even when the operation is started in a state in which the data in the standby RAM is destroyed due to a missing battery or the like, the delay time before the control processing is started is not long, and the time until the control target is activated is minimized. Can be

【0020】しかも、本発明の車両用制御装置では、第
1の処理にて、スタンバイRAM内のデータが異常と判
定して上記初期化を行った際に、スタンバイRAM内の
履歴データを未完了を示す内容に設定し、第2の処理に
て、書換可能ROM内の特定のデータをスタンバイRA
Mへコピーした際に(データの復元が完了した時に)、
上記履歴データを完了を示す内容に設定し直し、更に、
保存処理では、スタンバイRAM内のデータが正常で且
つ上記履歴データが完了を示す内容に設定されている場
合にのみ、スタンバイRAM内の特定のデータを書換可
能ROMにコピーするようにしている。
Further, in the vehicle control device of the present invention, when the data in the standby RAM is determined to be abnormal in the first processing and the initialization is performed, the history data in the standby RAM is not completed. In the second processing, the specific data in the rewritable ROM is set to the standby RA.
When copying to M (when data restoration is completed)
Reset the history data to the content indicating completion, and further,
In the saving process, specific data in the standby RAM is copied to the rewritable ROM only when the data in the standby RAM is normal and the history data is set to a content indicating completion.

【0021】このため、仮に、第1の処理でスタンバイ
RAMの上記初期化が行われた後に、第2の処理におけ
る電圧判定で否定判定されて、書換可能ROMからスタ
ンバイRAMへのデータコピーが完了していない状況が
発生しても、その状況下において、保存処理によりスタ
ンバイRAM内のデータが書換可能ROMにコピーされ
てしまうことが確実に防止される。
For this reason, if the initialization of the standby RAM is performed in the first processing, a negative determination is made in the voltage determination in the second processing, and the data copy from the rewritable ROM to the standby RAM is completed. Even if a situation where the data is not written is generated, it is possible to reliably prevent the data in the standby RAM from being copied to the rewritable ROM by the saving process in the situation.

【0022】つまり、バッテリ外れ等によってスタンバ
イRAM内のデータが異常となった場合には、「第1の
処理によるスタンバイRAMの初期化」→「第2の処理
による書換可能ROMからスタンバイRAMへのデータ
コピー」→「保存処理によるスタンバイRAMから書換
可能ROMへのデータコピー」というデータ転送順序が
確実に守られることとなり、書換可能ROM内の本来の
バックアップデータを失ってしまうことが確実に防止さ
れるのである。
In other words, if the data in the standby RAM becomes abnormal due to the battery being disconnected, etc., "initialization of the standby RAM by the first processing" → "rewriting from the rewritable ROM to the standby RAM by the second processing" The data transfer order of "data copy" → "data copy from standby RAM to rewritable ROM by storage processing" is reliably maintained, and loss of the original backup data in rewritable ROM is reliably prevented. Because

【0023】よって、本発明の車両用制御装置によれ
ば、「発明が解決しようとする課題」で述べた全ての問
題を解決して、動作を開始してから制御処理を開始する
までの遅れ時間を最小限にすることができると共に、制
御処理で用いるデータの保存及び復元を確実に行うこと
ができるようになる。
Therefore, according to the vehicle control apparatus of the present invention, all the problems described in “Problems to be Solved by the Invention” are solved, and the delay from the start of the operation to the start of the control processing is solved. The time can be minimized, and the data used in the control processing can be reliably saved and restored.

【0024】また更に、本発明の車両用制御装置によれ
ば、上記履歴データをスタンバイRAM内に格納してい
るため、例えば仮に、第1の処理で上記初期化が行われ
てから、第2の処理で書換可能ROMからスタンバイR
AMへのデータコピーが行われるまでの間に、当該装置
への動作電圧が遮断されたとしても、次回に動作電圧が
供給されて当該装置が動作を開始した際に、第2の処理
によって書換可能ROMからスタンバイRAMへのデー
タコピーを確実に行うことができると共に、その第2の
処理によるデータコピーが完了するまでは、保存処理に
よってスタンバイRAMから書換可能ROMへデータが
コピーされてしまうことが無い。
Further, according to the vehicle control device of the present invention, since the history data is stored in the standby RAM, for example, after the initialization is performed in the first process, the second data is stored in the standby RAM. From the rewritable ROM to standby R
Even if the operating voltage to the device is cut off before the data is copied to the AM, the rewriting is performed by the second process when the operating voltage is supplied next time and the device starts operating. The data copy from the possible ROM to the standby RAM can be reliably performed, and the data may be copied from the standby RAM to the rewritable ROM by the storage process until the data copy by the second process is completed. There is no.

【0025】よって、当該装置への動作電圧が断続され
ても、上記データ転送順序を常に確実に守ることがで
き、データの保存及び復元を確実に行うことができる。
尚、本発明の車両用制御装置において、通常時には、ス
タンバイRAM内のデータが正常であると共に、スタン
バイRAM内の上記履歴データが完了を示す内容に設定
されているため、第1の処理では上記初期化が行われ
ず、また、第2の処理では、書換可能ROMからスタン
バイRAMへのデータコピーが行われない。そして、制
御処理と並行して行われる保存処理により、スタンバイ
RAM内の特定のデータが書換可能ROMにコピーされ
て、スタンバイRAM内のデータが破壊された場合に備
えることとなる。
Therefore, even if the operating voltage to the device is interrupted, the data transfer order can always be reliably maintained, and data can be saved and restored reliably.
In the vehicle control device of the present invention, the data in the standby RAM is normal at normal times, and the history data in the standby RAM is set to the content indicating completion. No initialization is performed, and in the second process, data is not copied from the rewritable ROM to the standby RAM. Then, by the storage processing performed in parallel with the control processing, specific data in the standby RAM is copied to the rewritable ROM, so that the data in the standby RAM is destroyed.

【0026】次に、請求項2に記載の車両用制御装置で
は、上記請求項1の車両用制御装置において、前記制御
処理では、前記履歴データが書換可能ROMからスタン
バイRAMへのデータコピーが完了したことを示す内容
に設定されている場合にのみ、スタンバイRAM内の前
記特定のデータを更新する。
According to a second aspect of the present invention, in the vehicle control apparatus according to the first aspect, in the control processing, the copying of the history data from the rewritable ROM to the standby RAM is completed. The specific data in the standby RAM is updated only when the content is set to indicate that the operation has been performed.

【0027】つまり、履歴データが完了を示す内容に設
定されていない場合には、書換可能ROMからスタンバ
イRAMへ、それまでの経緯を継承した本来のデータが
未だコピーされていないため、その時点でスタンバイR
AM内の特定のデータを制御処理によって更新しても意
味が無いためである。そして、このような請求項2の車
両用制御装置によれば、制御処理を効率的に進めること
ができ有利である。
That is, when the history data is not set to the content indicating the completion, the original data inheriting the process up to that time has not yet been copied from the rewritable ROM to the standby RAM. Standby R
This is because there is no point in updating specific data in the AM by control processing. According to the vehicle control device of the second aspect, the control process can be efficiently advanced, which is advantageous.

【0028】[0028]

【発明の実施の形態】以下、本発明の実施形態について
図面を用いて説明する。まず、図1は、車両に搭載され
たエンジンを制御する実施形態の車両用制御装置(以
下、ECUという)1の構成を表わすブロック図であ
る。
Embodiments of the present invention will be described below with reference to the drawings. First, FIG. 1 is a block diagram illustrating a configuration of a vehicle control device (hereinafter, referred to as an ECU) 1 of an embodiment that controls an engine mounted on a vehicle.

【0029】図1に示すように、本実施形態のECU1
は、エンジンを制御するための様々な処理を実行するC
PU3、CPU3により実行されるプログラムや該プロ
グラムの実行時に参照されるデータが格納されたROM
5、CPU3による演算結果を記憶するRAM6とスタ
ンバイRAM(以下、S−RAMと記す)7、及び入出
力インターフェース(I/O)9などを内蔵したマイク
ロコンピュータ(以下、マイコンという)11と、電気
的にデータの書き換えが可能な不揮発性の書換可能RO
MとしてのEEPROM13とを備えている。そして、
マイコン11とEEPROM13は、シリアルデータラ
イン15を介してデータ転送可能に接続されている。
As shown in FIG. 1, the ECU 1 of this embodiment
Executes various processes for controlling the engine.
PU3, ROM storing a program executed by CPU3 and data referred to when the program is executed
5, a microcomputer (hereinafter, referred to as a microcomputer) 11 including a RAM 6 for storing a calculation result by the CPU 3, a standby RAM (hereinafter, referred to as an S-RAM) 7, an input / output interface (I / O) 9, and the like; Nonvolatile rewritable RO that can rewrite data
And an EEPROM 13 as M. And
The microcomputer 11 and the EEPROM 13 are connected via a serial data line 15 so that data can be transferred.

【0030】尚、RAM6とS−RAM7とのうち、S
−RAM7の方には、車両に搭載されたバッテリ27か
ら常時給電される。また、ROM5は、データの書き換
えが不能な不揮発性の読出専用メモリである。そして更
に、ECU1は、車両の走行速度(車速)を検出する車
速センサ17や、エンジンの回転数を検出する回転セン
サ19などの各種センサからの信号を、マイコン11へ
入力させると共に、マイコン11から出力される制御信
号に応じて、インジェクタ21やイグナイタ23などの
アクチュエータを駆動する入出力回路25と、バッテリ
27から車両のイグニッションスイッチ29を介して供
給されるイグニッション電圧VIGを受けて、マイコン1
1やEEPROM13等へ動作電圧VD を供給するメイ
ン電源回路31と、バッテリ27からイグニッションス
イッチ29を介さずに直接供給されるバッテリ電圧VBB
を受けて、マイコン11内のS−RAM7へデータ保持
用のスタンバイ電圧VS を供給するサブ電源回路33と
を備えている。
Note that, of the RAM 6 and the S-RAM 7,
-Power is always supplied to the RAM 7 from the battery 27 mounted on the vehicle. The ROM 5 is a nonvolatile read-only memory in which data cannot be rewritten. Further, the ECU 1 causes the microcomputer 11 to input signals from various sensors such as a vehicle speed sensor 17 for detecting a traveling speed (vehicle speed) of the vehicle and a rotation sensor 19 for detecting the number of revolutions of the engine. The microcomputer 1 receives an input / output circuit 25 for driving actuators such as the injector 21 and the igniter 23 and an ignition voltage VIG supplied from a battery 27 via an ignition switch 29 of the vehicle in response to the output control signal.
1, a main power supply circuit 31 for supplying the operating voltage VD to the EEPROM 13 and the like, and a battery voltage VBB directly supplied from the battery 27 without passing through the ignition switch 29.
And a sub-power supply circuit 33 for supplying a standby voltage VS for holding data to the S-RAM 7 in the microcomputer 11 upon receipt of the signal.

【0031】このようなECU1においては、イグニッ
ションスイッチ29がオンされると、メイン電源回路3
1からマイコン11やEEPROM13等に動作電圧V
D が供給される。そして、マイコン11のCPU3が、
ROM5に格納されたプログラムに従いエンジンを制御
するための制御処理を実行して、各種センサからのセン
サ信号に基づき上記アクチュエータを作動させることに
より、エンジンの制御を行う。
In such an ECU 1, when the ignition switch 29 is turned on, the main power supply circuit 3
1 to the microcomputer 11, the EEPROM 13, etc.
D is supplied. Then, the CPU 3 of the microcomputer 11
A control process for controlling the engine is executed in accordance with a program stored in the ROM 5, and the actuator is operated based on sensor signals from various sensors to control the engine.

【0032】ここで、マイコン11のCPU3は、S−
RAM7を用いて制御処理を行うと共に、その制御処理
で算出するS−RAM7内の各種制御用データのうち、
制御上の学習値データや車両の累積走行距離データな
ど、恒久的に更新して保存しておく必要がある特定のデ
ータ(以下、保存対象データという)については、EE
PROM13にもコピーして保存するようにしている。
そして、S−RAM7内のデータが異常であると判定し
た場合には、EEPROM13内の保存対象データをS
−RAM7へコピーすることにより、バッテリ27が車
両から外される等してS−RAM7内のデータが破壊さ
れたとしても、その保存対象データを失わないようにし
ている。また、ROM5には、上記保存対象データを含
む各種制御用データの初期値(固定の初期値データに相
当)が予め格納されている。
Here, the CPU 3 of the microcomputer 11 executes S-
The control process is performed using the RAM 7, and among the various control data in the S-RAM 7 calculated by the control process,
Specific data that needs to be permanently updated and stored (hereinafter, referred to as storage target data), such as learning value data for control and accumulated mileage data of the vehicle, is referred to as EE.
The data is also copied and stored in the PROM 13.
When it is determined that the data in the S-RAM 7 is abnormal, the storage target data in the
-By copying the data to the RAM 7, even if the data in the S-RAM 7 is destroyed due to the battery 27 being removed from the vehicle or the like, the data to be saved is not lost. The ROM 5 stores in advance initial values (corresponding to fixed initial value data) of various control data including the storage target data.

【0033】そこで次に、このようなECU1のマイコ
ン11で実行される処理について、図2及び図3のフロ
ーチャートに沿って説明する。まず、マイコン11のC
PU3は、イグニッションスイッチ29のオンに伴い動
作を開始(イニシャルスタート)すると、制御処理を開
始する前に、図2(A)に示す第1の処理を実行する。
尚、本実施形態において、この第1の処理は、こうした
イニシャル時(即ち、ECU1の動作開始時)に実行さ
れるだけではなく、その後は、一定時間毎(本実施形態
では65ms毎)に繰り返し実行される。
Next, the processing executed by the microcomputer 11 of the ECU 1 will be described with reference to the flowcharts of FIGS. First, C of the microcomputer 11
When the operation starts (initial start) when the ignition switch 29 is turned on, the PU 3 executes the first processing shown in FIG. 2A before starting the control processing.
In the present embodiment, the first process is not only executed at the time of the initial state (that is, at the time of starting the operation of the ECU 1), but thereafter, is repeated at regular intervals (every 65 ms in the present embodiment). Be executed.

【0034】そして、図2(A)に示すように、この第
1の処理の実行を開始すると、まずステップ(以下
「S」と記す)110にて、S−RAM7内のデータが
異常であるか否かをパリティチェックやミラーリング等
の手法によってチェックし、S−RAM7内のデータが
異常ではない(即ち正常である)と判定した場合には、
そのまま当該第1の処理を終了して、S−RAM7を用
いた制御処理を開始する。
Then, as shown in FIG. 2A, when the execution of the first process is started, first, in step (hereinafter referred to as "S") 110, the data in the S-RAM 7 is abnormal. It is checked whether or not the data in the S-RAM 7 is abnormal (that is, normal) by a method such as parity check or mirroring.
The first process is terminated as it is, and the control process using the S-RAM 7 is started.

【0035】これに対し、上記S110にて、S−RA
M7内のデータが異常であると判定した場合には、S1
20に進んで、S−RAM7内のデータ状態を示すS−
RAM状態変数を、“異常”を示す内容に設定する。
尚、このS−RAM状態変数は、RAM6の所定領域に
格納されているデータであり、その初期値は、RAM6
に対するイニシャル処理(図示省略)によって“正常”
に設定されている。
On the other hand, in S110, S-RA
If it is determined that the data in M7 is abnormal, S1
Proceeding to 20, the S-RAM 7 indicates the data state in the S-RAM 7.
The RAM state variable is set to a content indicating “abnormal”.
The S-RAM state variable is data stored in a predetermined area of the RAM 6, and its initial value is
"Normal" by initial processing (not shown) for
Is set to

【0036】次に、続くS130にて、サブ電源回路3
3からS−RAM7に供給されているスタンバイ電圧V
S がS−RAM7へのデータ書き込みを正常に行うこと
が可能な正常電圧値であるか否かを判定し、正常電圧値
であれば、S−RAM7への書込禁止状態ではないと判
断して、S140に進む。
Next, at S130, the sub power supply circuit 3
3 to the standby voltage V supplied to the S-RAM 7
It is determined whether or not S is a normal voltage value at which data writing to the S-RAM 7 can be normally performed. If S is a normal voltage value, it is determined that the writing to the S-RAM 7 is not in a prohibited state. Then, the process proceeds to S140.

【0037】そして、このS140にて、ROM5から
S−RAM7へ各種制御用データの初期値(初期値デー
タ)を書き込んでS−RAM7内のデータを正常化させ
る初期化を行い、続くS150にて、EEPROM13
からS−RAM7への保存対象データのコピーが完了し
ているか否かを示す履歴データDRを、“未完了”を示
す内容に設定する。尚、この履歴データDRは、S−R
AM7の所定領域に格納されているデータである。
Then, in S140, initialization for writing various control data initial values (initial value data) from the ROM 5 to the S-RAM 7 to normalize the data in the S-RAM 7 is performed, and then in S150. , EEPROM 13
The history data DR indicating whether or not the copying of the data to be saved from the to the S-RAM 7 has been completed is set to the content indicating “incomplete”. Note that this history data DR is SR-R
This is data stored in a predetermined area of AM7.

【0038】そして更に、続くS160にて、上記S−
RAM状態変数を、“正常”を示す内容に設定し直し、
その後、当該第1の処理を終了する。また、上記S13
0にて、S−RAM7への書込禁止状態であると判断し
た場合(つまり、スタンバイ電圧VS が正常電圧値では
ないと判定した場合)には、そのまま当該第1の処理を
一旦終了する。そして、この場合には、当該第1の処理
が次に実行された時に、上記S110でS−RAM7内
のデータが異常であると再び判定されて、S120以降
の処理が再度行われることとなる。
Further, at S160, the S-
Reset the RAM status variable to indicate "normal",
After that, the first process ends. In addition, S13
At 0, if it is determined that the write to the S-RAM 7 is prohibited (that is, if it is determined that the standby voltage VS is not a normal voltage value), the first process is temporarily terminated. Then, in this case, when the first process is next executed, it is again determined in S110 that the data in the S-RAM 7 is abnormal, and the processes after S120 are performed again. .

【0039】次に、マイコン11のCPU3は、イニシ
ャル時に上記第1の処理を行ってから制御処理の実行を
開始することとなるが、その制御処理と並行して、図2
(B)に示す第2の処理と図2(C)に示す保存処理と
を、一定時間毎(本実施形態では16ms毎)に繰り返
し実行する。尚、保存処理は、S−RAM7内の保存対
象データをEEPROM13にコピーして保存するため
の処理であるが、その実質的な保存用の処理は、後述す
る保存条件が成立した場合にのみ行われる。
Next, the CPU 3 of the microcomputer 11 starts executing the control processing after performing the first processing at the time of initializing. In parallel with the control processing, the CPU 3 in FIG.
The second process shown in FIG. 2B and the storage process shown in FIG. 2C are repeatedly executed at regular intervals (in this embodiment, every 16 ms). The saving process is a process for copying the data to be saved in the S-RAM 7 to the EEPROM 13 and saving the data. The substantial saving process is performed only when a later-described saving condition is satisfied. Will be

【0040】まず、図2(B)に示すように、CPU3
が第2の処理の実行を開始すると、最初のS210に
て、RAM6内のS−RAM状態変数を参照することに
より、S−RAM7内のデータが正常であるか否かを判
定する。そして、S−RAM状態変数が“正常”を示す
内容に設定されていれば、S−RAM7内のデータが正
常であると判断して、S220に進み、今度は、S−R
AM7内の上記履歴データDRが“未完了”を示す内容
に設定されているか否かを判定する。
First, as shown in FIG.
Starts the execution of the second process, at first S210, it is determined whether or not the data in the S-RAM 7 is normal by referring to the S-RAM state variable in the RAM 6. If the S-RAM state variable is set to a content indicating "normal", it is determined that the data in the S-RAM 7 is normal, and the process proceeds to S220.
It is determined whether or not the history data DR in the AM 7 is set to a content indicating “incomplete”.

【0041】このS220にて履歴データDRが“未完
了”を示す内容に設定されていると判定した場合には、
前述した第1の処理によってS−RAM7の初期化が行
われたと判断して、S230に進む。S230では、第
1の処理におけるS130と同様に、スタンバイ電圧V
S がS−RAM7へのデータ書き込みを正常に行うこと
が可能な正常電圧値であるか否かを判定し、正常電圧値
であれば、S−RAM7への書込禁止状態ではないと判
断して、S240に進む。そして、このS240にて、
EEPROM13内の保存対象データをS−RAM7へ
コピーし、続くS250にて、S−RAM7内の上記履
歴データDRを、“完了”を示す内容(即ち、EEPR
OM13からS−RAM7へのデータコピーが完了した
ことを示す内容)に設定し直す。そして、その後、当該
第2の処理を終了する。
If it is determined in step S220 that the history data DR is set to indicate "incomplete",
It is determined that the S-RAM 7 has been initialized by the first process described above, and the process proceeds to S230. In S230, as in S130 in the first process, the standby voltage V
It is determined whether or not S is a normal voltage value at which data writing to the S-RAM 7 can be normally performed. If S is a normal voltage value, it is determined that the writing to the S-RAM 7 is not in a prohibited state. Then, the process proceeds to S240. And in this S240,
The data to be stored in the EEPROM 13 is copied to the S-RAM 7, and in S250, the history data DR in the S-RAM 7 is replaced with a content indicating "completion" (ie, EEPROM
(Indicating that the data copy from the OM 13 to the S-RAM 7 has been completed). Then, thereafter, the second process ends.

【0042】また、S210にて、S−RAM7内のデ
ータが正常ではないと判定した場合(即ち、S−RAM
状態変数が“異常”を示す内容に設定されていた場
合)、或いは、S220にて、上記履歴データDRが
“未完了”を示す内容に設定されていないと判定した場
合、或いは、S230にて、S−RAM7への書込禁止
状態であると判断した場合(即ち、スタンバイ電圧VS
が正常電圧値ではないと否定判定した場合)には、その
まま当該第2の処理を一旦終了する。
If it is determined in S210 that the data in the S-RAM 7 is not normal (that is,
When the state variable is set to the content indicating “abnormal”), or when it is determined in S220 that the history data DR is not set to the content indicating “incomplete”, or in S230 , When it is determined that the writing to the S-RAM 7 is prohibited (that is, the standby voltage VS
Is not a normal voltage value), the second process is temporarily terminated.

【0043】次に、図2(C)に示すように、CPU3
が保存処理の実行を開始すると、まず最初のS305に
て、保存条件が成立しているか否かを判定する。この保
存条件は、EEPROM13へのデータ書き込み回数を
減らすために設けられている条件であり、本実施形態で
は、例えば下記及びの条件が共に満たされている場
合に、保存条件が成立していると判定する。
Next, as shown in FIG.
Starts the execution of the saving process, first, in S305, it is determined whether or not the saving condition is satisfied. This storage condition is a condition provided to reduce the number of times of writing data to the EEPROM 13. In the present embodiment, for example, when both of the following conditions are satisfied, it is determined that the storage condition is satisfied. judge.

【0044】:当該ECU1が継続して動作している
期間中に、車速が20km/h以上でエンジン回転数が
2000rpm以上という運転状態があった。 :当該ECU1が継続して動作している期間中に、後
述するS330の処理によってS−RAM7内の保存対
象データがEEPROM13に未だ1回もコピーされて
いない。
During the period in which the ECU 1 is continuously operating, there was an operation state in which the vehicle speed was 20 km / h or more and the engine speed was 2000 rpm or more. : During the period when the ECU 1 is continuously operating, the data to be stored in the S-RAM 7 has not been copied to the EEPROM 13 even once by the processing of S 330 described later.

【0045】つまり、本実施形態では、当該ECU1が
継続して動作している期間中に、上記の条件が成立す
ると、1回だけS−RAM7内の保存対象データをEE
PROM13へコピーするようにしており、これによ
り、EEPROM13へのデータ書き込み回数を必要最
小限に抑えている。
That is, in this embodiment, if the above condition is satisfied during the period when the ECU 1 is continuously operating, the data to be saved in the S-RAM 7 is stored in the S-RAM 7 only once.
The data is copied to the PROM 13 so that the number of times of writing data to the EEPROM 13 is minimized.

【0046】そして、S305にて、上記保存条件が成
立していないと判定した場合には、そのまま当該保存処
理を終了するが、上記保存条件が成立していれば、S3
10に進んで、RAM6内のS−RAM状態変数を参照
することにより、S−RAM7内のデータが正常である
か否かを判定する。
If it is determined in S305 that the storage condition is not satisfied, the storage process is terminated. If the storage condition is satisfied, the process proceeds to S3.
Proceeding to 10, it is determined whether or not the data in the S-RAM 7 is normal by referring to the S-RAM state variable in the RAM 6.

【0047】ここで、S−RAM状態変数が“正常”を
示す内容に設定されていれば、S−RAM7内のデータ
が正常であると判断して、S320に進み、今度は、S
−RAM7内の上記履歴データDRが“完了”を示す内
容に設定されているか否かを判定する。
Here, if the S-RAM state variable is set to a content indicating "normal", it is determined that the data in the S-RAM 7 is normal, and the process proceeds to S320.
It is determined whether or not the history data DR in the RAM 7 is set to a content indicating “completed”.

【0048】そして、S320にて履歴データDRが
“完了”を示す内容に設定されていると判定した場合に
は、S330に進んで、S−RAM7内の保存対象デー
タをEEPROM13にコピーし、その後、当該保存処
理を終了する。また、S310にて、S−RAM7内の
データが正常ではないと判定した場合(即ち、S−RA
M状態変数が“異常”を示す内容に設定されていた場
合)、或いは、S320にて、上記履歴データDRが
“完了”を示す内容に設定されていないと判定した場合
には、そのまま当該保存処理を終了する。
If it is determined in step S320 that the history data DR is set to indicate "complete", the flow advances to step S330 to copy the data to be stored in the S-RAM 7 to the EEPROM 13, and thereafter, Then, the storage process ends. When it is determined in S310 that the data in the S-RAM 7 is not normal (that is, when the
If the M state variable is set to the content indicating “abnormal”), or if it is determined in S320 that the history data DR is not set to the content indicating “complete”, the storage is performed as it is. The process ends.

【0049】尚、バッテリ27のプラス端子とメイン電
源回路31との間に、マイコン11によって制御される
メインリレーを設け、マイコン11が、イグニッション
スイッチ29がオフされた後も上記メインリレーをオン
させ続けて動作を継続できるように構成した場合には、
上記保存条件として、イグニッションスイッチ29がオ
ン状態からオフされた、という条件を加えるようにして
も良い。つまり、この場合には、通常、イグニッション
スイッチ29がオン状態からオフされて、当該ECU1
が動作を停止する前に一回だけ、S−RAM7内の保存
対象データをEEPROM13にコピーすることとな
る。
A main relay controlled by the microcomputer 11 is provided between the plus terminal of the battery 27 and the main power supply circuit 31. The microcomputer 11 turns on the main relay even after the ignition switch 29 is turned off. If you are configured to continue operation,
As the above-mentioned storage condition, a condition that the ignition switch 29 is turned off from the on state may be added. That is, in this case, normally, the ignition switch 29 is turned off from the on state, and the ECU 1
The data to be stored in the S-RAM 7 is copied to the EEPROM 13 only once before the operation stops.

【0050】一方、マイコン11のCPU3は、制御処
理によってS−RAM7内の保存対象データを逐次最新
の内容へと更新しているが、その制御処理では、S−R
AM7内の上記履歴データDRを参照して、その履歴デ
ータDRが“完了”を示す内容に設定されている場合に
のみ、S−RAM7内の保存対象データを更新するよう
にしている。
On the other hand, the CPU 3 of the microcomputer 11 sequentially updates the storage target data in the S-RAM 7 to the latest contents by the control processing.
With reference to the history data DR in the AM 7, the storage target data in the S-RAM 7 is updated only when the history data DR is set to a content indicating "complete".

【0051】例えば、図3は、制御処理のうち、車両の
走行距離を累積して算出するために一定時間T毎に実行
される走行距離算出処理を表すフローチャートである
が、この処理では、まずS410にて、その時の車速か
ら一定時間T内の走行距離Δを算出し、続くS420に
て、S−RAM7内の上記履歴データDRが“完了”を
示す内容に設定されているか否かを判定する。そして、
履歴データDRが“完了”を示す内容に設定されている
場合にのみ、次のS430に進んで、S−RAM7内の
累積走行距離データに上記S410で算出した走行距離
Δを加算して、その累積走行距離データを更新する。
For example, FIG. 3 is a flowchart showing a mileage calculating process executed at regular time intervals T to accumulate and calculate the mileage of the vehicle in the control process. In S410, the travel distance Δ within the fixed time T is calculated from the vehicle speed at that time, and in S420, it is determined whether or not the history data DR in the S-RAM 7 is set to indicate “completed”. I do. And
Only when the history data DR is set to the content indicating “completed”, the process proceeds to the next S430, where the traveling distance Δ calculated in S410 is added to the accumulated traveling distance data in the S-RAM 7, and Update the accumulated mileage data.

【0052】以上のように、本実施形態のECU1で
は、少なくとも動作開始直後に制御処理に先立って実行
される第1の処理にて、S−RAM7内のデータが異常
であるか否かを判定し(S110)、異常と判定した場
合には(S110:YES)、とりあえず、通常のRO
M5からS−RAM7へ各種制御用データの初期値を書
き込んで該S−RAM7内のデータを正常化させる初期
化だけを行うと共に(S140)、EEPROM13か
らS−RAM7への保存対象データのコピーが完了して
いるか否かを示すS−RAM7内の履歴データDRを、
“未完了”を示す内容に設定するようにしている(S1
50)。
As described above, the ECU 1 of this embodiment determines whether or not the data in the S-RAM 7 is abnormal at least in the first processing executed immediately before the start of the operation and prior to the control processing. Then (S110), when it is determined that there is an abnormality (S110: YES), the normal RO
Only the initialization for writing the initial values of various control data from M5 to the S-RAM 7 to normalize the data in the S-RAM 7 is performed (S140), and the copy of the data to be saved from the EEPROM 13 to the S-RAM 7 is performed. The history data DR in the S-RAM 7 indicating whether or not the process has been completed is
The content indicating “incomplete” is set (S1
50).

【0053】そして、その後、制御処理と並行して定期
的に実行される第2の処理にて、S−RAM7内のデー
タが正常で且つ上記履歴データDRが“未完了”を示す
内容であると肯定判定すると(S210及びS220:
YES)、上記第1の処理によってS−RAM7の上記
初期化が行われたと判断し、S−RAM7に供給されて
いるスタンバイ電圧VS が正常電圧値であることを確認
した上で(S230:NO)、EEPROM13内の保
存対象データをS−RAM7へコピーすると共に(S2
40)、S−RAM7内の上記履歴データDRを、“完
了”を示す内容に設定し直すようにしている(S25
0)。
Then, in a second process which is periodically executed in parallel with the control process, the data in the S-RAM 7 is normal and the history data DR has a content indicating "incomplete". (S210 and S220:
YES), it is determined that the initialization of the S-RAM 7 has been performed by the first processing, and after confirming that the standby voltage VS supplied to the S-RAM 7 is a normal voltage value (S230: NO) ), And copy the data to be stored in the EEPROM 13 to the S-RAM 7 (S2).
40), the history data DR in the S-RAM 7 is reset to the content indicating "complete" (S25).
0).

【0054】このため、本実施形態のECU1によれ
ば、S−RAM7内のデータが異常であった場合には、
とりあえず固定の初期値データをS−RAM7に書き込
んで制御処理を開始させ、その後で、EEPROM13
内の本来のバックアップデータをS−RAM7へコピー
することとなる。よって、バッテリ外れ等によってS−
RAM7内のデータが破壊された状態で動作を開始した
場合でも、制御処理が開始されるまでの遅れ時間が長く
ならず、制御対象を作動させるまでの時間を最小限にす
ることができる。
Therefore, according to the ECU 1 of this embodiment, if the data in the S-RAM 7 is abnormal,
For the time being, fixed initial value data is written into the S-RAM 7 to start the control processing.
Is copied to the S-RAM 7. Therefore, S-
Even when the operation is started in a state where the data in the RAM 7 has been destroyed, the delay time before the control processing is started is not long, and the time until the controlled object is activated can be minimized.

【0055】しかも、本実施形態のECU1では、第1
の処理にて、S−RAM7内のデータが異常と判定して
上記初期化を行った際に、S−RAM7内の履歴データ
DRを“未完了”を示す内容に設定し(S150)、第
2の処理にて、EEPROM内の保存対象データをS−
RAM7へコピーした際に(データの復元が完了した時
に)、上記履歴データDRを“完了”を示す内容に設定
し直し(S250)、更に、定期的に実行される保存処
理では、S−RAM7内のデータが正常で且つ上記履歴
データDRが“完了”を示す内容に設定されている場合
にのみ(S310及びS320:YES)、S−RAM
7内の保存対象データをEEPROM13にコピーする
ようにしている(S330)。
Further, in the ECU 1 of the present embodiment, the first
In the process (1), when the data in the S-RAM 7 is determined to be abnormal and the initialization is performed, the history data DR in the S-RAM 7 is set to a content indicating "incomplete" (S150). In the processing of step 2, the data to be stored in the EEPROM is
When the data is copied to the RAM 7 (when the data restoration is completed), the history data DR is reset to the content indicating “completed” (S250). Only when the data in the file is normal and the history data DR is set to the content indicating “completed” (S310 and S320: YES), the S-RAM
7 is copied to the EEPROM 13 (S330).

【0056】このため、仮に、第1の処理におけるS1
40でS−RAM7の初期化が行われた後に、第2の処
理におけるS230の電圧判定でスタンバイ電圧VS が
正常電圧値ではないと否定判定されて(書込禁止状態で
あると判定されて)、EEPROM13からS−RAM
7へのデータコピーが完了していない状況が発生して
も、その状況下において、保存処理によりS−RAM7
内のデータがEEPROM13にコピーされてしまうこ
とが、確実に防止される。
Therefore, suppose that S1 in the first processing is
After the initialization of the S-RAM 7 is performed in 40, it is determined that the standby voltage VS is not a normal voltage value in the voltage determination in S230 in the second process (negative determination is made in the write-protected state). , EEPROM 13 to S-RAM
Even if a situation occurs in which the data copy to the S-RAM 7 has not been completed, the S-RAM 7
Copying of data in the EEPROM 13 to the EEPROM 13 is reliably prevented.

【0057】つまり、バッテリ外れ等によってS−RA
M7内のデータが異常となった場合には、「第1の処理
によるS−RAM7の初期化」→「第2の処理によるE
EPROM13からS−RAM7へのデータコピー」→
「保存処理によるS−RAM7からEEPROM13へ
のデータコピー」というデータ転送順序が確実に守られ
ることとなり、EEPROM13内の本来のバックアッ
プデータを失ってしまうことが確実に防止されるのであ
る。
That is, when the battery is disconnected, the S-RA
If the data in M7 becomes abnormal, “initialization of S-RAM 7 by first processing” → “E-RAM by second processing”
Data Copy from EPROM 13 to S-RAM 7 "→
The data transfer order of "copying data from the S-RAM 7 to the EEPROM 13 by the preservation process" is reliably maintained, and loss of the original backup data in the EEPROM 13 is reliably prevented.

【0058】よって、本実施形態のECU1によれば、
動作を開始してから制御処理を開始するまでの遅れ時間
を最小限にすることができると共に、制御処理で用いる
データの保存及び復元を確実に行うことができる。そし
て更に、本実施形態のECU1によれば、上記履歴デー
タDRをS−RAM7内に格納しているため、仮に、第
1の処理でS−RAM7の初期化が行われてから、第2
の処理におけるS240でEEPROM13からS−R
AM7へのデータコピーが行われるまでの間に、イグニ
ッションスイッチ29がオフされてメイン電源回路31
からの動作電圧VD が遮断されたとしても、次回に動作
電圧VD が供給されて当該ECU1が動作を開始した際
に、第2の処理によってEEPROM13からS−RA
M7へのデータコピーを確実に行うことができ、しか
も、EEPROM13からS−RAM7へのデータコピ
ーが完了するまでは、保存処理によってS−RAM7か
らEEPROM13へデータがコピーされてしまうこと
が無い。よって、動作電圧VD が断続されても、上記デ
ータ転送順序を常に確実に守ることができ、データの保
存及び復元を確実に行うことができる。
Therefore, according to the ECU 1 of the present embodiment,
The delay time from the start of the operation to the start of the control processing can be minimized, and the data used in the control processing can be reliably stored and restored. Further, according to the ECU 1 of the present embodiment, since the history data DR is stored in the S-RAM 7, if the initialization of the S-RAM 7 is performed in the first process, the second
In S240 in the process of S-R from the EEPROM 13
By the time the data is copied to the AM 7, the ignition switch 29 is turned off and the main power supply circuit 31 is turned off.
Even if the operating voltage VD is interrupted, when the operating voltage VD is supplied the next time and the ECU 1 starts operating, the S-RA
The data copy to the M7 can be reliably performed, and the data is not copied from the S-RAM 7 to the EEPROM 13 by the storage process until the data copy from the EEPROM 13 to the S-RAM 7 is completed. Therefore, even if the operating voltage VD is intermittent, the data transfer order can always be reliably maintained, and data can be saved and restored reliably.

【0059】また、本実施形態のECU1では、制御処
理において、S−RAM7内の上記履歴データDRを参
照し、その履歴データDRが、EEPROM13からS
−RAM7へのデータコピーが完了したことを示す内容
に設定されている場合にのみ、S−RAM7内の保存対
象データを更新するようにしている。よって、制御処理
を効率的に進めることができる。つまり、履歴データD
Rが“未完了”を示す内容に設定されている場合には、
EEPROM13からS−RAM7へ、それまでの経緯
を継承した本来の保存対象データが未だコピーされてい
ないため、その時点でS−RAM7内の保存対象データ
を制御処理によって更新しても意味が無いためである。
In the ECU 1 of this embodiment, in the control processing, the history data DR in the S-RAM 7 is referred to, and the history data DR is read from the EEPROM 13 by the S
-The storage target data in the S-RAM 7 is updated only when the content indicating that the data copy to the RAM 7 is completed is set. Therefore, the control process can proceed efficiently. That is, the history data D
If R is set to indicate "incomplete",
Since the original data to be saved, which inherits the process up to that point, has not yet been copied from the EEPROM 13 to the S-RAM 7, it is meaningless to update the data to be saved in the S-RAM 7 at that time by control processing. It is.

【0060】尚、本実施形態のECU1において、通常
時には、S−RAM7内のデータが正常であると共に、
S−RAM7内の上記履歴データDRが“完了”を示す
内容に設定されているため、第1の処理ではS−RAM
7の初期化が行われず、また、第2の処理ではEEPR
OM13からS−RAM7へのデータコピーが行われな
い。そして、制御処理と並行して行われる保存処理によ
り、S−RAM7内の保存対象データがEEPROM1
3にコピーされて、S−RAM7内のデータが破壊され
た場合に備えることとなる。
In the ECU 1 of this embodiment, the data in the S-RAM 7 is normal at normal times,
Since the history data DR in the S-RAM 7 is set to indicate “completed”, the first process uses the S-RAM
7 is not initialized, and in the second process, the EEPR
Data copy from the OM 13 to the S-RAM 7 is not performed. The data to be stored in the S-RAM 7 is stored in the EEPROM 1 by the storage processing performed in parallel with the control processing.
3 and the data in the S-RAM 7 is destroyed.

【0061】以上、本発明の一実施形態について説明し
たが、本発明は、種々の形態を採り得ることは言うまで
もない。例えば、上記実施形態では、第2の処理のS2
10と保存処理のS310とにおいて、RAM6内のS
−RAM状態変数を参照することにより、S−RAM7
内のデータが正常であるか否かを判定するようにした
が、そのS210とS310では、S110と同様に、
S−RAM7内のデータが正常であるか否かをパリティ
チェックやミラーリング等の手法によってチェックする
ようにしても良い。
The embodiment of the present invention has been described above, but it goes without saying that the present invention can take various forms. For example, in the above embodiment, S2 of the second processing
10 and S310 of the storage process,
S-RAM7 by referring to RAM state variables
It is determined whether or not the data inside is normal. In S210 and S310, similar to S110,
Whether the data in the S-RAM 7 is normal may be checked by a method such as parity check or mirroring.

【0062】また、上記実施形態では、図2に示したよ
うに、第2の処理と保存処理とが別々に分かれていた
が、図2(B)の第2の処理に続いて図2(C)の保存
処理が行われるようにしても、全く同様の効果を得るこ
とができる。一方、上記実施形態のECU1は、車両の
エンジンを制御するものであったが、例えば自動変速機
など、他の制御対象を制御する装置についても全く同様
に構成することができる。
Further, in the above-described embodiment, the second processing and the storage processing are separately performed as shown in FIG. 2, but the second processing in FIG. Even if the storage process of C) is performed, exactly the same effect can be obtained. On the other hand, the ECU 1 of the above-described embodiment controls the engine of the vehicle. However, a device that controls another control target, such as an automatic transmission, may be configured in exactly the same manner.

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

【図1】 実施形態の車両用制御装置(ECU)の構成
を表すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of a vehicle control device (ECU) according to an embodiment.

【図2】 実施形態のECUのマイコンで実行される第
1の処理と第2の処理と保存処理とを表すフローチャー
トである。
FIG. 2 is a flowchart illustrating a first process, a second process, and a storage process executed by a microcomputer of the ECU according to the embodiment.

【図3】 実施形態のECUのマイコンで実行される制
御処理の一部内容を表すフローチャートである。
FIG. 3 is a flowchart illustrating a part of a control process executed by a microcomputer of an ECU according to the embodiment.

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

1…ECU(車両用制御装置) 3…CPU 5…
ROM 7…S−RAM(スタンバイRAM) 11…マイコ
ン 13…EEPROM 15…シリアルデータライン
17…車速センサ 19…回転センサ 21…インジェクタ 23…イ
グナイタ 25…入出力回路 27…バッテリ 29…イグニ
ッションスイッチ 31…メイン電源回路 33…サブ電源回路
DESCRIPTION OF SYMBOLS 1 ... ECU (Vehicle control device) 3 ... CPU 5 ...
ROM 7: S-RAM (standby RAM) 11: microcomputer 13: EEPROM 15: serial data line
Reference Signs List 17 vehicle speed sensor 19 rotation sensor 21 injector 23 igniter 25 input / output circuit 27 battery 29 ignition switch 31 main power supply circuit 33 sub power supply circuit

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 車両に搭載されたバッテリから常時給電
されるスタンバイRAMを用いて、前記車両内の制御対
象を制御するための制御処理を行うと共に、該制御処理
によって算出される前記スタンバイRAM内の特定のデ
ータを電気的にデータの書き換えが可能な不揮発性の書
換可能ROMにコピーして保存する保存処理を行い、更
に、前記スタンバイRAM内のデータが異常であると判
定した場合には、前記書換可能ROM内の前記特定のデ
ータを前記スタンバイRAMへコピーすることにより、
前記特定のデータを復元するように構成された車両用制
御装置において、 少なくとも当該装置が動作を開始して前記制御処理を開
始する前に実行される処理であって、前記スタンバイR
AM内のデータが異常か否かを判定し、異常であると判
定した場合には、データの書き換えが不能な不揮発性の
書換不能ROMから前記スタンバイRAMへ初期値デー
タを書き込んで該スタンバイRAM内のデータを正常化
させる初期化を行い、更に、前記書換可能ROMから前
記スタンバイRAMへのデータコピーが完了しているか
否かを示す前記スタンバイRAMの所定領域内の履歴デ
ータを、未完了を示す内容に設定する第1の処理と、 前記制御処理と並行して定期的に実行される処理であっ
て、前記スタンバイRAM内のデータが正常で且つ前記
履歴データが未完了を示す内容であるか否かを判定し、
該判定により肯定判定すると、更に、前記スタンバイR
AMに供給されている電圧がデータの書き込みを正常に
行うことが可能な電圧値であるか否かを判定して、該電
圧判定により肯定判定した場合に、前記書換可能ROM
内の前記特定のデータを前記スタンバイRAMへコピー
すると共に、前記履歴データを、前記書換可能ROMか
ら前記スタンバイRAMへのデータコピーが完了したこ
とを示す内容に設定し直す第2の処理とを行い、 更に、前記保存処理では、前記スタンバイRAM内のデ
ータが正常で且つ前記履歴データが前記書換可能ROM
から前記スタンバイRAMへのデータコピーが完了した
ことを示す内容に設定されているか否かを判定し、該判
定により肯定判定した場合にのみ、前記スタンバイRA
M内の前記特定のデータを前記書換可能ROMにコピー
すること、 を特徴とする車両用制御装置。
A control process for controlling a control target in the vehicle is performed by using a standby RAM constantly supplied with power from a battery mounted on the vehicle, and the standby RAM calculated by the control process is controlled by the control process. Performing a save process of copying and storing the specific data in a nonvolatile rewritable ROM in which data can be electrically rewritten, and further, when it is determined that the data in the standby RAM is abnormal, By copying the specific data in the rewritable ROM to the standby RAM,
In the vehicle control device configured to restore the specific data, at least a process that is executed before the device starts operating and starts the control process, wherein the standby R
It is determined whether or not the data in the AM is abnormal. If it is determined that the data is abnormal, the initial value data is written from the nonvolatile non-rewritable ROM in which data cannot be rewritten to the standby RAM, and Initialization for normalizing the data of the standby RAM is further performed, and the history data in a predetermined area of the standby RAM, which indicates whether data copying from the rewritable ROM to the standby RAM has been completed, is indicated as incomplete. A first process for setting the content, and a process periodically executed in parallel with the control process, wherein the data in the standby RAM is normal and the history data is content indicating incomplete. Judge whether or not
If the determination is affirmative, the standby R
It is determined whether or not the voltage supplied to the AM is a voltage value at which data can be normally written. If the voltage determination is affirmative, the rewritable ROM is used.
And copying the specific data in the standby RAM to the standby RAM, and resetting the history data to contents indicating that the data copy from the rewritable ROM to the standby RAM is completed. Further, in the storing process, the data in the standby RAM is normal and the history data is stored in the rewritable ROM.
It is determined whether or not the content is set to indicate that the data copy to the standby RAM has been completed. Only when the determination is affirmative, the standby RA
M. The specific data in M is copied to the rewritable ROM.
【請求項2】 請求項1に記載の車両用制御装置におい
て、 前記制御処理では、前記履歴データが前記書換可能RO
Mから前記スタンバイRAMへのデータコピーが完了し
たことを示す内容に設定されている場合にのみ、前記ス
タンバイRAM内の前記特定のデータを更新すること、 を特徴とする車両用制御装置。
2. The vehicle control device according to claim 1, wherein in the control processing, the history data is the rewritable RO.
A control device for a vehicle, characterized in that the specific data in the standby RAM is updated only when the content indicating that data copying from the M to the standby RAM is completed is set.
JP25200799A 1999-09-06 1999-09-06 Vehicle control device Expired - Lifetime JP3551855B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25200799A JP3551855B2 (en) 1999-09-06 1999-09-06 Vehicle control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25200799A JP3551855B2 (en) 1999-09-06 1999-09-06 Vehicle control device

Publications (2)

Publication Number Publication Date
JP2001073864A true JP2001073864A (en) 2001-03-21
JP3551855B2 JP3551855B2 (en) 2004-08-11

Family

ID=17231281

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25200799A Expired - Lifetime JP3551855B2 (en) 1999-09-06 1999-09-06 Vehicle control device

Country Status (1)

Country Link
JP (1) JP3551855B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006023163A (en) * 2004-07-07 2006-01-26 Victor Co Of Japan Ltd Data storage device for vehicle-mounted apparatus
JP2013116044A (en) * 2011-11-25 2013-06-10 Ls Industrial Systems Co Ltd Electric vehicle and program application method for the same
JP7430016B1 (en) 2023-04-28 2024-02-09 株式会社ユニバーサルエンターテインメント Gaming devices and gaming systems

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006023163A (en) * 2004-07-07 2006-01-26 Victor Co Of Japan Ltd Data storage device for vehicle-mounted apparatus
JP2013116044A (en) * 2011-11-25 2013-06-10 Ls Industrial Systems Co Ltd Electric vehicle and program application method for the same
US9090166B2 (en) 2011-11-25 2015-07-28 Lsis Co., Ltd. Method of managing program for electric vehicle
EP2604470A3 (en) * 2011-11-25 2017-03-29 LSIS Co., Ltd. Method of managing program for electric vehicle
JP7430016B1 (en) 2023-04-28 2024-02-09 株式会社ユニバーサルエンターテインメント Gaming devices and gaming systems

Also Published As

Publication number Publication date
JP3551855B2 (en) 2004-08-11

Similar Documents

Publication Publication Date Title
JP4345860B2 (en) Vehicle memory management device
US6401163B1 (en) Apparatus and method for rewriting data from volatile memory to nonvolatile memory
JP5176728B2 (en) Electronic control device for vehicle
JP3932654B2 (en) Vehicle control device and vehicle control system
US5095438A (en) Engine controller with low voltage reset
JP2003256228A (en) Program rewriting device
JP3969278B2 (en) Electronic control unit
JPH11107846A (en) Vehicular controller
JP4333745B2 (en) Electronic control unit
JPH11238005A (en) Electronic controller and control system
US6182004B1 (en) Apparatus and method for controlling electric power supply in nonvolatile memory rewriting operation
JP3870563B2 (en) Electronic control device and non-volatile memory rewrite count method
US6243630B1 (en) Vehicle control system
JP4001088B2 (en) Electronic control unit
JP2002041367A (en) Vehicle controller
JP3551855B2 (en) Vehicle control device
JP2007162586A (en) On-vehicle control device
JP4760103B2 (en) Vehicle information backup device
JP2008196441A (en) Control device for vehicle
JP2007062632A (en) Electronic control unit and storing method of data for abnormality generated time storage
JP3960212B2 (en) Electronic control unit
JPH11141391A (en) Controller for automobile
JPH05289949A (en) Vehicle control device
JPH10252547A (en) Vehicle control device
JPH09171459A (en) Electronic control equipment

Legal Events

Date Code Title Description
TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040406

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040419

R150 Certificate of patent or registration of utility model

Ref document number: 3551855

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110514

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120514

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20120514

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130514

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20140514

Year of fee payment: 10

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term