[go: up one dir, main page]

JPH1173203A - Electronic control unit - Google Patents

Electronic control unit

Info

Publication number
JPH1173203A
JPH1173203A JP9235154A JP23515497A JPH1173203A JP H1173203 A JPH1173203 A JP H1173203A JP 9235154 A JP9235154 A JP 9235154A JP 23515497 A JP23515497 A JP 23515497A JP H1173203 A JPH1173203 A JP H1173203A
Authority
JP
Japan
Prior art keywords
input
microcomputer
main microcomputer
output
signal
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
JP9235154A
Other languages
Japanese (ja)
Other versions
JP3817855B2 (en
Inventor
Hatsuo Okada
初男 岡田
Shinichi Maeda
真一 前田
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 JP23515497A priority Critical patent/JP3817855B2/en
Publication of JPH1173203A publication Critical patent/JPH1173203A/en
Application granted granted Critical
Publication of JP3817855B2 publication Critical patent/JP3817855B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Control By Computers (AREA)
  • Combined Controls Of Internal Combustion Engines (AREA)
  • Safety Devices In Control Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an electronic control unit(ECU) for realizing back-up control by a sub-microcomputer (sub-micon) for an actuator at the time of the generation of abnormality in a main microcomputer (main micon) with a simple constitution. SOLUTION: The device is provided with a main microcomputer 3 whose input and output ports P00-P03 connected with a signal inputting part 41 of a driving circuit 7 for driving a motor M are set as output ports for outputting the driving signals of the motor M to the driving circuit 7 in a normal time, and whose input and output ports P00-P03 are set as input ports when a reset signal is applied to a reset terminal INT, and a sub-micon 5 whose own input and output ports P10-P13 are connected with the ports P00-P03 in a wired OR form. At the time of detecting the abnormality of a main micon 3, the sub-micon 5 continues to apply the reset signal to the reset terminal INT of the main micon 3, and switches the input and output ports P10-P13 to output ports for outputting the driving signals to the driving circuit 7.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、主マイクロコンピ
ュータと副マイクロコンピュータとを備え、主マイクロ
コンピュータに異常が生じた場合に、副マイクロコンピ
ュータが主マイクロコンピュータに代わってアクチュエ
ータを駆動する、バックアップ制御機能を備えた電子制
御装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a backup control system comprising a main microcomputer and a sub-microcomputer, wherein the sub-microcomputer drives an actuator in place of the main microcomputer when an abnormality occurs in the main microcomputer. The present invention relates to an electronic control device having functions.

【0002】[0002]

【従来の技術、及び発明が解決しようとする課題】従来
より、例えば自動車に搭載される車両制御用の電子制御
装置においては、CPU,ROM,RAM,入力ポー
ト,及び出力ポート等を備えたマイクロコンピュータ
(以下、マイコンともいう)が搭載され、そのマイコン
が、ROMに格納されたプログラムに従って、アクチュ
エータを駆動する駆動回路へ駆動信号を出力するように
している。
2. Description of the Related Art Conventionally, for example, an electronic control unit for controlling a vehicle mounted on an automobile has a microcontroller having a CPU, a ROM, a RAM, an input port, an output port, and the like. A computer (hereinafter, also referred to as a microcomputer) is mounted, and the microcomputer outputs a drive signal to a drive circuit that drives the actuator according to a program stored in the ROM.

【0003】そして、この種の電子制御装置では、プロ
グラム暴走によるマイコンの異常な動作を防止するため
に、図6に例示する如く、マイコン51がプログラムの
実行に伴い所謂ウォッチドックパルスWDを定期的に出
力するようにしておくと共に、マイコン51からのウォ
ッチドックパルスWDを監視する監視回路53を設け、
マイコン51からウォッチドックパルスWDが出力され
なくなると、上記監視回路53が、マイコン51の動作
が異常であると判断してマイコン51のリセット端子に
リセット信号RSTを所定時間与え、これにより、マイ
コン51の動作を正常復帰させるようにしている。
In this type of electronic control device, in order to prevent abnormal operation of the microcomputer due to runaway of the program, as shown in FIG. 6, the microcomputer 51 periodically sends a so-called watchdog pulse WD with the execution of the program. And a monitoring circuit 53 for monitoring the watchdog pulse WD from the microcomputer 51 is provided.
When the watchdog pulse WD is no longer output from the microcomputer 51, the monitoring circuit 53 determines that the operation of the microcomputer 51 is abnormal and gives a reset signal RST to the reset terminal of the microcomputer 51 for a predetermined time. Operation is returned to normal.

【0004】ところで、マイコン51へのリセット信号
RSTの付与を解除しても、マイコン51の動作が正常
復帰しないような故障(例えば、プログラム暴走以外の
ハードウエア上の故障)も考えられる。また近年、この
種の電子制御装置に対しては、より高い制御安全性が要
求されている。
[0004] By the way, even if the application of the reset signal RST to the microcomputer 51 is canceled, a malfunction that the operation of the microcomputer 51 does not return to a normal state (for example, a hardware failure other than a program runaway) may be considered. In recent years, higher control safety has been required for this type of electronic control device.

【0005】そこで、制御安全性を一層高めるために
は、制御の中枢を成すマイコンを主マイコンとして設け
ると共に、それとは別のマイコンを副マイコンとして追
加し、主マイコンに異常が生じた場合に、副マイコンが
主マイコンに代わってアクチュエータを駆動する、所謂
バックアップ制御を行うように構成することが考えられ
ている。
Therefore, in order to further enhance the control safety, a microcomputer which is the center of control is provided as a main microcomputer, and another microcomputer is added as a sub-microcomputer. It has been considered that the sub-microcomputer performs so-called backup control in which an actuator is driven in place of the main microcomputer.

【0006】そして、その具体的な構成としては、例え
ば図6に示すものが考えられる。即ち、まず、主マイコ
ン(メインマイコン)51における駆動信号の出力ポー
トPM と、副マイコン(サブマイコン)55における駆
動信号の出力ポートPSとの何れか一方を、アクチュエ
ータ(この例では、アクチュエータのコイルL1〜L
4)を駆動する駆動回路57の信号入力部57aに切り
替えて接続する出力切替回路59を設ける。
As a specific configuration, for example, the configuration shown in FIG. 6 can be considered. That is, first, one of the drive signal output port PM of the main microcomputer (main microcomputer) 51 and the drive signal output port PS of the sub microcomputer (sub microcomputer) 55 is connected to the actuator (in this example, the coil of the actuator). L1-L
4) An output switching circuit 59 for switching to and connecting to the signal input unit 57a of the driving circuit 57 for driving is provided.

【0007】そして、例えば、副マイコン55が、主マ
イコン51からのウォッチドックパルスWDを監視し、
そのウォッチドックパルスWDの出力が停止すると、主
マイコン51の動作が異常であると判断して、自己の出
力ポートPS が主マイコン51の出力ポートPM に代わ
って駆動回路57の信号入力部57aと接続されるよう
に出力切替回路59へ切替信号を出力する。そして更
に、その状態で、副マイコン55が、自己の出力ポート
PS から駆動回路57へアクチュエータを駆動するため
の駆動信号を出力するのである。
Then, for example, the sub microcomputer 55 monitors the watchdog pulse WD from the main microcomputer 51,
When the output of the watchdog pulse WD is stopped, it is determined that the operation of the main microcomputer 51 is abnormal, and its own output port PS is replaced with the signal input section 57a of the drive circuit 57 instead of the output port PM of the main microcomputer 51. A switching signal is output to the output switching circuit 59 so as to be connected. Further, in this state, the sub-microcomputer 55 outputs a drive signal for driving the actuator from its own output port PS to the drive circuit 57.

【0008】しかしながら、上記図6のような構成で
は、出力切替回路59が不可欠であるため、高い制御安
全性を達成することはできるものの、装置の小型化と低
コスト化を実現するには不利である。本発明は、こうし
た問題に鑑みなされたものであり、主マイクロコンピュ
ータに異常が生じた場合の、アクチュエータに対する副
マイクロコンピュータによるバックアップ制御を、簡単
な構成で実現することのできる電子制御装置を提供する
ことを目的としている。
However, in the configuration as shown in FIG. 6, the output switching circuit 59 is indispensable, so that high control safety can be achieved, but it is disadvantageous for realizing miniaturization and cost reduction of the device. It is. The present invention has been made in view of such a problem, and provides an electronic control device that can realize, with a simple configuration, backup control of an actuator by a sub microcomputer when an abnormality occurs in a main microcomputer. It is intended to be.

【0009】[0009]

【課題を解決するための手段、及び発明の効果】かかる
目的を達成するためになされた請求項1に記載の本発明
の電子制御装置においては、ソフトウェアにより入力ポ
ートと出力ポートとに切替可能な入出力ポートを夫々有
した主マイクロコンピュータと副マイクロコンピュータ
とを備えている。
Means for Solving the Problems and Effects of the Invention In order to achieve the above object, the electronic control device of the present invention according to the first aspect is capable of switching between an input port and an output port by software. It has a main microcomputer and a sub microcomputer each having an input / output port.

【0010】そして、主マイクロコンピュータの入出力
ポートは、信号入力部に入力される駆動信号に応じてア
クチュエータを駆動する駆動回路の上記信号入力部に接
続され、また、副マイクロコンピュータの入出力ポート
は、主マイクロコンピュータの入出力ポートと駆動回路
の信号入力部との間の信号経路にワイヤードオア形式で
接続されている。そして更に、両マイクロコンピュータ
のうち、少なくとも主マイクロコンピュータは、そのリ
セット端子にリセット信号が与えられて初期化(リセッ
ト)されると、自己の入出力ポートが入力ポートになる
ものである。
An input / output port of the main microcomputer is connected to the signal input section of the drive circuit for driving the actuator in accordance with a drive signal input to the signal input section. Are connected in a wired-OR manner to a signal path between an input / output port of the main microcomputer and a signal input section of the drive circuit. Further, among the two microcomputers, at least the main microcomputer has its own input / output port becoming an input port when a reset signal is given to its reset terminal and initialized (reset).

【0011】ここで、主マイクロコンピュータは、通常
動作時には、自己の入出力ポートを出力ポートに設定し
て、その出力ポートとしての入出力ポートから駆動回路
へ、アクチュエータを駆動するための駆動信号を出力す
る。そして、監視手段が、主マイクロコンピュータの動
作が正常であるか否かを監視し、この監視手段により主
マイクロコンピュータの動作が異常であると判断される
と、初期化手段が、主マイクロコンピュータのリセット
端子にリセット信号を継続して与える。
Here, during normal operation, the main microcomputer sets its own input / output port as an output port, and sends a drive signal for driving the actuator from the input / output port as the output port to the drive circuit. Output. Then, the monitoring means monitors whether or not the operation of the main microcomputer is normal, and when the monitoring means determines that the operation of the main microcomputer is abnormal, the initialization means causes the initialization of the main microcomputer to proceed. A reset signal is continuously applied to the reset terminal.

【0012】また、副マイクロコンピュータは、監視手
段により主マイクロコンピュータの動作が異常であると
判断されて、初期化手段により主マイクロコンピュータ
のリセット端子にリセット信号が与えられている間、自
己の入出力ポートを出力ポートに設定して、その出力ポ
ートとしての入出力ポートから駆動回路へアクチュエー
タを駆動するための駆動信号を出力し、それ以外の場合
には、自己の入出力ポートを入力ポートに設定する。
The sub-microcomputer is determined by the monitoring means to determine that the operation of the main microcomputer is abnormal, and while the reset signal is being supplied to the reset terminal of the main microcomputer by the initialization means, the sub-microcomputer has its own input. Set the output port as an output port, and output a drive signal to drive the actuator from the input / output port as the output port to the drive circuit; otherwise, set its own input / output port as the input port. Set.

【0013】このため、監視手段により主マイクロコン
ピュータの動作が異常であると判断されていない場合
(即ち正常時)には、副マイクロコンピュータの入出力
ポートが入力ポートに設定されて、主マイクロコンピュ
ータの入出力ポートから出力される駆動信号が、副マイ
クロコンピュータの入出力ポートに影響されることなく
駆動回路の信号入力部に入力され、その結果、アクチュ
エータは、駆動回路により主マイクロコンピュータから
の駆動信号に応じて駆動されることとなる。
For this reason, if the operation of the main microcomputer is not judged to be abnormal by the monitoring means (that is, normal), the input / output port of the sub-microcomputer is set to the input port, and the main microcomputer is set to the input port. The drive signal output from the input / output port of the microcomputer is input to the signal input section of the drive circuit without being affected by the input / output port of the sub-microcomputer. As a result, the actuator is driven by the drive circuit from the main microcomputer. It is driven according to the signal.

【0014】一方、監視手段により主マイクロコンピュ
ータの動作が異常であると判断されると、主マイクロコ
ンピュータが初期化手段により継続して初期化(リセッ
ト)され、その間、主マイクロコンピュータの入出力ポ
ートは強制的に入力ポートになると共に、副マイクロコ
ンピュータが、自己の入出力ポートを出力ポートに設定
して駆動回路へ駆動信号を出力することとなる。
On the other hand, if the operation of the main microcomputer is judged to be abnormal by the monitoring means, the main microcomputer is continuously initialized (reset) by the initialization means, and during that time, the input / output ports of the main microcomputer are reset. Is forced to be an input port, and the sub-microcomputer sets its own input / output port as an output port and outputs a drive signal to the drive circuit.

【0015】よって、主マイクロコンピュータに異常が
生じると、副マイクロコンピュータの入出力ポートから
出力される駆動信号が、主マイクロコンピュータの入出
力ポートに影響されることなく駆動回路の信号入力部に
入力され、その結果、アクチュエータは、駆動回路によ
り副マイクロコンピュータからの駆動信号に応じて駆動
されることとなる。
Therefore, when an abnormality occurs in the main microcomputer, the drive signal output from the input / output port of the sub microcomputer is input to the signal input section of the drive circuit without being affected by the input / output port of the main microcomputer. As a result, the actuator is driven by the drive circuit in accordance with the drive signal from the sub-microcomputer.

【0016】このように本発明の電子制御装置では、主
マイクロコンピュータの異常時に、主マイクロコンピュ
ータのリセット端子へリセット信号を継続して与えるこ
とにより、主マイクロコンピュータの入出力ポートを強
制的に入力ポートとし、更に、その状態で、副マイクロ
コンピュータが、自己の入出力ポートを出力ポートに切
り替えて、そのポートから駆動回路へバックアップ制御
用の駆動信号を出力するようにしている。
As described above, in the electronic control unit of the present invention, when the main microcomputer is abnormal, the input / output port of the main microcomputer is forcibly input by continuously providing the reset signal to the reset terminal of the main microcomputer. In this state, the sub microcomputer switches its own input / output port to an output port, and outputs a drive signal for backup control from the port to the drive circuit.

【0017】従って、本発明の電子制御装置によれば、
図6に示したような出力切替回路59を設けることな
く、主マイクロコンピュータの入出力ポートと副マイク
ロコンピュータの入出力ポートとをワイヤードオア形式
で接続して、その両マイクロコンピュータからの駆動信
号を駆動回路に切り替えて与えることができるため、主
マイクロコンピュータに異常が生じた場合のアクチュエ
ータに対する副マイクロコンピュータによるバックアッ
プ制御を、非常に簡単な構成で実現することができる。
よって、本発明の電子制御装置によれば、制御安全性と
装置の小型化及び低コスト化とを、高次元で両立させる
ことができる。
Therefore, according to the electronic control device of the present invention,
Without providing the output switching circuit 59 as shown in FIG. 6, the input / output port of the main microcomputer and the input / output port of the sub-microcomputer are connected in a wired-OR manner, and drive signals from both microcomputers are connected. Since the switching can be provided to the drive circuit, backup control of the actuator by the sub-microcomputer when an abnormality occurs in the main microcomputer can be realized with a very simple configuration.
Therefore, according to the electronic control device of the present invention, both control safety and miniaturization and cost reduction of the device can be achieved at a high level.

【0018】尚、ソフトウェアにより入力ポートと出力
ポートとに切替可能な入出力ポートを有したマイクロコ
ンピュータは、例えば特公昭60−54682号公報等
に記載されているように周知のものである。具体的に
は、この種のマイクロコンピュータは、入出力ポートを
入力ポートと出力ポートとの何れに設定するかを決める
ための入出力設定用レジスタを内蔵しており、ソフトウ
ェアによって(プログラムの実行によって)上記入出力
設定用レジスタの値を書き替えることにより、入出力ポ
ートを入力ポートと出力ポートとの何れかに任意に設定
することができるようになっている。
A microcomputer having an input / output port that can be switched between an input port and an output port by software is well known as described in, for example, Japanese Patent Publication No. 60-54682. Specifically, this type of microcomputer has an input / output setting register for determining whether the input / output port is to be set to an input port or an output port. By rewriting the value of the input / output setting register, the input / output port can be arbitrarily set to any of the input port and the output port.

【0019】また、この種の切替可能な入出力ポートを
有するマイクロコンピュータは、一般に、リセット端子
にリセット信号が与えられて初期化されると、上記入出
力設定用レジスタの値が、入出力ポートを入力ポートに
設定する方の値に初期化されるように構成されている。
よって、このようなマイクロコンピュータは、リセット
端子にリセット信号が与えられると、その入出力ポート
が強制的に(ハードウェア的に)入力ポートとなるた
め、本発明の電子制御装置における主マイクロコンピュ
ータとして用いることができる。
In general, a microcomputer having this type of switchable input / output port is generally configured such that when a reset signal is applied to a reset terminal and initialized, the value of the input / output setting register is changed to the input / output port. Is configured to be initialized to the value set for the input port.
Therefore, in such a microcomputer, when a reset signal is given to the reset terminal, the input / output port is forcibly (hardware) an input port, and therefore, as a main microcomputer in the electronic control device of the present invention. Can be used.

【0020】次に、請求項2に記載の電子制御装置で
は、副マイクロコンピュータが、駆動系異常検出手段を
備えている。そして、この駆動系異常検出手段は、監視
手段により主マイクロコンピュータの動作が異常である
と判断されていない場合に、主マイクロコンピュータか
ら駆動回路へ出力されている駆動信号を当該副マイクロ
コンピュータの入出力ポートを介して監視すると共に、
駆動回路からアクチュエータに至る電流経路の電圧レベ
ルを当該副マイクロコンピュータの他の入力ポートを介
して監視し、更に、前記駆動信号の監視結果と前記電圧
レベルの監視結果とに基づき、駆動回路及びその駆動回
路からアクチュエータに至る電流経路の異常を検出す
る。
Next, in the electronic control device according to the second aspect, the sub-microcomputer has the drive system abnormality detecting means. When the operation of the main microcomputer is not determined to be abnormal by the monitoring means, the drive system abnormality detection means outputs the drive signal output from the main microcomputer to the drive circuit to the input of the sub microcomputer. Monitoring through the output port,
The voltage level of the current path from the drive circuit to the actuator is monitored via another input port of the sub-microcomputer, and further based on the monitor result of the drive signal and the monitor result of the voltage level, the drive circuit and its An abnormality in the current path from the drive circuit to the actuator is detected.

【0021】つまり、請求項2に記載の電子制御装置で
は、主マイクロコンピュータから駆動回路へ出力されて
いる駆動信号と、駆動回路からアクチュエータに至る電
流経路の電圧レベルとに基づき、例えば、駆動信号に応
じて前記電圧レベルが変化しているか否かといった手順
で、駆動回路及びその駆動回路からアクチュエータに至
る電流経路の異常を検出するようにしており、特に、そ
の異常検出を副マイクロコンピュータ側で行うようにし
ている。
That is, in the electronic control device according to the second aspect, for example, the drive signal is output based on the drive signal output from the main microcomputer to the drive circuit and the voltage level of the current path from the drive circuit to the actuator. The abnormalities of the drive circuit and the current path from the drive circuit to the actuator are detected by a procedure such as whether or not the voltage level is changed in accordance with the above. Particularly, the abnormality is detected by the sub-microcomputer side. I'm trying to do it.

【0022】そして、このような請求項2に記載の電子
制御装置によれば、主マイクロコンピュータのポート数
を節約することができるという点で有利である。つま
り、例えば図6に示すように、主マイコン51が、駆動
回路57からアクチュエータに至る電流経路の電圧レベ
ル(図6では、駆動回路57とアクチュエータとを接続
する端子J1〜J4の電圧レベル)を入力回路61を介
して監視し、その電流経路の電圧レベルと自己の出力ポ
ートPM から出力している駆動信号とを比較すること
で、駆動回路57及び上記電流経路の異常を検出するよ
うに構成することも考えられるが、一般に、主マイコン
51は、センサやスイッチなどからの様々な情報を入力
する必要がある。
The electronic control unit according to the second aspect is advantageous in that the number of ports of the main microcomputer can be reduced. That is, as shown in FIG. 6, for example, the main microcomputer 51 sets the voltage level of the current path from the drive circuit 57 to the actuator (in FIG. 6, the voltage levels of the terminals J1 to J4 connecting the drive circuit 57 and the actuator). It is configured to detect an abnormality in the drive circuit 57 and the current path by monitoring via the input circuit 61 and comparing the voltage level of the current path with the drive signal output from its own output port PM. However, in general, the main microcomputer 51 needs to input various information from sensors, switches, and the like.

【0023】よって、図6のように構成すると、主マイ
コン51が上記電流経路の電圧レベルを監視するために
用いる入力ポートPK の分だけ、主マイコン51でのポ
ート不足を招き易くなるのであるが、請求項2に記載の
如く構成すれば、そのような問題を回避することができ
るのである。
Therefore, with the configuration as shown in FIG. 6, the shortage of ports in the main microcomputer 51 is easily caused by the input port PK used by the main microcomputer 51 for monitoring the voltage level of the current path. With such a configuration, such a problem can be avoided.

【0024】次に、請求項3に記載の電子制御装置で
は、初期化手段が、監視手段により主マイクロコンピュ
ータの動作が異常であると判断されると、当該電子制御
装置への電源供給が遮断されるまでの間、主マイクロコ
ンピュータのリセット端子にリセット信号を与え続ける
ように構成されている。
Next, in the electronic control device according to the third aspect, when the initialization means determines that the operation of the main microcomputer is abnormal by the monitoring means, the power supply to the electronic control device is cut off. Until the reset, the reset signal is continuously supplied to the reset terminal of the main microcomputer.

【0025】このため、請求項3に記載の電子制御装置
においては、主マイクロコンピュータの動作に異常が生
じると、その後、当該電子制御装置への電源供給が遮断
されるまでの間、主マイクロコンピュータがリセットさ
れ続けて、主マイクロコンピュータの入出力ポートが強
制的に入力ポートになると共に、副マイクロコンピュー
タが、自己の入出力ポートを出力ポートに設定して駆動
回路へバックアップ制御用の駆動信号を出力し続けるこ
ととなる。
Therefore, in the electronic control device according to the third aspect, when an abnormality occurs in the operation of the main microcomputer, the main microcomputer is thereafter operated until the power supply to the electronic control device is cut off. Continues to be reset, the input / output port of the main microcomputer is forcibly changed to the input port, and the sub-microcomputer sets its own input / output port as the output port and sends a drive signal for backup control to the drive circuit. Output will continue.

【0026】よって、この請求項3に記載の電子制御装
置によれば、主マイクロコンピュータにリセット信号に
よるリセット(初期化)をかけても正常復帰しないよう
な故障(例えば、プログラム暴走以外のハードウェア上
の故障)が生じた場合でも、副マイクロコンピュータか
らの駆動信号によって、アクチュエータの異常な動作を
確実に防止できるという点で有利である。
Therefore, according to the electronic control apparatus of the third aspect, a failure such that the main microcomputer does not return to normal even if reset (initialization) is performed by a reset signal (for example, hardware other than program runaway) This is advantageous in that abnormal operation of the actuator can be reliably prevented by the drive signal from the sub-microcomputer even when the above-mentioned failure occurs.

【0027】一方、請求項4に記載の電子制御装置で
は、初期化手段が、監視手段により主マイクロコンピュ
ータの動作が異常であると判断されると、予め定められ
た所定時間の間、主マイクロコンピュータのリセット端
子にリセット信号を与え続けるように構成されている。
On the other hand, in the electronic control device according to the fourth aspect, when the initializing means determines that the operation of the main microcomputer is abnormal by the monitoring means, the initializing means sets the main microcomputer for a predetermined time. The computer is configured to continuously supply a reset signal to a reset terminal of the computer.

【0028】このため、請求項4に記載の電子制御装置
においては、主マイクロコンピュータの動作に異常が生
じると、予め定められた所定時間の間だけ、主マイクロ
コンピュータがリセットされ続けて、主マイクロコンピ
ュータの入出力ポートが強制的に入力ポートになると共
に、その間だけ、副マイクロコンピュータが、自己の入
出力ポートを出力ポートに設定して駆動回路へ駆動信号
を出力することとなる。
Therefore, in the electronic control device according to the fourth aspect, if an abnormality occurs in the operation of the main microcomputer, the main microcomputer is continuously reset for a predetermined period of time, and the main microcomputer is reset. The input / output port of the computer is forcibly changed to the input port, and only during this time, the sub-microcomputer sets its own input / output port as the output port and outputs a drive signal to the drive circuit.

【0029】よって、このような請求項4に記載の電子
制御装置によれば、主マイクロコンピュータに生じた異
常が、リセット信号によるリセットを解除すれば正常復
帰するような異常(プログラム暴走)であった場合に
は、主マイクロコンピュータのリセット中にのみ、アク
チュエータが副マイクロコンピュータからの駆動信号に
よってバックアップ制御され、リセットの解除後は、ア
クチュエータが正常復帰した主マイクロコンピュータか
らの駆動信号によって制御されることとなり、システム
全体の正常復帰を速やかに行うことができるという点で
有利である。
Therefore, according to the electronic control device of the fourth aspect, the abnormality that has occurred in the main microcomputer is an abnormality (program runaway) that returns to normal if the reset by the reset signal is released. In this case, the actuator is controlled by the drive signal from the sub-microcomputer only during the reset of the main microcomputer, and is controlled by the drive signal from the main microcomputer after the reset is released. This is advantageous in that the normal recovery of the entire system can be promptly performed.

【0030】ところで、前述した請求項1〜4に記載の
電子制御装置において、監視手段と初期化手段は、請求
項5に記載のように、副マイクロコンピュータに備えら
れるように構成することができる。つまり、請求項5に
記載の電子制御装置では、副マイクロコンピュータが、
プログラムを実行することにより、監視手段と初期化手
段との機能を果たすようにしている。
By the way, in the electronic control device according to the first to fourth aspects, the monitoring means and the initialization means can be configured to be provided in the sub-microcomputer as described in the fifth aspect. . That is, in the electronic control device according to claim 5, the sub-microcomputer includes:
The functions of the monitoring means and the initialization means are performed by executing the program.

【0031】そして、請求項5に記載のように構成すれ
ば、監視手段と初期化手段を副マイクロコンピュータと
は別に設けた場合よりも、当該電子制御装置を小型で且
つ低コストなものとすることができる。
According to the fifth aspect of the present invention, the electronic control unit can be made smaller and less expensive than when the monitoring means and the initialization means are provided separately from the sub microcomputer. be able to.

【0032】[0032]

【発明の実施の形態】以下、本発明が適用された実施形
態について図面を用いて説明する。尚、本発明は、下記
の実施形態に限定されることなく、本発明の技術的範囲
に属する限り、種々の形態を採り得ることは言うまでも
ない。
Embodiments of the present invention will be described below with reference to the drawings. It is needless to say that the present invention is not limited to the embodiments described below, and can take various forms as long as it belongs to the technical scope of the present invention.

【0033】[第1実施形態]まず図1は、自動車のエ
ンジンを制御する第1実施形態の電子制御装置(以下、
ECUという)1の構成を表す構成図である。尚、本実
施形態のECU1は、エンジンに対する燃料噴射量及び
点火時期や、エンジンの吸気経路に設けられたスロット
ル弁(延いては、エンジンの吸入空気量)等を制御する
ものであるが、ここでは、主にスロットル弁の制御に関
する部分について説明する。
[First Embodiment] First, FIG. 1 shows an electronic control unit (hereinafter, referred to as an electronic control unit) of a first embodiment for controlling an engine of an automobile.
FIG. 2 is a configuration diagram illustrating a configuration of an ECU (referred to as ECU). The ECU 1 of the present embodiment controls the fuel injection amount and ignition timing for the engine, a throttle valve provided in the intake path of the engine (and the intake air amount of the engine), and the like. A description will be mainly given of a portion related to control of the throttle valve.

【0034】図1に示すように、ECU1は、エンジン
を制御するための様々な制御処理を実行する主マイクロ
コンピュータとしてのメインマイコン3と、メインマイ
コン3に異常が生じた場合に、メインマイコン3に代わ
って、少なくとも上記スロットル弁を制御する副マイク
ロコンピュータとしてのサブマイコン5と、メインマイ
コン3とサブマイコン5との何れか一方から出力される
駆動信号に応じて、上記スロットル弁の開度を調節する
アクチュエータとしてのステッピングモータMを駆動す
る駆動回路7と、自動車に搭載されたバッテリBTのバ
ッテリ電圧VB(通常12V)がイグニッションスイッ
チIGSを介して入力され、そのバッテリ電圧VB を当
該ECU1が動作するための電源電圧(本実施形態では
5V)に変換して、上記両マイコン3,5や駆動回路7
等に供給する電源回路9とを備えている。
As shown in FIG. 1, the ECU 1 includes a main microcomputer 3 as a main microcomputer for executing various control processes for controlling the engine, and a main microcomputer 3 when an abnormality occurs in the main microcomputer 3. Instead, at least the sub-microcomputer 5 as a sub-microcomputer for controlling the throttle valve and the opening degree of the throttle valve in accordance with a drive signal output from one of the main microcomputer 3 and the sub-microcomputer 5 A drive circuit 7 for driving a stepping motor M as an actuator for adjustment, and a battery voltage VB (normally 12 V) of a battery BT mounted on an automobile are input via an ignition switch IGS, and the ECU 1 operates the battery voltage VB. To a power supply voltage (5 V in the present embodiment) Serial both the microcomputer 3 and 5 and the driving circuit 7
And the like, and a power supply circuit 9 for supplying power to the power supply.

【0035】そして、本実施形態においては、上記ステ
ッピングモータMの4つの励磁コイルL1,L2,L
3,L4の一端が、ECU1の外部でバッテリ電圧VB
に接続されており、その各励磁コイルL1〜L4のバッ
テリ電圧VB とは反対側の端部が、夫々、ECU1に設
けられた4つのコネクタ端子J1,J2,J3,J4を
介して駆動回路7の後述する信号出力部43に接続され
ている。
In the present embodiment, the four exciting coils L1, L2, L
3, one end of L4 is connected to the battery voltage VB outside the ECU 1.
The end of each of the exciting coils L1 to L4 opposite to the battery voltage VB is connected to a drive circuit 7 via four connector terminals J1, J2, J3, and J4 provided in the ECU 1, respectively. Is connected to a signal output unit 43 described later.

【0036】また、ECU1は、上記コネクタ端子J1
〜J4の各々に一端が接続され、他端がバッテリBTの
マイナス側である接地電位(=0V)に接続された、4
つのプルダウン用抵抗器R1,R2,R3,R4と、上
記各コネクタ端子J1〜J4の電圧レベル(即ち、駆動
回路7からステッピングモータMの4つの励磁コイルL
1〜L4に至る各電流経路の電圧レベル)を、0Vから
5Vまでの論理信号レベルに夫々変換してサブマイコン
5に入力させる入力回路11とを備えている。
The ECU 1 is connected to the connector terminal J1.
To J4, one end of which is connected to the ground potential (= 0V) which is the negative side of the battery BT.
The two pull-down resistors R1, R2, R3, and R4 and the voltage levels of the connector terminals J1 to J4 (that is, the four exciting coils L of the stepping motor M from the drive circuit 7).
And an input circuit 11 for converting the voltage level of each current path from 1 to L4 into a logic signal level of 0 V to 5 V and inputting the logic signal level to the sub-microcomputer 5.

【0037】尚、プルダウン用抵抗器R1〜R4は、励
磁コイルL1〜L4が断線したり、或いは、励磁コイル
L1〜L4がコネクタ端子J1〜J4から外れた場合
に、各コネクタ端子J1〜J4の電圧レベルを0Vに安
定させるためのものである。また、入力回路11は、各
コネクタ端子J1〜J4の電圧レベルが5Vよりも大き
い場合に、その電圧レベルを5Vにクランプしてサブマ
イコン5へ出力する。
When the exciting coils L1 to L4 are disconnected or when the exciting coils L1 to L4 are disengaged from the connector terminals J1 to J4, the pull-down resistors R1 to R4 are connected to the respective connector terminals J1 to J4. This is for stabilizing the voltage level at 0V. Further, when the voltage level of each of the connector terminals J1 to J4 is higher than 5V, the input circuit 11 clamps the voltage level to 5V and outputs it to the sub-microcomputer 5.

【0038】ここで、メインマイコン3とサブマイコン
5との各々は、CPU,ROM,及びRAMと、入力専
用の入力ポート(入力専用ポート)と、出力専用の出力
ポート(出力専用ポート)と、ソフトウェアにより入力
ポートと出力ポートとに切替可能な入出力ポートと、そ
の入出力ポートを入力ポートと出力ポートとの何れに設
定するかを決めるための入出力設定用レジスタとを備え
た周知のシングルチップマイクロコンピュータであり、
ソフトウェアにより(プログラムの実行により)上記入
出力設定用レジスタの値を書き替えることで、上記入出
力ポートを入力ポートと出力ポートとの何れかに任意に
設定することができるようになっている。
Here, each of the main microcomputer 3 and the sub-microcomputer 5 includes a CPU, a ROM, and a RAM, an input-only input port (input-only port), an output-only output port (output-only port), A well-known single unit including an input / output port that can be switched between an input port and an output port by software, and an input / output setting register for determining whether the input / output port is set to an input port or an output port. Chip microcomputer,
By rewriting the value of the input / output setting register by software (by executing a program), the input / output port can be arbitrarily set to any of the input port and the output port.

【0039】具体的に説明すると、両マイコン3,5の
入出力ポートは、図2に示すように、上記入出力設定用
レジスタの値に対応した入出力切替信号SC がハイレベ
ルの時(つまり、入出力設定用レジスタの値が「1」の
時)に、マイコンの内部で生成された出力信号SO を当
該ポートの端子Pへ出力する出力バッファ21と、上記
入出力切替信号SC がロウレベルの時(つまり、入出力
設定用レジスタの値が「0」の時)に、当該ポートの端
子Pに入力される信号をマイコンの内部へ入力信号SI
として取り込む入力バッファ23と、その入力バッファ
23と端子Pとの間に直列に設けられた入力保護抵抗2
5とから構成されている。よって、ソフトウェアによっ
て上記入出力設定用レジスタに「0」を書き込めば、そ
のレジスタに対応する入出力ポートを入力ポートに設定
することができ、また、上記入出力設定用レジスタに
「1」を書き込めば、そのレジスタに対応する入出力ポ
ートを出力ポートに設定することができる。
More specifically, as shown in FIG. 2, the input / output ports of both microcomputers 3 and 5 are set when the input / output switching signal SC corresponding to the value of the input / output setting register is at a high level (that is, When the value of the input / output setting register is "1"), the output buffer 21 for outputting the output signal So generated inside the microcomputer to the terminal P of the port, and the input / output switching signal SC having the low level At the time (that is, when the value of the input / output setting register is “0”), the signal input to the terminal P of the port is input to the microcomputer by the input signal SI.
And an input protection resistor 2 provided in series between the input buffer 23 and the terminal P.
And 5. Therefore, if "0" is written to the I / O setting register by software, the I / O port corresponding to that register can be set as an input port, and "1" can be written to the I / O setting register. For example, an input / output port corresponding to the register can be set as an output port.

【0040】また、少なくともメインマイコン3は、そ
のリセット端子INITにロウレベルのリセット信号R
STが与えられて初期化(リセット)されると、上記入
出力設定用レジスタの値が、入出力ポートを入力ポート
に設定する方の「0」に初期化されるように構成されて
いる。このため、メインマイコン3では、リセット端子
INITにロウレベルのリセット信号RSTが与えられ
ると、全ての入出力ポートが強制的に(ハードウェア的
に)入力ポートとなる。
At least the main microcomputer 3 supplies a low-level reset signal R to its reset terminal INIT.
When the ST is given and initialized (reset), the value of the input / output setting register is initialized to “0” which sets the input / output port as the input port. Therefore, in the main microcomputer 3, when a low-level reset signal RST is supplied to the reset terminal INIT, all the input / output ports are forcibly (hardware) input ports.

【0041】そして、本実施形態のECU1において
は、メインマイコン3の入出力ポートのうち、4つの入
出力ポートP00,P01,P02,P03が、駆動回路7の後
述する信号入力部41に接続されている。そして更に、
サブマイコン5の入出力ポートのうち、4つの入出力ポ
ートP10,P11,P12,P13が、夫々、4つの抵抗器R
5,R6,R7,R8を介して、メインマイコン3の各
入出力ポートP00,P01,P02,P03に接続されてい
る。つまり、サブマイコン5の入出力ポートP10,P1
1,P12,P13は、メインマイコン3の入出力ポートP0
0,P01,P02,P03と駆動回路7の信号入力部41と
の間の信号経路にワイヤードオア形式で接続されてい
る。また、サブマイコン5の入出力ポートのうちの、他
の4つの入出力ポートP20,P21,P22,P23には、入
力回路11からの信号が入力されている。
In the ECU 1 of the present embodiment, among the input / output ports of the main microcomputer 3, four input / output ports P00, P01, P02, and P03 are connected to a signal input section 41 of the drive circuit 7, which will be described later. ing. And furthermore
Of the input / output ports of the sub-microcomputer 5, four input / output ports P10, P11, P12 and P13 are respectively connected to four resistors R
5, R6, R7, and R8 are connected to the input / output ports P00, P01, P02, and P03 of the main microcomputer 3. That is, the input / output ports P10, P1 of the sub-microcomputer 5
1, P12 and P13 are input / output ports P0 of the main microcomputer 3.
A signal path between 0, P01, P02, P03 and the signal input section 41 of the drive circuit 7 is connected in a wired-OR manner. The signals from the input circuit 11 are input to the other four input / output ports P20, P21, P22, and P23 of the input / output ports of the sub-microcomputer 5.

【0042】一方、駆動回路7は、図3に示すように、
電源回路9から供給される電源電圧(5V)の電源ライ
ンLV にエミッタが接続されたPNPトランジスタ31
と、電源ラインLV とPNPトランジスタ31のベース
との間に接続された誤動作防止用の抵抗器33と、PN
Pトランジスタ31のベースに一端が接続された電流制
限用の抵抗器35と、エミッタが接地電位に接続された
出力用のNPNトランジスタ37と、接地電位とNPN
トランジスタ37のベースとの間に接続された誤動作防
止用の抵抗器38と、PNPトランジスタ31のコレク
タとNPNトランジスタ37のベースとの間に接続され
た電流制限用の抵抗器39と、からなる単位駆動回路
を、ステッピングモータMの各励磁コイルL1〜L4に
対応して4組備えている。尚、図3では1つの単位駆動
回路のみ示している。
On the other hand, as shown in FIG.
PNP transistor 31 whose emitter is connected to power supply line LV of power supply voltage (5 V) supplied from power supply circuit 9
A resistor 33 for preventing malfunction which is connected between the power supply line LV and the base of the PNP transistor 31;
A current limiting resistor 35 having one end connected to the base of P transistor 31; an output NPN transistor 37 having an emitter connected to the ground potential;
A unit composed of a malfunction preventing resistor 38 connected between the base of the transistor 37 and a current limiting resistor 39 connected between the collector of the PNP transistor 31 and the base of the NPN transistor 37. Four drive circuits are provided corresponding to the respective excitation coils L1 to L4 of the stepping motor M. FIG. 3 shows only one unit drive circuit.

【0043】そして、駆動回路7では、抵抗器35のP
NPトランジスタ31とは反対側の端部が、メインマイ
コン3の入出力ポートP00,P01,P02,P03の何れか
に接続される信号入力部41となっており、また、NP
Nトランジスタ37のコレクタが、上記各励磁コイルL
1〜L4のバッテリ電圧VB とは反対側の端部の何れか
(即ち、コネクタ端子J1〜J4の何れか)に接続され
る信号出力部43となっている。
Then, in the drive circuit 7, the P of the resistor 35
An end opposite to the NP transistor 31 is a signal input unit 41 connected to any of the input / output ports P00, P01, P02, and P03 of the main microcomputer 3.
The collector of the N transistor 37 is connected to each of the exciting coils L
The signal output unit 43 is connected to any one of the ends of the battery terminals 1 to L4 opposite to the battery voltage VB (that is, any one of the connector terminals J1 to J4).

【0044】つまり、駆動回路7では、信号入力部41
にロウレベルの駆動信号が入力されると、PNPトラン
ジスタ31とNPNトランジスタ37がオンして、対応
する励磁コイルL1〜L4にNPNトランジスタ37を
介して駆動電流が流れ、逆に、信号入力部41にハイレ
ベルの駆動信号が入力されると、PNPトランジスタ3
1とNPNトランジスタ37がオフして、対応する励磁
コイルL1〜L4への通電が停止される。
That is, in the drive circuit 7, the signal input section 41
When a low-level drive signal is input to the PNP transistor 31 and the NPN transistor 37, the drive current flows through the corresponding excitation coils L1 to L4 via the NPN transistor 37, and conversely, the signal input section 41 When a high-level drive signal is input, the PNP transistor 3
1 and the NPN transistor 37 are turned off, and the energization to the corresponding exciting coils L1 to L4 is stopped.

【0045】次に、図1にて図示はされていないが、メ
インマイコン3には、エンジンの回転数を検出する回転
数センサ、アクセルペダルの開度を検出するペダル開度
センサ、及びエンジンの冷却水温を検出する水温センサ
等、エンジンを制御するために必要な様々なセンサから
の信号が入力されている。
Next, although not shown in FIG. 1, the main microcomputer 3 includes a rotation speed sensor for detecting the rotation speed of the engine, a pedal opening sensor for detecting the opening of the accelerator pedal, and Signals from various sensors necessary for controlling the engine, such as a water temperature sensor for detecting a cooling water temperature, are input.

【0046】そして、メインマイコン3は、自己のリセ
ット端子INITにロウレベルのリセット信号RSTが
与えられていない(入力されていない)通常動作時に
は、まず動作開始の直後に、自己のROMに格納されて
いる初期化処理用のプログラムを実行して、上記入出力
ポートP00〜P03を前述した手順で出力ポートに設定
し、その後、自己のROMに格納されているエンジン制
御用のプログラム(以下、制御プログラムという)を繰
り返し実行することにより、上記各センサからの信号に
基づきスロットル弁の制御開度を算出して、その算出し
た制御開度に応じた駆動信号を出力ポートとしての入出
力ポートP00〜P03から駆動回路7へ出力する。
In a normal operation in which the low-level reset signal RST is not supplied to the reset terminal INIT of the main microcomputer 3 (ie, the main microcomputer 3 is not input), the main microcomputer 3 first stores the low-level reset signal RST in its own ROM immediately after the operation starts. A program for initialization processing is executed to set the input / output ports P00 to P03 as output ports in the above-described procedure. Thereafter, an engine control program (hereinafter referred to as a control program) stored in its own ROM. ) Is repeatedly executed to calculate the control opening of the throttle valve based on the signal from each of the sensors, and drive signals corresponding to the calculated control opening are input / output ports P00 to P03 as output ports. To the drive circuit 7.

【0047】また、メインマイコン3は、上記制御プロ
グラムを実行することに伴って、ウォッチドックパルス
WD1を定期的(本実施形態では、16ms以内毎)に
出力するようになっている。一方、図1に示すように、
サブマイコン5には、メインマイコン3からのウォッチ
ドックパルスWD1と、エンジンを始動させるためのス
タータスイッチがオンしているか否かを示すスタータ信
号STAとが入力されている。
The main microcomputer 3 outputs a watchdog pulse WD1 periodically (in this embodiment, every 16 ms or less) in accordance with the execution of the control program. On the other hand, as shown in FIG.
The sub-microcomputer 5 receives a watchdog pulse WD1 from the main microcomputer 3 and a starter signal STA indicating whether a starter switch for starting the engine is turned on.

【0048】そして、サブマイコン5は、後述するフェ
イルセーフ処理(図4)を実行することにより、駆動回
路7及び駆動回路7からステッピングモータMの各励磁
コイルL1〜L4に至る電流経路が正常であるか否かを
判断すると共に、メインマイコン3からのウォッチドッ
クパルスWD1を監視して、メインマイコン3の動作が
正常であるか否かを判断する。そして更に、サブマイコ
ン5は、上記フェイルセーフ処理の実行により、メイン
マイコン3の動作が異常であると判断すると、メインマ
イコン3のリセット端子INITにリセット信号RST
を与えるためのハイレベルのリセット指令信号RST2
をポートPR から出力すると共に、メインマイコン3に
代わって入出力ポートP10〜P13から駆動回路7へバッ
クアップ制御用の駆動信号を出力する。
Then, the sub-microcomputer 5 executes a fail-safe process (FIG. 4) described later, so that the drive circuit 7 and the current paths from the drive circuit 7 to the respective exciting coils L1 to L4 of the stepping motor M are normal. In addition to determining whether or not there is, the watchdog pulse WD1 from the main microcomputer 3 is monitored to determine whether or not the operation of the main microcomputer 3 is normal. Further, when the sub-microcomputer 5 determines that the operation of the main microcomputer 3 is abnormal by executing the fail-safe processing, the reset signal RST is input to the reset terminal INIT of the main microcomputer 3.
-Level reset command signal RST2 for applying
Is output from the port PR, and a drive signal for backup control is output from the input / output ports P10 to P13 to the drive circuit 7 in place of the main microcomputer 3.

【0049】このため、図1に示すように、ECU1に
は、上記リセット指令信号RST2に応じてメインマイ
コン3にリセットをかけるための回路として、コレクタ
がメインマイコン3のリセット端子INITに接続さ
れ、エミッタが接地電位に接続され、ベースが電流制限
用の抵抗器R9を介してサブマイコン5の上記ポートP
R に接続されたNPNトランジスタTr1と、そのNP
NトランジスタTr1のベースと接地電位との間に接続
された誤動作防止用の抵抗器R10とからなる、レベル
反転回路13が設けられている。
For this reason, as shown in FIG. 1, the ECU 1 is connected to a reset terminal INIT of the main microcomputer 3 as a circuit for resetting the main microcomputer 3 in response to the reset command signal RST2. The emitter is connected to the ground potential, and the base is connected to the port P of the sub-microcomputer 5 via a current limiting resistor R9.
The NPN transistor Tr1 connected to R and its NP
A level inversion circuit 13 including a malfunction prevention resistor R10 connected between the base of the N transistor Tr1 and the ground potential is provided.

【0050】つまり、レベル反転回路13では、サブマ
イコン5のポートPR からハイレベルのリセット指令信
号RST2が出力されると、NPNトランジスタTr1
がオンし、これにより、メインマイコン3のリセット端
子INITにロウレベルのリセット信号RSTが与えら
れて、メインマイコン3がリセットされる。
That is, in the level inversion circuit 13, when the high-level reset command signal RST2 is output from the port PR of the sub-microcomputer 5, the NPN transistor Tr1
Is turned on, whereby a low-level reset signal RST is given to the reset terminal INIT of the main microcomputer 3, and the main microcomputer 3 is reset.

【0051】また、ECU1に設けられた電源回路9
は、イグニッションスイッチIGSがオンされてから、
自己が供給する5Vの電源電圧が安定するまでの間、メ
インマイコン3とサブマイコン5とにリセットをかける
所謂パワーオンリセット機能と、メインマイコン3から
ウォッチドックパルスWD1が定期的に出力されている
か否かを監視して、ウォッチドックパルスWD1の出力
が停止すると、メインマイコン3のリセット端子INI
Tにロウレベルのリセット信号RSTを微小時間(例え
ば100ms)出力する監視機能とを備えている。つま
り、本実施形態において、メインマイコン3の動作は、
サブマイコン5と電源回路9との両方によって監視され
ている。
The power supply circuit 9 provided in the ECU 1
Means that after the ignition switch IGS is turned on,
A so-called power-on reset function for resetting the main microcomputer 3 and the sub-microcomputer 5 until the power supply voltage of 5 V supplied by itself becomes stable, and whether the watchdog pulse WD1 is periodically output from the main microcomputer 3 When the output of the watchdog pulse WD1 is stopped, the reset terminal INI of the main microcomputer 3 is monitored.
A monitoring function for outputting a low-level reset signal RST to T for a very short time (for example, 100 ms) is provided. That is, in the present embodiment, the operation of the main microcomputer 3 is as follows.
It is monitored by both the sub microcomputer 5 and the power supply circuit 9.

【0052】一方更に、本実施形態のECU1では、サ
ブマイコン5も、自己のROMに格納されたプログラム
を実行することに伴って、ウォッチドックパルスWD2
を定期的に出力するようになっている。そして、メイン
マイコン3が、サブマイコン5からウォッチドックパル
スWD2が定期的に出力されているか否かを監視して、
ウォッチドックパルスWD2の出力が停止すると、サブ
マイコン5に異常が生じたと判断するようになってい
る。つまり、メインマイコン3とサブマイコン5は、互
いの動作を監視し合うようになっている。
On the other hand, in the ECU 1 of this embodiment, the sub-microcomputer 5 also executes the program stored in its own ROM, thereby causing the watchdog pulse WD2
Is output periodically. Then, the main microcomputer 3 monitors whether the watchdog pulse WD2 is periodically output from the sub-microcomputer 5, and
When the output of the watchdog pulse WD2 is stopped, it is determined that an abnormality has occurred in the sub-microcomputer 5. That is, the main microcomputer 3 and the sub-microcomputer 5 monitor each other's operations.

【0053】尚、本実施形態では、メインマイコン3に
おいて、ウォッチドックパルスWD1を出力するための
ポートは出力専用ポートであり、センサからの信号を入
力するためのポートと、サブマイコン5からのウォッチ
ドックパルスWD2を入力するためのポートと、サブマ
イコン5から後述するように出力される報知信号CMP
を入力するためのポートは、入力専用ポートである。ま
た、サブマイコン5において、リセット指令信号RST
2を出力するためのポートPR と、ウォッチドックパル
スWD2を出力するためのポートと、上記報知信号CM
Pを出力するためのポートは、出力専用ポートであり、
メインマイコン3からのウォッチドックパルスWD1を
入力するためのポートと、スタータ信号STAを入力す
るためのポートは、入力専用ポートである。
In this embodiment, the port for outputting the watchdog pulse WD1 in the main microcomputer 3 is an output-only port, and the port for inputting a signal from the sensor and the port for outputting the watch A port for inputting the dock pulse WD2, and a notification signal CMP output from the sub-microcomputer 5 as described later.
Is an input-only port. In the sub-microcomputer 5, the reset command signal RST
, A port for outputting a watchdog pulse WD2, and a port PR for outputting a watchdog pulse WD2.
The port for outputting P is an output-only port,
The port for inputting the watchdog pulse WD1 from the main microcomputer 3 and the port for inputting the starter signal STA are input-only ports.

【0054】次に、サブマイコン5で実行されるフェイ
ルセーフ処理について、図4に示すフローチャートに沿
って説明する。尚、サブマイコン5は、イグニッション
スイッチIGSがオンされて電源回路9からの電源電圧
(5V)を受けると動作を開始し、まず最初に、図示し
ない初期化処理を実行して、前述した入出力ポートP10
〜P13,P20〜P23を入力ポートに設定する。そして、
その後、図4のフェイルセーフ処理を、メインマイコン
3がウォッチドックパルスWD1を出力する最大周期
(16ms)よりも短い所定時間毎(例えば1ms毎)
に繰り返し実行する。また、サブマイコン5は、図4の
フェイルセーフ処理と並行して、メインマイコン3から
ウォッチドックパルスWD1が出力される時間間隔を計
時するための計時処理を実行している。
Next, the fail-safe processing executed by the sub-microcomputer 5 will be described with reference to the flowchart shown in FIG. When the ignition switch IGS is turned on and the power supply voltage (5 V) from the power supply circuit 9 is received, the sub-microcomputer 5 starts operation. Port P10
PP13 and P20〜P23 are set as input ports. And
Thereafter, the fail-safe processing of FIG. 4 is performed at predetermined time intervals (for example, every 1 ms) shorter than the maximum cycle (16 ms) at which the main microcomputer 3 outputs the watchdog pulse WD1.
Execute repeatedly. Further, the sub-microcomputer 5 executes a time measurement process for measuring a time interval during which the watchdog pulse WD1 is output from the main microcomputer 3 in parallel with the fail-safe process of FIG.

【0055】図4に示すように、サブマイコン5がフェ
イルセーフ処理の実行を開始すると、まず、ステップ
(以下単に「S」と記す)100にて、メインマイコン
3に対する異常検出動作(後述するS110の動作)を
行うべき条件である異常検出条件が成立しているか否か
を判断する。尚、この異常検出条件は、前述したスター
タ信号STAに基づきスタータスイッチがオン状態から
オフ状態に変化したことが検出され、更に、その時点か
ら電源回路9により供給される電源電圧が十分に安定す
ると見なされる時間が経過している場合に成立する。つ
まり、バッテリ電圧VB 及び電源回路9からの電源電圧
が不安定なエンジン始動直後の期間は、メインマイコン
3に対する異常検出動作を行わないようにしている。
As shown in FIG. 4, when the sub-microcomputer 5 starts executing the fail-safe processing, first, in step (hereinafter simply referred to as "S") 100, an abnormality detection operation for the main microcomputer 3 (S110 to be described later). It is determined whether or not an abnormality detection condition, which is a condition for performing the above operation, is satisfied. The abnormality detection condition is that the starter switch is detected to change from the on state to the off state based on the above-described starter signal STA, and furthermore, if the power supply voltage supplied by the power supply circuit 9 becomes sufficiently stable from that time. It is established when the time to be considered has elapsed. That is, the abnormality detection operation for the main microcomputer 3 is not performed immediately after the start of the engine in which the battery voltage VB and the power supply voltage from the power supply circuit 9 are unstable.

【0056】そして、S100にて異常検出条件が成立
していると判断した場合には、次のS110に進んで、
前述した計時処理の実行により計時されているウォッチ
ドックパルスWD1の出力時間間隔が16ms以内であ
るか否かを判定することにより、メインマイコン3の動
作が正常であるか否かを判断し、ウォッチドックパルス
WD1の出力時間間隔が16ms以内であれば、メイン
マイコン3の動作が正常である(異常ではない)と判断
して、S120に進む。
If it is determined in S100 that the abnormality detection condition is satisfied, the process proceeds to the next S110,
It is determined whether the operation of the main microcomputer 3 is normal by determining whether the output time interval of the watchdog pulse WD1 clocked by the execution of the above-described clock processing is within 16 ms. If the output time interval of the dock pulse WD1 is within 16 ms, it is determined that the operation of the main microcomputer 3 is normal (not abnormal), and the process proceeds to S120.

【0057】また、上記S100にて異常検出条件が成
立していないと判断した場合には、そのままS120に
移行する。S120では、入力ポートとして設定されて
いる入出力ポートP10〜P13の入力状態、即ちメインマ
イコン3の入出力ポートP00〜P03から駆動回路7へ出
力されている各駆動信号を読み込む。そして、続くS1
30にて、入力ポートとして設定されている入出力ポー
トP20〜P23の入力状態、即ち各コネクタ端子J1〜J
4の電圧レベル(駆動回路7から励磁コイルL1〜L4
に至る各電流経路の電圧レベル)を0Vから5Vまでの
論理信号レベルに変換した入力回路11からの各信号を
読み込む。そして更に、続くS140にて、入出力ポー
トP10〜P13の入力状態と、それに対応する入出力ポー
トP20〜P23の入力状態とを比較し、次のS150に
て、両入力状態が一致しているか否かを判定する。
If it is determined in S100 that the abnormality detection condition is not satisfied, the flow directly proceeds to S120. In S120, the input state of the input / output ports P10 to P13 set as the input ports, that is, the respective drive signals output to the drive circuit 7 from the input / output ports P00 to P03 of the main microcomputer 3 are read. And the following S1
At 30, the input state of the input / output ports P20 to P23 set as the input ports, that is, the connector terminals J1 to J
4 voltage level (from the drive circuit 7 to the excitation coils L1 to L4
, The signals from the input circuit 11 in which the voltage level of each current path leading to the current path is converted to a logic signal level of 0 V to 5 V are read. In step S140, the input states of the input / output ports P10 to P13 are compared with the input states of the corresponding input / output ports P20 to P23. Determine whether or not.

【0058】ここで、入出力ポートP10〜P13の入力状
態と入出力ポートP20〜P23の入力状態とが一致してい
れば、駆動回路7及び駆動回路7からステッピングモー
タMの各励磁コイルL1〜L4に至る電流経路(以下、
これらを駆動系ともいう)が正常であると判断して、S
160に進み、メインマイコン3へ、駆動系が正常であ
ることを報知するために、前述した報知信号CMPを一
定周期(例えば8ms)のパルスで出力する。そして、
その後、当該フェイルセーフ処理を一旦終了する。
Here, if the input states of the input / output ports P10-P13 and the input states of the input / output ports P20-P23 match, the drive circuit 7 and the drive circuits 7 supply the respective exciting coils L1-P3 of the stepping motor M. The current path to L4 (hereinafter referred to as L4)
These are also referred to as drive systems), and S
Proceeding to 160, the above-described notification signal CMP is output in pulses of a fixed period (for example, 8 ms) to notify the main microcomputer 3 that the drive system is normal. And
After that, the fail-safe process is temporarily ended.

【0059】これに対して、入出力ポートP10〜P13の
入力状態と入出力ポートP20〜P23の入力状態とが一致
していなければ、上記駆動系に異常が生じていると判断
して、S170へ移行し、メインマイコン3へ、駆動系
が異常であることを報知するために、前述した報知信号
CMPをハイレベル(5V)で出力する。そして、その
後、当該フェイルセーフ処理を一旦終了する。
On the other hand, if the input states of the input / output ports P10 to P13 and the input states of the input / output ports P20 to P23 do not match, it is determined that an abnormality has occurred in the drive system, and S170 Then, the above-described notification signal CMP is output at a high level (5 V) to notify the main microcomputer 3 that the drive system is abnormal. Then, thereafter, the fail-safe process is temporarily ended.

【0060】つまり、本実施形態において、駆動系が正
常であれば、駆動回路7の信号入力部41にロウレベル
の駆動信号を出力すると、その信号入力部41に対応す
る入力回路11からの信号もロウレベルとなり、また、
駆動回路7の信号入力部41にハイレベルの駆動信号を
出力すると、その信号入力部41に対応する入力回路1
1からの信号もハイレベルとなる。そこで、上記S15
0では、メインマイコン3から駆動回路7への各駆動信
号と、それに夫々対応する入力回路11からの各信号と
が一致しているか否かを判定し、両信号が一致していな
ければ、駆動系に異常が生じていると判断して、S17
0の処理により、異常の発生を示すハイレベルの報知信
号CMPをメインマイコン3に出力するようにしてい
る。
That is, in this embodiment, if the drive system is normal, a low-level drive signal is output to the signal input unit 41 of the drive circuit 7, and the signal from the input circuit 11 corresponding to the signal input unit 41 is also output. Low level,
When a high-level drive signal is output to the signal input section 41 of the drive circuit 7, the input circuit 1 corresponding to the signal input section 41 is output.
The signal from 1 also goes high. Therefore, the above S15
At 0, it is determined whether or not each drive signal from the main microcomputer 3 to the drive circuit 7 matches each signal from the input circuit 11 corresponding thereto. It is determined that an abnormality has occurred in the system, and S17
By the process of 0, a high-level notification signal CMP indicating the occurrence of an abnormality is output to the main microcomputer 3.

【0061】尚、上記S170で出力されるハイレベル
の報知信号CMPを受けたメインマイコン3は、エンジ
ンに対する燃料噴射或いは点火の制御を止めて、エンジ
ンを速やか且つ滑らかに停止させる。そして更に、車両
の運転者に異常を報知するための警告ランプを点灯させ
ると共に、当該メインマイコン3内に設けられているバ
ックアップRAM(電源電圧の供給が停止されても記憶
内容を保持可能なRAM)に、駆動系に異常が生じたこ
とを示すコードを記憶する。
The main microcomputer 3 which has received the high-level notification signal CMP output in S170 stops control of fuel injection or ignition to the engine, and stops the engine quickly and smoothly. Further, a warning lamp for notifying the driver of the vehicle of an abnormality is turned on, and a backup RAM (RAM capable of retaining stored contents even when supply of power supply voltage is stopped) provided in the main microcomputer 3 is provided. ) Stores a code indicating that an abnormality has occurred in the drive system.

【0062】一方、上記S110にて、メインマイコン
3からのウォッチドックパルスWD1の出力時間間隔が
16ms以内ではなく、メインマイコン3の動作が異常
であると判断した場合には、S180に移行する。そし
て、このS180にて、前述したポートPR からハイレ
ベルのリセット指令信号RST2を出力して、メインマ
イコン3のリセット端子INITにロウレベルのリセッ
ト信号RSTを与える。
On the other hand, if it is determined in S110 that the output time interval of the watchdog pulse WD1 from the main microcomputer 3 is not within 16 ms and the operation of the main microcomputer 3 is abnormal, the process proceeds to S180. At S180, a high-level reset command signal RST2 is output from the port PR, and a low-level reset signal RST is applied to the reset terminal INIT of the main microcomputer 3.

【0063】すると、メインマイコン3がリセットされ
て、メインマイコン3の入出力ポートP00〜P03が強制
的に入力ポートとなるため、その状態で、次のS190
に進み、自己の入出力ポートP10〜P13を入力ポートか
ら出力ポートに設定する。そして、続くS200にて、
上記出力ポートに切り替えた入出力ポートP10〜P13か
ら駆動回路7へ、スロットル弁を速やかに且つ滑らかに
閉じるためのバックアップ制御用の駆動信号を出力す
る、フェイルセーフ出力を実施する。
Then, the main microcomputer 3 is reset, and the input / output ports P00 to P03 of the main microcomputer 3 are forcibly set as input ports.
To set their own input / output ports P10 to P13 from input ports to output ports. Then, in the following S200,
A fail-safe output for outputting a drive signal for backup control for promptly and smoothly closing the throttle valve from the input / output ports P10 to P13 switched to the output port to the drive circuit 7 is implemented.

【0064】その後は、イグニッションスイッチIGS
がオフされて電源回路9による電源電圧の供給が遮断さ
れるまでの間、上記S180〜S200の処理を繰り返
す。つまり、本第1実施形態のECU1では、サブマイ
コン5が、メインマイコン3の動作が正常であるか否か
を監視し(S110)、メインマイコン3の動作が異常
であると判断すると(S110:NO)、レベル反転回
路13にハイレベルのリセット指令信号RST2を出力
して、メインマイコン3のリセット端子INITにリセ
ット信号RSTを与え、これにより、メインマイコン3
の入出力ポートP00〜P03を強制的に入力ポートとする
ようにしている(S180)。そして更に、サブマイコ
ン5は、上記リセット指令信号RST2を出力している
間、自己の入出力ポートP10〜P13を出力ポートに設定
して(S190)、その入出力ポートP10〜P13から駆
動回路7へ、ステッピングモータMをバックアップ制御
するための駆動信号を出力するようにしている(S20
0)。また、サブマイコン5は、上記以外の場合には
(S100:NO,S110:YES)、自己の入出力
ポートP10〜P13を入力ポートに設定して、メインマイ
コン3の入出力ポートP00〜P03から出力される駆動信
号が、当該サブマイコン5の入出力ポートP10〜P13に
影響されることなく駆動回路7の信号入力部41に入力
されるようにしている。
After that, the ignition switch IGS
Until the power supply circuit 9 is turned off and the supply of the power supply voltage by the power supply circuit 9 is cut off, the processes of S180 to S200 are repeated. That is, in the ECU 1 of the first embodiment, the sub-microcomputer 5 monitors whether or not the operation of the main microcomputer 3 is normal (S110), and determines that the operation of the main microcomputer 3 is abnormal (S110: NO), a high-level reset command signal RST2 is output to the level inversion circuit 13, and a reset signal RST is given to a reset terminal INIT of the main microcomputer 3, whereby the main microcomputer 3
Are forcedly set as input ports (S180). Further, while outputting the reset command signal RST2, the sub-microcomputer 5 sets its own input / output ports P10 to P13 as output ports (S190), and from the input / output ports P10 to P13 to the drive circuit 7 To output a drive signal for performing backup control of the stepping motor M (S20).
0). In cases other than the above (S100: NO, S110: YES), the sub-microcomputer 5 sets its own input / output ports P10 to P13 as input ports, and switches the input / output ports P00 to P03 of the main microcomputer 3 from the input / output ports P00 to P03. The output drive signal is input to the signal input unit 41 of the drive circuit 7 without being affected by the input / output ports P10 to P13 of the sub-microcomputer 5.

【0065】尚、本第1実施形態においては、図4のS
110が監視手段としての処理に相当しており、図4の
S180が初期化手段としての処理に相当している。ま
た、図4のS120〜S150が駆動系異常検出手段と
しての処理に相当している。以上詳述したように、本第
1実施形態のECU1では、メインマイコン3の異常時
に、メインマイコン3のリセット端子INITへリセッ
ト信号RSTを継続して与えることにより、メインマイ
コン3の入出力ポートP00〜P03を強制的に入力ポート
とし、更に、その状態で、サブマイコン5が、自己の入
出力ポートP10〜P13を出力ポートに切り替えて、その
ポートP10〜P13から駆動回路7へバックアップ制御用
の駆動信号を出力するようにしている。
In the first embodiment, S in FIG.
110 corresponds to processing as monitoring means, and S180 in FIG. 4 corresponds to processing as initialization means. Further, S120 to S150 in FIG. 4 correspond to the processing as the drive system abnormality detecting means. As described in detail above, the ECU 1 of the first embodiment continuously supplies the reset signal RST to the reset terminal INIT of the main microcomputer 3 when the main microcomputer 3 is in an abnormal state. .. P03 are forcibly set as input ports, and in this state, the sub-microcomputer 5 switches its own input / output ports P10 to P13 to output ports, and from the ports P10 to P13 to the drive circuit 7 for backup control. A drive signal is output.

【0066】従って、このECU1によれば、図6に示
したような出力切替回路59を設けることなく、メイン
マイコン3の入出力ポートP00〜P03とサブマイコン5
の入出力ポートP10〜P13とをワイヤードオア形式で接
続して、その両マイコン3,5からの駆動信号を駆動回
路7に切り替えて与えることができるため、メインマイ
コン3に異常が生じた場合のステッピングモータMに対
するサブマイコン5によるバックアップ制御を、非常に
簡単な構成で実現することができる。よって、このEC
U1によれば、制御安全性と装置の小型化及び低コスト
化とを、高次元で両立させることができる。
Therefore, according to the ECU 1, the input / output ports P00 to P03 of the main microcomputer 3 and the sub-microcomputer 5 are provided without providing the output switching circuit 59 as shown in FIG.
The input / output ports P10 to P13 can be connected in a wired-OR manner, and the drive signals from the microcomputers 3 and 5 can be switched to the drive circuit 7 to be applied. Backup control of the stepping motor M by the sub-microcomputer 5 can be realized with a very simple configuration. So this EC
According to U1, both control safety and miniaturization and cost reduction of the device can be achieved at a high level.

【0067】また、本第1実施形態のECU1では、サ
ブマイコン5が、メインマイコン3の動作が異常である
と判断していない場合に(S100:NO,S110:
YES)、メインマイコン3から駆動回路7へ出力され
ている駆動信号を入力ポートとしての入出力ポートP10
〜P13を介して監視すると共に(S120)、駆動回路
7からステッピングモータMの励磁コイルL1〜L4に
至る各電流経路の電圧レベルを入力ポートとしての他の
入出力ポートP20〜P23を介して監視し(S130)、
その監視結果に基づいて、ステッピングモータMの駆動
系(駆動回路7及び駆動回路7からステッピングモータ
Mの各励磁コイルL1〜L4に至る電流経路)の異常を
検出するようにしている(S140,S150)。
In the ECU 1 of the first embodiment, when the sub-microcomputer 5 does not determine that the operation of the main microcomputer 3 is abnormal (S100: NO, S110:
YES), the drive signal output from the main microcomputer 3 to the drive circuit 7 is input / output port P10 as an input port.
And P13 (S120), and monitor the voltage level of each current path from the drive circuit 7 to the exciting coils L1 to L4 of the stepping motor M via the other input / output ports P20 to P23 as input ports. (S130),
Based on the monitoring result, an abnormality in the drive system of the stepping motor M (the drive circuit 7 and the current path from the drive circuit 7 to each of the excitation coils L1 to L4 of the stepping motor M) is detected (S140, S150). ).

【0068】よって、このECU1によれば、駆動系の
異常検出を行う上で、メインマイコン3が入力回路11
からの信号を入力して上記各電流経路の電圧レベルを監
視する必要が無いため、メインマイコン3のポート数を
節約することができるという点で非常に有利である。つ
まり、メインマイコン3は、様々なセンサからの信号を
入力する必要があり、ポートの不足を招き易いのである
が、本実施形態のECU1の如く構成すれば、そのよう
な問題を回避することができるのである。
Therefore, according to the ECU 1, the main microcomputer 3 is connected to the input circuit 11 to detect an abnormality in the drive system.
There is no need to monitor the voltage level of each of the current paths by inputting a signal from the main microcomputer 3, which is very advantageous in that the number of ports of the main microcomputer 3 can be reduced. In other words, the main microcomputer 3 needs to input signals from various sensors, which tends to cause a shortage of ports. However, such a problem can be avoided by configuring the ECU 1 as in the present embodiment. You can.

【0069】そして更に、本第1実施形態のECU1で
は、メインマイコン3の動作が異常であると判断する
と、イグニッションスイッチIGSがオフされて電源回
路9による電源電圧の供給が遮断されるまでの間、メイ
ンマイコン3のリセット端子INITにリセット信号R
STを与え続けるようにしており、その間、サブマイコ
ン5から駆動回路7へバックアップ制御用の駆動信号を
継続して出力するようにしている(S180〜S20
0)。
Further, in the ECU 1 of the first embodiment, when it is determined that the operation of the main microcomputer 3 is abnormal, the ignition switch IGS is turned off and the supply of the power supply voltage by the power supply circuit 9 is interrupted. And a reset signal R to the reset terminal INIT of the main microcomputer 3.
ST is continuously provided, and during this time, a drive signal for backup control is continuously output from the sub-microcomputer 5 to the drive circuit 7 (S180 to S20).
0).

【0070】よって、メインマイコン3にリセット信号
RSTによるリセットをかけても正常復帰しないような
故障(例えば、プログラム暴走以外のハードウェア上の
故障)が生じた場合でも、サブマイコン5からの駆動信
号によって、ステッピングモータM(延いてはスロット
ル弁)の異常な動作を確実に防止できるという点で有利
である。
Therefore, even if a failure (for example, a hardware failure other than a program runaway) that does not return to a normal state occurs even when the main microcomputer 3 is reset by the reset signal RST, the drive signal from the sub-microcomputer 5 This is advantageous in that abnormal operation of the stepping motor M (and thus the throttle valve) can be reliably prevented.

【0071】また、本第1実施形態のECU1では、バ
ックアップ制御用の駆動信号を出力するサブマイコン5
が、メインマイコン3の動作の監視と、異常検出時にお
けるメインマイコン3へのリセット信号RSTの付与と
を行うようにしているため、当該ECU1を、一層小型
で且つ低コストなものにすることができる。
Further, in the ECU 1 of the first embodiment, the sub-microcomputer 5 for outputting a drive signal for backup control is provided.
However, since the operation of the main microcomputer 3 is monitored and the reset signal RST is given to the main microcomputer 3 when an abnormality is detected, the ECU 1 can be made smaller and less costly. it can.

【0072】[第2実施形態]次に、第2実施形態のE
CUについて説明する。本第2実施形態のECUは、前
述した第1実施形態のECU1と比較して、サブマイコ
ン5が実行するフェイルセーフ処理だけが異なってい
る。
[Second Embodiment] Next, E of the second embodiment will be described.
The CU will be described. The ECU of the second embodiment differs from the ECU 1 of the first embodiment only in the fail-safe processing executed by the sub-microcomputer 5.

【0073】即ち、図5に示すように、第2実施形態の
サブマイコン5で実行されるフェイルセーフ処理では、
第1実施形態のフェイルセーフ処理(図4)に対して、
S210〜S230の処理が追加されており、S200
でフェイルセーフ出力の実施(駆動回路7へのバックア
ップ制御用の駆動信号の出力)を開始した後、続くS2
10にて、予め定められた所定時間t(例えば5秒間)
が経過したか否かを判定する。そして、所定時間tが経
過していなければS180に戻る。
That is, as shown in FIG. 5, in the fail-safe processing executed by the sub microcomputer 5 of the second embodiment,
With respect to the fail-safe processing (FIG. 4) of the first embodiment,
The processing of S210 to S230 is added, and S200
To start the fail-safe output (output of the drive signal for backup control to the drive circuit 7) at
At 10, a predetermined period of time t (for example, 5 seconds)
Is determined. If the predetermined time t has not elapsed, the process returns to S180.

【0074】また、上記S210で所定時間tが経過し
たと判断すると、S220に進んで、ポートPR からハ
イレベルのリセット指令信号RST2を出力することを
止めて、メインマイコン3に対するリセットを解除し、
続くS230にて、自己の入出力ポートP10〜P13を出
力ポートから入力ポートに戻す。そして、その後、当該
フェイルセーフ処理を一旦終了する。
If it is determined in S210 that the predetermined time t has elapsed, the process proceeds to S220, in which the output of the high-level reset command signal RST2 from the port PR is stopped, and the reset for the main microcomputer 3 is released.
At S230, the input / output ports P10 to P13 are returned from the output ports to the input ports. Then, thereafter, the fail-safe process is temporarily ended.

【0075】つまり、本第2実施形態のECUでは、サ
ブマイコン5が、メインマイコン3の動作が異常である
と判断すると、所定時間tの間だけ、メインマイコン3
のリセット端子INITにリセット信号RSTを与え続
けて、メインマイコン3の入出力ポートP00〜P03を強
制的に入力ポートとし、その間だけ、サブマイコン5
が、自己の入出力ポートP10〜P13を出力ポートに設定
して駆動回路7へ駆動信号を出力するようにしてる。
That is, in the ECU of the second embodiment, when the sub-microcomputer 5 determines that the operation of the main microcomputer 3 is abnormal, the sub-microcomputer 5 operates only for a predetermined time t.
The reset signal RST is continuously supplied to the reset terminal INIT of the main microcomputer 3 so that the input / output ports P00 to P03 of the main microcomputer 3 are forcibly set as the input ports.
However, the input / output ports P10 to P13 are set as output ports to output a drive signal to the drive circuit 7.

【0076】そして、このような第2実施形態のECU
によれば、メインマイコン3に生じた異常が、リセット
信号RSTによるリセットを解除すれば正常復帰するよ
うな異常(プログラム暴走)であった場合には、メイン
マイコン3のリセット中にのみ、ステッピングモータM
がサブマイコン5からの駆動信号によってバックアップ
制御され、リセットの解除後は、ステッピングモータM
が正常復帰したメインマイコン3からの駆動信号によっ
て制御されることとなり、システム全体の正常復帰を速
やかに行うことができるという点で有利である。
The ECU according to the second embodiment is
According to the above, when the abnormality that has occurred in the main microcomputer 3 is an abnormality (program runaway) that returns to normal if the reset by the reset signal RST is released, the stepping motor is only activated while the main microcomputer 3 is reset. M
Is controlled by the drive signal from the sub-microcomputer 5, and after the reset is released, the stepping motor M
Is controlled by the drive signal from the main microcomputer 3 which has returned to the normal state, which is advantageous in that the normal state of the entire system can be promptly restored.

【0077】[その他]ところで、上記第1及び第2実
施形態では、メインマイコン3において、ウォッチドッ
クパルスWD1を出力するためのポートが出力専用ポー
トであり、センサからの信号を入力するためのポート
と、サブマイコン5からのウォッチドックパルスWD2
を入力するためのポートと、サブマイコン5からの報知
信号CMPを入力するためのポートとが入力専用ポート
であったが、それら各ポートとして、切替可能な入出力
ポートを用いても良い。
[Others] In the first and second embodiments, the port for outputting the watchdog pulse WD1 in the main microcomputer 3 is an output-only port, and the port for inputting a signal from a sensor. And the watchdog pulse WD2 from the sub-microcomputer 5
Although the port for inputting the command and the port for inputting the notification signal CMP from the sub-microcomputer 5 are input-only ports, switchable input / output ports may be used as those ports.

【0078】同様に、上記第1及び第2実施形態では、
サブマイコン5において、リセット指令信号RST2を
出力するためのポートPR と、ウォッチドックパルスW
D2を出力するためのポートと、報知信号CMPを出力
するためのポートとが出力専用ポートであり、メインマ
イコン3からのウォッチドックパルスWD1を入力する
ためのポートと、スタータ信号STAを入力するための
ポートとが入力専用ポートであったが、それら各ポート
として、切替可能な入出力ポートを用いても良い。
Similarly, in the first and second embodiments,
In the sub-microcomputer 5, the port PR for outputting the reset command signal RST2 and the watchdog pulse W
The port for outputting D2 and the port for outputting the notification signal CMP are output-only ports, and are used for inputting the watchdog pulse WD1 from the main microcomputer 3 and inputting the starter signal STA. Are input-only ports, but switchable input / output ports may be used as those ports.

【0079】また、上記第1及び第2実施形態では、サ
ブマイコン5において、入力回路11からの信号を入力
するためのポートが入出力ポートP20〜P23であった
が、その入出力ポートP20〜P23に代えて、切替不能な
入力専用ポートを用いても良い。
In the first and second embodiments, the ports for inputting signals from the input circuit 11 in the sub-microcomputer 5 are the input / output ports P20 to P23. Instead of P23, a non-switchable input-only port may be used.

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

【図1】 第1実施形態の電子制御装置(ECU)の構
成を表す構成図である。
FIG. 1 is a configuration diagram illustrating a configuration of an electronic control unit (ECU) according to a first embodiment.

【図2】 入出力ポートの構成を表す回路図である。FIG. 2 is a circuit diagram illustrating a configuration of an input / output port.

【図3】 駆動回路を表す回路図である。FIG. 3 is a circuit diagram illustrating a driving circuit.

【図4】 第1実施形態の電子制御装置(ECU)のサ
ブマイコンで実行されるフェイルセーフ処理を表すフロ
ーチャートである。
FIG. 4 is a flowchart illustrating a fail-safe process executed by a sub-microcomputer of the electronic control unit (ECU) according to the first embodiment.

【図5】 第2実施形態の電子制御装置(ECU)のサ
ブマイコンで実行されるフェイルセーフ処理を表すフロ
ーチャートである。
FIG. 5 is a flowchart illustrating a fail-safe process executed by a sub-microcomputer of an electronic control unit (ECU) according to a second embodiment.

【図6】 従来の電子制御装置の構成を表す構成図であ
る。
FIG. 6 is a configuration diagram illustrating a configuration of a conventional electronic control device.

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

1…電子制御装置(ECU) M…ステッピングモー
タ L1〜L4…励磁コイル 3…メインマイコン(主マ
イクロコンピュータ) 5…サブマイコン(副マイクロコンピュータ) IN
IT…リセット端子 P00〜P03,P10〜P13 …入出力ポート 7…駆動
回路 9…電源回路 11…入力回路 13…レベル反転回路 41…信
号入力部 43…信号出力部 BT…バッテリ IGS…イグ
ニッションスイッチ J1〜J4…コネクタ端子
DESCRIPTION OF SYMBOLS 1 ... Electronic control device (ECU) M ... Stepping motor L1-L4 ... Exciting coil 3 ... Main microcomputer (main microcomputer) 5 ... Sub microcomputer (sub microcomputer) IN
IT reset terminals P00 to P03, P10 to P13 input / output ports 7 drive circuits 9 power supply circuits 11 input circuits 13 level inverting circuits 41 signal input sections 43 signal output sections BT batteries IGS ignition switches J1 ~ J4 ... Connector terminal

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 信号入力部に入力される駆動信号に応じ
てアクチュエータを駆動する駆動回路と、 ソフトウェアにより入力ポートと出力ポートとに切替可
能な入出力ポートを有すると共に、該入出力ポートが前
記駆動回路の信号入力部に接続され、通常動作時には、
前記入出力ポートを出力ポートに設定して、該出力ポー
トとしての入出力ポートから前記駆動回路へ前記アクチ
ュエータを駆動するための駆動信号を出力し、リセット
端子にリセット信号が与えられて初期化されると、前記
入出力ポートが入力ポートになるよう構成された主マイ
クロコンピュータと、 該主マイクロコンピュータの動作が正常であるか否かを
監視する監視手段と、 該監視手段により前記主マイクロコンピュータの動作が
異常であると判断されると、前記主マイクロコンピュー
タのリセット端子に前記リセット信号を継続して与える
初期化手段と、 ソフトウェアにより入力ポートと出力ポートとに切替可
能な入出力ポートを有すると共に、該入出力ポートが前
記主マイクロコンピュータの入出力ポートと前記駆動回
路の信号入力部との間の信号経路にワイヤードオア形式
で接続され、前記監視手段により前記主マイクロコンピ
ュータの動作が異常であると判断されて前記初期化手段
により前記主マイクロコンピュータのリセット端子に前
記リセット信号が与えられている間、自己の前記入出力
ポートを出力ポートに設定して、該出力ポートとしての
入出力ポートから前記駆動回路へ前記アクチュエータを
駆動するための駆動信号を出力し、それ以外の場合に
は、自己の前記入出力ポートを入力ポートに設定する副
マイクロコンピュータと、 を備えたことを特徴とする電子制御装置。
A drive circuit for driving an actuator in accordance with a drive signal input to a signal input unit; an input / output port switchable between an input port and an output port by software; Connected to the signal input of the drive circuit, during normal operation,
The input / output port is set as an output port, a drive signal for driving the actuator is output from the input / output port as the output port to the drive circuit, and a reset signal is given to a reset terminal to be initialized. Then, a main microcomputer configured so that the input / output port becomes an input port, monitoring means for monitoring whether or not the operation of the main microcomputer is normal, and Initial operation means for continuously applying the reset signal to a reset terminal of the main microcomputer when the operation is determined to be abnormal, and an input / output port switchable between an input port and an output port by software. The input / output port is connected to the input / output port of the main microcomputer and the signal input of the drive circuit. Connected to the signal path between the main microcomputer and the main microcomputer in a wired-OR manner, the monitoring means determines that the operation of the main microcomputer is abnormal, and the reset means outputs the reset signal to a reset terminal of the main microcomputer. While being given, the own input / output port is set as an output port, and a drive signal for driving the actuator is output from the input / output port as the output port to the drive circuit. A sub-microcomputer for setting the input / output port of the device as an input port.
【請求項2】 請求項1に記載の電子制御装置におい
て、 前記副マイクロコンピュータは、 前記監視手段により前記主マイクロコンピュータの動作
が異常であると判断されていない場合に、前記主マイク
ロコンピュータから前記駆動回路へ出力されている前記
駆動信号を当該副マイクロコンピュータの前記入出力ポ
ートを介して監視すると共に、前記駆動回路から前記ア
クチュエータに至る電流経路の電圧レベルを当該副マイ
クロコンピュータの他の入力ポートを介して監視し、前
記駆動信号の監視結果と前記電圧レベルの監視結果とに
基づき、前記駆動回路及び前記電流経路の異常を検出す
る駆動系異常検出手段を備えていること、 を特徴とする電子制御装置。
2. The electronic control device according to claim 1, wherein the sub-microcomputer is connected to the main microcomputer when the operation of the main microcomputer is not judged to be abnormal by the monitoring means. The drive signal output to the drive circuit is monitored via the input / output port of the sub-microcomputer, and the voltage level of a current path from the drive circuit to the actuator is monitored at another input port of the sub-microcomputer. And a drive system abnormality detecting means for detecting an abnormality in the drive circuit and the current path based on the monitor result of the drive signal and the monitor result of the voltage level. Electronic control unit.
【請求項3】 請求項1又は請求項2に記載の電子制御
装置において、 前記初期化手段は、 前記監視手段により前記主マイクロコンピュータの動作
が異常であると判断されると、当該電子制御装置への電
源供給が遮断されるまでの間、前記主マイクロコンピュ
ータのリセット端子に前記リセット信号を与え続けるよ
う構成されていること、 を特徴とする電子制御装置。
3. The electronic control device according to claim 1, wherein the initialization unit is configured to determine that the operation of the main microcomputer is abnormal by the monitoring unit. An electronic control unit configured to continuously supply the reset signal to a reset terminal of the main microcomputer until power supply to the main microcomputer is cut off.
【請求項4】 請求項1又は請求項2に記載の電子制御
装置において、 前記初期化手段は、 前記監視手段により前記主マイクロコンピュータの動作
が異常であると判断されると、予め定められた所定時間
の間、前記主マイクロコンピュータのリセット端子に前
記リセット信号を与え続けるよう構成されていること、 を特徴とする電子制御装置。
4. The electronic control device according to claim 1, wherein the initialization means determines a predetermined value when the operation of the main microcomputer is determined to be abnormal by the monitoring means. An electronic control unit configured to continuously supply the reset signal to a reset terminal of the main microcomputer for a predetermined time.
【請求項5】 請求項1ないし請求項4の何れかに記載
の電子制御装置において、 前記監視手段と前記初期化手段は、前記副マイクロコン
ピュータに備えられていること、 を特徴とする電子制御装置。
5. The electronic control device according to claim 1, wherein said monitoring means and said initialization means are provided in said sub-microcomputer. apparatus.
JP23515497A 1997-08-29 1997-08-29 Electronic control device Expired - Fee Related JP3817855B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP23515497A JP3817855B2 (en) 1997-08-29 1997-08-29 Electronic control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP23515497A JP3817855B2 (en) 1997-08-29 1997-08-29 Electronic control device

Publications (2)

Publication Number Publication Date
JPH1173203A true JPH1173203A (en) 1999-03-16
JP3817855B2 JP3817855B2 (en) 2006-09-06

Family

ID=16981858

Family Applications (1)

Application Number Title Priority Date Filing Date
JP23515497A Expired - Fee Related JP3817855B2 (en) 1997-08-29 1997-08-29 Electronic control device

Country Status (1)

Country Link
JP (1) JP3817855B2 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003167601A (en) * 2001-11-30 2003-06-13 Denso Corp Electronic controller for vehicle
JP2006262582A (en) * 2005-03-16 2006-09-28 Ricoh Co Ltd Conveyance apparatus and image forming apparatus
JP2006523871A (en) * 2003-03-25 2006-10-19 コンティネンタル・テーベス・アクチエンゲゼルシヤフト・ウント・コンパニー・オッフェネ・ハンデルスゲゼルシヤフト How to prevent false actuator access in a multifunction total electronic control system
JP2007083888A (en) * 2005-09-22 2007-04-05 Honda Elesys Co Ltd Motor driving circuit
JP2008203146A (en) * 2007-02-21 2008-09-04 Denso Corp On-board millimeter wave radar system
JP2008223692A (en) * 2007-03-14 2008-09-25 Denso Corp Electronic control device
JP2010244311A (en) * 2009-04-07 2010-10-28 Hitachi Automotive Systems Ltd In-vehicle electronic controller
JP2011134025A (en) * 2009-12-23 2011-07-07 Autonetworks Technologies Ltd Processor and control method
CN102979900A (en) * 2011-09-06 2013-03-20 株式会社电装 Motor control apparatus
JP2015058751A (en) * 2013-09-17 2015-03-30 日立オートモティブシステムズ株式会社 Vehicle electronic control device
US9657668B2 (en) 2013-12-04 2017-05-23 Hyundai Motor Company Injector driver and operating method thereof
CN107110348A (en) * 2015-01-26 2017-08-29 日立汽车系统株式会社 The electronic-controlled installation of vehicle automatic transmission

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102783093B (en) 2010-02-26 2016-12-21 株式会社自动网络技术研究所 Communications connector, communication wire harness and communication system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0599061A (en) * 1991-10-01 1993-04-20 Nippondenso Co Ltd Controller for automobile
JPH05118247A (en) * 1991-10-28 1993-05-14 Nippondenso Co Ltd Signal input/output device for microprocessor
JPH06138000A (en) * 1992-10-28 1994-05-20 Fujitsu Ten Ltd Electronic controller
JPH07293320A (en) * 1994-04-21 1995-11-07 Nippondenso Co Ltd Electronic controller

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0599061A (en) * 1991-10-01 1993-04-20 Nippondenso Co Ltd Controller for automobile
JPH05118247A (en) * 1991-10-28 1993-05-14 Nippondenso Co Ltd Signal input/output device for microprocessor
JPH06138000A (en) * 1992-10-28 1994-05-20 Fujitsu Ten Ltd Electronic controller
JPH07293320A (en) * 1994-04-21 1995-11-07 Nippondenso Co Ltd Electronic controller

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003167601A (en) * 2001-11-30 2003-06-13 Denso Corp Electronic controller for vehicle
JP2006523871A (en) * 2003-03-25 2006-10-19 コンティネンタル・テーベス・アクチエンゲゼルシヤフト・ウント・コンパニー・オッフェネ・ハンデルスゲゼルシヤフト How to prevent false actuator access in a multifunction total electronic control system
JP2006262582A (en) * 2005-03-16 2006-09-28 Ricoh Co Ltd Conveyance apparatus and image forming apparatus
JP4584096B2 (en) * 2005-09-22 2010-11-17 株式会社ホンダエレシス Motor drive circuit
JP2007083888A (en) * 2005-09-22 2007-04-05 Honda Elesys Co Ltd Motor driving circuit
JP2008203146A (en) * 2007-02-21 2008-09-04 Denso Corp On-board millimeter wave radar system
US7538714B2 (en) 2007-02-21 2009-05-26 Denso Corporation System for measuring physical relationship between vehicle and object
JP2008223692A (en) * 2007-03-14 2008-09-25 Denso Corp Electronic control device
JP2010244311A (en) * 2009-04-07 2010-10-28 Hitachi Automotive Systems Ltd In-vehicle electronic controller
JP2011134025A (en) * 2009-12-23 2011-07-07 Autonetworks Technologies Ltd Processor and control method
CN102979900A (en) * 2011-09-06 2013-03-20 株式会社电装 Motor control apparatus
JP2015058751A (en) * 2013-09-17 2015-03-30 日立オートモティブシステムズ株式会社 Vehicle electronic control device
US9657668B2 (en) 2013-12-04 2017-05-23 Hyundai Motor Company Injector driver and operating method thereof
CN107110348A (en) * 2015-01-26 2017-08-29 日立汽车系统株式会社 The electronic-controlled installation of vehicle automatic transmission
US10221945B2 (en) 2015-01-26 2019-03-05 Hitachi Automotive Systems, Ltd. Electronic control device for vehicular automatic transmission
EP3252350B1 (en) * 2015-01-26 2019-12-18 Hitachi Automotive Systems, Ltd. Electronic control device for vehicular automatic transmission

Also Published As

Publication number Publication date
JP3817855B2 (en) 2006-09-06

Similar Documents

Publication Publication Date Title
US7155326B2 (en) Electric control unit
US6144887A (en) Electronic control unit with reset blocking during loading
JP3255693B2 (en) Automotive multi-computer system
JPH1173203A (en) Electronic control unit
JPH11294252A (en) Electronic control device
JP3970196B2 (en) Engine intake air amount control device and engine intake air amount control method
JP5094777B2 (en) In-vehicle electronic control unit
JP2006322332A (en) Failure detection method for starter drive circuit and economical running control device
JP3097580B2 (en) Electronic control unit
JPH1139231A (en) Electronic controller for vehicle
US6879892B2 (en) Electronic control system and method thereof
JP3804454B2 (en) Electronic control device
JP2007291989A (en) Abnormality diagnosing device of load drive system
WO2020054271A1 (en) Electronic control unit
JP2002041493A (en) Microcomputer
JP3908020B2 (en) Electronic control device for vehicle
JPH06138000A (en) Electronic controller
JP2003227402A (en) Diagnostic system for vehicle
JP2021126995A (en) Electronic control device for vehicle and control method for electronic control device for vehicle
JP6620688B2 (en) Electronic control unit
JP2016203764A (en) Vehicular electronic control device
JP2005319847A (en) Failure diagnosing method of microcomputer monitoring device, and vehicular electronic control device
JPH05118306A (en) Failure detecting device for actuator
JP3884938B2 (en) Fault diagnosis display method and apparatus for vehicle
JP2003261019A (en) On-vehicle electronic control circuit with adequate processing function of sensor self-diagnostic signal

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060512

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: 20060523

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060605

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20090623

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100623

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100623

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110623

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110623

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120623

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120623

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130623

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20140623

Year of fee payment: 8

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees