JPH11232181A - Abnormally detector for battery backup ram - Google Patents

Abnormally detector for battery backup ram

Info

Publication number
JPH11232181A
JPH11232181A JP10048886A JP4888698A JPH11232181A JP H11232181 A JPH11232181 A JP H11232181A JP 10048886 A JP10048886 A JP 10048886A JP 4888698 A JP4888698 A JP 4888698A JP H11232181 A JPH11232181 A JP H11232181A
Authority
JP
Japan
Prior art keywords
backup ram
abnormality
power supply
data
battery
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
JP10048886A
Other languages
Japanese (ja)
Inventor
Seiji Hashimoto
省二 橋本
Hiroki Mori
広樹 森
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 JP10048886A priority Critical patent/JPH11232181A/en
Publication of JPH11232181A publication Critical patent/JPH11232181A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To detect a true abnormality in a battery backup RAM. SOLUTION: In a computer system on which this battery backup RAM 13 is mounted, the feeding state of a backup power supply line 20 is detected and a keyword written on the RAM 13 and data written on a ROM 7 are compared. Only when the feeding state of the line 20 is normal and also the noncoincidence of keyword data is decided, the RAM 13 is decided as a true failure. In the case of an abnormality in the feeding state, the line 20 is decided as abnormal. Also, when it is continuously decided as abnormal, the number of times is written in a nonvolatile EEPROM, and when counted value is larger than a prescribed value, it is decided as a permanent failure. It is thus possible to surely detect a true abnormality in a backup RAM.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、電源遮断後も、バ
ッテリによりデ−タを保持できるバッテリバックアップ
RAMの検査装置に関し、特に、バックアップRAM自
体の異常を検出する検出装置に関する。本装置は、例え
ば、バッテリバックアップRAMに制御数値を学習値と
して記憶したエンジン制御装置におけるバックアップR
AMの異常検出装置に用いることができる。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a battery backup RAM inspection device capable of retaining data by a battery even after power is turned off, and more particularly to a detection device for detecting an abnormality in a backup RAM itself. This device is, for example, a backup R in an engine control device in which a control value is stored as a learning value in a battery backup RAM.
It can be used in an AM abnormality detection device.

【0002】[0002]

【従来の技術】従来、CPU(中央演算処理ユニット)
を用いた制御装置は、大きく、プログラムが書かれたR
OM(リ−ドオンリ−メモリ)、作業領域メモリである
RAM(ランダムアクセスメモリ)および外部との入出
力インタ−フェ−スであるI/Oインタ−フェ−ス等か
ら構成される。近年では、ROMには、電気的に消去あ
るいは書き込み可能なフラッシュROMやEEPROM
が、RAMには、静的な電源電圧で記憶が保持されるS
RAM(スタティックラム)と、動的なパルス(リフレ
ッシュパルス)で記憶が保持されるDRAM(ダイナミ
ックラム)がある。SRAMはバッテリで記憶が保持さ
れるバックアップRAM等に使用される。これらは、制
御機器の使用目的によって、それぞれ使い分けられる。
2. Description of the Related Art Conventionally, a CPU (Central Processing Unit)
Is large, the program is written in R
It comprises an OM (read only memory), a RAM (random access memory) as a work area memory, an I / O interface as an input / output interface with the outside, and the like. In recent years, flash ROMs and EEPROMs that can be electrically erased or written
However, the RAM holds the memory at a static power supply voltage S
There are a RAM (static ram) and a DRAM (dynamic ram) whose data is held by a dynamic pulse (refresh pulse). The SRAM is used as a backup RAM or the like whose storage is held by a battery. These are used properly depending on the purpose of use of the control device.

【0003】車両用内燃機関に使用される燃料噴射制御
装置も、上記同様のコンピュ−タシステムによって構成
されている。燃料噴射制御装置では、適切な空燃比の混
合ガスを得るために、車両の状態を各種センサで検出
し、CPUが、具備するメモリを利用して演算処理し、
燃料噴射弁等のアクチュエ−タを作動させている。そし
て、噴射タイミングや噴射量等の前回の制御値は、学習
値として、バックアップRAMに記憶され、次回のエン
ジンスタート時の制御値として用いられる。バックアッ
プRAMは、車両のイグニッションスイッチ(起動スイ
ッチ)をオフにしても、上記学習値が保持されるメモリ
である。そして、このバックアップRAMを作動させる
ための電源(バックアップ電源)としては、一般に車載
バッテリが用いられている。
[0003] A fuel injection control device used in an internal combustion engine for a vehicle is also constituted by a computer system similar to the above. In the fuel injection control device, in order to obtain a mixed gas having an appropriate air-fuel ratio, the state of the vehicle is detected by various sensors, and the CPU performs arithmetic processing using a memory provided therein,
Actuators such as fuel injection valves are operated. The previous control values such as the injection timing and the injection amount are stored in the backup RAM as learning values, and are used as control values at the time of the next engine start. The backup RAM is a memory that retains the learning value even when the ignition switch (start switch) of the vehicle is turned off. As a power supply (backup power supply) for operating the backup RAM, an in-vehicle battery is generally used.

【0004】しかしながら、バックアップRAMにおい
ては、これに印加される実際の電圧(バックアップ電
圧)が、同バックアップRAMを作動させるのに必要な
電圧より低下することがある。それは、車載バッテリの
電圧が低下したり、バックアップ電源ラインが断線した
り、バックアップ電源ラインから車載バッテリが外れた
りする場合に起こる。すると、バックアップRAMに記
憶されているデ−タが破壊され、それをそのままの状態
で使用すると、誤ったデ−タによってアクチュエ−タが
作動されるという問題があった。
However, in the backup RAM, the actual voltage (backup voltage) applied thereto may be lower than the voltage required to operate the backup RAM. This occurs when the voltage of the vehicle-mounted battery drops, the backup power supply line is disconnected, or the vehicle-mounted battery is disconnected from the backup power supply line. Then, there is a problem that the data stored in the backup RAM is destroyed, and if the data is used as it is, the actuator is operated by erroneous data.

【0005】また、バックアップRAMは複数のIC
(集積回路)がプリント基板に半田付けされた状態で車
輌に搭載される場合があり、その中に潜在的な半田付け
不良があると、車輌の激しい振動等で、剥離し、バック
アップRAMの一部が破壊されることがある。このよう
な場合にも、最適なエンジン制御ができなくなるという
問題があった。
The backup RAM is composed of a plurality of ICs.
In some cases, the (integrated circuit) is mounted on a vehicle in a state of being soldered to a printed circuit board. If there is a potential soldering failure, the integrated circuit is peeled off due to severe vibration of the vehicle and the like, and one of the backup RAMs is removed. The part may be destroyed. Even in such a case, there is a problem that optimal engine control cannot be performed.

【0006】従来、これらの問題を解決する方法として
は、特開平7−52732号公報に記載のバッテリ断線
検出装置が知られている。その構成を図8に示す。簡単
に説明すると、コンピュ−タシステムの要素であるRO
Mの一部に上述のEEPROM10を、RAMの一部に
バックアップRAM13を採用する。上記イグニション
スイッチ19がONされるごとに、例えばバックアップ
電圧であるスタンバイ電圧VSTBYを監視し、その電圧が
規定値以下であると、その結果をEEPROM10に書
き込む。連続して書き込まれた回数が、所定の回数を上
回るとバックアップ電源ライン異常と判断することが特
徴である。また、上記EEPROM10とバックアップ
RAM13に同じキ−ワ−ドを書き込み、同じくイグニ
ションスイッチがONされるごとに、そのキ−ワ−ドを
比較する。一致しない場合、同様にEEPROM10に
その結果を書き込む。連続して書き込まれた回数が、所
定の回数を上回るとバックアップ電源ライン異常と判断
するものである。
Conventionally, as a method of solving these problems, there is known a battery disconnection detecting device described in Japanese Patent Application Laid-Open No. 7-52732. FIG. 8 shows the configuration. Briefly, RO, which is an element of a computer system,
The above-described EEPROM 10 is used as a part of M, and the backup RAM 13 is used as a part of RAM. Each time the ignition switch 19 is turned on, for example, a standby voltage VSTBY, which is a backup voltage, is monitored, and if the voltage is equal to or lower than a specified value, the result is written to the EEPROM 10. When the number of times of continuous writing exceeds a predetermined number, it is characterized that a backup power supply line abnormality is determined. The same keyword is written in the EEPROM 10 and the backup RAM 13, and the keyword is compared every time the ignition switch is turned on. If they do not match, the result is similarly written to the EEPROM 10. If the number of consecutive writings exceeds a predetermined number, it is determined that the backup power supply line is abnormal.

【0007】上述の装置によれば、バックアップ電源ラ
インの電圧低下の回数をEEPROM10に書き込み、
その書き込みが連続して所定の回数を上回った時のみ永
続的な断線と判断し、単発的な電圧降下、すなわち修理
等で発生するバックアップ電源ラインの取り外しと区別
でき、確実な断線検出ができるとしていた。
According to the above-described device, the number of times of voltage drop of the backup power supply line is written in the EEPROM 10,
Only when the writing exceeds a predetermined number of times continuously is determined to be a permanent disconnection, it can be distinguished from a single voltage drop, that is, removal of the backup power supply line that occurs due to repair etc., and it is possible to reliably detect disconnection Was.

【0008】[0008]

【発明が解決しようする課題】しかしながら、上述の装
置は、車載バッテリからバックアップRAMへの電力供
給の低下、あるいは遮断が発生した場合のバックアップ
電源ラインの異常を検出するものであり、真正のバック
アップRAM異常(バックアップRAM自体の異常)の
検出を目的とはしていない。例えば、書き込まれたキ−
ワ−ドの不一致は、キ−ワ−ドが書き込まれた素子の破
壊か、あるいは断線等によるデータの消失かのどちらか
であり、それを区別するものではなかった。また、キ−
ワ−ドが書き込まれた以外の素子に異常が生じた場合
は、その異常を検出することはできなかった。従って、
従来と同じ誤作動をするという問題が残されていた。
However, the above-described device detects an abnormality in the backup power supply line when the power supply from the vehicle-mounted battery to the backup RAM is reduced or interrupted. It is not intended to detect an abnormality (an abnormality in the backup RAM itself). For example, a written key
The word mismatch is either a destruction of the element in which the keyword is written or a loss of data due to a disconnection or the like, and does not distinguish between them. Also, the key
If an error occurred in an element other than the one in which the word was written, the error could not be detected. Therefore,
The problem of malfunctioning as before has been left.

【0009】本発明は、上述した問題点を解決するため
になされたものであり、バッテリによりデ−タを保持で
きるバッテリバックアップRAMの異常検出装置に関
し、バックアップ給電路からの給電状態の異常によるも
のと、真正のバックアップRAM異常(バックアップR
AM自体の異常)があることに注目し、バックアップR
AMのキ−ワ−ド検査の方法によって、完全にその両者
を区別し、真正のバックアップRAM異常を検出するこ
とを目的としている。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems, and relates to a battery backup RAM abnormality detecting device capable of holding data by a battery. And a genuine backup RAM error (backup R
Note that there is an abnormality in the AM itself)
It is an object of the present invention to completely distinguish between the two by the AM keyword inspection method and to detect a genuine backup RAM abnormality.

【0010】[0010]

【課題を解決するための手段】請求項1の発明は、主ス
イッチがオフする前に、バッテリバックアップRAMの
所定アドレスに所定データを書込み、次回に主スイッチ
がオンした時に、バッテリバックアップRAMの所定ア
ドレスのデータを読出し、このデータが所定データに一
致するか否かを判定し、バックアップ給電路を介したバ
ッテリバックアップRAMへの給電状態が正常である場
合において、データが不一致と判定された時に、不一致
であることを示すデータを書込可能不揮発性メモリに書
き込み、その書込可能不揮発性メモリに記憶されたデー
タに基づきバッテリバックアップRAMを異常と判定す
る装置である。
According to a first aspect of the present invention, a predetermined data is written to a predetermined address of a battery backup RAM before the main switch is turned off, and a predetermined data of the battery backup RAM is stored next time the main switch is turned on. The data at the address is read, and it is determined whether or not this data matches the predetermined data. When the power supply state to the battery backup RAM via the backup power supply path is normal, when it is determined that the data does not match, This is an apparatus that writes data indicating mismatch to a writable nonvolatile memory and determines that the battery backup RAM is abnormal based on the data stored in the writable nonvolatile memory.

【0011】このように、バックアップ給電路の給電状
態が正常である場合において、主スイッチがオフしてい
る間のバックアップRAMのデータに異常があれば、R
AM異常として、書込可能不揮発性メモリに記憶され
る。よって、データの破壊がバックアップ給電路による
断線等により給電が停止されたためか、バッテリバック
アップRAMの真正な故障かを明確に区別することがで
きる。
As described above, when the power supply state of the backup power supply path is normal and there is an abnormality in the data in the backup RAM while the main switch is off, R
It is stored in the writable nonvolatile memory as an AM abnormality. Therefore, it is possible to clearly distinguish whether the data is destroyed because power supply is stopped due to disconnection of the backup power supply path or the like or a genuine failure of the battery backup RAM.

【0012】請求項2のバッテリバックアップRAMの
異常検出装置によれば、一致判定手段は不一致を連続し
て判定した場合に、書込可能不揮発性モメリにその不一
致回数を記憶させ、RAM異常判定手段はその連続して
発生した不一致回数が所定回数以上である場合に異常と
判定するRAM異常判定手段を備えている。その結果、
一時的な不一致が除外され、バッテリバックアップRA
M自体に連続的な異常(不一致)がある時のみ、真正な
バックアップRAM異常と判断する。従って、確実に真
正異常を検出するバッテリバックアップRAMの異常検
出装置となる。
According to the battery backup RAM abnormality detecting device of the second aspect, when the coincidence determining means continuously determines the mismatch, the number of mismatches is stored in the writable nonvolatile memory, and the RAM abnormality determining means is provided. Is provided with a RAM abnormality judging means for judging an abnormality when the number of consecutive mismatches is equal to or more than a predetermined number. as a result,
Temporary inconsistencies are excluded and battery backup RA
Only when M has a continuous abnormality (mismatch), it is determined that the backup RAM is abnormal. Therefore, it becomes an abnormality detection device for the battery backup RAM that reliably detects the genuine abnormality.

【0013】請求項3のバッテリバックアップRAMの
異常検出装置によれば、RAM異常判定手段による判定
は、主スイッチがオンされ、バッテリからバッテリバッ
クアップRAMを用いて制御される電子制御装置に電力
の供給が開始される毎に実行される。従って、電子制御
装置の休止時にバッテリバックアップRAM内に異常が
発生した場合に、その起動時に検査を行うので、誤った
データによって、電子制御装置を制御し、誤作動させる
ことはない。例えば、自動車用の電子制御装置であれ
ば、エンジンスタート又はイグニッションスイッチのオ
ン直後にこの検出がなされる。従って、誤作動を防ぐ安
全なバッテリバックアップRAMの異常検出装置とな
る。
According to the battery backup RAM abnormality detecting device of the present invention, the determination by the RAM abnormality determining means is performed by turning on the main switch and supplying power from the battery to the electronic control device controlled using the battery backup RAM. Is executed every time is started. Therefore, when an abnormality occurs in the battery backup RAM when the electronic control unit is stopped, the inspection is performed at the time of startup, so that the electronic control unit is not controlled by a wrong data and does not malfunction. For example, in the case of an electronic control unit for an automobile, this detection is performed immediately after the engine is started or the ignition switch is turned on. Therefore, it is a safe battery backup RAM abnormality detection device for preventing malfunction.

【0014】請求項4のバッテリバックアップRAMの
異常検出装置によれば、主スイッチがオンとなり、一致
判定手段によりバッテリバックアップRAMのデータが
所定データと一致しないと判定された場合には、次に、
バッテリバックアップRAMへの所定データの書込みと
読取りが実行され、データの書込みと読取り動作に異常
がないかが判定される。異常の場合には、バッテリバッ
クアップRAMの異常と判定でき、再書込みによるエラ
ーが発生しなければ、主スイッチがオフの間に、バッテ
リバックアップRAMのデータが破壊されたと考えられ
る。即ち、バックアップ給電路の断線、バッテリの一時
的な取り外し、保守によるバッテリバックアップRAM
のデータの書き換えと見なすことができる。このように
して、バックアップ給電路の給電状態を検出する手段を
設けることなく、バッテリバックアップRAMの真正な
故障検出が可能となる。例えば、電子制御装置の起動直
後、読出手段によって読み出されたデータと所定のデー
タが不一致であれば、まず何らかの原因で、バッテリバ
ックアップRAMが異常と判定する。次に、書込み、読
出しを逐次行い、その結果が一致しない場合は、その異
常は、真正のバックアップRAM異常(バッテリバック
アップRAM自体の異常)であると判断する。一致の場
合は、給電状態の異常による一時的なデータ消失と判断
する。従って、バックアップ給電路の給電状態を検出す
る装置を必要とすることなく、真正のバックアップRA
M異常を効率よく検出できる。
According to the battery backup RAM abnormality detecting device of the present invention, when the main switch is turned on and the coincidence determining means determines that the data in the battery backup RAM does not match the predetermined data, then
Writing and reading of predetermined data to and from the battery backup RAM are performed, and it is determined whether there is any abnormality in the data writing and reading operations. In the case of an abnormality, it can be determined that the battery backup RAM is abnormal, and if no error occurs due to rewriting, it is considered that the data in the battery backup RAM was destroyed while the main switch was off. That is, battery backup RAM for disconnection of backup power supply line, temporary removal of battery, and maintenance
Can be regarded as rewriting of data. In this manner, a genuine failure of the battery backup RAM can be detected without providing a means for detecting the power supply state of the backup power supply path. For example, if the data read by the reading unit does not match the predetermined data immediately after the start of the electronic control unit, it is first determined that the battery backup RAM is abnormal for some reason. Next, writing and reading are sequentially performed, and if the results do not match, it is determined that the abnormality is a genuine backup RAM abnormality (an abnormality of the battery backup RAM itself). If they match, it is determined that the data is temporarily lost due to an abnormality in the power supply state. Therefore, a genuine backup RA is required without a device for detecting the power supply state of the backup power supply line.
M abnormality can be detected efficiently.

【0015】請求項5の発明では、請求項4の主スイッ
チがオンする毎に判定される不一致の検出回数が連続し
て発生した場合に、バッテリバックアップRAMの異常
と判定する。よって、バッテリバックアップRAMの真
正な故障と、バックアップ給電路の故障とをより正確に
判別できる。
According to a fifth aspect of the present invention, when the number of times of inconsistency detected each time the main switch of the fourth aspect is turned on occurs continuously, it is determined that the battery backup RAM is abnormal. Therefore, a genuine failure of the battery backup RAM and a failure of the backup power supply path can be more accurately determined.

【0016】請求項6のバッテリバックアップRAMの
異常検出装置によれば、上述の電子制御装置は自動車の
エンジン制御を行なう装置であり、バッテリバックアッ
プRAMは、電子制御装置がバッテリから給電されてエ
ンジン制御を行なっている間に得られた各種の制御値を
学習値として記憶し、その学習値を次回のエンジン制御
に使用するために、電子制御装置がバッテリからの給電
が停止された状態において、その学習値を記憶するメモ
リを備えている。従って、自動車のエンジン制御を行な
う装置に、請求項1乃至請求項5に記載のいずれかのバ
ッテリバックアップRAMの異常検出装置を適用する
と、エンジン起動時に、確実に真正のバックアップRA
M異常の検査を行い使用者に知らせるので、誤動作のな
い安全な装置とすることができる。
According to a sixth aspect of the present invention, the above-mentioned electronic control device is a device for controlling the engine of a vehicle, and the electronic control unit is supplied with power from a battery to control the engine. The various control values obtained during the operation are stored as learning values, and in order to use the learning values for the next engine control, in a state where the power supply from the battery is stopped, A memory for storing a learning value is provided. Therefore, when the abnormality detection device for the battery backup RAM according to any one of claims 1 to 5 is applied to the device for controlling the engine of the automobile, the genuine backup RA is surely obtained when the engine is started.
Since the M abnormality is inspected and notified to the user, a safe device without malfunction can be provided.

【0017】[0017]

【発明の実施の形態】以下、本発明を具体化した実施例
を図1〜図7に基づいて説明する。尚、本発明は、下記
実施例に限定されるものではない。 (第1実施例)本実施例装置の構成を図1に示す。本発
明のバッテリバックアップRAMの異常検出装置は、例
えば、ジ−ゼルエンジンに関する制御装置に適用され
る。それは、大きく、ジ−ゼルエンジンである車輌機器
2、車輌機器2を制御する制御装置であるECU5,E
CU5を稼動させる電源であるバッテリ1および異常状
態などを警告する警告ランプ3から構成される。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to FIGS. Note that the present invention is not limited to the following examples. (First Embodiment) FIG. 1 shows the configuration of the apparatus according to the first embodiment. The battery backup RAM abnormality detection device of the present invention is applied to, for example, a control device for a diesel engine. The vehicle equipment 2 is a diesel engine, and the ECUs 5 and 5 are control devices for controlling the vehicle equipment 2.
It comprises a battery 1 as a power supply for operating the CU 5 and a warning lamp 3 for warning an abnormal state or the like.

【0018】これらの装置は、コネクタ4に設けられた
接点18、21、15、16および電力供給経路である
主要電源ライン(請求項の主給電路に該当)17、バッ
クアップ電源ライン(請求項のバックアップ給電路に該
当)20を介してバッテリ1に接続されている。尚、起
動スイッチであるイグニションスイッチ(請求項の主ス
イッチに該当)19は、主要電源ライン17上に取り付
けられている。
These devices are provided with contacts 18, 21, 15, 16 provided on the connector 4, a main power supply line (corresponding to a main power supply path) 17 as a power supply path, and a backup power supply line (claims). (Corresponding to a backup power supply path) 20 to the battery 1. An ignition switch (corresponding to a main switch in the claims) 19 serving as a start switch is mounted on the main power supply line 17.

【0019】また、ECU5は、コンピュ−タシステム
が搭載された制御装置である。それは、定電圧を供給す
る電源回路11、車輌機器2を制御するコントロ−ラ1
4、実行されるプログラムが記憶されたROM7、起動
時のパラメ−タ等が書かれたEEPROM10(請求項
の書込可能不揮発性メモリに該当)(electrical erasa
ble progamable ROM)で構成される。このEEPR
OM10は、限定された回数において、データの書き換
えが可能であり、少量の書き換えデータが記憶される。
さらにコントロ−ラ14は、CPU6、演算処理の作業
領域や記憶領域であるRAM8、制御機器2への入出力
のインタ−フェ−スである入出力ポ−ト9からなり、こ
れらはアドレス線、デ−タ線、信号線からなるシステム
バス12によって接続されている。また、RAM8は、
電源遮断後も学習されたデ−タが記憶保持できるバック
アップRAM13を備えている。尚、電源回路11のC
PU6等への出力とバックアップRAM13への出力と
の間に順方向に配置されるダイオード22は、バックア
ップRAM13への供給電圧Vstby安定化のために、V
stbyのレベルがCPU6等への出力電圧VDDより低下し
た場合に、その出力電圧VDDがダイオード22を介して
バックアップRAM13への供給電圧Vstbyに供給され
るようになっている。CPU6等への出力電圧VDDとバ
ックアップRAM13への供給電圧Vstbyは、ほぼ同一
レベルとなっている。
The ECU 5 is a control device on which a computer system is mounted. The power supply circuit 11 supplies a constant voltage, and the controller 1 controls the vehicle equipment 2.
4. ROM 7 in which a program to be executed is stored, EEPROM 10 in which parameters at the time of startup and the like are written (corresponding to a writable nonvolatile memory in the claims) (electrical eraser)
ble progamable ROM). This EEPR
The OM 10 can rewrite data a limited number of times, and stores a small amount of rewritten data.
Further, the controller 14 comprises a CPU 6, a RAM 8 which is a work area and a storage area for arithmetic processing, and an input / output port 9 which is an interface for input and output to and from the control device 2. They are connected by a system bus 12 composed of data lines and signal lines. Also, the RAM 8
A backup RAM 13 is provided which can store data learned after power-off. In addition, C of the power supply circuit 11
The diode 22 arranged in the forward direction between the output to the PU 6 or the like and the output to the backup RAM 13 is connected to the V 22 to stabilize the supply voltage Vstby to the backup RAM 13.
When the level of stby falls below the output voltage V DD to the CPU 6 or the like, the output voltage V DD is supplied to the supply voltage Vstby to the backup RAM 13 via the diode 22. The output voltage V DD to the CPU 6 and the like and the supply voltage V stby to the backup RAM 13 are at substantially the same level.

【0020】次に、図2に示めすフロ−チャ−トを用い
て、本バッテリバックアップRAMの異常検出装置の動
作を説明する。本発明は、起動時にバックアップRAM
13の正常/異常を検査し、使用者に知らせることが主
旨であるので、制御機器2の制御については省略する。
また、本実施例は、バックアップRAM13が単数であ
る場合に主に適用される。本発明のバッテリバックアッ
プRAMの異常検出装置は、車輌の起動スイッチ(イグ
ニッションスイッチ、以後IGスイッチ)がキ−ONと
なることで、動作が開始する。
Next, the operation of the battery backup RAM abnormality detecting apparatus will be described with reference to the flowchart shown in FIG. The present invention uses a backup RAM at startup.
Since the main purpose is to inspect the normal / abnormal state of 13 and inform the user, the control of the control device 2 is omitted.
This embodiment is mainly applied to the case where the backup RAM 13 is singular. The operation of the battery backup RAM abnormality detecting device of the present invention starts when a vehicle start switch (ignition switch, hereinafter referred to as IG switch) is turned on.

【0021】ステップs210において、CPU6のス
タンバイビットの状態が「1」であるか否かが給電状態
検出手段と給電状態判定手段によって判断される。両手
段とも、CPU6、ROM7およびROM7に含まれる
プログラム7aから構成される。尚、スタンバイビット
とはバックアップ電源ライン20の給電状態を常時監視
するCPU6が有する動作状態監視ビットであり、バッ
クアップRAM13への供給電圧Vstbyが所定時間基準
電圧よりも高い場合「1」が設定され、そうでない場合
は「0」が設定される。スタンバイビットが「1」であ
る場合には、バックアップ電源ライン20からの電力供
給は正常と判断されて、ステップs220に移行する。
スタンバイビットが「0」の場合、バックアップ電源ラ
インに異常が生じたと判断し、すぐ次処理に移る。次処
理では、スタンバイビット=「0」に対応した処理、例
えば、バックアップ電源ライン20の断線に対する警
告、その他の処理がなされる。
In step s210, the power supply state detection means and the power supply state determination means determine whether or not the state of the standby bit of the CPU 6 is "1". Both means are composed of a CPU 6, a ROM 7, and a program 7a contained in the ROM 7. The standby bit is an operation state monitoring bit of the CPU 6 that constantly monitors the power supply state of the backup power supply line 20. When the supply voltage Vstby to the backup RAM 13 is higher than the reference voltage for a predetermined time, "1" is set. Otherwise, "0" is set. When the standby bit is “1”, it is determined that the power supply from the backup power supply line 20 is normal, and the process shifts to step s220.
If the standby bit is "0", it is determined that an abnormality has occurred in the backup power supply line, and the process immediately proceeds to the next processing. In the next process, a process corresponding to the standby bit = “0”, for example, a warning for disconnection of the backup power supply line 20 and other processes are performed.

【0022】ステップs220では、読出手段によって
バックアップRAM13から読み出されたキ−ワ−ドと
ROM7内の所定のデータとが一致するか否か、一致判
定手段によって判断される。ステップs220が読出手
段と一致判定手段を構成している。キ−ワ−ドが一致す
る場合は、バックアップRAM13は正常であると判断
され、ステップs230に移行する。ステップs230
では、EEPROM10内に設けられたカウンタのカウ
ント値が「0」であるか否かが判断される。ここで、カ
ウント値が「0」である場合にはバッテリバックアップ
RAM13の過去の異常はないので、すぐに次処理へ移
行する。カウント値が「0」でない場合は、前回までの
異常回数は、ノイズ等による突発的なものであると判断
されて、次のステップs240にすすみ、EEPROM
10に書かれたカウント値がクリアされ、次処理へ移行
する。
In step s220, the coincidence judging means judges whether or not the keyword read from the backup RAM 13 by the reading means matches predetermined data in the ROM 7. Step s220 constitutes the reading means and the coincidence determining means. If the keywords match, the backup RAM 13 is determined to be normal, and the flow shifts to step s230. Step s230
Then, it is determined whether or not the count value of a counter provided in the EEPROM 10 is “0”. Here, when the count value is “0”, there is no abnormality in the battery backup RAM 13 in the past, so that the process immediately proceeds to the next process. If the count value is not “0”, it is determined that the number of abnormalities up to the previous time is abrupt due to noise or the like, and the process proceeds to the next step S240, and the EEPROM is executed.
The count value written in 10 is cleared, and the process proceeds to the next processing.

【0023】一方、ステップs220において、キ−ワ
−ド不一致の場合は、正常な電力供給下のもとで、何ら
かの影響で確実にバックアップRAM13自体に異常が
生じたと判断され、ステップs250に移行する。ステ
ップs250では、EEPROM10内のカウンタがカ
ウントアップされる。続いて、ステップs260におい
て、バックアップRAM13内の所定の箇所に、次回の
検査のために、例えば5AA5Hという値が再セットさ
れ、ステップs270に移行する。
On the other hand, if the keywords do not match in step s220, it is determined that an abnormality has occurred in the backup RAM 13 itself due to some influence under a normal power supply, and the process proceeds to step s250. . In step s250, the counter in the EEPROM 10 is counted up. Subsequently, in step s260, for example, a value of 5AA5H is reset to a predetermined location in the backup RAM 13 for the next inspection, and the process proceeds to step s270.

【0024】ステップs270のRAM異常判定手段に
よって、EEPROM10内のカウンタのカウント値が
調べられる。カウント値がn以上(通常3〜4)に達し
たyesの場合には、永続的なバックアップRAM13
の回路異常が、発生していると判断される。つまり、I
Gスイッチ19を連続3〜4回起動し、連続して、バッ
クアップRAM異常が検出された場合は、突発的な異常
ではなく、真正なRAM異常として判断され、ステップ
s280に移行する。また、noの場合は、一時的なR
AM異常(例えば、バッテリの取り外しによるデータの
消失)の可能性もあるので、スッテプs275に移行
し、学習データ使用不可フラグを立て、次処理に移行す
る。次処理では、バックアップRAM13内の学習デー
タを使用せず、ROM7に記憶されている初期データが
制御に用いられる。尚、学習データ使用不可フラグは、
RAM8に記憶され、次回IGスイッチがONする毎
に、プログラムスタート時に0でクリアされるものとす
る。この場合のRAM異常判定手段も、同じくCPU
6、ROM7およびROM7に含まれるプログラム7a
から構成されている。
The count value of the counter in the EEPROM 10 is checked by the RAM abnormality determining means in step s270. If the count value reaches n or more (usually 3 to 4), the permanent backup RAM 13
Is determined to have occurred. That is, I
The G switch 19 is activated three to four times in succession, and if a backup RAM abnormality is detected continuously, it is determined that the abnormality is not a sudden abnormality but a genuine RAM abnormality, and the process proceeds to step s280. In the case of no, the temporary R
Since there is a possibility of an AM abnormality (for example, data loss due to battery removal), the process proceeds to step s275, sets a learning data unusable flag, and proceeds to the next process. In the next process, the initial data stored in the ROM 7 is used for control without using the learning data in the backup RAM 13. The learning data unusable flag is
It is stored in the RAM 8 and is cleared to 0 at the start of the program each time the IG switch is turned on next time. The RAM abnormality determination means in this case is also
6, ROM 7 and program 7a included in ROM 7
It is composed of

【0025】図2のフローチャートの動作を図3のタイ
ミングチャートで説明する。図3の区間(a)は、バッ
テリ1が取り外されている期間(スタンバイビット=
「0」)の時に、IGスイッチ19がONされた場合で
あり、信号keyword (ステップs220のキーワードの
一致判定信号)が異常を示すレベルにあるが、真正の異
常ではないため、EEPROM10のカウンタはカウン
トアップされず「0」である。図3の区間(b)は、正
常時にIGスイッチ19がONした場合であり、信号ke
yword は正常を示すレベルにある。従って、EEPRO
M10のカウンタはカウントアップされず「0」であ
る。ところが、図3の区間(c)に示すように、バック
アップRAM13に何らかの異常が発生している場合、
IGスイッチ19がONされる毎に、信号keywordは不
一致(異常)を示すレベルとなり、EEPROM10の
カウンタは連続的にカウントアップされる。このカウン
ト値が、上述のステップs270にて判断され、その判
断結果に応じてステップs275とステップs280の
処理が実行される。
The operation of the flowchart of FIG. 2 will be described with reference to the timing chart of FIG. The section (a) in FIG. 3 is a period during which the battery 1 is removed (standby bit =
At the time of "0"), the IG switch 19 is turned on, and the signal keyword (keyword match determination signal in step s220) is at a level indicating abnormality, but is not a genuine abnormality. It is "0" without being counted up. The section (b) in FIG. 3 is a case where the IG switch 19 is turned on during normal operation, and the signal ke
yword is at a level indicating normality. Therefore, EEPRO
The counter of M10 is not counted up and is "0". However, as shown in the section (c) of FIG. 3, when any abnormality occurs in the backup RAM 13,
Each time the IG switch 19 is turned on, the signal keyword becomes a level indicating a mismatch (abnormal), and the counter of the EEPROM 10 is continuously counted up. This count value is determined in step s270 described above, and the processing in steps s275 and s280 is executed according to the determination result.

【0026】そして、真正のバックアップRAM異常と
判断された場合は、ステップs280において、警告ラ
ンプ3が点灯される等の異常警告が運転者に対し行わ
れ、ステップs290では、故障コ−ド等が設定され、
図示しない表示装置に表示される。
If it is determined that the backup RAM is genuine, a warning is issued to the driver in step s280 such as turning on the warning lamp 3. In step s290, a failure code or the like is issued. Is set,
It is displayed on a display device (not shown).

【0027】上述の様に、バックアップRAM13のバ
ックアップ電源ライン20の給電状態が正常であると確
認された場合に、バックアップRAM13に保持されて
いるデータとキ−ワ−ドとが不一致である場合に、バッ
クアップRAM13の異常と判定している。この結果、
バックアップ電源ライン20の断線等の異常とバックア
ップRAM13の真正故障とを明確に区別することがで
きる。また、連続して異常と判定される毎に不揮発性メ
モリであるEEPROM10のカウンタを更新し、その
カウンタ値が所定値以上となった場合にバックアップR
AM13の真正故障と判定しているので、その故障判定
がより確実となる。
As described above, when it is confirmed that the power supply state of the backup power supply line 20 of the backup RAM 13 is normal, when the data held in the backup RAM 13 and the keyword do not match. , The backup RAM 13 is abnormal. As a result,
An abnormality such as a disconnection of the backup power supply line 20 and a genuine failure of the backup RAM 13 can be clearly distinguished. The counter of the EEPROM 10, which is a non-volatile memory, is updated each time the abnormality is determined to be continuous, and when the counter value exceeds a predetermined value, the backup R
Since it is determined that the AM 13 is a genuine failure, the failure determination is more reliable.

【0028】(第2実施例)第1実施例は、バックアッ
プRAM13の容量が少なく単数の記憶素子(SRA
M)で構成される場合に適用された。しかし、同RAM
に大容量が必要とされ、複数個の記憶素子で構成される
場合は、たとえ、所定アドレスに記憶されたキ−ワ−ド
が一致しても、他の領域や他の素子が破壊されている可
能性がある。このような場合に、本実施例は適用され
る。本実施例は、簡単に全てのバックアップRAM13
を検査することを特徴とする。
(Second Embodiment) In the first embodiment, the capacity of the backup RAM 13 is small and a single storage element (SRA) is used.
M). But the same RAM
When a large capacity is required and a plurality of storage elements are used, even if the keywords stored at the predetermined addresses match, other areas and other elements are destroyed. Could be. In such a case, the present embodiment is applied. In this embodiment, all the backup RAMs 13
Is inspected.

【0029】その動作を、図4に示めすフロ−チャ−ト
を用いて説明する。第1実施例と異なるところは、図2
のステップs220のキーワード一致判定に代えて、ス
テップs225のデータ構造の一致判定を採用したこ
と、およびステップs235(メモリ異常状態の記録ク
リア)とステップs295(メモリ異常状態の表示)を
付加したことである。
The operation will be described with reference to a flowchart shown in FIG. The difference from the first embodiment is shown in FIG.
By adopting the data structure match determination in step s225 instead of the keyword match determination in step s220, and adding step s235 (memory abnormal state recording clear) and step s295 (memory abnormal state display). is there.

【0030】ステップs225では、バックアップRA
M13内のデ−タ構造とROM7で指定されているデー
タ構造との一致が、一致判定手段によって判断される。
デ−タ構造とは、図5に示されるような、例えば、デ−
タが左右対称に形成されたミラ−構造のことである。制
御に使われるデータを5AH(16進数)とすると、バ
ックアップRAM13には、左右対称のデータ、5AA
5H、一般的にはpqqpが書き込まれている。また、
ROM7にはデータ構造の指定とミラ−デ−タを検査す
るプログラム7aがROM7に書かれている。CPU6
は、このプログラムに従ってバックアップRAM13内
のミラー構造を検査する。
In step s225, the backup RA
Matching between the data structure in M13 and the data structure specified in the ROM 7 is determined by the match determining means.
The data structure is, for example, a data structure as shown in FIG.
Is a mirror structure formed symmetrically. Assuming that the data used for control is 5AH (hexadecimal), the backup RAM 13 stores symmetrical data, 5AA
5H, generally pqqp is written. Also,
In the ROM 7, a program 7a for designating a data structure and inspecting mirror data is written. CPU6
Inspects the mirror structure in the backup RAM 13 according to this program.

【0031】ステップs225にて、デ−タ構造が全て
一致する場合、ステップs230に移行する。ステップ
s230では、EEPROM10内に設けられたカウン
タのカウント値が「0」であるか否かが判断される。カ
ウント値が「0」である場合には、正常と判断されて、
次処理へ移行する。カウント値が「1」である場合に
は、過去に突発的な異常があったことを意味しているの
で、次のステップs235、s240に移行し、メモリ
異常状態の記録のクリアおよびEEPROM10のカウ
ンタの値がクリアされ、次処理に移る。
If it is determined in step s225 that all the data structures match, the process proceeds to step s230. In step s230, it is determined whether or not the count value of the counter provided in the EEPROM 10 is "0". If the count value is "0", it is determined that the count is normal,
Move to next process. If the count value is "1", it means that a sudden abnormality has occurred in the past. Therefore, the process proceeds to the next steps s235 and s240, where the recording of the memory abnormality state is cleared and the counter of the EEPROM 10 is cleared. Is cleared, and the process proceeds to the next process.

【0032】一方、ステップs225にて、デ−タ構造
が全て一致しない場合には、メモリ異常であるので、ス
テップs226に移行し、メモリ異常のアドレス,総
数、デ−タ値などのメモリ異常状態を記録してステップ
s250に移行する。ステップs250〜s290まで
は、第1実施例と同じである。
On the other hand, if all the data structures do not match in step s225, it is a memory abnormality, so the process proceeds to step s226, and the memory abnormality state such as the address, total number, and data value of the memory abnormality is detected. Is recorded, and the routine goes to step s250. Steps s250 to s290 are the same as in the first embodiment.

【0033】そして、最後にステップs295にて、ス
タンバイビット、メモリ異常の記録を基に、異常を生じ
たメモリのアドレス、個数等が図示しない表示装置によ
って使用者に示される。
Finally, in step s295, based on the standby bit and the record of the memory abnormality, the address and number of the memory in which the abnormality has occurred are indicated to the user by a display device (not shown).

【0034】(第3実施例)第3実施例は、第1、第2
実施例と異なり、バックアップ電源ライン20の給電状
態を検出することなく、バックアップRAM13の真正
故障を検出するようにした装置である。図6に示すステ
ップs110では、読出手段によって、バックアップR
AM13の所定の場所に書かれたキ−ワードが読み出さ
れ、読み出されたキーワードは、一致判定手段によっ
て、ROM7内に書かれている所定のキーワードと比較
される。尚、読出手段、一致判定手段とも、CPU6、
ROM7およびROM7内のプログラム7aからなるコ
ンピュータシステムによって構成されている。
(Third Embodiment) The third embodiment is similar to the first and second embodiments.
Unlike the embodiment, this is an apparatus that detects a genuine failure of the backup RAM 13 without detecting the power supply state of the backup power supply line 20. In step s110 shown in FIG.
A keyword written in a predetermined location of the AM 13 is read, and the read keyword is compared with a predetermined keyword written in the ROM 7 by the match determination means. Note that both the reading means and the coincidence determining means are the CPU 6,
It is constituted by a computer system comprising a ROM 7 and a program 7a in the ROM 7.

【0035】比較された結果が、yesすなわち一致の
場合は、バックアップRAM13は正常と判断され、ス
テップs160に移行する。ステップs160では、E
EPROM10内に設けられたカウンタのカウント値が
「0」であるか否かが判断される。ここで、カウント値
が「0」である場合には正常であるので、すぐに次処
理、すなわちバックアップRAM13に記憶されている
前回の学習値に基づいて、燃料噴射量の演算等の通常制
御が開始される。また、カウント値が「0」でない場合
は、過去に、ノイズ等の突発的原因によって、誤認識が
あったことを意味しているで、ステップs170に進
み、EEPROM10に書かれた前回までのカウント値
をクリアし、次処理へ移行する。
If the result of the comparison is "yes", that is, if the values match, the backup RAM 13 is determined to be normal, and the routine goes to step s160. In step s160, E
It is determined whether the count value of the counter provided in EPROM 10 is “0”. Here, when the count value is “0”, the operation is normal, and the next process, that is, the normal control such as the calculation of the fuel injection amount is immediately performed based on the previous learning value stored in the backup RAM 13. Be started. On the other hand, if the count value is not "0", it means that an erroneous recognition has been made in the past due to a sudden cause such as noise or the like. Clear the value and proceed to the next process.

【0036】一方、ステップs110において、不一致
と判断された場合は、一時的にバックアップ電源ライン
20が取り外されるなどによりデータが消失している
か、あるいは振動等で電気回路上に異常の生じている可
能性がある。そのいずれかを判断するため、ステップs
120、ステップs130では、連続した書き込み、読
み出し、一致判定が行われる。バックアップRAM13
自体が破壊されている場合、この連続した書き込み、読
み出しの値が一致しないからである。すなわち、ステッ
プs120で、再度キーワードがバックアップRAM1
3に書き込まれ、ステップs130の一致判定手段によ
って、読み出し、比較される。
On the other hand, if it is determined in step s110 that they do not match, it is possible that data has been lost due to the temporary removal of the backup power supply line 20, or that an abnormality has occurred in the electric circuit due to vibration or the like. There is. Step s to determine which one
In step 120 and step s130, continuous writing, reading, and coincidence determination are performed. Backup RAM 13
This is because if the data itself is destroyed, the values of the continuous writing and reading do not match. That is, in step s120, the keyword is stored in the backup RAM1 again.
3, and are read and compared by the coincidence determining means in step s130.

【0037】その結果が、一致の場合は、ステップs1
10での不一致の原因は、一時的なデータの消失と判断
され、ステップs135で学習データ使用不可フラグを
「1」とし、ステップs170に進む。ステップs17
0では、EEPROMに書かれた前回までのカウント値
をクリアし、次処理へ移行する。次処理では、学習デー
タ使用不可フラグが「1」であるので、バックアップR
AM13に書かれている学習データを使用せず、ROM
7等に登録されている初期値データを使用し、制御機器
2を制御する。尚、学習データ使用不可フラグは、RA
M8に記憶され、次回IGスイッチがONする毎に、プ
ログラムスタート時に0でクリアされるものとする。
If the result is a match, step s1
The cause of the mismatch at 10 is determined to be a temporary loss of data, the learning data unavailable flag is set to "1" at step s135, and the process proceeds to step s170. Step s17
At 0, the previous count value written in the EEPROM is cleared, and the process proceeds to the next process. In the next process, since the learning data unavailable flag is “1”, the backup R
Without using the learning data written in AM13, ROM
The control device 2 is controlled using the initial value data registered in 7 or the like. The learning data unavailable flag is set to RA
It is stored in M8 and cleared to 0 at the start of the program every time the IG switch is turned on next time.

【0038】不一致の場合は、正常な電力供給下のもと
で、何らかの影響でバックアップRAM13の回路自体
に異常(真正の異常)が生じたと判断され、ステップs
140に移行する。ステップs140では、この異常の
頻度を調べるためEEPROM10内のカウンタがカウ
ントアップされ、ステップs150に移行する。ステッ
プs150においては、第2RAM異常検出手段によっ
て、EEPROM10内のカウンタのカウント値がn以
上(通常3〜4)に達したか否かが判定される。異常回
数が所定数以上でない場合には、突発的に異常が生じた
とみなし、ステップs155に移行し、学習データ使用
不可フラグを「1」とし、次処理に移行する。異常回数
が所定数以上の場合には、バックアップRAM13自体
に、永続的な異常が発生していると判断される。つま
り、IGスイッチ19の3〜4回の連続起動に関して、
連続してバックアップRAM13に異常が検出された場
合は、ノイズ等の突発的な異常ではなく、永続的に破壊
されていると判断される。この第2RAM異常検出手段
も、同じくCPU6、ROM7およびROM7に含まれ
るプログラム7aから構成されている。
If the values do not match, it is determined that an abnormality (genuine abnormality) has occurred in the circuit of the backup RAM 13 due to some influence under a normal power supply.
Move to 140. In step s140, a counter in the EEPROM 10 is counted up to check the frequency of the abnormality, and the process proceeds to step s150. In step s150, the second RAM abnormality detecting means determines whether or not the count value of the counter in the EEPROM 10 has reached n or more (usually 3 to 4). If the number of abnormalities is not equal to or greater than the predetermined number, it is considered that an abnormality has suddenly occurred, and the process proceeds to step s155, the learning data unavailable flag is set to “1”, and the process proceeds to the next process. If the number of abnormalities is equal to or more than the predetermined number, it is determined that a permanent abnormality has occurred in the backup RAM 13 itself. In other words, regarding the continuous start of the IG switch 19 three to four times,
When an abnormality is continuously detected in the backup RAM 13, it is determined that the abnormality is not a sudden abnormality such as noise but is permanently destroyed. The second RAM abnormality detecting means also includes a CPU 6, a ROM 7, and a program 7a included in the ROM 7.

【0039】そして、ステップs180において、警告
ランプ3が点灯される等の異常警告が運転者に対し行わ
れ、ステップs190では、故障コ−ド等が設定され、
図示しない表示装置に表示される。
In step s180, an abnormal warning such as turning on the warning lamp 3 is given to the driver. In step s190, a failure code or the like is set.
It is displayed on a display device (not shown).

【0040】上述の様に、本実施例では、前回書き込ん
だキーワードとの比較、即ち、バッテリバックアップさ
ている間のデータの保持状態の判定と、主要電源ライン
17から供給されている間に連続した書込み/読出しに
よるデータ比較とを組み合わせることによって、永続的
な異常(真正なバックアップRAM異常)と一時的な異
常を判別している。従って、従来ように給電状態を検出
する装置をあえて用いることなく、効率的にバッアップ
RAMの真正異常が検出できる。また、異常と判定され
た回数を不揮発性メモリであるEEPROM10に書き
込んで、その連続性から最終的に判断している従って、
確実に真正のバックアップRAMの異常を検出できる。
As described above, in the present embodiment, the comparison with the previously written keyword, that is, the determination of the data holding state during the battery backup, and the continuous operation while the data is supplied from the main power supply line 17 are performed. By combining data comparison by writing / reading, a permanent abnormality (genuine backup RAM abnormality) and a temporary abnormality are determined. Therefore, it is possible to efficiently detect the genuine abnormality of the backup RAM without intentionally using a device for detecting the power supply state. Also, the number of times determined to be abnormal is written in the EEPROM 10 which is a non-volatile memory, and the continuity is finally determined.
Abnormality of the genuine backup RAM can be reliably detected.

【0041】(変形例)以上、本発明を表わす1実施例
を示したが、他に様々な変形例が考えられる。例えば、
第1実施例、第2実施例において、バックアップ電源ラ
イン20からの給電の有無を、CPUのスタンバイビッ
トにて検出したが、バックアップ電源電圧を図示しない
A/D変換器にて、デジタル値に変換し、入出力ポート
9で監視し、判断してもよい。また、第1〜第3実施例
において、CPUによって実行されるプログラムは、主
にROMに書かれたが、小規模なプログラムであれば直
接EEPROM10に書いても良い。さらに、第1〜第
3実施例において、本発明のバッテリバックアップRA
Mの異常検出装置は、全て制御装置の中に組み込まれた
が、これとは別に独立させたシステムとしてもよい。
(Modifications) Although one embodiment of the present invention has been described above, various other modifications are possible. For example,
In the first and second embodiments, the presence or absence of power supply from the backup power supply line 20 is detected by the standby bit of the CPU, but the backup power supply voltage is converted into a digital value by an A / D converter (not shown). Alternatively, monitoring and determination may be made at the input / output port 9. In the first to third embodiments, the program executed by the CPU is mainly written in the ROM. However, a small-scale program may be directly written in the EEPROM 10. Further, in the first to third embodiments, the battery backup RA of the present invention is used.
Although the M abnormality detection device is all incorporated in the control device, it may be a separate system.

【0042】また、上述の第2実施例で、バックアップ
RAM13の異常が検出された場合、その修復を容易に
するために故障発生箇所の特定が要求されることがあ
る。第2実施例では、最終ステップs295にてメモリ
異常アドレス、総数などを表示したが、さらに、その異
常の発生したアドレスから異常領域あるいは異常素子を
特定してもよい。その場合は、異常の発生したアドレス
の上位桁あるいはその上位桁に対応するバックアップR
AM13の構成要素の番号等を表示させ、使用者に知ら
せることもできる。
In the above-described second embodiment, when an abnormality in the backup RAM 13 is detected, it may be necessary to specify the location where the failure has occurred in order to facilitate the recovery. In the second embodiment, the memory abnormal address, the total number, and the like are displayed in the final step s295, but an abnormal area or an abnormal element may be further specified from the address where the abnormality has occurred. In this case, the backup R corresponding to the upper digit of the address in which the error occurred or the upper digit
The number of the component of the AM 13 or the like can be displayed to notify the user.

【0043】また、第2実施では、デ−タ構造を左右対
称のミラ−構造としたが、図7に示すように実際のデ−
タをビット反転して、下位桁に付加した反転ビット構造
としても何ら差し支えない。
In the second embodiment, the data structure is a symmetric mirror structure. However, as shown in FIG.
The data may be bit-inverted to form an inverted bit structure added to the lower digits.

【0044】また、第3実施例において、ステップs1
10で、異常と判定された時に、バックアップRAM1
3に対して、キーワードデータの再書込みと、再読出し
を実行して、不一致を検出し、その不一致の検出が連続
して所定数だけ検出された場合に、バックアップRAM
13の真正故障と判断している。しかし、再書込みと、
再読出しによる不一致は、バックアップRAM13の真
正故障の可能性が高いことから、1回でもこの状態にな
った時に真正故障と判断するようにしても良い。
Further, in the third embodiment, step s1
10, when it is determined that there is an abnormality, the backup RAM 1
3, the rewriting and rereading of the keyword data are executed to detect a mismatch, and when a predetermined number of such mismatches are detected consecutively, the backup RAM
13 is determined to be a genuine failure. But with rewriting,
Since the possibility of a genuine failure of the backup RAM 13 is high when there is a mismatch due to re-reading, it may be determined that the genuine failure has occurred at least once in this state.

【0045】その他、様々な変形が考えられるが、キー
ワードの読み出し方法の組み合わせ、あるいはキーワー
ドによる判定と給電状態の組み合わせによって、真正の
バックアップRAM異常を確定する本発明の主旨を逸脱
しない限り、様々な改変ができるものとする。
In addition, various modifications are conceivable. However, various modifications may be made without departing from the gist of the present invention, in which a genuine backup RAM abnormality is determined by a combination of a keyword reading method or a combination of a determination based on a keyword and a power supply state. Modifications can be made.

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

【図1】本発明の第1実施例の異常検出装置を用いた電
子制御装置を示す構成図。
FIG. 1 is a configuration diagram showing an electronic control device using an abnormality detection device according to a first embodiment of the present invention.

【図2】第1実施例装置のCPUの処理手順を示すフロ
−チャ−ト。
FIG. 2 is a flowchart showing a processing procedure of a CPU of the first embodiment.

【図3】第1実施例装置の動作を示すタイミングチャ−
ト。
FIG. 3 is a timing chart showing the operation of the first embodiment.
G.

【図4】本発明の第2実施例装置のCPUの処理手順を
示すフロ−チャ−ト。
FIG. 4 is a flowchart showing a processing procedure of a CPU of the apparatus according to the second embodiment of the present invention.

【図5】第2実施例装置に用いた一致判定のための書込
みデータを示した構造図。
FIG. 5 is a structural diagram showing write data used for matching determination used in the device of the second embodiment.

【図6】本発明の第3実施例装置のCPUの処理手順を
示すフロ−チャ−ト。
FIG. 6 is a flowchart showing a processing procedure of a CPU of a device according to a third embodiment of the present invention.

【図7】本発明の変形例に用いたデ−タ構造図。FIG. 7 is a data structure diagram used in a modified example of the present invention.

【図8】従来のバックアップRAMに対するバックアッ
プ給電線の断線検出装置の構成図。
FIG. 8 is a configuration diagram of a conventional disconnection detection device for a backup power supply line for a backup RAM.

【符号の説明】 1 バッテリ 2 車載機器 3 警告ランプ 6 CPU 7 ROM 7a プログラム 8 RAM 10 EEPROM(書込可能不揮発性メモリ) 13 バックアップRAM 17 主要電源ライン(主給電路) 19 イグニッションスイッチ(主スイッチ) 20 バックアップ電源ライン(バックアップ給電路)[Description of Signs] 1 Battery 2 In-vehicle device 3 Warning lamp 6 CPU 7 ROM 7a Program 8 RAM 10 EEPROM (writable nonvolatile memory) 13 Backup RAM 17 Main power line (main power supply line) 19 Ignition switch (main switch) 20 Backup power line (backup power supply line)

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】電力がバッテリによりバックアップ給電路
を介して常時供給されて記憶内容を保持するバッテリバ
ックアップRAMの異常検出を、主スイッチのオンによ
り電力がバッテリにより主給電路を介して給電されてい
る時に行なう異常検出装置において、 前記バックアップ給電路を介した前記バッテリバックア
ップRAMへの給電状態を検出する給電状態検出手段
と、 前記給電状態検出手段により検出された給電状態が正常
か異常かを判定する給電状態判定手段と、 前記主スイッチがオフする前に、前記バッテリバックア
ップRAMの所定アドレスに所定データを書込む書込手
段と、 前記主スイッチの前回のオンの時に、前記書込手段によ
り書込まれた前記バッテリバックアップRAMの前記所
定アドレスのデータを、次回に前記主スイッチがオンし
た時に、読出す読出手段と、 前記読出手段により読出されたデータが前記所定データ
と一致するか否かを判定する一致判定手段と、 前記給電状態判定手段により正常と判定された場合であ
って、前記一致判定手段により不一致と判定された場合
に、不一致であることを示すデータが前記一致判定手段
により書込まれる書込可能不揮発性メモリと、 前記書込可能不揮発性メモリに記憶されたデータに基づ
き前記バッテリバックアップRAMを異常と判定するR
AM異常判定手段とから成るバッテリバックアップRA
Mの異常検出装置。
1. An abnormality is detected in a battery backup RAM that always supplies power via a backup power supply path by a battery and retains stored contents. When a main switch is turned on, power is supplied from the battery via the main power supply path. A power supply state detection means for detecting a power supply state to the battery backup RAM via the backup power supply path; and determining whether a power supply state detected by the power supply state detection means is normal or abnormal. Power supply state determining means for writing; writing means for writing predetermined data to a predetermined address of the battery backup RAM before the main switch is turned off; and writing by the writing means when the main switch is turned on last time. The data at the predetermined address of the battery backup RAM inserted in the When the switch is turned on, a reading means for reading, a coincidence judging means for judging whether or not the data read by the reading means coincides with the predetermined data, and a case where the power supply state judging means judges that the power is normal. And when the coincidence determination unit determines that there is no match, data indicating the mismatch is written by the match determination unit, and is stored in the writable nonvolatile memory. R that determines that the battery backup RAM is abnormal based on the
Battery backup RA comprising AM abnormality determination means
M abnormality detection device.
【請求項2】前記一致判定手段は前記不一致を連続して
判定した場合に、前記書込可能不揮発性モメリに不一致
回数を記憶させ、前記RAM異常判定手段はその連続し
て発生した不一致回数が所定回数以上である場合に異常
と判定することを特徴とする請求項1に記載のバッテリ
バックアップRAMの異常検出装置。
2. The method according to claim 1, wherein said coincidence determining means stores the number of mismatches in said writable nonvolatile memory when said mismatch is determined continuously, and said RAM abnormality determining means determines whether said number of mismatches has occurred continuously. The abnormality detection device for a battery backup RAM according to claim 1, wherein the abnormality is determined when the number of times is equal to or more than a predetermined number.
【請求項3】前記一致判定手段による判定は、前記主ス
イッチがオンされ、前記バッテリバックアップRAMを
用いて制御される電子制御装置に前記主給電路を介して
給電が開始される毎に、実行されることを特徴とする請
求項2に記載のバッテリバックアップRAMの異常検出
装置。
3. The judgment by the coincidence judging means is executed every time the main switch is turned on and power supply to the electronic control device controlled using the battery backup RAM is started via the main power supply path. 3. The abnormality detection device for a battery backup RAM according to claim 2, wherein the abnormality is detected.
【請求項4】電力がバッテリによりバックアップ給電路
を介して常時供給されて記憶内容を保持するバッテリバ
ックアップRAMの異常検出を、主スイッチのオンによ
り電力がバッテリにより主給電路を介して給電されてい
る時に行なう異常検出装置において、 前記主スイッチがオフされる前に前記バッテリバックア
ップRAMの所定アドレスに所定データを書込む書込手
段と、 前記主スイッチの前回のオンの時に前記書込手段により
書込まれた前記バッテリバックアップRAMの前記所定
アドレスのデータを、次回に前記主スイッチがオンされ
た後に読出す読出手段と、 前記読出手段により読出されたデータが前記所定データ
と一致するか否かを判定する一致判定手段と、 前記一致判定手段により不一致と判定された場合には、
前記バッテリバックアップRAMの所定アドレスに所定
データを書込み、その後、その所定アドレスのデータを
読出し、そのデータと前記所定データとが一致するか否
かを判定し、不一致である場合に前記バッテリバックア
ップRAMの異常と判定する第2RAM異常判定手段と
から成るバッテリバックアップRAMの異常検出装置。
4. An abnormality is detected in a battery backup RAM which always supplies power via a backup power supply line by a battery and retains stored contents. When a main switch is turned on, power is supplied from the battery via the main power supply line. Writing means for writing predetermined data to a predetermined address of the battery backup RAM before the main switch is turned off, and writing by the writing means when the main switch is turned on last time. Reading means for reading the stored data at the predetermined address of the battery backup RAM after the main switch is turned on next time; and determining whether or not the data read by the reading means matches the predetermined data. When the match determining means determines that there is no match,
The predetermined data is written to a predetermined address of the battery backup RAM, and then the data at the predetermined address is read, and it is determined whether or not the data matches the predetermined data. An abnormality detection device for a battery backup RAM, comprising: a second RAM abnormality determination means for determining an abnormality.
【請求項5】書込可能不揮発性メモリを有し、 前記第2RAM異常判定手段は、前記主スイッチがオン
される毎に連続して不一致と判定された場合に、不一致
であることを前記書込可能不揮発性メモリに記憶し、そ
の書込可能不揮発性メモリに記憶さた連続不一致回数が
所定数以上となった場合に前記バッテリバックアップR
AMを異常と判定することを特徴とする請求項4に記載
のバッテリバックアップRAMの異常検出装置。
5. A non-volatile memory, comprising: a writable nonvolatile memory; and said second RAM abnormality determination means, when the main switch is turned on, continuously determining that the data does not match. The battery backup R is stored when the number of consecutive mismatches stored in the writable nonvolatile memory is equal to or greater than a predetermined number.
The abnormality detection device for a battery backup RAM according to claim 4, wherein the AM is determined to be abnormal.
【請求項6】前記電子制御装置は自動車のエンジン制御
を行なう装置であり、前記バッテリバックアップRAM
は、前記電子制御装置が前記バッテリから給電されてエ
ンジン制御を行なっている間に得られた各種の制御値を
学習値として記憶し、その学習値を次回のエンジン制御
に使用するために、前記電子制御装置が前記バッテリか
らの給電が停止された状態において、その学習値を記憶
するメモリであることを特徴とする請求項1乃至請求項
5のいずれか1項に記載のバッテリバックアップRAM
の異常検出装置。
6. The electronic control unit according to claim 1, wherein said electronic control unit is a device for controlling an engine of a vehicle, and said battery backup RAM
Stores various control values obtained while the electronic control unit is powered by the battery and performing engine control as learning values, and uses the learning values for the next engine control. The battery backup RAM according to any one of claims 1 to 5, wherein the electronic control unit is a memory for storing a learning value when power supply from the battery is stopped.
Abnormality detection device.
JP10048886A 1998-02-12 1998-02-12 Abnormally detector for battery backup ram Pending JPH11232181A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10048886A JPH11232181A (en) 1998-02-12 1998-02-12 Abnormally detector for battery backup ram

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10048886A JPH11232181A (en) 1998-02-12 1998-02-12 Abnormally detector for battery backup ram

Publications (1)

Publication Number Publication Date
JPH11232181A true JPH11232181A (en) 1999-08-27

Family

ID=12815773

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10048886A Pending JPH11232181A (en) 1998-02-12 1998-02-12 Abnormally detector for battery backup ram

Country Status (1)

Country Link
JP (1) JPH11232181A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007207092A (en) * 2006-02-03 2007-08-16 Denso Corp Electronic controller
JP2008286682A (en) * 2007-05-18 2008-11-27 Yazaki Corp Electronic gas meter
JP2011122501A (en) * 2009-12-10 2011-06-23 Fujitsu Ten Ltd Control device and control method
JP2015225023A (en) * 2014-05-29 2015-12-14 日本電産サンキョー株式会社 Encoder

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007207092A (en) * 2006-02-03 2007-08-16 Denso Corp Electronic controller
JP2008286682A (en) * 2007-05-18 2008-11-27 Yazaki Corp Electronic gas meter
JP2011122501A (en) * 2009-12-10 2011-06-23 Fujitsu Ten Ltd Control device and control method
JP2015225023A (en) * 2014-05-29 2015-12-14 日本電産サンキョー株式会社 Encoder

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
JP4274186B2 (en) Failure diagnosis apparatus and failure information recording method
JP4065790B2 (en) In-vehicle electronic control unit
JP3460256B2 (en) Battery disconnection detector
JP4552982B2 (en) Electronic control unit
US7203581B2 (en) Electronic control unit for controlling updating of data in non-volatile memory
JP2006291730A (en) Diagnosis device for vehicle
JPH09230929A (en) Method and device for diagnosing fault of on-vehicle controller
JP3988609B2 (en) Oxygen sensor abnormality detection device
JPH11232181A (en) Abnormally detector for battery backup ram
US20040083071A1 (en) Evaluation, system for fault diagnosis function, computer program product, and computer readable storage medium
JP2006286111A (en) Management apparatus of semiconductor memory
KR20080037815A (en) Self-diagnosis/recovery ecu in vehicle and method for operating the same
JP3644058B2 (en) Electronic control device for vehicle engine and data rewrite control device for EEPROM
JP2004151021A (en) Fault diagnostic device for vehicle
JP4041216B2 (en) Abnormality detection method and abnormality detection device
JPH09161493A (en) Management method for rewritable nonvolatile memory
JP3419060B2 (en) Diagnostic device for vehicles
JP4556666B2 (en) Inspection apparatus and inspection method for in-vehicle failure diagnosis system
JPS60211525A (en) Power supply momentary interruption storage device
JP2004021520A (en) Electronic controller for vehicle
JP2002047998A (en) Controller for vehicle
JP2007138726A (en) Electronic control device and display for vehicle
JP3438270B2 (en) Data backup device and vehicle failure diagnosis device in electronic control system
JP4072198B2 (en) Automatic transmission failure diagnosis device