JPH02148233A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPH02148233A
JPH02148233A JP63302570A JP30257088A JPH02148233A JP H02148233 A JPH02148233 A JP H02148233A JP 63302570 A JP63302570 A JP 63302570A JP 30257088 A JP30257088 A JP 30257088A JP H02148233 A JPH02148233 A JP H02148233A
Authority
JP
Japan
Prior art keywords
signal
runaway
instruction
watchdog timer
initialization
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
JP63302570A
Other languages
Japanese (ja)
Inventor
Osamu Itoku
井徳 修
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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP63302570A priority Critical patent/JPH02148233A/en
Publication of JPH02148233A publication Critical patent/JPH02148233A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To surely detect a runaway by executing the initialization of a watch dog timer only when an initializing instruction is executed by a specific address which is set in advance. CONSTITUTION:A control part 5 is constitute so that an address signal 6 of an instruction which is being executed at present and an initializing instruction executing signal 7 are inputted, and only when the initializing instruction executing signal 7 is a correct signal, and also, a condition that its executing address signal 6 is a prescribed address is formed, an initializing signal 3 is outputted actually to a watch dog timer 2. Accordingly, probability by which the initialization of the watch dog timer is executed by an instruction code generated by change at the time of runaway is very low. In such a way, such a situation as the watch dog timer is initialized by mistake in the course of runaway and the runaway cannot be detected can be avoided in reality.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、マイクロコンピュータに関する。より詳細に
は、本発明は、ウォッチドッグ・タイマを備えて、プロ
グラムの暴走を有効に検出することができる新規なマイ
クロコンピュータの構成に関する。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to microcomputers. More specifically, the present invention relates to a novel microcomputer configuration that is equipped with a watchdog timer and can effectively detect program runaway.

従来の技術 マイクロコンピュータの暴走を検出して有効な対応を図
る手法のひとつに、ウォッチドッグ・タイマとよばれる
回路を使用する方法がある。 即ち、ウォッチドッグ・
タイマとは、予め定められた一定の期間毎に初期化され
るカウンタであり、何らかの原因でこの期間内にカウン
ト値の初期化が実行されず、カウントが続行されてオー
バフローが発生するとこれをプログラムの暴走と見なし
て所定の制御信号を発生するように構成されている。
Conventional Technology One method for detecting runaway in a microcomputer and taking effective countermeasures is to use a circuit called a watchdog timer. That is, the watchdog
A timer is a counter that is initialized every predetermined period of time, and if for some reason the count value is not initialized within this period and the count continues and an overflow occurs, the program The system is configured to generate a predetermined control signal by assuming that the control signal has run out of control.

発明が解決しようとする課題 上述のような従来のウォッチドッグ・タイマは、所定期
間毎に発生する命令(以下、初期化命令と記載する)に
よってカウント値が初期化される構成となっているが、
プログラムの暴走時に偶然初期化命令と同じコードが発
生した場合には、初期化が実行されてしまうのでその暴
走を検知することができない。
Problems to be Solved by the Invention The conventional watchdog timer as described above has a configuration in which a count value is initialized by an instruction (hereinafter referred to as an initialization instruction) that is generated every predetermined period. ,
If the same code as the initialization instruction happens to occur when the program runs out of control, the runaway cannot be detected because the initialization will be executed.

即ち、例えば外部からのノイズによってプログラム・カ
ウンタの値が破壊されてしまった場合には、2バイト命
令の2バイト目の命令コードを1バイト目として実行し
てしまうことがある。この場合、以降のプログラムの実
行動作が完全な暴走状態であっても、偶然に2つの命令
にまたがった命令コードが初期化命令の命令コードとな
ってしまえばウォッチドッグ・タイマは誤って初期化さ
れ、最早マイクロコンピュータの暴走を検出できない。
That is, for example, if the value of the program counter is destroyed by external noise, the instruction code in the second byte of a two-byte instruction may be executed as the first byte. In this case, even if the subsequent execution of the program is completely out of control, if the instruction code that spans two instructions accidentally becomes the instruction code of the initialization instruction, the watchdog timer will be initialized by mistake. As a result, it is no longer possible to detect a runaway microcomputer.

そこで、本発明は、上記従来技術の問題点を解決して、
より確実に暴走を検知することができる新規なウォッチ
ドッグ・タイマを搭載したマイクロコンピュータの構成
を提供することを目的としている。
Therefore, the present invention solves the problems of the prior art described above, and
The purpose of this invention is to provide a microcomputer configuration equipped with a new watchdog timer that can more reliably detect runaway.

課題を解決するための手段 即ち、本発明に従い、所定の期間毎にカウント値を更新
し、オーバフローが発生すると所定の制御信号を発生す
るウォッチドッグ・タイマと、該ウォッチドッグ・タイ
マのカウント値を初期化する初期化命令とを備えたマイ
クロコンピュータにおいて、予め設定された特定のアド
レスで該初期化命令が実行された場合にのみ、該ウォッ
チドッグ・タイマの初期化を実行するように構成されて
いることを特徴とするマイクロコンピュータが提供され
る。
Means for Solving the Problems According to the present invention, there is provided a watchdog timer that updates a count value every predetermined period and generates a predetermined control signal when an overflow occurs; The microcomputer is configured to initialize the watchdog timer only when the initialization instruction is executed at a preset specific address. A microcomputer is provided which is characterized in that:

作用 即ち、本発明に係るマイクロコンピュータでは、アドレ
スと命令コードとの2重の確認を経てウォッチドッグ・
タイマの初期化を実行するので、偶然に発生したコード
によってウォッチドッグ・タイマが初期化されることが
ない。従って、前述した従来のマイクロコンピュータの
暴走検出方法では、暴走中に偶然ウォッチドッグ・タイ
マの初期化命令が実行されてしまった場合にウォッチド
ッグ・タイマの効果が全くないのに対し、本発明に係る
マイクロコンピュータでは、偶然に発生した初期化命令
ではウォッチドッグ・タイマは初期化されず、ウォッチ
ドッグ・タイマは暴走を常に有効に検出することができ
る。
In other words, in the microcomputer according to the present invention, the watchdog function is activated after double confirmation of the address and instruction code.
Performs timer initialization so that accidental code cannot initialize the watchdog timer. Therefore, in the conventional microcomputer runaway detection method described above, if the watchdog timer initialization instruction is accidentally executed during runaway, the watchdog timer has no effect at all. In such a microcomputer, the watchdog timer is not initialized by an accidentally generated initialization command, and the watchdog timer can always effectively detect runaway.

以下に図面を参照して本発明をより具体的に詳述するが
、以下の開示は本発明の一実施例に過ぎず、本発明の技
術的範囲を何ら限定するものではない。
The present invention will be described in more detail below with reference to the drawings, but the following disclosure is only one example of the present invention and does not limit the technical scope of the present invention in any way.

実施例 第1図は、本発明に係るマイクロコンビ二一夕の特徴的
な部分の構成例を模式的に示すブロック図である。
Embodiment FIG. 1 is a block diagram schematically showing a configuration example of characteristic parts of a micro-combination store according to the present invention.

このマイクロコンピュータは、プログラムに基づいて演
算処理を行う中央処理部1と、後述するようにして暴走
を検出した場合に暴走検出信号4を出力するウォッチド
ッグ・タイマ2と、やはり後述するようにウォッチドッ
グ・タイマ2を制御する制御部5とを備えている。
This microcomputer includes a central processing unit 1 that performs arithmetic processing based on a program, a watchdog timer 2 that outputs a runaway detection signal 4 when a runaway is detected as described later, and a watchdog timer 2 that outputs a runaway detection signal 4 as described later. The control unit 5 controls the dog timer 2.

ウォッチドッグ・タイマ2は、一定期間毎にそのカウン
ト値を更新し、更に、カウント値が予め定められた一定
の値を越えてオーバフローした場合に、暴走検出信号4
を中央処理部1に出力するように構成されている。
The watchdog timer 2 updates its count value every fixed period, and furthermore, when the count value exceeds a predetermined fixed value and overflows, the watchdog timer 2 outputs a runaway detection signal 4.
is configured to output to the central processing unit 1.

制御部5は、中央処理部1が正常に動作している場合に
発生する初期化命令を受けて、ウォッチドッグ・タイマ
2がオーバフローしない範囲の一定期間毎にウォッチド
ッグ・タイマ2を初期化する。ここで、本発明に係るマ
イクロコンピュータの制御部5は、現在実行中の命令の
アドレス信号6と初期化命令実行信号7とを入力される
ように構成されており、初期化命令実行信号7が正しい
信号であり、且つその実行アドレス信号6が所定のアド
レスであるという条件が成立した場合にのみ実際に初期
化信号3をウォッチドッグ・タイマに出力する。
The control unit 5 receives an initialization command generated when the central processing unit 1 is operating normally, and initializes the watchdog timer 2 at regular intervals within a range in which the watchdog timer 2 does not overflow. . Here, the control unit 5 of the microcomputer according to the present invention is configured to receive an address signal 6 of the currently executing instruction and an initialization instruction execution signal 7, and the initialization instruction execution signal 7 is The initialization signal 3 is actually output to the watchdog timer only when the conditions that the signal is correct and the execution address signal 6 is a predetermined address are satisfied.

即ち、本発明に係るマイクロコンピュータでは、初期化
命令自体のコードと、そのアドレス信号とのいずれもが
正常でない限りウォッチドッグ・タイマ2を初期化しな
い。マイクロコンピュータノ暴走時に、偶然に命令コー
ドとアドレスとの両方の信号を同時に発生することは事
実上あり得ず、従ってこのマイクロコンピュータでは確
実に暴走を検出することができる。
That is, in the microcomputer according to the present invention, the watchdog timer 2 is not initialized unless both the code of the initialization instruction itself and its address signal are normal. When a microcomputer runs out of control, it is virtually impossible for both the instruction code and address signals to be generated at the same time. Therefore, this microcomputer can reliably detect a runaway.

発明の詳細 な説明したように、本発明に係るマイクロコンピュータ
は、アドレスと命令コードとの2重の確認を経てウォッ
チドッグ・タイマの初期化を実行するので、暴走時に偶
然発生したコードによってウォッチドッグ・タイマの初
期化が実行される確率が非常に低い。従って、暴走中に
誤ってウォッチドッグ・タイマが初期化され暴走が検出
できないという事態を事実上回避することができる。
As described in detail, the microcomputer according to the present invention initializes the watchdog timer after double confirmation of the address and the instruction code. - The probability that timer initialization will be executed is very low. Therefore, it is practically possible to avoid a situation where the watchdog timer is erroneously initialized during a runaway and the runaway cannot be detected.

図である。It is a diagram.

(主な参照番号) ■・・中央処理部、 2・・ウォッチドッグ・タイマ、 3・・初期化信号、 4・・暴走検出信号、 5・・制御部、 6・・アドレス信号、 7・・初期化命令実行信号(Main reference number) ■・Central processing unit, 2. Watchdog timer, 3...Initialization signal, 4. Runaway detection signal, 5...control unit, 6.Address signal, 7...Initialization instruction execution signal

Claims (1)

【特許請求の範囲】 所定の期間毎にカウント値を更新し、オーバフローが発
生すると所定の制御信号を発生するウォッチドッグ・タ
イマと、該ウォッチドッグ・タイマのカウント値を初期
化する初期化命令とを備えたマイクロコンピュータにお
いて、 予め設定された特定のアドレスで該初期化命令が実行さ
れた場合にのみ、該ウォッチドッグ・タイマの初期化を
実行するように構成されていることを特徴とするマイク
ロコンピュータ。
[Claims] A watchdog timer that updates a count value every predetermined period and generates a predetermined control signal when an overflow occurs; and an initialization instruction that initializes the count value of the watchdog timer. The microcomputer is configured to initialize the watchdog timer only when the initialization instruction is executed at a preset specific address. Computer.
JP63302570A 1988-11-30 1988-11-30 Microcomputer Pending JPH02148233A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63302570A JPH02148233A (en) 1988-11-30 1988-11-30 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63302570A JPH02148233A (en) 1988-11-30 1988-11-30 Microcomputer

Publications (1)

Publication Number Publication Date
JPH02148233A true JPH02148233A (en) 1990-06-07

Family

ID=17910570

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63302570A Pending JPH02148233A (en) 1988-11-30 1988-11-30 Microcomputer

Country Status (1)

Country Link
JP (1) JPH02148233A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59214957A (en) * 1983-05-23 1984-12-04 Fujitsu Ltd Watchdog timer circuit

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59214957A (en) * 1983-05-23 1984-12-04 Fujitsu Ltd Watchdog timer circuit

Similar Documents

Publication Publication Date Title
JPH02148233A (en) Microcomputer
JPH0212345A (en) Microcomputer
JP2871429B2 (en) Processor with runaway monitoring function
JPH05233374A (en) Watchdog timer device
JP3129873B2 (en) Microcomputer
JPH0287239A (en) Microprogram processor
JPS6370343A (en) Microcomputer
JPS6298435A (en) Computer abnormality detection method
JPH05257748A (en) Microprocessor device
JPS63148336A (en) Microcomputer
JPH02126342A (en) Method for detecting runaway of microcomputer
JPS63150732A (en) Program running supervisory equipment
JPS6014345A (en) Protecting system of program runaway
JP2002215427A (en) Method and device for detecting system runaway
JPS6083149A (en) Computer
JPH03204739A (en) Microcomputer
JPH0748198B2 (en) Multiprocessor system
JPS6256544B2 (en)
JPH03152637A (en) Abnormality diagnostic system
JPH02101540A (en) System for detecting runaway of cpu
JPH02297629A (en) Microcomputer
JPS6029849A (en) Prevention system against malfunction of detecting circuit for processor malfunction
JPS6234249A (en) Program monitoring system
JPH0283677A (en) Microcomputer
JPH01243132A (en) System for processing trouble