JPH1021121A - Microcomputer system - Google Patents

Microcomputer system

Info

Publication number
JPH1021121A
JPH1021121A JP8186835A JP18683596A JPH1021121A JP H1021121 A JPH1021121 A JP H1021121A JP 8186835 A JP8186835 A JP 8186835A JP 18683596 A JP18683596 A JP 18683596A JP H1021121 A JPH1021121 A JP H1021121A
Authority
JP
Japan
Prior art keywords
monitoring circuit
output
lower limit
operation abnormality
reset 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.)
Pending
Application number
JP8186835A
Other languages
Japanese (ja)
Inventor
Kensuke Otake
賢輔 大竹
Hirotaka Kojima
浩孝 小島
Atsuro Ota
淳朗 大田
Morio Satou
司雄 佐藤
Tatsuo Hayashi
達生 林
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.)
Honda Motor Co Ltd
NEC Home Electronics Ltd
NEC Corp
Original Assignee
Honda Motor Co Ltd
NEC Home Electronics Ltd
Nippon Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honda Motor Co Ltd, NEC Home Electronics Ltd, Nippon Electric Co Ltd filed Critical Honda Motor Co Ltd
Priority to JP8186835A priority Critical patent/JPH1021121A/en
Publication of JPH1021121A publication Critical patent/JPH1021121A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Microcomputers (AREA)

Abstract

PROBLEM TO BE SOLVED: To immediately diagnose the occurrence of disorder when that disorder is generated in output timing by diagnosing the output of reset signal at that timing within upper and lower limit values designed from an operational abnormality monitor circuit. SOLUTION: A system initializing program includes diagnostic processing for diagnosing the output of reset signal at the timing within the upper and lower limit values designed from 1st and 2nd monitor circuits 2 and 3. Then, the value of reference time predetermined concerning the 1st monitor circuit 2 is designed so as to be settled between the prescribed lower limit value designed while considering a limitation cycle and the prescribed upper limit value determined while considering the allowable runaway time of the program. Similarly, the value of reference time predetermined concerning the 2nd monitor circuit 3 is designed so as to be settled between the prescribed lower limit value designed while considering the time of execution for one instruction and the prescribed upper limit value determined while considering allowable abnormal time.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、マイクロコンピュ
ータ装置に係り、特に、動作異常監視回路(ウオッチド
ッグタイマ回路等と称される)から設計された上下限値
内のタイミングでリセット信号が出力されることを診断
する機能を備えたマイクロコンピュータ装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer device, and more particularly, to a microcomputer which outputs a reset signal at a timing within upper and lower limit values designed by an operation abnormality monitoring circuit (referred to as a watchdog timer circuit or the like). The present invention relates to a microcomputer device having a function of diagnosing a problem.

【0002】[0002]

【従来の技術】従来、この種のマイクロコンピュータ装
置には、プログラムの暴走などの動作異常が発生した場
合を考慮して、動作異常監視対策が施されている。すな
わち、マイクロコンピュータ装置側には、本体プログラ
ムの一巡実行ループ中に挿入されたオンオフ一対のポー
ト操作命令により前記本体プログラムの実行に連動して
オンオフ操作される状態信号送出用の出力ポートと、パ
ワーオンリセット回路若しくは動作異常監視回路から出
力されるリセット信号を受付る為のリセット端子とが設
けられる一方、マイクロコンピュータ装置の外部には、
前記出力ポートから、想定される動作異常時の内容に相
当する状態信号が出力されるのに応じて計時動作を開始
し、そのような内容の状態信号が規定時間継続した場合
には、前記マイクロコンピュータ装置のリセット端子に
対して所定のリセット信号を出力する動作異常監視回路
が設けられている。
2. Description of the Related Art Conventionally, this type of microcomputer device has been provided with an operation abnormality monitoring measure in consideration of a case where an operation abnormality such as a program runaway occurs. That is, on the microcomputer side, an output port for transmitting a state signal that is turned on / off in conjunction with the execution of the main program by a pair of on / off port operation instructions inserted in a round execution loop of the main program, and a power While a reset terminal for receiving a reset signal output from the on-reset circuit or the operation abnormality monitoring circuit is provided, outside the microcomputer device,
The timing operation is started in response to the output of a status signal corresponding to the content of the assumed abnormal operation, and when the status signal of such content continues for a specified time, the microcontroller is activated. An operation abnormality monitoring circuit for outputting a predetermined reset signal to a reset terminal of the computer device is provided.

【0003】そして、マイクロコンピュータ装置側で
は、前記リセット端子にリセット信号が受付けられるの
に応答して強制的にイニシャライズプログラムを実行
し、このイニシャライズプログラムにおいて必要な処理
を実行することによりプログラムの暴走などの動作異常
を停止させ、制御対象負荷を保護している。
On the microcomputer device side, the initialization program is forcibly executed in response to the reset signal being received at the reset terminal, and necessary processing in the initialization program is executed, thereby causing the program to run out of control. The operation abnormalities of are stopped, and the load to be controlled is protected.

【0004】ところで、このような動作異常監視回路を
備えたマイクロコンピュータ装置であっても、動作異常
監視回路それ自体が故障してリセット信号が発せられな
ければ、動作異常発生時においてマイクロコンピュータ
装置側に必要な措置をとらせることはできない。
[0004] Incidentally, even in a microcomputer device provided with such an operation abnormality monitoring circuit, unless the operation abnormality monitoring circuit itself fails and a reset signal is issued, the microcomputer device side when an operation abnormality occurs. Cannot take the necessary measures.

【0005】そこで、従来、上述のイニシャライズプロ
グラム中には、動作異常監視回路の状態を診断するため
の診断処理が含まれている。この診断処理は、出力ポー
トから想定される動作異常時の内容に相当する模擬状態
信号を送出する模擬状態信号送出処理と、前記模擬状態
信号の送出に続いて、予め決められた状態フラグ領域
に、動作異常監視回路の診断中である旨を示すキーワー
ドを書き込み、その後、上述のリセット端子にリセット
信号が到来することを待機する処理と、イニシャライズ
プログラムの起動直後における状態フラグ領域の内容を
参照し、それが故障診断中である旨を示すキーワードで
あれば、動作異常監視回路からリセット信号が到来して
イニシャライズプログラムが起動されたものと認識し
て、状態フラグ領域の内容を運用中である旨を示すキー
ワードに書き替えた後、本体プログラムへの移行を許容
する処理とから構成されている。
Therefore, conventionally, the above-mentioned initialization program includes a diagnosis process for diagnosing the state of the operation abnormality monitoring circuit. This diagnostic processing includes a simulated state signal transmission processing for transmitting a simulated state signal corresponding to the content of an assumed abnormal operation from the output port, and a transmission of the simulated state signal to a predetermined state flag area. Write a keyword indicating that the operation abnormality monitoring circuit is diagnosing, and then wait for the arrival of a reset signal at the above-described reset terminal, and refer to the contents of the status flag area immediately after the start of the initialization program. If it is a keyword indicating that a failure diagnosis is being performed, it is recognized that a reset signal has been received from the operation abnormality monitoring circuit and the initialization program has been started, and the content of the status flag area is being operated. After rewriting the keyword to indicate the following, the process is permitted to shift to the main program.

【0006】このような診断処理によれば、出力ポート
から模擬状態信号を送出した後、動作異常監視回路から
リセット信号が到来しなければ、本体プログラムへの移
行は許容されないため、動作異常監視回路が故障した状
態で本体プログラムへの移行が行われる虞はなくなる。
[0006] According to such a diagnostic process, after a simulated state signal is transmitted from the output port and the reset signal does not arrive from the operation abnormality monitoring circuit, the transition to the main body program is not allowed. There is no danger that the transition to the main program will be performed in the state where the device has failed.

【0007】尚、本体プログラムの実行中に、プログラ
ムの暴走などの何等かの動作異常が発生した場合には、
イニシャライズプログラムの起動直後における状態フラ
グ領域の内容は運用中を示すキーワードとなっている
為、その場合にはプログラム実行動作を停止させるなど
の動作異常時の対策を適切にとることができる。
[0007] If any operation abnormality such as program runaway occurs during the execution of the main program,
Since the content of the status flag area immediately after the start of the initialization program is a keyword indicating that the program is in operation, in such a case, countermeasures for an abnormal operation such as stopping the program execution operation can be taken appropriately.

【0008】[0008]

【発明が解決しようとする課題】しかしながら、このよ
うな従来の診断処理にあっては、想定される動作異常時
の内容に相当する模擬状態信号を出力ポートから送出し
た後、イニシャライズプログラム起動直後の状態フラグ
領域の内容が故障診断中を示すキーワードでありさえす
れば、無条件で本体プログラムへの移行を許容するよう
な構成となっていたため、動作異常監視回路から出力さ
れるリセット信号のタイミングが、設計された上下限値
を大きく外れていたことにより、本体プログラムが正常
に動作しているにも拘らず、それがリセット信号の到来
により中断されてイニシャライズプログラムが実行され
てしまったり、或いは動作異常が発生しているにも拘ら
ず、長時間リセット信号が到来しないことにより、イニ
シャライズプログラムが起動されないと言った不都合が
発生する虞れがあった。
However, in such conventional diagnostic processing, after a simulated state signal corresponding to the contents of an assumed abnormal operation is transmitted from an output port, immediately after the initialization program is started, As long as the content of the status flag area is a keyword indicating that the fault diagnosis is being performed, the configuration is such that the transition to the main body program is unconditionally permitted. Even though the designed upper and lower limits were greatly deviated, even though the main body program was operating normally, it was interrupted by the arrival of the reset signal, and the initialization program was executed or Even if an error has occurred, the reset signal will not arrive for a long time, Beam is a problem that said that is not activated there is a possibility to occur.

【0009】即ち、この種の動作異常監視回路から出力
されるリセット信号のタイミングは、規定の上下限値内
に収まるように予め設計されているのであるが、当初か
ら回路素子に不良が存在したり、或いは回路素子に経年
劣化などが生ずると、リセット信号の出力タイミングに
狂いが生じ、その結果予め設計された上下限値を外れて
リセット信号が出力されるものと推定される。特に、こ
の種の出力タイミングの狂いは、上限側若しくは下限側
のいずれに生ずるかは予測が困難であり、そのためこの
種の動作異常監視回路の動作を診断するにあたっては、
予め設計された上下限値内のタイミングでリセット信号
が確実に出力されていることを診断することが要望され
てる。
That is, the timing of the reset signal output from this type of operation abnormality monitoring circuit is designed in advance so as to fall within specified upper and lower limits, but a defect exists in the circuit element from the beginning. If the circuit element is deteriorated with time or the like, the output timing of the reset signal is deviated, and as a result, it is estimated that the reset signal is output outside the upper and lower limit values designed in advance. In particular, it is difficult to predict whether this type of output timing deviation occurs on the upper limit side or the lower limit side. Therefore, in diagnosing the operation of this type of operation abnormality monitoring circuit,
There is a demand for diagnosing that the reset signal is output reliably at a timing within the upper and lower limit values designed in advance.

【0010】この発明は、従来のマイクロコンピュータ
装置における以上の問題点を解決するためになされたも
のであり、その目的とするところは、動作異常監視回路
からリセット信号が出力されるものの、その出力タイミ
ングに狂いが生じているような場合には、その旨を直ち
に診断可能として、その診断結果に基づき、本体プログ
ラムの実行中に誤ってイニシャライズプログラムが起動
されたり、或いは本体プログラムが暴走しているにも拘
らず、長時間に亘りイニシャライズプログラムが起動さ
れないといった不都合を未然に防止することが可能なマ
イクロコンピュータ装置を提供することにある。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems in the conventional microcomputer device. It is an object of the present invention to output a reset signal from an operation abnormality monitoring circuit. If the timing is incorrect, the diagnosis can be immediately diagnosed, and based on the diagnosis result, the initialization program is mistakenly started during the execution of the main program, or the main program runs out of control. Nevertheless, an object of the present invention is to provide a microcomputer device capable of preventing a problem that the initialization program is not started for a long time.

【0011】[0011]

【課題を解決するための手段】この出願の請求項1に記
載の発明は、本体プログラムの一巡実行ループ中に挿入
されたオンオフ一対のポート操作命令により前記本体プ
ログラムの実行に連動してオンオフ操作される状態信号
送出用の出力ポートと、パワーオンリセット回路若しく
は動作異常監視回路から出力されるリセット信号を受け
付けるためのリセット端子とを備え、前記リセット端子
にリセット信号が受け付けられるのに応答して強制的に
イニシャライズプログラムを実行するようにしたマイク
ロコンピュータ装置であって、前記イニシャライズプロ
グラムには、前記動作異常監視回路から設計された上下
限値内のタイミングでリセット信号が出力されることを
診断するための診断処理が含まれていることを特徴とす
るマイクロコンピュータ装置にある。
According to a first aspect of the present invention, an on / off operation is performed in conjunction with the execution of the main body program by a pair of on / off port operation instructions inserted in a loop for executing the main program. An output port for transmitting a status signal to be transmitted, and a reset terminal for receiving a reset signal output from a power-on reset circuit or an operation abnormality monitoring circuit, in response to a reset signal being received at the reset terminal. A microcomputer device for forcibly executing an initialization program, wherein the initialization program diagnoses that a reset signal is output at a timing within upper and lower limits designed from the operation abnormality monitoring circuit. Microcomputer characterized by including diagnostic processing for In the over the other apparatus.

【0012】ここで、『状態信号送出用の出力ポート』
は、1個若しくは2個以上設けることができる。動作異
常監視回路として、在来の周期監視型のものが採用され
る場合には、出力ポートの数は1個で足りる。これに対
して、本出願人が先に開発(未公開)しているタイミン
グずれ監視型の動作異常監視回路の場合には、少なくと
も2個以上の出力ポートが必要となるであろう。
Here, "an output port for transmitting a status signal"
Can be provided singly or two or more. When a conventional cycle monitoring type is used as the operation abnormality monitoring circuit, one output port is sufficient. On the other hand, in the case of the timing error monitoring type operation abnormality monitoring circuit which has been previously developed (not disclosed) by the present applicant, at least two or more output ports will be required.

【0013】尚、『本体プログラム』とあるのは、例え
ば、当該マイクロコンピュータ装置に組み込まれた本来
の制御プログラム等のことを意味しており、例えば車両
用アンチロックブレーキシステム(ABS)制御用の8
ビットマイクロコンピュータなどの場合であれば、当該
ABS制御用のプログラムがこれに相当する。また、
『本体プログラムの一巡実行ループ中に挿入されたオン
オフ一対のポート操作命令』とあるのは、この種のプロ
グラムは制御周期監視用タイマを用いて一定周期で繰り
返し実行されるのが通例であるから、そのような実行ル
ープ中にポート操作命令が含まれていることを意味して
いる。ここで、このような『ポート操作命令』は、一対
のポートオン命令とポートオフ命令とから構成されてお
り、通常それら一対のポート操作命令は本体プログラム
を挟んでその前後に配置されている。もっとも、この発
明ではそのように本体プログラムを挟んでその前後に一
対の命令を挿入する場合だけではなく、ポート操作命令
を二対以上設け、それらを適宜本体プログラム中に適当
な間隔を隔てて挿入する場合も含まれるであろう。そし
て、このようにポート操作命令を配置して、本体プログ
ラムの実行状態に連動して出力ポートをオンオフ操作す
ることにより、本体プログラムが正常に動作しているか
動作異常を発生しているかを正確に表示する状態信号を
出力ポートから外部へと送出することができる。
The term "main body program" means, for example, an original control program or the like incorporated in the microcomputer device. For example, the "main body program" is used for controlling an antilock brake system (ABS) for a vehicle. 8
In the case of a bit microcomputer or the like, the ABS control program corresponds to this. Also,
"A pair of on / off port operation instructions inserted in a single loop of the main program" means that this type of program is usually repeatedly executed at regular intervals using a control cycle monitoring timer. Means that a port operation instruction is included in such an execution loop. Here, such a “port operation instruction” is composed of a pair of port-on instruction and port-off instruction, and the pair of port operation instructions is usually arranged before and after the main program. However, the present invention is not limited to the case where a pair of instructions are inserted before and after the main program as described above, but two or more pairs of port operation instructions are provided and these are inserted into the main program at appropriate intervals. Will be included. By arranging port operation instructions in this way and turning on and off the output ports in conjunction with the execution state of the main program, it is possible to accurately determine whether the main program is operating normally or abnormally. The status signal to be displayed can be sent from the output port to the outside.

【0014】『リセット端子』とは、この種のマイクロ
コンピュータ装置に通常1個備えられているものであ
り、一般に、このリセット端子に外部からリセット信号
が供給されると、マイクロコンピュータ装置の内部では
アドレスカウンタを強制的に特定のアドレスに飛ばすこ
とにより、そのアドレスに記録されたイニシャライズプ
ログラムを実行可能となる。もっとも、ここでいうリセ
ット端子は、そのような特定の内部動作を起動するもの
に限られるものではなく、要するにそのリセット端子に
リセット信号が到来することによって、強制的に何等か
のイニシャライズプログラムが実行されるものであれば
良い。
Usually, one "reset terminal" is provided in this type of microcomputer device. In general, when a reset signal is supplied from the outside to this reset terminal, the microcomputer device internally has a "reset terminal". By forcibly skipping the address counter to a specific address, the initialization program recorded at that address can be executed. However, the reset terminal referred to here is not limited to one that activates such a specific internal operation. In other words, when a reset signal arrives at the reset terminal, any initialization program is forcibly executed. Whatever is done is good.

【0015】また、『パワーオンリセット回路』とは、
この種のマイクロコンピュータを電源投入時にリセット
するために広く用いられているものであり、電源投入に
応答してリセット信号を出力するように構成されてい
る。
The "power-on reset circuit"
This type of microcomputer is widely used for resetting at the time of power-on, and is configured to output a reset signal in response to power-on.

【0016】また、『動作異常監視回路』とは、一般に
はウオッチドッグタイマ回路などと称されているもので
あり、その動作異常監視アルゴリズムについては種々の
ものが知られている。最も一般的なものは、状態信号を
構成するパルス列の周期を監視するものであり、この周
期が規定値を越えると、所定のリセット信号を出力する
ものである。もっとも、ここでいう動作異常監視回路に
は、その他様々な動作異常監視アルゴリズムを有するも
のを採用できる。例えば、本出願人が先に開発(未公
開)している動作異常監視回路の場合であれば、特定の
2個の出力ポートから出力される2系統の状態信号相互
間におけるタイミングずれを監視し、そのタイミングず
れが規定値を越える状態が一定時間継続すると、所定の
リセット信号を出力するものである。
The "operation abnormality monitoring circuit" is generally called a watchdog timer circuit or the like, and various operation abnormality monitoring algorithms are known. The most common one monitors the cycle of a pulse train constituting a state signal, and outputs a predetermined reset signal when this cycle exceeds a specified value. However, as the operation abnormality monitoring circuit here, one having various other operation abnormality monitoring algorithms can be adopted. For example, in the case of an operation abnormality monitoring circuit that has been previously developed (unpublished) by the present applicant, a timing shift between two state signals output from two specific output ports is monitored. When a state in which the timing deviation exceeds a specified value continues for a predetermined time, a predetermined reset signal is output.

【0017】一般に、この種のマイクロコンピュータ装
置においては、前記リセット端子にリセット信号が受付
けられるのに応答して強制的にイニシャライズプログラ
ムを実行する。ここで、『イニシャライズプログラム』
とは、例えば、各種カウンタやフラグ等をリセットし
て、本体プログラムへの移行準備を整えるものであり、
後に詳細に説明するように、本発明における診断処理
は、このイニシャライズプログラム中に含まれる。
Generally, in this type of microcomputer device, an initialization program is forcibly executed in response to a reset signal being received at the reset terminal. Here, "Initialize Program"
Means, for example, resetting various counters, flags, and the like, and preparing for transition to the main body program.
As will be described later in detail, the diagnostic processing according to the present invention is included in the initialization program.

【0018】本発明で新たに適用された『診断処理』
は、動作異常監視回路から設計された通りの上下限値内
のタイミングでリセット信号が出力されることを診断す
る点において、単にリセット信号の出力有無のみを診断
する従来の動作異常監視回路と顕著に相違する。
"Diagnosis processing" newly applied in the present invention
Is different from a conventional operation abnormality monitoring circuit which simply diagnoses whether or not a reset signal is output, in diagnosing that a reset signal is output at a timing within the upper and lower limits as designed from the operation abnormality monitoring circuit. Is different.

【0019】そして、この請求項1に記載の発明によれ
ば、動作異常監視回路からリセット信号が出力されるも
のの、その出力タイミングに狂いが生じているような場
合には、その旨を直ちに診断可能として、その診断結果
に基づき、本体プログラムの実行中に誤ってイニシャラ
イズプログラムが起動されたり、或いは本体プログラム
が暴走しているにも拘らず、長時間に亘りイニシャライ
ズプログラムが起動されないといった不都合を未然に防
止することが可能となる。
According to the first aspect of the present invention, although the reset signal is output from the operation abnormality monitoring circuit, if the output timing is incorrect, it is immediately diagnosed. It is possible to prevent inconvenience that the initialization program is erroneously started during the execution of the main program, or that the initialization program is not started for a long time despite the runaway of the main program, based on the diagnosis result. Can be prevented.

【0020】なお、この請求項1の主たる目的とすると
ころは、動作異常監視回路から設計された上下限値内の
タイミングでリセット信号が出力されたか否かを診断す
ることにある。従って、この診断結果に基づく対応処理
は必ずしも要件とされるものではない。即ち、この診断
結果を用いて、従来の診断処理のように、本体プログラ
ムへの移行を制御したり、或いは所謂ダブルマイコンシ
ステムであれば、制御権を他のマイコンに移管したり、
更には特別な異常時対応処理を実行して何らかの対象負
荷にマイコン制御から手動制御に切り替えさせる等様々
な対応をとることが可能となるであろう。
It is a main object of the present invention to diagnose whether or not a reset signal is output at a timing within the upper and lower limit values designed by the operation abnormality monitoring circuit. Therefore, the corresponding processing based on the diagnosis result is not always required. In other words, using this diagnosis result, control of the transition to the main body program is performed as in the conventional diagnosis processing, or in the case of a so-called double microcomputer system, the control right is transferred to another microcomputer,
Further, it will be possible to take various countermeasures such as executing a special error handling process to switch from a microcomputer control to a manual control to some target load.

【0021】この出願の請求項2に記載の発明は、前記
診断処理は、前記出力ポートから、想定される動作異常
時の内容に相当する模擬状態信号を送出する模擬状態信
号送出処理と、前記模擬状態信号の送出に続いて、前記
設計上下限値の下限値に相当する時間が到来するのを待
って、あらかじめ決められた状態フラグ領域に、前記設
計上下限値内に収まっていることを意味するキーワード
を書き込み、続いて、前記設計上下限値の上限値に相当
する時間が到来するのを待って、前記状態フラグ領域の
内容を、前記設計上下限値から外れている旨を意味する
内容に書き替える現在時間帯記録処理と、を含み、それ
により、前記リセット信号の到来に応答して強制的に実
行されるイニシャライズプログラムにおいて、前記フラ
グ領域の内容を参照することにより、前記動作異常監視
回路から設計された上下限値内のタイミングでリセット
信号が出力されたことを診断し得るように構成したこと
を特徴とする請求項1に記載のマイクロコンピュータ装
置にある。
According to a second aspect of the present invention, in the diagnostic processing, the simulated state signal transmitting processing for transmitting a simulated state signal corresponding to the content of an assumed abnormal operation from the output port; Following the transmission of the simulated state signal, after waiting for the time corresponding to the lower limit of the design upper / lower limit value to arrive, in a predetermined state flag area, it is within the design upper / lower limit value. A meaningful keyword is written, and then, after waiting for a time corresponding to the upper limit value of the design lower limit value to arrive, it means that the content of the state flag area is out of the design lower limit value. Current time zone recording processing for rewriting the contents of the flag area, whereby the contents of the flag area are referenced in an initialization program forcibly executed in response to the arrival of the reset signal. 2. The microcomputer device according to claim 1, wherein the operation abnormality monitoring circuit is configured to diagnose that the reset signal is output at a timing within the upper and lower limit values designed by the operation abnormality monitoring circuit. is there.

【0022】この請求項2に記載の発明における診断処
理には、『模擬状態信号送出処理』と『現在時間帯記録
処理』とが含まれる。ここで、『想定される動作異常時
の内容に相当する模擬状態信号』には、種々の形態が考
えられる。例えば、動作異常監視回路として在来の周期
監視型のものが使用される場合、模擬状態信号として
は、状態信号を構成するパルス列の周期が一定時間以上
長くなったり、或いはその論理値が“H”若しくは
“L”に固定されてしまった状態を意味している。ま
た、動作異常監視回路として、本出願人が先に提案(未
公開)されているタイミングずれ監視型のものが使用さ
れる場合には、模擬状態信号としては、特定の2つの出
力ポートから出力される2系統の状態信号間において論
理不一致の状態が一定時間以上継続するものが想定され
る。
The diagnostic processing according to the second aspect of the present invention includes "simulated state signal transmission processing" and "current time zone recording processing". Here, various modes are conceivable for the “simulated state signal corresponding to the content of the assumed abnormal operation”. For example, when a conventional cycle monitoring type circuit is used as the operation abnormality monitoring circuit, as the simulated state signal, the cycle of the pulse train forming the state signal becomes longer than a predetermined time or the logical value thereof becomes “H”. "Or" L ". Further, in the case where a circuit for monitoring a timing deviation, which has been proposed (not disclosed) by the present applicant, is used as the operation abnormality monitoring circuit, the simulated state signal is output from two specific output ports. It is assumed that the state of logic mismatch between the two status signals continues for a certain period of time or longer.

【0023】また、『現在時間帯記録処理』において
は、現在時間帯が、設計上下限値の中にあるか、或いは
上限値を越えているかに対応して、それぞれその旨を示
すキーワードが状態フラグ領域に書き込まれる。ここ
で、『状態フラグ領域』は、例えば半導体RAM内の特
定の領域に設けることができる。また、『キーワード』
としては、上下限値内にあるかそれとも上限値を越えて
いるかを示す1ビットのフラグで構成することもできる
が、イニシャライズプログラム起動直後の不定状態と何
等かの特定のキーワードが書き込まれている状態とを確
実に識別させるためには、多ビットのデジタルコードと
することが好ましいであろう。尚、状態フラグ領域に特
定のキーワードを書き込み、或いはそのキーワードを書
き替える処理は、一般的には上書き処理により行われる
が、勿論、予め各キーワード専用の状態フラグ領域を確
保しておき、そのエリアに何等かのデータが書き込まれ
ているかそれとも書き込まれていないかに基づいて、設
計上下限値内に収まっているか、或いは外れているかを
識別可能に構成することもできるであろう。また、『現
在時間帯記録処理』における計時動作は、一巡実行時間
があらかじめ知られている一連の処理を繰り返し実行し
つつ計時動作を行ういわゆるソフトタイマ処理や、所定
のデジタルタイマ回路を起動後、前述した下限値並びに
上限値の到来によるタイマ割り込みを待機するタイマ割
り込み処理等にて実現することができるであろう。
In the "current time zone recording process", a keyword indicating that the current time zone is within the design lower limit value or exceeds the upper limit value is indicated by a state. Written to the flag area. Here, the “status flag area” can be provided, for example, in a specific area in the semiconductor RAM. Also, "keyword"
Can be composed of a one-bit flag indicating whether the value is within the upper / lower limit value or exceeds the upper limit value. However, an undefined state immediately after the initialization program is started and some specific keyword are written. It is preferable to use a multi-bit digital code in order to reliably distinguish the state from the state. Note that the process of writing a specific keyword in the status flag area or rewriting the keyword is generally performed by overwriting, but of course, a status flag area dedicated to each keyword is reserved in advance, Could be configured to be identifiable as to whether it is within the design lower limit or out of design based on whether any data is written or not. In addition, the timekeeping operation in the “current time zone recording process” is a so-called soft timer process for performing a timekeeping operation while repeatedly executing a series of processes in which a round execution time is known in advance, or after activating a predetermined digital timer circuit, This can be realized by a timer interrupt process or the like that waits for a timer interrupt due to the arrival of the lower limit value and the upper limit value described above.

【0024】そして、この請求項2に記載の発明によれ
ば、想定される動作異常時の内容に相当する模擬状態信
号を出力ポートから送出させた後、状態フラグ領域の内
容は、設計上下限値を基準とした現在時間帯を順次に示
す内容となるため、その間にリセット信号が到来して、
イニシャライズプログラムが起動されると、状態フラグ
領域の内容はリセット信号が到来した時点のキーワード
が書き残された状態に保存されることとなり、このキー
ワードを参照することによって、逆に、リセット信号が
設計上下限値内のタイミングで到来したか、それとも設
計上下限値を外れたタイミングで到来したかを判定する
ことができる。
According to the second aspect of the present invention, after the simulated state signal corresponding to the contents of the assumed abnormal operation is transmitted from the output port, the contents of the state flag area are set at the lower limit in design. Since the current time zone based on the value is shown sequentially, a reset signal arrives during that time,
When the initialization program is started, the contents of the status flag area are stored in a state where the keyword at the time of the arrival of the reset signal is left unwritten, and by referring to this keyword, the reset signal is conversely designed. It is possible to determine whether the arrival has occurred at a timing within the lower limit value or at a timing outside the design lower limit value.

【0025】なお、この請求項2に記載の発明において
は、模擬状態信号送出から設計下限値時間の到来に至る
間、状態フラグ領域に何らかのキーワードを書き込むこ
とを必ずしも要件とはしていない。これは、電源投入直
後のイニシャライズ処理ではそのような状態フラグ領域
の内容は不定状態となっているであろうし、また運用時
に何らかの原因で動作監視回路が作動したことに基づく
イニシャライズ処理においても、その内容は運用時の開
始直後に特定の内容に書き替えられているであろうか
ら、そのような設計上下限値を外れていることを示す特
別のキーワードを書き込まずとも、設計上下限値内にあ
ることを意味するキーワードが存在するか否かだけに基
づいて、適正なタイミングでリセット信号が到来したこ
とを診断できると考えられるからである。
In the second aspect of the present invention, it is not always necessary to write a certain keyword in the state flag area from the time when the simulated state signal is transmitted until the time when the design lower limit value is reached. This is because the contents of such a state flag area will be in an indefinite state in the initialization processing immediately after the power is turned on, and also in the initialization processing based on the operation monitoring circuit being activated for some reason during operation. Since the contents will be rewritten to specific contents immediately after the start of operation, even if such a special keyword indicating that it is outside the design lower limit is not written, it will be within the design lower limit. This is because it is considered that it can be diagnosed that the reset signal has arrived at an appropriate timing based only on whether or not there is a keyword indicating that the keyword is present.

【0026】この請求項2の主たる目的とするところ
は、イニシャライズプログラムにおいてフラグ領域の内
容を参照することにより、動作異常監視回路から設計さ
れた上下限値内のタイミングでリセット信号が出力され
たか否かを診断することにある。従って、この診断結果
に基づく対応処理は必ずしも要件とされるものではな
い。即ち、この診断結果を用いて、従来の診断処理のよ
うに、本体プログラムへの移行を制御したり、或いは所
謂ダブルマイコンシステムであれば、制御権を他のマイ
コンに移管したり、更には特別な異常時対応処理を実行
して何らかの対象負荷にマイコン制御から手動制御に切
り替えさせる等様々な対応をとることが可能となるであ
ろう。
The main object of the present invention is to refer to the contents of the flag area in the initialization program to determine whether or not the reset signal is output at a timing within the upper and lower limit values designed by the operation abnormality monitoring circuit. Or to diagnose. Therefore, the corresponding processing based on the diagnosis result is not always required. In other words, using this diagnosis result, control of transition to the main body program is performed as in the conventional diagnosis processing, or in the case of a so-called double microcomputer system, control is transferred to another microcomputer, and furthermore, special processing is performed. It will be possible to take various countermeasures, such as executing an abnormal response process to switch from a microcomputer control to a manual control to some target load.

【0027】この出願の請求項3に記載の発明は、前記
診断処理は、前記出力ポートから、想定される動作異常
時の内容に相当する模擬状態信号を送出する模擬状態信
号送出処理と、前記模擬状態信号の送出に続いて、前記
設計上下限値の下限値に相当する時間が到来するのを待
って、あらかじめ決められた状態フラグ領域に、前記設
計上下限値内に収まっていることを意味するキーワード
を書き込む現在時間帯記録処理と、前記設計上下限値の
上限値に相当する時間が到来するのを待って、前記動作
異常監視回路の再起動時の内容に相当する模擬状態信号
を送出すると共に、動作異常監視回路の異常時に対応す
る処理を実行する監視回路異常処理と、を含み、それに
より、前記リセット信号の到来に応答して強制的に実行
されるイニシャライズプログラムにおいて、前記フラグ
領域の内容を参照することにより、前記動作異常監視回
路から設計された上下限値内のタイミングでリセット信
号が出力されたことを診断し得るように構成したことを
特徴とする請求項1に記載のマイクロコンピュータ装置
にある。
According to a third aspect of the present invention, in the diagnostic processing, the simulated state signal transmitting processing for transmitting a simulated state signal corresponding to the content of an assumed abnormal operation from the output port; Following the transmission of the simulated state signal, after waiting for the time corresponding to the lower limit of the design upper / lower limit value to arrive, in a predetermined state flag area, it is within the design upper / lower limit value. A current time zone recording process of writing a meaningful keyword, and waiting for a time corresponding to the upper limit value of the design lower limit value to arrive, and a simulated state signal corresponding to the content at the time of restarting the operation abnormality monitoring circuit. A monitoring circuit abnormality process for transmitting and performing a process corresponding to an abnormality of the operation abnormality monitoring circuit, whereby the initialization is forcibly executed in response to the arrival of the reset signal. In the configuration program, by referring to the contents of the flag area, it is possible to diagnose that a reset signal is output at a timing within the upper and lower limit values designed by the operation abnormality monitoring circuit. The microcomputer device according to claim 1.

【0028】この請求項3に記載の発明に含まれる『現
在時間帯記録処理』では、前述の請求項2に記載の発明
に含まれる『現在時間帯記録処理』の場合とは異なり、
設計上下限値の上限値に相当する時間が到来しても、フ
ラグ領域の内容はそのまま維持され、設計上下限値を外
れている旨のキーワードに書き替えられることはない。
その代わりに、この請求項3に記載の発明では、新たに
『監視回路異常処理』が設けられている。そして、この
『監視回路異常処理』では、前記動作異常監視回路の再
起動時の内容に相当する模擬状態信号を送出すると共
に、動作異常監視回路の異常時に対応する処理を実行す
ることとしている。
The “current time zone recording process” included in the third aspect of the present invention is different from the “current time zone recording process” included in the second aspect of the present invention.
Even if the time corresponding to the upper limit of the design lower limit value arrives, the content of the flag area is maintained as it is, and is not rewritten with a keyword indicating that the value is outside the design lower limit value.
Instead, in the third aspect of the present invention, "monitoring circuit abnormality processing" is newly provided. In this "monitoring circuit abnormality processing", a simulated state signal corresponding to the content at the time of restarting the operation abnormality monitoring circuit is transmitted, and processing corresponding to the abnormality of the operation abnormality monitoring circuit is executed.

【0029】そして、この請求項3に記載の発明によれ
ば、設計上下限値の下限値を外れたタイミングにてリセ
ット信号が到来した場合には、適正時間帯に相当するキ
ーワードが書き込まれていないことにより、イニシャラ
イズ処理にてその旨を確認することができる一方、設計
上下限値の上限値に相当する時間が到来した以降につい
ては、送出される正常時の内容に相当する模擬状態信号
により動作異常監視回路を再リセットした状態にて、所
定の異常時処理を実行することとしているため、設計上
下限値内のタイミングでリセット信号が到来した場合に
限り、フラグ領域の内容はその旨を表すキーワードが書
き残された状態となり、イニシャライズ処理にてその旨
を確認することができる。
According to the third aspect of the present invention, when a reset signal arrives at a timing outside the lower limit of the design lower limit, a keyword corresponding to an appropriate time zone is written. Since it is not possible to confirm that in the initialization process, on the other hand, after the time corresponding to the upper limit value of the design lower limit value has arrived, the simulation state signal corresponding to the content of the normal state is transmitted. The specified abnormal condition processing is executed in a state where the operation abnormality monitoring circuit is reset again, so that the content of the flag area indicates that only when a reset signal arrives at a timing within the lower limit value in design. The keyword to be written is left unwritten, and it can be confirmed in the initialization processing.

【0030】この請求項3の主たる目的とするところ
も、イニシャライズプログラムにおいてフラグ領域の内
容を参照することにより、動作異常監視回路から設計さ
れた上下限値内のタイミングでリセット信号が出力され
たか否かを診断することにある。従って、この診断結果
に基づく対応処理は必ずしも要件とされるものではな
い。即ち、この診断結果を用いて、従来の診断処理のよ
うに、本体プログラムへの移行を制御したり、或いは所
謂ダブルマイコンシステムであれば、制御権を他のマイ
コンに移管したり、更には特別な異常時対応処理を実行
して何らかの対象負荷にマイコン制御から手動制御に切
り替えさせる等様々な対応をとることが可能となるであ
ろう。
The main object of claim 3 is to refer to the contents of the flag area in the initialization program to determine whether or not the reset signal is output at a timing within the upper and lower limit values designed by the operation abnormality monitoring circuit. Or to diagnose. Therefore, the corresponding processing based on the diagnosis result is not always required. In other words, using this diagnosis result, control of transition to the main body program is performed as in the conventional diagnosis processing, or in the case of a so-called double microcomputer system, control is transferred to another microcomputer, and furthermore, special processing is performed. It will be possible to take various countermeasures, such as executing an abnormal response process to switch from a microcomputer control to a manual control to some target load.

【0031】この出願の請求項4に記載の発明は、前記
診断処理に含まれる現在時間帯記録処理は、前記模擬状
態信号の送出とほぼ同時に、前記状態フラグ領域に、前
記設計上下限値から外れていることを意味するキーワー
ドを書き込む処理を含むことを特徴とする請求項2若し
くは請求項3に記載のマイクロコンピュータ装置にあ
る。
According to a fourth aspect of the present invention, in the present time zone recording process included in the diagnostic process, the status flag area includes the design time lower limit value almost simultaneously with the transmission of the simulated status signal. 4. The microcomputer according to claim 2, further comprising a process of writing a keyword indicating that the keyword is out of range.

【0032】前述した請求項2若しくは請求項3に記載
の発明とは異なり、この請求項4に記載の発明では、模
擬状態信号送出から設計下限値時間の到来に至る間、状
態フラグ領域に適正時間帯に対応するキーワードとは異
なる何らかのキーワードを積極的に書き込むこととして
いる。
Unlike the second or third aspect of the present invention, according to the fourth aspect of the present invention, the proper state flag area is set during the period from the transmission of the simulated state signal to the arrival of the design lower limit time. Some keywords different from the keywords corresponding to the time zone are actively written.

【0033】そして、この請求項4に記載の発明によれ
ば、イニシャライズプログラムにおいて前記フラグ領域
の内容を参照することにより、前記動作異常監視回路か
ら設計された上下限値内のタイミングでリセット信号が
出力されたことを一層確実に診断することができる。
According to the fourth aspect of the invention, by referring to the contents of the flag area in the initialization program, the reset signal is generated at a timing within the upper and lower limit values designed by the operation abnormality monitoring circuit. The output can be more reliably diagnosed.

【0034】この出願の請求項5に記載の発明は、前記
状態フラグ領域に、前記模擬状態信号の送出とほぼ同時
に書き込まれるキーワードには前記下限値を外れている
旨が意味づけられており、かつ前記設計上下限値の上限
値の到来により書き替えられる内容は、前記上限値を外
れている旨が意味づけられていることを特徴とする請求
項4に記載のマイクロコンピュータ装置にある。
The invention described in claim 5 of the present application means that a keyword written in the state flag area almost simultaneously with the transmission of the simulated state signal is out of the lower limit, 5. The microcomputer device according to claim 4, wherein the contents to be rewritten when the upper limit value of the design lower limit value is reached means that the upper limit value is deviated.

【0035】ここで、『意味づけられており』とは、当
該キーワードが設計上下限値内にあるか或いは外にある
かを示すのみならず、下限値を外れているか若しくは上
限値を外れているかまでをも識別可能とすることを意味
している。
Here, "meaning" means not only whether the keyword is within or outside the lower limit in design, but also is out of the lower limit or out of the upper limit. Means that it is possible to identify

【0036】そして、この請求項5に記載の発明によれ
ば、イニシャライズプログラム中において、状態フラグ
領域の内容を参照することにより、リセット信号が下限
値を外れて出力されたか、或いは上限値を外れて出力さ
れたかまでをも診断することができる。前述と同様に、
この診断結果をどのように利用するかはユーザの使い勝
手によるものであり、またこのフラグ領域の内容を保存
したまま処理を終了し、適当な時点でフラグ領域の内容
を読み出すことにより、動作異常監視回路の故障が例え
ば時定数回路を構成するどの素子に起因するか等を推定
することも可能となる。
According to the fifth aspect of the present invention, by referring to the contents of the status flag area during the initialization program, the reset signal is output outside the lower limit value or out of the upper limit value. Can be diagnosed as to whether the data has been output. As before,
How this diagnosis result is used depends on the usability of the user. In addition, the processing is terminated while the contents of the flag area are preserved, and the contents of the flag area are read out at an appropriate time to monitor the operation abnormality. It is also possible to estimate, for example, which element of the time constant circuit causes the circuit failure.

【0037】この出願の請求項6に記載の発明は、前記
診断処理には、前記現在時間帯記録処理の終了に続い
て、前記リセット端子にリセット信号が到来するのを待
つことなく直ちに動作異常監視回路の異常時に対応する
処理を実行する監視回路異常処理が含まれていることを
特徴とする請求項2に記載のマイクロコンビュータ装置
にある。
According to a sixth aspect of the present invention, in the diagnosis process, the operation abnormality immediately follows the end of the current time zone recording process without waiting for a reset signal to arrive at the reset terminal. 3. The micro-computer device according to claim 2, further comprising a monitoring circuit abnormality process for executing a process corresponding to an abnormality of the monitoring circuit.

【0038】ここで『前記リセット端子にリセット信号
が到来するのを待つことなく』とあるのは、従来の診断
処理のように、模擬状態信号を出力ポートから送出した
後、ひたすらリセット信号が到来するのを待つのではな
く、既に設計上下限値を外れていることが分かっている
のであるから、直ちに動作監視回路の異常時に対応する
処理を実行することを意味している。
Here, "without waiting for the reset signal to arrive at the reset terminal" means that, as in the conventional diagnostic processing, after the simulation state signal is transmitted from the output port, the reset signal is simply received. Since it is known that the operation monitoring circuit has already deviated from the lower limit in design, instead of waiting for the operation, it means that the processing corresponding to the abnormality of the operation monitoring circuit is immediately executed.

【0039】そして、この請求項6に記載の発明によれ
ば、リセット信号が規定の上下限値を外れて到来する場
合のみならず、動作異常監視回路が完全に故障してしま
って、リセット信号が全く発せられなかった場合にも、
直ちに動作監視回路の異常時に対応する処理を実行する
ことが可能となる。
According to the present invention, not only when the reset signal arrives out of the specified upper and lower limit values, but also the operation abnormality monitoring circuit completely breaks down, and the reset signal is output. Is not emitted at all,
It is possible to immediately execute a process corresponding to an abnormality of the operation monitoring circuit.

【0040】この出願の請求項7に記載の発明は、前記
イニシャライズプログラムには、前記フラグ領域の記憶
内容を参照した結果として、当該イニシャライズプログ
ラムの起動が、前記診断処理において前記出力ポートか
ら模擬状態信号を送出したことに応答して、前記動作異
常監視回路から設計された上下限値内のタイミングでリ
セット信号が出力された結果であると判定された場合に
は、前記本体プログラムへの移行を許容する一方、前記
パワーオンリセット回路からリセット信号が出力された
結果であると判定された場合には、前記診断処理への移
行を許容する条件分岐処理が、前記診断処理の前処理と
して、含まれていることを特徴とする請求項2若しくは
請求項3に記載のマイクロコンピュータ装置にある。
According to a seventh aspect of the present invention, in the initialization program, the activation of the initialization program is simulated from the output port in the diagnosis processing as a result of referring to the storage contents of the flag area. If it is determined that the reset signal is output at a timing within the upper and lower limit values designed by the operation abnormality monitoring circuit in response to the transmission of the signal, the transition to the main body program is performed. On the other hand, if it is determined that the result is a result of the output of the reset signal from the power-on reset circuit, a conditional branching process that allows a shift to the diagnostic process is included as a pre-process of the diagnostic process. The microcomputer device according to claim 2 or 3, wherein

【0041】この『条件分岐処理』では、本体プログラ
ムへ移行すべきか、或いは診断処理へ移行すべきかの制
御が行われる。即ち、前述したように、請求項2若しく
は請求項3に記載の発明によれば、状態フラグ領域の記
憶内容を参照することによって、動作異常監視回路から
設計上下限値内のタイミングでリセット信号が出力され
たか、或いはそれを外れてリセット信号が出力されたか
を判別することができるため、この請求項7に記載の発
明の場合には、その判定結果を用いることにより、診断
処理において動作異常監視回路が正常に動作した場合に
限り本体プログラムへの移行を許容する一方、パワーオ
ンリセット回路からリセット信号が出力された結果であ
ると判定された場合には、未だ診断処理が実行されてい
ないものと判定して、直ちに上述の診断処理を実行させ
るようにしたものである。
In the "conditional branching process", control is performed to determine whether to shift to the main program or to the diagnostic process. That is, as described above, according to the second or third aspect of the invention, the reset signal is output from the operation abnormality monitoring circuit at a timing within the design lower limit value by referring to the storage contents of the status flag area. Since it is possible to determine whether the signal has been output or the reset signal has been output when the signal is out of the range, in the case of the invention according to the seventh aspect, by using the result of the determination, it is possible to monitor the operation abnormality in the diagnostic processing. The transition to the main program is permitted only when the circuit operates normally, but the diagnostic processing has not been executed if it is determined that the reset signal is output from the power-on reset circuit. Is determined, and the above-described diagnostic processing is immediately executed.

【0042】そして、この請求項7に記載の発明によれ
ば、電源投入直後自動的に本発明の診断処理を実行させ
る一方、その診断処理の結果、動作異常監視回路が正常
に動作した場合に限り、本体プログラムへの移行を許容
し、これにより動作異常監視回路におけるリセット信号
出力タイミングの狂いを原因とする誤ったイニシャライ
ズプログラムの実行や、或いは本体プログラムが動作異
常を発生しているにも拘らず、イニシャライズプログラ
ムがなかなか実行されないといった不都合を未然に防止
できるのである。
According to the seventh aspect of the present invention, the diagnostic processing of the present invention is automatically executed immediately after the power is turned on, and as a result of the diagnostic processing, the operation abnormality monitoring circuit operates normally. As long as the transition to the main body program is permitted, the execution of the wrong initialization program due to the irregularity of the reset signal output timing in the operation abnormality monitoring circuit, or the operation abnormality That is, it is possible to prevent the inconvenience that the initialization program is not easily executed.

【0043】この出願の請求項8に記載の発明は、前記
動作異常監視回路は、互いに独立した複数の動作異常監
視回路を含み、前記イニシャライズプログラムに含まれ
る診断処理は、前記複数の動作異常監視回路のそれぞれ
に対応する複数の個別診断処理を含むことを特徴とする
請求項2若しくは請求項3に記載のマイクロコンピュー
タ装置にある。
In the invention according to claim 8 of the present application, the operation abnormality monitoring circuit includes a plurality of operation abnormality monitoring circuits independent of each other, and the diagnostic processing included in the initialization program includes the plurality of operation abnormality monitoring circuits. The microcomputer device according to claim 2 or 3, further comprising a plurality of individual diagnosis processes corresponding to the respective circuits.

【0044】請求項2若しくは請求項3に記載の発明
は、1個の動作異常監視回路を有するマイクロコンピュ
ータのみならず、互いに独立した複数の動作異常監視回
路を含むマイクロコンピュータにも適応が可能である。
このように複数の動作異常監視回路を設けるのは、それ
らの1つが故障しても他の動作異常監視回路によってこ
れをバックアップすることを意図したり、動作異常内容
が様々に存在する場合、特定の動作異常監視アルゴリズ
ムを有する1個の動作異常監視回路ではそれら全ての動
作異常内容に対応できないような場合、これを幾つかの
動作異常監視回路によってそれぞれ受け持たせることを
意図する場合があるからである。
The invention described in claim 2 or 3 can be applied not only to a microcomputer having one operation abnormality monitoring circuit but also to a microcomputer including a plurality of operation abnormality monitoring circuits independent of each other. is there.
Providing a plurality of operation abnormality monitoring circuits in this way is intended to back up one of them even if one of them fails, or to specify the operation abnormality when there are various types of operation abnormality contents. In the case where one operation abnormality monitoring circuit having the operation abnormality monitoring algorithm described above cannot cope with all the contents of the operation abnormality, it may be intended that each of the operation abnormality monitoring circuits handles the operation abnormality. It is.

【0045】そして、この請求項8に記載の発明では、
それら複数の動作異常監視回路のそれぞれに対して、個
別に診断処理を行おうとするものである。
In the invention according to claim 8,
The diagnostic processing is individually performed for each of the plurality of operation abnormality monitoring circuits.

【0046】この出願の請求項9に記載の発明は、前記
複数の個別診断処理のそれぞれには一定の順序付けがな
されており、かつ各診断処理にて使用される前記キーワ
ードには対応する動作異常監視回路に固有な意味付けが
なされており、前記イニシャライズプログラムには、前
記フラグ領域の記憶内容を参照した結果として、当該イ
ニシャライズプログラムの起動が、前記個別診断処理に
おいて前記出力ポートから模擬状態信号を送出したこと
に応答して、前記対応する動作異常監視回路から設計さ
れた上下限値内のタイミングでリセット信号が出力され
た結果であると判定された場合には、次の順位に位置す
る個別診断処理若しくは次の順位に位置する個別診断処
理が存在しなければ前記本体プログラムへの移行を許容
する一方、前記パワーオンリセット回路からリセット信
号が出力された結果であると判定された場合には、前記
診断処理への移行を許容する条件分岐処理が、前記診断
処理の前処理として、含まれていることを特徴とする請
求項8に記載のマイクロコンピュータ装置にある。 前
述のような理由で複数の個別診断処理を設け、複数の動
作異常監視回路に対応する場合、動作異常監視回路のそ
れぞれが専用の状態信号を監視するとは限らない。即
ち、出力ポートの数には限りがあるため、好ましくは、
共通の出力ポートを以て複数の動作異常監視回路に対応
することが好ましい。そのような場合、共通の模擬状態
信号を以て複数の個別診断処理を同時に行わせることは
なかなか困難である。そこで、この請求項9に記載の発
明では、それら複数の動作異常監視回路を幾つかの時間
帯に分けて順次に個別診断処理するものである。そし
て、それら個別診断処理において、全ての処理が正常に
終了した場合に限り、本体プログラムへの移行を許容す
るものである。
According to a ninth aspect of the present invention, in each of the plurality of individual diagnostic processes, a predetermined order is assigned, and an abnormal operation corresponding to the keyword used in each diagnostic process is performed. A unique meaning is given to the monitoring circuit, and as a result of referring to the stored contents of the flag area, the initialization program starts the initialization program and generates a simulated state signal from the output port in the individual diagnosis processing. In response to the transmission, when it is determined that the result is that the reset signal is output at a timing within the upper and lower limit values designed from the corresponding operation abnormality monitoring circuit, the individual in the next order is determined. If there is no diagnostic processing or individual diagnostic processing located in the next order, the transition to the main program is permitted, while the When it is determined that the result is a result of outputting a reset signal from the on-reset circuit, a conditional branching process that allows a shift to the diagnostic process is included as a pre-process of the diagnostic process. A microcomputer device according to claim 8. When a plurality of individual diagnosis processes are provided for the above-described reason and a plurality of operation abnormality monitoring circuits are supported, each of the operation abnormality monitoring circuits does not always monitor a dedicated state signal. That is, since the number of output ports is limited, preferably,
It is preferable to support a plurality of operation abnormality monitoring circuits with a common output port. In such a case, it is very difficult to simultaneously perform a plurality of individual diagnosis processes using a common simulation state signal. Therefore, according to the ninth aspect of the present invention, the plurality of operation abnormality monitoring circuits are divided into several time zones and sequentially subjected to individual diagnosis processing. Then, in these individual diagnosis processes, the shift to the main program is permitted only when all the processes are normally completed.

【0047】そして、この請求項9に記載の発明によれ
ば、電源投入に応答して、予め決められた順序でそれら
複数の動作異常監視回路に対して順次に診断を行い、全
ての動作異常監視回路が正常なタイミングでリセット信
号を出力することを確認した後、初めて本体プログラム
への移行を可能とすることができる。
According to the ninth aspect of the present invention, the plurality of operation abnormality monitoring circuits are sequentially diagnosed in a predetermined order in response to power-on, and all the operation abnormality After confirming that the monitoring circuit outputs the reset signal at a normal timing, it is possible to shift to the main program for the first time.

【0048】この出願の請求項10に記載の発明は、前
記複数の個別診断処理には、周期監視型の動作異常監視
回路に対する個別診断処理とタイミングズレ監視型の動
作異常監視回路に対応する個別診断処理とが含まれてい
ることを特徴とする請求項8若しくは請求項9に記載の
マイクロコンピュータ装置にある。
According to a tenth aspect of the present invention, the plurality of individual diagnostic processes include an individual diagnostic process for a period monitoring type operation abnormality monitoring circuit and an individual diagnosis process corresponding to a timing deviation monitoring type operation abnormality monitoring circuit. 10. The microcomputer according to claim 8, further comprising a diagnosis process.

【0049】動作異常監視回路を複数設ける場合、それ
ら動作異常監視回路の監視アルゴリズムを互いに異なら
せることは、多岐に亘る内容の動作異常に対して適切な
対応を図る点で有効である。ここで、在来の周期監視型
の動作異常監視回路に加えて、本発明者等が新たに開発
したタイミングずれ監視型の動作異常監視回路を設ける
ことが最も好ましいと考えられる。即ち、タイミングず
れ監視型の動作異常監視回路では、プログラムが暴走状
態を起こしてポート操作命令が実行されていないにも拘
らず、他の命令がポート操作命令に化けて、その結果予
期せぬタイミングで状態信号中にオンオフタイミングが
生じた場合でも、これを特定の2個の出力ポートから得
られる2系統の状態信号化における論理不一致に基づい
て確実に検出することができる。即ち、このような所謂
命令化けによるオン操作若しくはオフ操作は、予めタイ
ミングずれを与えた2系統の状態信号間におけるタイミ
ングずれとは明らかに相違するから、このタイミングず
れが正常時のタイミングずれと異なることによって、そ
のような命令化けに基づく動作異常を確実に検出するこ
とができる。その結果、2個の出力ポートから互いに一
定のタイミングずれを有する同一周期の状態信号を出力
させておき、それら状態信号のいずれか一方を周期監視
型の動作異常監視回路にて監視するように構成すれば、
2個の出力ポートから得られる2系統の信号のみによっ
て、従来より想定されている動作異常のみならず、新た
に想定された命令化けに基づく動作異常までをも的確に
対応が可能となる。
When a plurality of operation abnormality monitoring circuits are provided, it is effective to make the monitoring algorithms of the operation abnormality monitoring circuits different from each other in order to appropriately cope with various kinds of operation abnormalities. Here, it is considered most preferable to provide a timing deviation monitoring type operation abnormality monitoring circuit newly developed by the present inventors in addition to the conventional period monitoring type operation abnormality monitoring circuit. In other words, in the timing error monitoring type operation abnormality monitoring circuit, although the program runs out of control and the port operation instruction is not executed, other instructions are transformed into port operation instructions, resulting in unexpected timing. Therefore, even when the on / off timing occurs in the status signal, it can be reliably detected based on the logical mismatch between the two status signal conversions obtained from the specific two output ports. That is, since the on-operation or the off-operation due to the so-called garbled instruction is clearly different from the timing deviation between the two state signals to which a timing deviation has been given in advance, this timing deviation is different from the timing deviation in a normal state. By doing so, it is possible to reliably detect an operation abnormality based on such a garbled instruction. As a result, a configuration is adopted in which two output ports output status signals of the same cycle having a fixed timing shift with respect to each other, and one of the status signals is monitored by a cycle monitoring type operation abnormality monitoring circuit. if,
By using only the two signals obtained from the two output ports, it is possible to appropriately cope not only with the operation error assumed conventionally, but also with the operation error based on newly assumed command corruption.

【0050】そして、この請求項10に記載の発明で
は、そのような広範囲な動作異常にも対応し得る構成に
おいても、それら動作異常監視回路のリセットタイミン
グの異常を的確に診断することが可能となるのである。
According to the tenth aspect of the present invention, even in a configuration capable of coping with such a wide range of operation abnormality, it is possible to accurately diagnose an abnormality in the reset timing of the operation abnormality monitoring circuit. It becomes.

【0051】[0051]

【発明の実施の形態】以下、この発明の好ましい実施の
形態につき、添付図面を参照して詳細に説明する。前述
したように、この種のマイクロコンピュータ装置には、
本体プログラムの一巡実行ループ中に挿入されたオンオ
フ一対のポート操作命令により本体プログラムの実行に
連動してオンオフ操作される状態信号送出用の出力ポー
トと、パワーオンリセット回路若しくは動作異常監視回
路から出力されるリセット信号を受付けるためのリセッ
ト端子が備えられており、前記リセット端子にリセット
信号が受付けられるのに応答して強制的にイニシャライ
ズプログラムを実行させることにより、プログラムの暴
走などの動作異常が発生した場合、プログラムの実行を
強制的に停止させて、制御対象負荷を保護するようにし
ている。
Preferred embodiments of the present invention will be described below in detail with reference to the accompanying drawings. As described above, this type of microcomputer device includes:
An output port for sending a status signal that is turned on and off in conjunction with the execution of the main program by a pair of on / off port operation instructions inserted into the loop of execution of the main program, and output from a power-on reset circuit or operation abnormality monitoring circuit A reset terminal is provided for receiving a reset signal to be executed, and the initialization program is forcibly executed in response to the reset signal being received at the reset terminal. In such a case, the execution of the program is forcibly stopped to protect the load to be controlled.

【0052】ところで、従来この種のマイクロコンピュ
ータ装置にて想定されている動作異常は、その発生と共
に前述したオンオフ一対のポート操作命令が実行されな
くなり、その結果状態信号の内容が“H”若しくは
“L”に固定されて、それまで繰り返し一定周期で出力
されていたパルスが停止するといった内容のものであ
る。その為、動作異常監視回路に採用された監視アルゴ
リズムとしては、状態信号中のパルス周期を監視し、こ
のパルス周期が予め決められた基準周期を越えたことに
基づいて動作異常の発生を推定し、直ちにリセット信号
を出力するように構成されている。
By the way, when an operation abnormality assumed in the conventional microcomputer apparatus of this type is performed, the above-mentioned pair of on / off port operation commands is not executed with the occurrence of the abnormality. As a result, the content of the state signal becomes "H" or "H". The pulse is fixed to L ", and the pulse which has been repeatedly output at a constant cycle is stopped. Therefore, as a monitoring algorithm adopted in the operation abnormality monitoring circuit, the pulse period in the state signal is monitored, and the occurrence of the operation abnormality is estimated based on the fact that the pulse period exceeds a predetermined reference period. , The reset signal is output immediately.

【0053】ところが、本発明者等の鋭意研究によれ
ば、プログラムの暴走中であっても、状態信号送出用の
出力ポートが予期せぬタイミングでオン若しくはオフさ
れたり、或いはオンオフを繰り返して動作正常時と同様
なパルス列が出力される場合もあり得るとの知見が得ら
れた。これは、プログラムの暴走中に予期せぬタイミン
グでポート操作命令が実際に実行される場合もあろう
が、それ以外にも、別の命令がフェッチ動作の乱れなど
によってポート操作命令に化けて実行された結果、状態
信号送出用の出力ポートが予期せぬタイミングで操作さ
れている場合もあり得るとの知見が得られた。
However, according to the inventor's earnest research, the output port for transmitting the status signal is turned on or off at an unexpected timing, or operates repeatedly on and off, even during program runaway. It has been found that a pulse train similar to that in a normal state may be output. This means that a port operation instruction may actually be executed at an unexpected timing during a program runaway, but another instruction may be executed as a port operation instruction due to disturbance of the fetch operation. As a result, it has been found that the output port for transmitting the status signal may be operated at an unexpected timing.

【0054】そこで、本発明者等は、このような内容の
動作異常にも的確に対応が可能な、新規な動作異常監視
回路を提案している。この新規な動作異常監視回路に採
用された監視アルゴリズムは、特定の2個の出力ポート
から外部へ送出される2系統の状態信号相互間における
オンタイミング若しくはオフタイミングのずれに着目
し、これが基準時間よりも長くなると、直ちにリセット
信号を出力するものである。一方、これに対応してマイ
クロコンピュータ装置側には、本体プログラムの一巡実
行ループ中にオンオフ一対のポート操作命令を2個以上
挿入し、それらポート操作命令の実行時間のずれによ
り、予め決められた2個の出力ポートからそれら実行時
間の相違に基づく一定のタイミングずれを有する2系統
の状態信号を送出するようにしている。そして、1台の
マイクロコンピュータ装置に対して、在来の周期監視型
の動作異常監視回路と本発明者等が新たに提案した新規
な動作異常監視回路等を併設することによって、より一
層信頼性の高いマイクロコンピュータシステムを構成し
ている。
Therefore, the present inventors have proposed a new operation abnormality monitoring circuit capable of accurately coping with such an operation abnormality. The monitoring algorithm employed in this new operation abnormality monitoring circuit focuses on the shift of the on-timing or off-timing between the two status signals sent from two specific output ports to the outside. If it becomes longer, a reset signal is output immediately. On the other hand, in response to this, two or more pairs of on / off port operation instructions are inserted into the microcomputer device during the one-time execution loop of the main program, and a predetermined time is determined by a difference in execution time of the port operation instructions. Two output state signals are sent from the two output ports with a certain timing shift based on the difference in the execution time. Further, by providing a single microcomputer device with a conventional cycle monitoring type operation abnormality monitoring circuit and a new operation abnormality monitoring circuit newly proposed by the present inventors, reliability is further improved. Of the microcomputer system with high performance.

【0055】このような高信頼性を有するマイクロコン
ピュータシステムの構成を、図1のブロック図に概略的
に示している。即ち、同図に示されるように、このマイ
クロコンピュータシステムは、マイクロコンピュータ装
置であるCPU1と、在来の周期監視型の動作異常監視
回路である第1の監視回路2と、本発明者等により新た
に提案されたタイミングずれ監視型の動作異常監視回路
である第2の監視回路3とから概略構成されている。
The structure of such a highly reliable microcomputer system is schematically shown in the block diagram of FIG. That is, as shown in FIG. 1, the microcomputer system includes a CPU 1 which is a microcomputer device, a first monitoring circuit 2 which is a conventional cycle monitoring type operation abnormality monitoring circuit, It comprises a second monitoring circuit 3 which is a newly proposed timing deviation monitoring type operation abnormality monitoring circuit.

【0056】CPU1を構成するマイクロコンピュータ
としては、この例では、車両用アンチロックブレーキシ
ステム(以下、ABSという)の制御に用いられる8ビ
ット構成のワンチップマイクロコンピュータが採用され
ている。この種のワンチップマイクロコンピュータの内
部には、各種の制御プログラムを予め格納されたROM
と、制御プログラムの実行の際にワーキングエリア等と
して使用されるRAMと、各種のタイマやカウンタ等が
設けられているのが通例である。この例では、説明の便
宜のために、それらの中で、RAM102の内部に設定
された状態フラグ領域102aと、内蔵デジタルタイマ
101のみが図示されている。また、この種のマイクロ
コンピュータには、多数の入出力ポート等が設けられる
のが通例であるが、これについても説明の便宜のため
に、状態信号を外部へ送出するための2個の出力ポート
P1,P2と、外部から与えられるリセット信号を受付
けるためのリセット端子RSTのみが図示されている。
後に詳細に説明するが、ROM内に格納された制御プロ
グラム(本体プログラム)の一巡実行ループ中には、前
述した2つの出力ポートP1,P2から、互いに一定の
タイミングずれを有する一定周期のパルス列を出力する
ための2組のポート操作命令が挿入されている。また、
良く知られているように、この種のマイクロコンピュー
タ装置では、リセット端子RSTがリセット信号を受付
けた場合、例えば内蔵するアドレスカウンタを強制的に
特定のアドレスに飛ばすことにより、予め決められたイ
ニシャライズプログラムを自動的に実行するように構成
されている。
In this example, an 8-bit one-chip microcomputer used for controlling a vehicle antilock brake system (hereinafter referred to as ABS) is employed as the microcomputer constituting the CPU 1. A ROM in which various control programs are stored in advance inside this kind of one-chip microcomputer
And a RAM used as a working area when the control program is executed, and various timers and counters are usually provided. In this example, only the state flag area 102a set inside the RAM 102 and the built-in digital timer 101 are shown for convenience of explanation. In general, a microcomputer of this type is provided with a large number of input / output ports and the like. For convenience of explanation, two output ports for sending a status signal to the outside are also provided. Only P1 and P2 and a reset terminal RST for receiving an externally applied reset signal are shown.
As will be described later in detail, during a single loop of the control program (main body program) stored in the ROM, a pulse train having a constant cycle having a certain timing shift from each other is output from the two output ports P1 and P2. Two sets of port operation instructions for output are inserted. Also,
As is well known, in this type of microcomputer device, when a reset terminal RST receives a reset signal, for example, a built-in address counter is forcibly skipped to a specific address, so that a predetermined initialization program is executed. Is configured to execute automatically.

【0057】周期監視型の動作異常監視回路である第1
の監視回路2は、CPU1のポートP1から出力される
状態信号を入力端子IN1を介して取り込むと共に、そ
の周期を常時監視し、これが予め決められた基準時間を
越えたことに基づいて動作異常の発生を判定し、それに
応答して出力端子OUT1のレベルを“H”から“L”
に立ち下げることによって、CPU1に対してリセット
をかけるように構成されている。
The first is a period monitoring type operation abnormality monitoring circuit.
The monitoring circuit 2 captures the status signal output from the port P1 of the CPU 1 through the input terminal IN1 and constantly monitors its cycle, and based on the fact that this exceeds a predetermined reference time, an abnormal operation is detected. The occurrence is determined, and the level of the output terminal OUT1 is changed from “H” to “L” in response to the occurrence.
, The CPU 1 is reset.

【0058】本発明者等が新たに開発したタイミングず
れ監視型の動作異常監視回路である第2の監視回路3
は、ポートP1,P2から出力される状態信号をその入
力端子IN21,IN22を介して取り込むと共に、そ
れらのタイミングずれを常時監視し、これが予め決めら
れた基準時間を越えたことに基づいて動作異常の発生を
判定し、これに応答して出力端子OUT2のレベルを
“H”から“L”に立ち下げることによって、CPU1
にリセットをかけるように構成されている。
The second monitoring circuit 3 which is a timing deviation monitoring type operation abnormality monitoring circuit newly developed by the present inventors.
Captures status signals output from the ports P1 and P2 via its input terminals IN21 and IN22, constantly monitors their timing deviations, and operates abnormally based on the fact that the timing deviation exceeds a predetermined reference time. Is determined, and in response to this, the level of the output terminal OUT2 falls from “H” to “L”, whereby the CPU 1
Is configured to be reset.

【0059】パワーオンリセット回路4は、電源投入に
応答してCPU1に対してリセットをかけるものであ
り、その内部構成は各種の文献により周知であるから説
明は省略する。
The power-on reset circuit 4 resets the CPU 1 in response to turning on the power. The internal configuration of the power-on reset circuit 4 is well known in various documents, and thus the description thereof is omitted.

【0060】尚、抵抗R1は、リセット端子RSTがハ
イインピーダンス状態にある時に、リセットラインを
“H”に引き上げるためのプルアップ抵抗であり、また
抵抗R2,R3は出力ポートP1,P2がハイインピー
ダンス状態にある時に、それらのラインを“H”レベル
に引き上げるためのプルアップ抵抗である。
The resistor R1 is a pull-up resistor for raising the reset line to "H" when the reset terminal RST is in a high-impedance state. The resistors R2 and R3 have output ports P1 and P2 of high impedance. These are pull-up resistors for raising those lines to the “H” level when in the state.

【0061】次に、第1の監視回路2並びに第2の監視
回路3の具体的な一例の構成を、図2の回路図を参照し
て詳細に説明する。同図に示されるように、周期監視型
の動作異常監視回路である第1の監視回路2は、入力端
子IN1から入力される信号の立ち上がりに応答して微
小幅“H”パルスを出力する微分回路DFと、この微分
回路DFから出力される微小幅“H”パルスに応答して
瞬間的にオンするトランジスタQと、抵抗R4,R5を
介して電源Vccにより充電されると共に、トランジス
タQを介して瞬間的に放電されるコンデンサC1と、演
算増幅器OP1を主体として構成され、コンデンサC1
の充電電圧Vc1を抵抗R6と抵抗R7とで電源電圧V
ccを分圧して得られた閾値電圧Vth1と比較し、そ
の比較結果を出力端子OUT1から外部へと出力するコ
ンパレータCOMP1とから構成されている。即ち、こ
の第1の監視回路2では、ポートP1から出力される状
態信号中に含まれるパルス列の周期が、予め決められた
基準時間よりも短い場合、コンデンサC1の充電電圧V
cは閾値電圧Vth1よりも低く維持されるのに対し、
前述したパルス列の周期が基準時間より長い場合には、
コンデンサC1の充電電圧Vc1は閾値電圧Vth1を
越えることとなり、その結果コンパレータCOMP1が
反転動作して、出力端子OUT1のレベルは“H”から
“L”へと立ち下がり、CPU1にリセットがかかるの
である。
Next, the configuration of a specific example of the first monitoring circuit 2 and the second monitoring circuit 3 will be described in detail with reference to the circuit diagram of FIG. As shown in the figure, a first monitoring circuit 2 which is a period monitoring type operation abnormality monitoring circuit outputs a minute width "H" pulse in response to a rise of a signal input from an input terminal IN1. A circuit DF, a transistor Q which is turned on instantaneously in response to a minute width "H" pulse output from the differentiating circuit DF, and is charged by a power supply Vcc via resistors R4 and R5, and is also connected via a transistor Q. And an operational amplifier OP1.
Charging voltage Vc1 is supplied to the power supply voltage V by resistors R6 and R7.
cc is compared with a threshold voltage Vth1 obtained by dividing the voltage cc, and the comparator COMP1 outputs the comparison result from the output terminal OUT1 to the outside. That is, in the first monitoring circuit 2, when the cycle of the pulse train included in the state signal output from the port P1 is shorter than a predetermined reference time, the charging voltage V of the capacitor C1 is changed.
While c is maintained lower than the threshold voltage Vth1,
If the period of the pulse train is longer than the reference time,
The charging voltage Vc1 of the capacitor C1 exceeds the threshold voltage Vth1. As a result, the comparator COMP1 inverts, the level of the output terminal OUT1 falls from "H" to "L", and the CPU 1 is reset. .

【0062】本発明者等が新たに提案したタイミングず
れ監視型の動作異常監視回路である第2の監視回路3
は、入力端子IN21,IN22に供給される2系統の
状態信号相互間における論理不一致状態を検出するため
の排他的論理和回路EーORと、この排他的論理和回路
EーORの出力が“H”の時に抵抗R8を介して充電さ
れ且つ“L”の時にダイオードDを介して瞬時に放電さ
れるコンデンサC2と、演算増幅器OP2により構成さ
れ、前記コンデンサC2の充電電圧Vc2を抵抗R9と
抵抗R10とで電源電圧Vccを分圧することにより得
られた閾値電圧Vthと比較し、その比較結果を出力端
子OUT2から出力するコンパレータCOMPとから構
成されている。そして、ポートP1,P2から出力され
る2系統の状態信号中のタイミングずれが、予め決めら
れた基準時間より短い場合、コンデンサC2の充電電圧
Vcには閾値電圧Vthよりも低く維持されているのに
対し、同タイミングずれが基準時間よりも長くなると、
コンデンサC2の充電電圧Vc2の値は閾値電圧Vth
2よりも高くなり、その結果コンパレータCOMP2が
反転動作して、出力端子OUT2のレベルは“H”から
“L”へと立ち下がり、CPU1にリセットがかかるこ
ととなる。
The second monitoring circuit 3 which is an operation abnormality monitoring circuit of the timing deviation monitoring type newly proposed by the present inventors.
Is an exclusive OR circuit E-OR for detecting a logical mismatch state between two state signals supplied to the input terminals IN21 and IN22, and the output of the exclusive OR circuit E-OR is " It comprises a capacitor C2 which is charged via a resistor R8 at the time of "H" and is instantaneously discharged via a diode D at the time of "L", and an operational amplifier OP2, and charges the capacitor C2 with a resistor R9 and a resistor R9. R10 and a comparator COMP which compares the power supply voltage Vcc with a threshold voltage Vth obtained by dividing the power supply voltage Vcc and outputs the comparison result from an output terminal OUT2. When the timing shift in the two-system state signals output from the ports P1 and P2 is shorter than a predetermined reference time, the charging voltage Vc of the capacitor C2 is maintained lower than the threshold voltage Vth. On the other hand, if the timing shift is longer than the reference time,
The value of the charging voltage Vc2 of the capacitor C2 is the threshold voltage Vth
Therefore, the level of the output terminal OUT2 falls from “H” to “L”, and the CPU 1 is reset.

【0063】次に、CPU1内のROMに格納されたプ
ログラムの構成を図3のフローチャートを参照しながら
説明する。同図に示されるように、CPU1内のROM
に格納されたプログラムは、システムイニシャライズプ
ログラム部分(ステップ301)と本体プログラムであ
るところの制御プログラム部分(ステップ306)とに
大別される。そして、後に詳細に説明するように、シス
テムイニシャライズ処理プログラム(ステップ301)
には、第1の監視回路2並びに第2の監視回路3から設
計された上下限値内のタイミングでリセット信号が出力
されることを診断するための診断処理が含まれている。
Next, the configuration of the program stored in the ROM in the CPU 1 will be described with reference to the flowchart of FIG. As shown in FIG.
Are roughly divided into a system initialization program portion (step 301) and a control program portion (step 306) which is a main body program. Then, as described in detail later, the system initialization processing program (step 301)
Includes a diagnosis process for diagnosing that the reset signal is output at a timing within the upper and lower limit values designed from the first monitoring circuit 2 and the second monitoring circuit 3.

【0064】一方、本体プログラム部分である制御プロ
グラム部分(ステップ306)を挟んでその前後にはポ
ートP1オン命令(ステップ303)並びにポートP2
オン命令(ステップ6304)と、ポートP1オフ命令
(ステップ308)並びにポートP2オフ命令(ステッ
プ309)とが互いに1命令実行時間の遅れを以て順次
に実行されるように配置されている。更に、ポートP1
オン命令(ステップ303)並びにポートP2オン命令
(ステップ304)を挟んでその前後には、割り込み禁
止命令(ステップ302)並びに割り込み許可命令(ス
テップ305)とが配置されると共に、ポートP1オフ
命令(ステップ308)並びにポートP2オフ命令(ス
テップ309)を挟んでその前後にも、割り込み禁止命
令(ステップ307)並びに割り込み許可命令(ステッ
プ310)が配置されている。従って、プログラムの実
行中に何らかの割り込み信号が到来したとしても、ポー
トP1オン命令(ステップ303)並びにポートP2オ
ン命令(ステップ304)は必ず1命令実行時間の遅れ
を以て順次に実行されると共に、ポートP1オフ命令
(ステップ308)並びにポートP2オフ命令(ステッ
プ309)についても、割り込み信号の到来に拘らず、
常に1命令実行時間の遅れを以て順次に実行されること
となる。換言すれば、ポートP1並びにポートP2のオ
ンタイミングは必ず1命令実行時間に相当するタイミン
グずれを有することとなると共に、ポートP1並びにポ
ートP2のオフタイミングについても、必ず1命令実行
時間に相当するタイミングずれを有することとなるので
ある。
On the other hand, before and after the control program portion (step 306) which is the main body program portion, a port P1 on instruction (step 303) and a port P2
The ON command (step 6304), the port P1 OFF command (step 308), and the port P2 OFF command (step 309) are arranged to be executed sequentially with a delay of one command execution time. Further, the port P1
Before and after the ON instruction (step 303) and the port P2 ON instruction (step 304), an interrupt disable instruction (step 302) and an interrupt enable instruction (step 305) are arranged. An interrupt disable command (step 307) and an interrupt enable command (step 310) are arranged before and after the step 308) and the port P2 off command (step 309). Therefore, even if any interrupt signal arrives during the execution of the program, the port P1 on instruction (step 303) and the port P2 on instruction (step 304) are always executed sequentially with a delay of one instruction execution time, and Regarding the P1 off command (step 308) and the port P2 off command (step 309), regardless of the arrival of the interrupt signal,
Execution is always performed sequentially with a delay of one instruction execution time. In other words, the on-timing of the ports P1 and P2 always has a timing difference corresponding to one instruction execution time, and the off-timing of the ports P1 and P2 always corresponds to the timing corresponding to one instruction execution time. There will be a shift.

【0065】更に、制御プログラム実行処理(ステップ
306)を経由する一巡実行ループ中には、制御周期T
cを管理するタイマ処理(ステップ311)が挿入され
ているため、出力ポートP1並びにP2からは、CPU
1が正常に動作している場合には、1命令実行時間に相
当するタイミングずれを有し且つ制御周期Tcにて定ま
る一定の周期を有する2系統の状態信号が出力されるの
である。
Further, during the round execution loop through the control program execution processing (step 306), the control cycle T
Since a timer process (step 311) for managing the c is inserted, the output ports P1 and P2
When 1 is operating normally, two state signals having a timing shift corresponding to one instruction execution time and having a constant cycle determined by the control cycle Tc are output.

【0066】そして、第1の監視回路2に関して予め決
められた基準時間(以下基準時間Trefと言う)の値
は、制御周期Tcを考慮し且つある程度の余裕をみて設
計された所定の下限値とプログラムの暴走許容時間を考
慮しし且つある程度の余裕をみて決定された所定の上限
値との間に納まるように設計されている。同様にして、
第2の監視回路3に関して予め決められた基準時間(以
下、これを基準時間TDrefという)の値は、1命令
実行時間を考慮し且つある程度の余裕をみて決定された
所定の下限値と異常許容時間を考慮し且つある程度の余
裕をみて決定された所定の上限値との間となるように設
計されている。本発明では、これら各監視回路2,3に
関する基準時間Tref,TDrefがそれぞれの上下
限値に納まっているかを的確に診断しようとするもので
ある。
The value of the reference time (hereinafter referred to as reference time Tref) predetermined for the first monitoring circuit 2 is equal to a predetermined lower limit value designed with a certain margin in consideration of the control cycle Tc. It is designed to be within a predetermined upper limit determined in consideration of a program runaway allowable time and with a certain margin. Similarly,
The value of a predetermined reference time (hereinafter referred to as a reference time TDref) for the second monitoring circuit 3 is determined by taking into consideration the execution time of one instruction and a certain margin, and the allowable lower limit value. It is designed to be within a predetermined upper limit determined in consideration of time and with a certain margin. In the present invention, it is intended to accurately diagnose whether the reference times Tref and TDref for each of the monitoring circuits 2 and 3 fall within the upper and lower limits.

【0067】次に、図1並びに図2に示される2つの監
視回路2,3の異常時における動作を、図4のタイミン
グチャートを参照しながら説明する。同図に示されるよ
うに、CPU1内においてプログラムが正常に実行され
ている場合、2個の出力ポートP1,P2からは、一定
の周期Tx(=Tc)を有し且つ一定のタイミングずれ
TDx(=1命令実行時間)を有する2系統のパルス列
が出力されている。この状態においては、前述した充電
電圧Vc1,Vc2はそれぞれ閾値電圧Vth1,Vt
h2を越えることはなく、その結果出力端子OUT1,
OUT2の電位は“H”に維持されている。
Next, the operation of the two monitoring circuits 2 and 3 shown in FIGS. 1 and 2 when an abnormality occurs will be described with reference to the timing chart of FIG. As shown in the figure, when the program is executed normally in the CPU 1, the two output ports P1 and P2 have a fixed cycle Tx (= Tc) and a fixed timing shift TDx ( = 1 instruction execution time). In this state, the above-described charging voltages Vc1 and Vc2 are respectively set to threshold voltages Vth1 and Vt.
h2, and as a result, the output terminals OUT1, OUT1,
The potential of OUT2 is maintained at "H".

【0068】これに対して、例えば時刻t01において
CPU1に何らかの異常が発生したものとすると、その
異常内容が従来想定されていたパルスの停止を引き起こ
すものであれば、図中一点鎖線l1に示されるように、
出力ポートP1のレベルは“L”に固定され、同時に出
力ポートP2の電位も“L”に固定される。すると、最
新の正常なオン出力が得られた時刻t00から基準時間
Trefが経過した時点において、本来であるならば出
力端子OUT1のレベルは“H”から“L”へと立ち下
がり、この立ち下がりに応答してCPU1にリセットが
かかるところが、本発明者等が新たに経験により得られ
た異常動作の場合、ポートP1から出力される状態信号
中には前述した命令化けに起因する疑似オン出力が時刻
t02において得られる。すると、この疑似オン出力が
得られた時刻t02においてコンデンサc1の充電電圧
Vc1はリセット(放電)されてしまうため、その後基
準時間Trefが経過するまで、出力端子OUT1の電
位は“H”に維持されてしまい、その分だけCPUに対
して遅れてリセットがかかる。
On the other hand, if it is assumed that an abnormality occurs in the CPU 1 at time t01, for example, if the content of the abnormality causes the stop of the pulse assumed conventionally, it is indicated by a dashed line 11 in the figure. like,
The level of the output port P1 is fixed at "L", and at the same time, the potential of the output port P2 is also fixed at "L". Then, when the reference time Tref elapses from the time t00 when the latest normal ON output is obtained, the level of the output terminal OUT1 normally falls from "H" to "L", and this fall Is reset in response to the above, but in the case of an abnormal operation newly obtained by the present inventors, etc., the pseudo-on output caused by the above-mentioned command corruption is included in the state signal output from the port P1. It is obtained at time t02. Then, at time t02 when the pseudo-on output is obtained, the charging voltage Vc1 of the capacitor c1 is reset (discharged), so that the potential of the output terminal OUT1 is maintained at "H" until the reference time Tref elapses thereafter. As a result, the CPU is reset by that amount with a delay.

【0069】これに対して、図1に示されるマイクロコ
ンピュータシステムの場合、周期監視型の第1の監視回
路2に加えてタイミングずれ監視型の第2の監視回路3
を備えていることにより、疑似オン出力が得られたこと
により時刻T02以降出力ポートP1とP2との間にお
いて論理不一致が生ずると、その後基準時間TDref
が経過した時点で出力端子OUT2の電位は“H”から
“L”に立ち下がり、この立ち下がりに応答してCPU
1に対しリセットをかけることができる(なお、このと
き、図中破線l2に示されるように、OUT1も“H”
から“L”になる)。
On the other hand, in the case of the microcomputer system shown in FIG. 1, in addition to the period monitoring type first monitoring circuit 2, the timing deviation monitoring type second monitoring circuit 3 is used.
Is provided, if a logic mismatch occurs between the output ports P1 and P2 after time T02 due to the provision of the pseudo-on output, then the reference time TDref
The potential of the output terminal OUT2 falls from "H" to "L" at the time when the time has elapsed.
1 can be reset (at this time, as indicated by the broken line 12 in the figure, OUT1 is also at "H").
To "L").

【0070】即ち、このような疑似オン出力は、何らか
の命令が出力ポートP1をオンさせるべき命令に化けた
ことに起因するものであり、このような命令化けが出力
ポートP2に関するポートオン命令に関しても起こる確
率は極めて希であるから、時刻t02以降、多くの場
合、ポートP1とポートP2の間で必ず論理不一致が生
ずることとなり、それに基づきこのような命令化けに起
因する第1の監視回路2の誤動作を、第2の監視回路3
により補間することが可能となるのである。尚、このよ
うな動作を可能とするためには、ポートP1とポートP
2とは1命令では同時に実行できないように、全く別個
のアドレスに割り当てられることはいうまでもないこと
である。
That is, such a pseudo-on output is caused by some instruction being turned into an instruction to turn on the output port P1. Since the probability of occurrence is extremely rare, after time t02, a logical mismatch always occurs between the port P1 and the port P2 in many cases. The malfunction is detected by the second monitoring circuit 3
Can be interpolated. In order to enable such an operation, the port P1 and the port P
Needless to say, 2 is assigned to completely different addresses so that they cannot be executed simultaneously by one instruction.

【0071】なお、従来より想定されている動作異常
(ポ−トP1から出力される状態信号の値が“H”もし
くは“L”に固定され、かつタイミングズレ時間がTD
ref以内である)に対しては、ポ−トP1から出力さ
れる状態信号の値が“H”もしくは“L”に固定される
と、最新のオン出力(正常オン出力もしくは疑似オン出
力)から周期基準時間Trefが経過した時点におい
て、出力端子OUT1のレベルは図中実線に示されるよ
うに、“H”から“L”へと変化し、この変化に応答し
てCPU1にリセットが掛かる。
It is to be noted that a conventionally assumed operation abnormality (the value of the state signal output from the port P1 is fixed to "H" or "L", and the timing shift time is TD
ref), when the value of the status signal output from the port P1 is fixed to "H" or "L", the latest ON output (normal ON output or pseudo ON output) When the cycle reference time Tref has elapsed, the level of the output terminal OUT1 changes from "H" to "L" as shown by the solid line in the figure, and the CPU 1 is reset in response to this change.

【0072】ここで、言うまでもないことであるが、図
2に示された第1の監視回路2並びに第2の監視回路3
の具体的な回路構成は、その一例にすぎないものであ
る。すなわち、第1の監視回路2としては、ポートP1
から出力される状態信号のオンタイミング若しくはオフ
タイミングが到来する毎に再起動されて、基準時間(タ
イマ時間)Trefの計時動作を繰り返し、計時完了と
共に出力端子OUT1から“L”を出力するタイマとし
て機能するものであればよく、また第2の監視回路2と
しては、ポートP1並びにポートP2から出力される2
系統の状態信号相互間に論理不一致が生ずる毎に再起動
されて、基準時間(タイマ時間)TDrefの計時動作
を繰り返し、計時完了と共に出力端子OUT2から
“L”を出力するタイマとして機能するものであればよ
い。このような機能を有するタイマに関しては、当業者
であれば様々な具体的な変形例が想起されるであろう。
Here, needless to say, the first monitoring circuit 2 and the second monitoring circuit 3 shown in FIG.
Is a mere example of such a circuit configuration. That is, as the first monitoring circuit 2, the port P1
Is restarted every time the ON timing or the OFF timing of the status signal output from the controller arrives, repeats the timing operation of the reference time (timer time) Tref, and outputs “L” from the output terminal OUT1 upon completion of the timing. Any function can be used, and as the second monitoring circuit 2, 2 output from the port P1 and the port P2 are output.
It is restarted every time a logical mismatch occurs between the state signals of the system, and repeats the timekeeping operation of the reference time (timer time) TDref, and functions as a timer that outputs “L” from the output terminal OUT2 upon completion of timekeeping. I just need. For a timer having such a function, those skilled in the art will recognize various specific modifications.

【0073】また、図2に示される監視回路2,3は、
タイマ回路における計時動作を中心として説明を行う関
係から、当業者には当然に理解されるとして、CPU1
のリセット受付保証時間については配慮されていない。
これについては、例えば第1の監視回路2の場合であれ
ば、例えば、コンパレータCOMP1としてヒステリシ
ス特性を有するものを採用して、リセット端子RSTの
“L”状態がリセット受付保証時間だけ維持されるよう
に構成すればよいであろう。また、第2の監視回路3の
場合であれば、例えば、コンパレータCOMP2として
同様なヒステリシス特性を有するものを採用する一方、
ダイオードDと直列に微小な放電用抵抗を挿入したり、
或いはダイオードDを除去して抵抗8の値を適切に設計
し、これによりリセット端子RSTの“L”状態がリセ
ット受付保証時間だけ維持されるように構成すればよい
であろう。
The monitoring circuits 2 and 3 shown in FIG.
It will be understood by those skilled in the art that the description will focus on the timing operation in the timer circuit.
No consideration has been given to the reset acceptance guarantee time.
In this case, for example, in the case of the first monitoring circuit 2, for example, a comparator COMP1 having a hysteresis characteristic is employed so that the "L" state of the reset terminal RST is maintained for the reset acceptance guarantee time. It may be configured as follows. In the case of the second monitoring circuit 3, for example, a comparator COMP2 having a similar hysteresis characteristic is employed,
Insert a minute discharge resistor in series with the diode D,
Alternatively, the diode D may be removed, and the value of the resistor 8 may be appropriately designed so that the "L" state of the reset terminal RST is maintained for the reset acceptance guarantee time.

【0074】次に、このような2台の監視回路2,3を
備えたマイクロコンピュータシステムにおいて、前述し
た基準時間Tref並びにTDrefを診断するための
処理を、図5のフローチャート並びに図6のタイミング
チャートを参照しながら説明する。先に説明したよう
に、図3に示されるシステムイニシャライズ処理(ステ
ップ301)には、図5に示されるような診断処理が含
まれている。この診断処理は、第1の監視回路2並びに
第2の監視回路3から設計された上下限値内のタイミン
グでリセット信号が出力されることを診断するものであ
る。
Next, in the microcomputer system having the two monitoring circuits 2 and 3 described above, the processing for diagnosing the reference time Tref and TDref described above is described by the flowchart of FIG. 5 and the timing chart of FIG. This will be described with reference to FIG. As described above, the system initialization process (step 301) shown in FIG. 3 includes a diagnosis process as shown in FIG. This diagnostic processing is for diagnosing that a reset signal is output from the first monitoring circuit 2 and the second monitoring circuit 3 at a timing within the upper and lower limit values designed.

【0075】図5に示される処理は、(1)パワーオン
リセット回路4からリセット信号が到来した場合、
(2)診断処理の実行中に第1の監視回路若しくは第2
の監視回路からリセット信号が到来した場合、(3)制
御プログラムの実行中に第1の監視回路2若しくは第2
の監視回路3からリセット信号が到来した場合に起動さ
れる。即ち、それらの内のいずれかの原因でプログラム
が起動されると、まず図1に示されるRAM102内の
状態フラグ領域102aに記憶されたキーワードの内容
が判定される(ステップ501)。この判定処理では、
参照されたキーワードの内容が、『other』,『ズ
レOK』,『WD OK』のいずれであるかの判定が行
われる。ここで、キーワード『ズレOK』はタイミング
ずれ監視型の動作異常監視回路である第2の監視回路3
が正常である旨を意味しており、キーワード『WD O
K』は周期監視型の動作異常監視回路である第1の監視
回路2が正常であることを意味しており、キーワード
『othef』はその他全ての場合を含む旨を意味して
いる。従って、電源投入直後のプログラムの起動に際し
ては、状態フラグ領域102aの内容は不定であること
から、『other』との判定が行われ、以後第2の監
視回路3に関する診断処理が実行される(ステップ50
2〜510)。
The processing shown in FIG. 5 is as follows: (1) When a reset signal arrives from the power-on reset circuit 4,
(2) The first monitoring circuit or the second monitoring circuit
(3) When the reset signal arrives from the monitoring circuit of the first monitoring circuit 2 or the second monitoring circuit 2
It is started when a reset signal arrives from the monitoring circuit 3 of. That is, when the program is started for any of these reasons, first, the contents of the keyword stored in the status flag area 102a in the RAM 102 shown in FIG. 1 are determined (step 501). In this determination process,
It is determined whether the content of the referred keyword is “other”, “shift OK”, or “WD OK”. Here, the keyword “displacement OK” is the second monitoring circuit 3 which is an operation abnormality monitoring circuit of the timing deviation monitoring type.
Is normal, and the keyword “WDO
“K” means that the first monitoring circuit 2 which is a cycle monitoring type operation abnormality monitoring circuit is normal, and the keyword “thef” means that all other cases are included. Therefore, when the program is started immediately after the power is turned on, since the content of the status flag area 102a is indefinite, a determination of "other" is made, and a diagnostic process for the second monitoring circuit 3 is executed thereafter ( Step 50
2-510).

【0076】この第2の監視回路3に対する診断処理で
は、出力ポートP1並びにP2から想定される動作異常
時の内容に相当する模擬状態信号を送出した後、現在時
間帯が、予め設計されたリセット信号出力タイミングの
上限値並びに下限値を基準として、いずれの時間帯にあ
るかを所定の内蔵タイマ101を用いて判定し、その判
定結果に基づいて、該当するキーワードを状態フラグ領
域102aに書き込む処理が実行される。尚、この内蔵
タイマーとしては、一巡実行時間が既知の処理を繰り返
し実行してその積算値に基づいて計時動作を行ういわゆ
るソフトタイマー処理や、この種のプロセッサに内蔵さ
れているデジタルタイマー機能を用いることができるで
あろう。
In the diagnostic processing for the second monitoring circuit 3, after a simulated state signal corresponding to the contents of an assumed abnormal operation is transmitted from the output ports P1 and P2, the current time zone is reset to a preset value. A process of determining which time zone is based on the upper limit value and the lower limit value of the signal output timing using a predetermined built-in timer 101, and writing the corresponding keyword in the status flag area 102a based on the determination result. Is executed. As the built-in timer, a so-called soft timer process for repeatedly executing a process with a known execution time and performing a timing operation based on the integrated value, or a digital timer function built in this type of processor is used. Will be able to.

【0077】即ち、電源断の状態では出力ポートP1並
びにP2のレベルは“H”にプルアップされておりまた
フラグ領域102aの内容は『不定』であるのに対し、
図6に示されるように、時刻t1にパワーオンリセット
信号が到来すると、出力ポートP1並びにP2のレベル
はいずれも“L”となり、その後キーワード書き替え処
理(ステップ502)並びに監視回路リフレッシュ出力
処理(ステップ503)が実行されると、それまで『不
定状態』であった状態フラグ領域102aの内容は設計
下限値を外れていることを示すキーワードである『ズレ
MIN』に書き替えられ、同時に出力ポートP1並びに
P2のレベルはいずれも“H”に操作され、この時出力
ポートP1の“H”への立上がりに応答して、第1の監
視回路2を構成するコンデンサC1がリセット(再起
動)され、第2の監視回路3の診断中に、誤って第1の
監視回路2からリセット出力が発せられないように保証
される。
That is, in the power-off state, the levels of the output ports P1 and P2 are pulled up to "H" and the content of the flag area 102a is "undefined".
As shown in FIG. 6, when the power-on reset signal arrives at time t1, the levels of the output ports P1 and P2 both become "L", and thereafter, the keyword rewriting process (step 502) and the monitoring circuit refresh output process (step 502). When step 503) is executed, the content of the status flag area 102a which has been in the "undefined state" is rewritten to "shift MIN" which is a keyword indicating that the value is outside the design lower limit, and at the same time, the output port The levels of P1 and P2 are both set to "H". At this time, in response to the rise of the output port P1 to "H", the capacitor C1 constituting the first monitoring circuit 2 is reset (restarted). During the diagnosis of the second monitoring circuit 3, it is ensured that a reset output is not issued from the first monitoring circuit 2 by mistake.

【0078】その後、異常信号出力処理(ステップ50
4)が実行されると、時刻t3において出力ポートP2
のレベルのみが“L”に操作されて、以後出力ポートP
1と出力ポートP2とで論理不一致の状態が作り出さ
れ、第2の監視回路3内の排他論理和ゲートE−ORの
出力は“H”となり、同時にタイマスタート処理(ステ
ップ505)が実行されて、出力タイミングの設計下限
値であるT1min計時動作が実行される(ステップ5
06)。
Thereafter, an abnormal signal output process (step 50)
4) is executed, at time t3, the output port P2
Is changed to “L”, and the output port P
1 and the output port P2 create a state of logical mismatch, the output of the exclusive OR gate E-OR in the second monitoring circuit 3 becomes "H", and at the same time, the timer start processing (step 505) is executed. , The T1min timing operation, which is the design lower limit value of the output timing, is executed (step 5).
06).

【0079】その後、リセット信号出力タイミングの設
計下限値であるT1minの計時が完了すると(ステッ
プ506YES)、キーワード書き替え処理(ステップ
507)が実行されて、状態フラグ領域102aの内容
は設計上下限値内に納まっていることを意味する『ズレ
OK』に書き替えられ、その後リセット信号出力タイミ
ングの上限値であるT1maxの計時動作が開始される
(ステップ508)。ここで、第2の監視回路3が正常
に動作すれば、この設計上限値T1maxの計時中に、
リセット端子RSTには第2の監視回路から出力された
リセット信号が到来し、その結果プログラムの実行は中
断されて、再びイニシャライズプログラムの起動が行わ
れ、その時点で状態フラグ領域102aに書き残されて
いるキーワードの内容が判定される(ステップ50
1)。ここで、第2の監視回路3から設計上下限値内の
タイミングでリセット信号が出力されていれば、キーワ
ード判定処理(ステップ501)の判定結果は、『ズレ
OK』となり、これに基づいて第2の監視回路3が正常
に動作していることを確認することができる。これに対
して、第2の監視回路3に何等かの故障が発生し、その
結果設計下限値を外れたタイミングでリセット信号が出
力されていれば、キーワード判定処理(ステップ50
1)の判定結果は『ズレMIN』(この場合には、『o
ther』と解釈される)となり、再び第2の監視回路
3に関する診断処理が起動される。
Thereafter, when the clocking of T1min, which is the design lower limit value of the reset signal output timing, is completed (step 506 YES), a keyword rewriting process (step 507) is executed, and the contents of the state flag area 102a are set to the design lower limit value. Is rewritten to “shift OK” meaning that the time is within the range, and then the timekeeping operation of T1max, which is the upper limit value of the reset signal output timing, is started (step 508). Here, if the second monitoring circuit 3 operates normally, during the measurement of the design upper limit value T1max,
The reset signal output from the second monitoring circuit arrives at the reset terminal RST. As a result, the execution of the program is interrupted, and the initialization program is started again. At that time, the program is left unwritten in the status flag area 102a. The content of the keyword is determined (step 50).
1). Here, if the reset signal is output from the second monitoring circuit 3 at a timing within the design lower limit value, the determination result of the keyword determination process (step 501) is “shift OK”, and based on this, It can be confirmed that the second monitoring circuit 3 is operating normally. On the other hand, if any failure occurs in the second monitoring circuit 3 and as a result a reset signal is output at a timing outside the design lower limit, the keyword determination processing (step 50)
The determination result of 1) is “shift MIN” (in this case, “o
and the diagnostic process for the second monitoring circuit 3 is started again.

【0080】一方、設計上限値に相当するT1maxの
計時中にリセット信号が到来しない場合には(ステップ
508YES)、その計時完了とともに状態フラグ領域
102aの内容は設計上限値を外れていることを意味す
る『ズレMAX』に書き替えられ(ステップ509)、
その後、最早リセット信号の到来を待つことなく、直ち
に第2の監視回路3が故障している場合に対応する所定
の異常処理が実行される(ステップ510)。この監視
回路異常処理(ステップ510)では、プログラムの実
行を強制的に停止させたり、或いは第2の監視回路3が
故障している旨を外部に報知したりする等の適切な非常
対応処理がとられる。
On the other hand, if the reset signal does not arrive during the measurement of T1max corresponding to the design upper limit (YES in step 508), it means that the content of the status flag area 102a is outside the design upper limit upon completion of the measurement. Is rewritten to "shift MAX" (step 509).
Thereafter, a predetermined abnormal process corresponding to the case where the second monitoring circuit 3 has failed is immediately executed without waiting for the arrival of the reset signal (Step 510). In this monitoring circuit abnormality processing (step 510), appropriate emergency response processing such as forcibly stopping the execution of the program or notifying the outside that the second monitoring circuit 3 is out of order is performed. Be taken.

【0081】第2の監視回路3が正常に動作した結果、
第2の監視回路3から設計上下限値内のタイミングでリ
セット信号が出力され、これに応答してシステムイニシ
ャライズ処理(ステップ301)が起動され、その後キ
ーワード判定処理(ステップ501)において『ズレO
K』と判定されると、続いて第1の監視回路2に関する
診断処理(ステップ511〜ステップ519)が起動さ
れる。
As a result of the normal operation of the second monitoring circuit 3,
A reset signal is output from the second monitoring circuit 3 at a timing within the design lower limit value. In response to this, a system initialization process (step 301) is started.
K ", the diagnostic processing (steps 511 to 519) for the first monitoring circuit 2 is started.

【0082】この第1の監視回路2に関する診断処理が
起動されると、リセット信号の内容は時刻t5において
復帰され、同時に出力ポートP1並びにP2のレベルは
“L”に操作され、続いてキーワード書き替え処理(ス
テップ511)、監視回路リフレッシュ出力処理(ステ
ップ512)並びに異常信号出力処理(ステップ51
3)が順次に実行されることによって、時刻t6におい
て、出力ポートP1並びにP2のレベルはいずれも
“H”に操作され、同時に状態フラグ領域102aの内
容は設計下限値を外れていることを意味する『停止MI
N』に書き替えられ、その後内蔵タイマ101が起動さ
れて(ステップ514)、設計下限値に相当するT2m
inの計時動作が行われる(ステップ515)。
When the diagnostic processing relating to the first monitoring circuit 2 is started, the content of the reset signal is restored at time t5, and at the same time, the levels of the output ports P1 and P2 are changed to "L", and then the keyword is written. Replacement processing (step 511), monitoring circuit refresh output processing (step 512), and abnormal signal output processing (step 51).
By sequentially executing 3), at time t6, the levels of the output ports P1 and P2 are both set to "H", and at the same time, the content of the state flag area 102a is out of the design lower limit. Stop MI
N ”, and then the built-in timer 101 is started (step 514), and T2m corresponding to the design lower limit value is set.
An in operation is performed (step 515).

【0083】その後、設計下限値に相当するT2min
の計時動作が完了すると(ステップ515YES)、状
態フラグ領域102aの内容は設計上下限値内に納まっ
ていることを意味するキーワードである『WD OK』
に書き替えられ(ステップ516)、以後設計上限値で
あるT2maxの計時動作が開始される(ステップ51
7)。
Thereafter, T2min corresponding to the design lower limit value
Is completed (YES in step 515), the content of the status flag area 102a is a keyword "WD OK" which means that the content is within the design lower limit value.
(Step 516), and thereafter, the timekeeping operation of T2max, which is the design upper limit, is started (step 51).
7).

【0084】ここで、第1の監視回路2が正常に動作し
た場合、この設計上限値T2maxの計時動作中に、例
えば時刻t7においてリセット信号が到来するため、そ
の場合にはプログラムの実行は中断されて、システムイ
ニシャライズ処理(ステップ301)が強制的に起動さ
れ、再びキーワード判定処理(ステップ501)が実行
される。この時、状態フラグ領域102aに書き残され
たキーワードは、第1の監視回路が正常に動作したこと
を示すキーワードである『WD OK』となるため、こ
れに基づいて、第1の監視回路2が正常に動作したこと
を診断することができる。これに対して、第1の監視回
路2に何らかの故障が発生して、その設計下限値を外れ
るタイミングでリセット信号が出力されていれば、キー
ワード判定処理(ステップ501)の判定結果は、設計
下限値を外れていることを示す『停止MIN』(ここで
は、『other』として処理される。)となるため、
この判定結果に基づいて再び第2の監視回路3から診断
処理がやり直される。
Here, when the first monitoring circuit 2 operates normally, a reset signal arrives at time t7, for example, at the time t7 during the clocking operation of the design upper limit value T2max. In this case, the execution of the program is interrupted. Then, the system initialization process (step 301) is forcibly started, and the keyword determination process (step 501) is executed again. At this time, the keyword left unwritten in the status flag area 102a is “WD OK” which is a keyword indicating that the first monitoring circuit has normally operated, and based on this, the first monitoring circuit 2 Diagnosis of normal operation can be made. On the other hand, if any failure occurs in the first monitoring circuit 2 and a reset signal is output at a timing outside the design lower limit, the result of the keyword determination process (step 501) is The value is “stop MIN” indicating that the value is out of value (here, processed as “other”).
Based on this determination result, the second monitoring circuit 3 performs the diagnostic process again.

【0085】一方、設計上限値に関する計時処理(ステ
ップ517)が完了しても、なおもリセット信号が到来
しない場合には、続いてキーワード書き替え処理(ステ
ップ518)が実行され、状態フラグ領域102aの内
容は設計上限値を外れていることを示す『停止MAX』
に書き替えられ、その後、最早リセット信号の到来を待
つことなく監視回路異常処理(ステップ519)が実行
される。この監視回路異常処理(ステップ519)で
は、前述と同様にして、プログラムの実行を強制的に停
止させたり、或いは外部に対して第1の監視回路2が故
障している旨を報知するなどの適切な処理がとられる。
On the other hand, if the reset signal still does not arrive even after the clocking process for the design upper limit value (step 517) is completed, the keyword rewriting process (step 518) is subsequently executed, and the status flag area 102a "Stop MAX" indicates that the value is outside the design upper limit
Then, the monitoring circuit abnormality processing (step 519) is executed without waiting for the arrival of the reset signal. In this monitoring circuit abnormality processing (step 519), the execution of the program is forcibly stopped or the outside is notified that the first monitoring circuit 2 is out of order, in the same manner as described above. Appropriate processing is taken.

【0086】第2の監視回路3並びに第1の監視回路2
がいずれも正常に動作した結果、キーワード判定処理
(ステップ501)において第1の監視回路2が正常に
動作したことを示すキーワードである『WD OK』と
判定されると、その後診断処理は終了して運用状態に入
ったことを知らせるためにキーワード書き替え処理(ス
テップ520)が実行されて、状態フラグ領域102a
の内容は運用状態にあることを示すキーワードである
『NORMAL』となり、以後本体プログラムである制
御プログラムへの以降が開始される(ステップ52
1)。ここで、制御プログラム(ステップ521)と
は、図3に示される一連の処理(ステップ302〜31
1)を示している。
Second monitoring circuit 3 and first monitoring circuit 2
All operate normally, and as a result, in the keyword determination process (step 501), when it is determined that the keyword is "WD OK" indicating that the first monitoring circuit 2 has normally operated, the diagnosis process is thereafter terminated. A keyword rewriting process (step 520) is executed to notify that the operation state has been entered, and the status flag area 102a
Is "NORMAL", which is a keyword indicating that it is in the operating state, and thereafter, the control program which is the main body program is started (step 52).
1). Here, the control program (step 521) is a series of processing (steps 302 to 31) shown in FIG.
1) is shown.

【0087】以上詳細に説明した図1並びに図2に示さ
れるマイクロコンピュータシステムにおいては、周期監
視型の動作異常監視回路である第1の監視回路2と本発
明者等が新たに提案したタイミングずれ監視型の動作異
常監視回路である第2の監視回路3とを備えたことによ
り、CPU1に生ずる様々な動作異常に対しても、これ
を的確に判定して、プログラムの暴走に起因する制御負
荷の誤動作を未然に防止することができる。
In the microcomputer systems shown in FIGS. 1 and 2 described in detail above, the first monitoring circuit 2 which is a period monitoring type operation abnormality monitoring circuit and the timing deviation newly proposed by the present inventors have been described. By providing the second monitoring circuit 3 which is a monitoring type operation abnormality monitoring circuit, various operation abnormalities occurring in the CPU 1 can be accurately determined, and a control load caused by a program runaway can be determined. Can be prevented beforehand.

【0088】しかも、システムプログラム中に組み込ま
れたシステムイニシャライズプログラム(ステップ30
1)においては、図5に示されるように、第1の監視回
路2に対応する個別診断処理(ステップ511〜51
9)並びに第2の監視回路3に対応する個別診断処理
(ステップ502〜510)を備えて、電源投入直後本
体プログラムへの以降に先立ち、それぞれの監視回路2
並びに3を個別に診断処理し、それらがいずれも正常に
動作することが確認された場合に限り、本体プログラム
である制御プログラムへの以降を許容するようにしてい
る。そのため、より一層信頼性の高いシステムを構成し
ている。
Moreover, the system initialization program (step 30) incorporated in the system program
In 1), as shown in FIG. 5, the individual diagnosis process corresponding to the first monitoring circuit 2 (steps 511 to 51)
9) and an individual diagnosis process corresponding to the second monitoring circuit 3 (steps 502 to 510).
And 3 are individually subjected to diagnostic processing, and only when it is confirmed that all of them operate normally, the control program, which is the main body program, is allowed to proceed. Therefore, a more reliable system is configured.

【0089】加えて、各個別診断処理においては対応す
る監視回路から単にリセット信号が出力された否かを確
認するだけではなく、その出力タイミングが設計上下限
値内に納まっているか、外れているかまでをも正確に診
断できるため、本体プログラムである制御プログラムが
正常に実行しているにも拘らず、リセットタイミングが
早すぎることによって、頻繁にシステムイニシャライズ
プログラムが起動されてしまったり、或いは制御プログ
ラムが異常動作を起こしているにも拘らず、リセットタ
イミングが遅すぎることによって、なかなかシステムイ
ニシャライズ処理が起動されないといった不都合につい
ても、これを未然に防止することができる。
In addition, in each individual diagnosis process, not only is it determined whether or not the reset signal is output from the corresponding monitoring circuit, but also whether the output timing is within the design lower limit value or out of design range. Can be accurately diagnosed, even though the control program, which is the main program, is executing normally, but the reset timing is too early, the system initialization program is frequently started, or the control program Can be prevented beforehand even if the reset operation is too late due to abnormal operation of the system, and the system initialization process is not easily activated.

【0090】尚、以上説明した実施の形態では、単に設
計上下限値を外れていることを示すのみならず、設計下
限値を外れていることを意味するキーワード『ズレMI
N』並びに『停止MIN』や、設計上限値を外れている
ことを示すキーワード『ズレMAX』並びに『停止MA
X』を設けているため、これらのキーワードを保存して
おき、その後に、状態フラグ領域102aから別途読み
出すように構成すれば、各監視回路2,3の異常がどの
ような原因で発生しているかを的確に診断することもで
きる。
In the above-described embodiment, the keyword “shift MI” not only indicates that the value is out of the design lower limit but also indicates that the value is out of the design lower limit.
N "and" stop MIN ", and keywords" shift MAX "and" stop MA "indicating that the value is outside the design upper limit value.
X "is provided, these keywords are stored, and then read out separately from the status flag area 102a. Can be accurately diagnosed.

【0091】また、以上の実施の形態では、設計上下限
値内に納まっていることを示すキーワード(『ズレO
K』並びに『WD OK』)以外の場合には、全てその
他のキーワード(『other』)と判定することによ
って診断処理を最初からやり直すように構成したが、更
に診断結果をより細かく判定することにより、例えば
『ズレMIN』若しくは『停止MIN』に応じて、それ
を示す警報を外部に出力させたり、或いはプログラムを
強制的に中断させるなどの処理を実行させたり、或いは
それらが規定回数以上繰り返し判定されたことを条件と
して、初めてプログラムの実行を停止させることなど様
々な設計変更が可能であることは、当業者であれば容易
に理解されるであろう。
Further, in the above embodiment, the keyword indicating that the value falls within the design upper and lower limit value (“shift O
In the case other than “K” and “WD OK”), the diagnosis process is restarted from the beginning by determining all other keywords (“other”). For example, in response to a "shift MIN" or a "stop MIN", an alarm indicating this is output to the outside, or a process such as forcibly interrupting a program is executed, or they are repeatedly determined a specified number of times or more. It will be easily understood by those skilled in the art that various design changes can be made on the condition that the execution of the program is stopped for the first time.

【0092】また、以上の実施の形態では、設計上限値
に相当する時間(T1max,T2max)が経過した
場合に(ステップ508YES,ステップ517YE
S)、直ちに状態フラグ領域102aの内容をその旨の
キーワード(#ズレMAX,#停止max)に書き替え
た後に(ステップ509,518)、監視回路異常処理
(510,519)を実行するようにしているが、上記
の監視回路異常処理(510,519)の代わりに、そ
の後ポーズ処理を実行してリセット信号が到来するのを
ひたすら待機し続けるように構成しても良い。すなわ
ち、ひとたび状態フラグ領域102aの内容をその旨の
キーワード(#ズレMAX,#停止max)に書き替え
た後であれば、その後、待機中に設計上限値を超えてリ
セット信号が到来しても、イニシャライズ処理にてキー
ワードを参照すれば、リセット信号が設計上下限値をは
ずれていることを判別できるからである。さらに、上記
のキーワード書き替え処理(ステップ509,518)
を省き、その代わりに、動作異常監視回路(2,3)に
再起動時に相当する模擬状態信号(監視回路2の場合に
は信号P1のLからHへの変化、監視回路3の場合には
信号P1,P2の論理一致状態)を送出してそれらを再
起動させ、その後、監視回路異常処理を実行するように
しても良い。すなわち、動作異常監視回路を再起動すれ
ばその後当分の間リセット信号は到来しないはずである
から、その間にリセット信号に邪魔されることなく監視
回路異常処理を確実に実行完了することができるからで
ある。その結果、設計上限値を越えるタイミングでリセ
ット信号が到来したにも拘わらず、適正範囲にある旨の
キーワード(#ズレOK,#WD OK)が読みとられ
ると言った不都合は生じない。
In the above embodiment, when the time (T1max, T2max) corresponding to the design upper limit value has elapsed (YES in step 508, step 517YE)
S) Immediately after rewriting the contents of the status flag area 102a with a keyword (#shift MAX, #stop max) (steps 509 and 518), the monitoring circuit abnormality processing (510 and 519) is executed. However, instead of the above-described monitoring circuit abnormality processing (510, 519), a configuration may be adopted in which the pause processing is executed thereafter, and the system continues to wait for the arrival of the reset signal. That is, once the contents of the status flag area 102a have been rewritten to a keyword (#shift MAX, #stop max) to that effect, even if the reset signal arrives beyond the design upper limit during standby, This is because, by referring to the keyword in the initialization processing, it can be determined that the reset signal is out of the design lower limit value. Further, the above keyword rewriting process (steps 509 and 518)
Is replaced by a simulated state signal (a change of the signal P1 from L to H in the case of the monitor circuit 2 and a change of the signal P1 in the case of the monitor circuit 3; The signals P1 and P2 may be sent to restart them, and then the monitoring circuit abnormality processing may be executed. That is, if the operation abnormality monitoring circuit is restarted, the reset signal should not arrive for a while after that, so that the monitoring circuit abnormality processing can be reliably completed without being interrupted by the reset signal during that time. is there. As a result, there is no inconvenience that the keyword (#shift OK, #WD OK) indicating that the keyword is within the appropriate range is read even though the reset signal arrives at a timing exceeding the design upper limit value.

【0093】[0093]

【発明の効果】以上の説明から明らかなように、この発
明によれば、動作異常監視回路からリセット信号が出力
されるものの、その出力タイミングに狂いが生じている
ような場合には、その旨を直ちに診断可能として、その
診断結果に基づき、本体プログラムの実行中に誤ってイ
ニシャライズプログラムが起動されたり、或いは本体プ
ログラムが動作異常を起こしているにも拘らず、長時間
に亘りイニシャライズプログラムが起動されないといっ
た不都合を未然に防止することができると言う効果があ
る。
As is apparent from the above description, according to the present invention, although the reset signal is output from the operation abnormality monitoring circuit, if the output timing is out of order, this is the case. Can be diagnosed immediately, and based on the diagnosis result, the initialization program is started for a long time despite the fact that the initialization program is erroneously started during the execution of the main body program or the main body program has caused an operation error. There is an effect that an inconvenience of not being performed can be prevented beforehand.

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

【図1】本発明が適用されたマイクロコンピュータのハ
ードウエア構成を概略的に示すブロック図である。
FIG. 1 is a block diagram schematically showing a hardware configuration of a microcomputer to which the present invention is applied.

【図2】第1の監視回路並びに第2の監視回路の内部構
成をそれぞれ詳細に示す回路図である。
FIG. 2 is a circuit diagram showing the internal configurations of a first monitoring circuit and a second monitoring circuit in detail.

【図3】CPU内のROMに格納されたシステムプログ
ラムの構成を示すフローチャートである。
FIG. 3 is a flowchart illustrating a configuration of a system program stored in a ROM in a CPU.

【図4】第1の監視回路並びに第2の監視回路の異常動
作発生時における動作を説明するためのタイミングチャ
ートである。
FIG. 4 is a timing chart for explaining operations of the first monitoring circuit and the second monitoring circuit when an abnormal operation occurs.

【図5】第1の監視回路並びに第2の監視回路に対する
個別診断処理の詳細を示すフローチャートである。
FIG. 5 is a flowchart illustrating details of an individual diagnosis process for a first monitoring circuit and a second monitoring circuit.

【図6】各個別診断処理における出力ポートの信号状態
並びに状態フラグ領域の内容を示すタイムチャートであ
る。
FIG. 6 is a time chart showing a signal state of an output port and contents of a state flag area in each individual diagnosis process.

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

1 CPU(マイクロコンピュータ装置) 2 第1の監視回路(周期監視型の動作異常監
視回路) 3 第2の監視回路(タイミングずれ監視型の
動作異常監視回路) 4 パワーオンリセット回路 101 内蔵タイマ 102 RAM 102a 状態フラグ領域 P1,P2 状態信号送出用出力ポート RST リセット端子
DESCRIPTION OF SYMBOLS 1 CPU (microcomputer device) 2 1st monitoring circuit (periodical monitoring type abnormality monitoring circuit) 3 2nd monitoring circuit (timing deviation monitoring type abnormality monitoring circuit) 4 Power-on reset circuit 101 Built-in timer 102 RAM 102a Status flag area P1, P2 Output port for transmitting status signal RST Reset terminal

フロントページの続き (72)発明者 小島 浩孝 大阪府大阪市中央区城見一丁目4番24号 日本電気ホームエレクトロニクス株式会社 内 (72)発明者 大田 淳朗 埼玉県和光市中央一丁目4番1号 株式会 社本田技術研究所内 (72)発明者 佐藤 司雄 埼玉県和光市中央一丁目4番1号 株式会 社本田技術研究所内 (72)発明者 林 達生 埼玉県和光市中央一丁目4番1号 株式会 社本田技術研究所内Continuation of the front page (72) Inventor Hirotaka Kojima 1-4-24 Shiromi, Chuo-ku, Osaka-shi, Osaka NEC Home Electronics Co., Ltd. (72) Inventor Atsuro Ota 1-4-1 Chuo, Wako-shi, Saitama Inside Honda R & D Co., Ltd. (72) Inventor Shio Sato 1-4-1, Chuo, Wako-shi, Saitama Pref. Inside the Honda R & D Co., Ltd. (72) Tatsuo Hayashi 1-4-1, Chuo, Wako-shi, Saitama Pref. No. In Honda R & D Co., Ltd.

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 本体プログラムの一巡実行ループ中に挿
入されたオンオフ一対のポート操作命令により前記本体
プログラムの実行に連動してオンオフ操作される状態信
号送出用の出力ポートと、パワーオンリセット回路若し
くは動作異常監視回路から出力されるリセット信号を受
け付けるためのリセット端子とを備え、前記リセット端
子にリセット信号が受け付けられるのに応答して強制的
にイニシャライズプログラムを実行するようにしたマイ
クロコンピュータ装置であって、 前記イニシャライズプログラムには、前記動作異常監視
回路から設計された上下限値内のタイミングでリセット
信号が出力されることを診断するための診断処理が含ま
れていることを特徴とするマイクロコンピュータ装置。
An output port for transmitting a status signal that is turned on / off in conjunction with the execution of the main program by a pair of on / off port operation instructions inserted into a round execution loop of the main program, and a power-on reset circuit or A microcomputer device comprising: a reset terminal for receiving a reset signal output from an operation abnormality monitoring circuit; and forcibly executing an initialization program in response to a reset signal being received at the reset terminal. The initialization program includes a diagnosis process for diagnosing that a reset signal is output at a timing within the upper and lower limit values designed by the operation abnormality monitoring circuit. apparatus.
【請求項2】 前記診断処理は、 前記出力ポートから、想定される動作異常時の内容に相
当する模擬状態信号を送出する模擬状態信号送出処理
と、 前記模擬状態信号の送出に続いて、前記設計上下限値の
下限値に相当する時間が到来するのを待って、あらかじ
め決められた状態フラグ領域に、前記設計上下限値内に
収まっていることを意味するキーワードを書き込み、続
いて、前記設計上下限値の上限値に相当する時間が到来
するのを待って、前記状態フラグ領域の内容を、前記設
計上下限値から外れている旨を意味する内容に書き替え
る現在時間帯記録処理と、 を含み、 それにより、前記リセット信号の到来に応答して強制的
に実行されるイニシャライズプログラムにおいて、前記
フラグ領域の内容を参照することにより、前記動作異常
監視回路から設計された上下限値内のタイミングでリセ
ット信号が出力されたことを診断し得るように構成した
ことを特徴とする請求項1に記載のマイクロコンピュー
タ装置。
2. The diagnosing process comprises: a simulated state signal sending process for sending a simulated state signal corresponding to the content of an assumed abnormal operation from the output port; and Waiting for the time corresponding to the lower limit of the design upper and lower limit to arrive, and writing a keyword indicating that the value falls within the design upper and lower limit, in a predetermined state flag area, Waiting for the time corresponding to the upper limit of the design upper and lower limits to arrive, and then rewriting the contents of the status flag area to contents that deviate from the design upper and lower limits, and a current time zone recording process. In the initialization program forcibly executed in response to the arrival of the reset signal, by referring to the contents of the flag area, the abnormal operation can be performed. The microcomputer according to claim 1, characterized in that the reset signal at the timing of the upper and lower limit values designed from viewing the circuit is configured to be able to diagnose the output.
【請求項3】 前記診断処理は、 前記出力ポートから、想定される動作異常時の内容に相
当する模擬状態信号を送出する模擬状態信号送出処理
と、 前記模擬状態信号の送出に続いて、前記設計上下限値の
下限値に相当する時間が到来するのを待って、あらかじ
め決められた状態フラグ領域に、前記設計上下限値内に
収まっていることを意味するキーワードを書き込む現在
時間帯記録処理と、 前記設計上下限値の上限値に相当する時間が到来するの
を待って、前記動作異常監視回路の再起動時の内容に相
当する模擬状態信号を送出すると共に、動作異常監視回
路の異常時に対応する処理を実行する監視回路異常処理
と、 を含み、 それにより、前記リセット信号の到来に応答して強制的
に実行されるイニシャライズプログラムにおいて、前記
フラグ領域の内容を参照することにより、前記動作異常
監視回路から設計された上下限値内のタイミングでリセ
ット信号が出力されたことを診断し得るように構成した
ことを特徴とする請求項1に記載のマイクロコンピュー
タ装置。
3. The diagnosing process includes: a simulated state signal sending process of sending a simulated state signal corresponding to the content of an assumed abnormal operation from the output port; and Waiting for a time corresponding to the lower limit value of the design lower limit value to arrive, and writing a keyword indicating that the value falls within the design lower limit value in a predetermined state flag area. Waiting for the time corresponding to the upper limit of the design upper and lower limits to arrive, sending out a simulated state signal corresponding to the content at the time of restarting the operation abnormality monitoring circuit, and detecting the abnormality of the operation abnormality monitoring circuit. And a monitoring circuit abnormality process for executing a corresponding process, whereby the initialization program is forcibly executed in response to the arrival of the reset signal. 2. The configuration according to claim 1, wherein by referring to the contents of the switching area, it is possible to diagnose that a reset signal has been output at a timing within the upper and lower limit values designed by the operation abnormality monitoring circuit. The microcomputer device according to any one of the preceding claims.
【請求項4】 前記診断処理に含まれる現在時間帯記録
処理は、 前記模擬状態信号の送出とほぼ同時に、前記状態フラグ
領域に、前記設計上下限値から外れていることを意味す
るキーワードを書き込む処理を含むことを特徴とする請
求項2若しくは請求項3に記載のマイクロコンピュータ
装置。
4. The current time zone recording process included in the diagnosis process writes a keyword indicating that the value deviates from the design upper / lower limit value into the status flag area almost simultaneously with the transmission of the simulated status signal. 4. The microcomputer device according to claim 2, further comprising a process.
【請求項5】 前記状態フラグ領域に、前記模擬状態信
号の送出とほぼ同時に書き込まれるキーワードには前記
下限値を外れている旨が意味づけられており、かつ前記
設計上下限値の上限値の到来により書き替えられる内容
は、前記上限値を外れている旨が意味づけられているこ
とを特徴とする請求項4に記載のマイクロコンピュータ
装置。
5. A keyword written in the status flag area almost simultaneously with the transmission of the simulated status signal means that the lower limit is deviated, and an upper limit of the design lower limit is set. The microcomputer device according to claim 4, wherein the content to be rewritten upon arrival is out of the upper limit.
【請求項6】 前記診断処理には、前記現在時間帯記録
処理の終了に続いて、前記リセット端子にリセット信号
が到来するのを待つことなく直ちに動作異常監視回路の
異常時に対応する処理を実行する監視回路異常処理が含
まれていることを特徴とする請求項2に記載のマイクロ
コンビュータ装置。
6. In the diagnosis processing, immediately after the end of the current time zone recording processing, a processing corresponding to an abnormality of the operation abnormality monitoring circuit is immediately executed without waiting for a reset signal to arrive at the reset terminal. 3. The microcomputer device according to claim 2, wherein a monitoring circuit abnormality process is performed.
【請求項7】 前記イニシャライズプログラムには、 前記フラグ領域の記憶内容を参照した結果として、当該
イニシャライズプログラムの起動が、前記診断処理にお
いて前記出力ポートから模擬状態信号を送出したことに
応答して、前記動作異常監視回路から設計された上下限
値内のタイミングでリセット信号が出力された結果であ
ると判定された場合には、前記本体プログラムへの移行
を許容する一方、前記パワーオンリセット回路からリセ
ット信号が出力された結果であると判定された場合に
は、前記診断処理への移行を許容する条件分岐処理が、
前記診断処理の前処理として、含まれていることを特徴
とする請求項2若しくは請求項3に記載のマイクロコン
ピュータ装置。
7. The initialization program according to claim 1, wherein, as a result of referring to the storage content of said flag area, said activation of said initialization program is performed in response to a simulated state signal being transmitted from said output port in said diagnosis processing. If it is determined that the result is a reset signal output at a timing within the upper and lower limit value designed from the operation abnormality monitoring circuit, while allowing the transition to the main program, from the power-on reset circuit If it is determined that the result is the output of the reset signal, conditional branch processing that allows the transition to the diagnostic processing,
The microcomputer device according to claim 2, wherein the microcomputer device is included as a pre-process of the diagnosis process.
【請求項8】 前記動作異常監視回路は、互いに独立し
た複数の動作異常監視回路を含み、 前記イニシャライズプログラムに含まれる診断処理は、
前記複数の動作異常監視回路のそれぞれに対応する複数
の個別診断処理を含むことを特徴とする請求項2若しく
は請求項3に記載のマイクロコンピュータ装置。
8. The operation abnormality monitoring circuit includes a plurality of operation abnormality monitoring circuits independent of each other, and the diagnostic processing included in the initialization program includes:
4. The microcomputer device according to claim 2, further comprising a plurality of individual diagnosis processes corresponding to each of the plurality of operation abnormality monitoring circuits.
【請求項9】 前記複数の個別診断処理のそれぞれには
一定の順序付けがなされており、かつ各診断処理にて使
用される前記キーワードには対応する動作異常監視回路
に固有な意味付けがなされており、 前記イニシャライズプログラムには、 前記フラグ領域の記憶内容を参照した結果として、当該
イニシャライズプログラムの起動が、前記個別診断処理
において前記出力ポートから模擬状態信号を送出したこ
とに応答して、前記対応する動作異常監視回路から設計
された上下限値内のタイミングでリセット信号が出力さ
れた結果であると判定された場合には、次の順位に位置
する個別診断処理若しくは次の順位に位置する個別診断
処理が存在しなければ前記本体プログラムへの移行を許
容する一方、前記パワーオンリセット回路からリセット
信号が出力された結果であると判定された場合には、前
記診断処理への移行を許容する条件分岐処理が、前記診
断処理の前処理として、含まれていることを特徴とする
請求項8に記載のマイクロコンピュータ装置。
9. Each of the plurality of individual diagnostic processes is given a fixed order, and the keyword used in each diagnostic process is given a meaning unique to a corresponding operation abnormality monitoring circuit. In the initialization program, as a result of referring to the storage content of the flag area, the activation of the initialization program responds to the fact that the simulation state signal is transmitted from the output port in the individual diagnosis processing. If it is determined that the reset signal is output at a timing within the upper and lower limit values designed by the operation abnormality monitoring circuit, the individual diagnostic processing positioned at the next rank or the individual diagnostic processing positioned at the next rank is performed. If the diagnostic process does not exist, the transition to the main program is permitted, while the power-on reset circuit resets 9. If it is determined that the result is an output result, a conditional branching process that allows a shift to the diagnosis process is included as a pre-process of the diagnosis process. The microcomputer device according to claim 1.
【請求項10】 前記複数の個別診断処理には、周期監
視型の動作異常監視回路に対する個別診断処理とタイミ
ングズレ監視型の動作異常監視回路に対応する個別診断
処理とが含まれていることを特徴とする請求項8若しく
は請求項9に記載のマイクロコンピュータ装置。
10. The method according to claim 1, wherein the plurality of individual diagnosis processes include an individual diagnosis process for a period monitoring type operation abnormality monitoring circuit and an individual diagnosis process corresponding to a timing deviation monitoring type operation abnormality monitoring circuit. The microcomputer device according to claim 8, wherein the microcomputer device is a microcomputer device.
JP8186835A 1996-06-27 1996-06-27 Microcomputer system Pending JPH1021121A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8186835A JPH1021121A (en) 1996-06-27 1996-06-27 Microcomputer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8186835A JPH1021121A (en) 1996-06-27 1996-06-27 Microcomputer system

Publications (1)

Publication Number Publication Date
JPH1021121A true JPH1021121A (en) 1998-01-23

Family

ID=16195469

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8186835A Pending JPH1021121A (en) 1996-06-27 1996-06-27 Microcomputer system

Country Status (1)

Country Link
JP (1) JPH1021121A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112335173A (en) * 2018-06-15 2021-02-05 松下知识产权经营株式会社 Cutoff circuit diagnosis device
CN114327986A (en) * 2021-12-29 2022-04-12 苏州浪潮智能科技有限公司 FRB2WDT timeout time determination method, device, equipment and medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112335173A (en) * 2018-06-15 2021-02-05 松下知识产权经营株式会社 Cutoff circuit diagnosis device
CN112335173B (en) * 2018-06-15 2024-04-05 松下知识产权经营株式会社 Diagnostic device for cut-off circuit
CN114327986A (en) * 2021-12-29 2022-04-12 苏州浪潮智能科技有限公司 FRB2WDT timeout time determination method, device, equipment and medium
CN114327986B (en) * 2021-12-29 2023-11-03 苏州浪潮智能科技有限公司 FRB2WDT timeout time determining method, device, equipment and medium

Similar Documents

Publication Publication Date Title
US6076172A (en) Monitoting system for electronic control unit
JP5739290B2 (en) Electronic control unit
US7890800B2 (en) Method, operating system and computing hardware for running a computer program
US20200033928A1 (en) Method of periodically recording for events
JP3491358B2 (en) Power cut-off detection device
JPH1021121A (en) Microcomputer system
JP4812699B2 (en) Power control device
US20220261307A1 (en) Monitoring-data processing method and system
JP2002236503A (en) Electronic controller for vehicle
JP2017007539A (en) Control device
JPH06348535A (en) Abnormality generation history storage device
JP4431883B2 (en) Transmitter
JP2016203764A (en) Vehicular electronic control device
JP4613019B2 (en) Computer system
CN116431377B (en) Watchdog circuit
JP2023122184A (en) electronic controller
WO2023223940A1 (en) In-vehicle device, program, and information processing method
JP2002287807A (en) System and method for detecting operation abnormality of control device
JP2000172575A (en) Memory backup system
WO2020054271A1 (en) Electronic control unit
JPH09212201A (en) Control circuit for production facility
JP2003044324A (en) Method, device and program for confirming abnormality detection
JPH08123704A (en) Controller
JPH10307601A (en) Output control circuit for cpu
JPH11282726A (en) Information processing system, watch dog timer operation method and recording medium for recording control program for the same

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041207

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050207

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050802

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060117