JPH05151029A - Watch dog timer device - Google Patents

Watch dog timer device

Info

Publication number
JPH05151029A
JPH05151029A JP3312576A JP31257691A JPH05151029A JP H05151029 A JPH05151029 A JP H05151029A JP 3312576 A JP3312576 A JP 3312576A JP 31257691 A JP31257691 A JP 31257691A JP H05151029 A JPH05151029 A JP H05151029A
Authority
JP
Japan
Prior art keywords
timing signal
circuit
charging
charge
output
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP3312576A
Other languages
Japanese (ja)
Other versions
JP2698260B2 (en
Inventor
Shinichiro Shibano
真一郎 柴野
Tadao Nakamura
唯男 中村
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo 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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP3312576A priority Critical patent/JP2698260B2/en
Publication of JPH05151029A publication Critical patent/JPH05151029A/en
Application granted granted Critical
Publication of JP2698260B2 publication Critical patent/JP2698260B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE:To provide the watch dog timer capable of monitoring the state of a microcomputer even in s standby state. CONSTITUTION:When the charge/discharge power of a charge/discharge circuit reaches a second threshold level VH in a standby state, a second timing signal *TIM from a timing signal generation circuit 9 is forcedly generated at constant intervals. Thereby operating the charge/discharge circuit to execute the operation of a watch dog timer, normally turning the computer 1 from the standby state to the normal operation state.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、マイクロコンピュータ
のスタンバイ状態においても動作を監視することのでき
るウオッチドッグタイマ装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a watchdog timer device capable of monitoring the operation of a microcomputer even in a standby state.

【0002】[0002]

【従来の技術】マイクロコンピュータには発振クロック
が印加されており、該発振クロックは複数段のフリップ
フロップ等を介して所定周波数のシステムクロックとな
るまで分周されている。そして、このシステムクロック
に同期してROMからプログラムデータを読み出してデ
コードした内容によってマイクロコンピュータ内部のC
PUは動作している。
2. Description of the Related Art An oscillating clock is applied to a microcomputer, and the oscillating clock is divided through a plurality of stages of flip-flops or the like until it becomes a system clock of a predetermined frequency. Then, in synchronization with this system clock, the program data is read from the ROM and is decoded according to the contents of the C in the microcomputer.
PU is running.

【0003】ここで、マイクロコンピュータ内部におい
ては、プログラム命令が正常に実行されてCPUが正常
に動作することが望ましいが、時として、外来ノイズ等
によってプログラムが暴走してしまうことがある。する
と、CPUが正常に動作しなくなって期待する演算結果
を得られなくなる問題が発生することになる。この場合
には、マイクロコンピュータの動作をできるだけ早くリ
セットし、該マイクロコンピュータを正常動作に戻す必
要がある。
Here, in the microcomputer, it is desirable that the program instructions are normally executed and the CPU operates normally, but sometimes the program runs away due to external noise or the like. Then, there arises a problem that the CPU does not operate normally and the expected calculation result cannot be obtained. In this case, it is necessary to reset the operation of the microcomputer as soon as possible to return the microcomputer to normal operation.

【0004】そこで、従来は、マイクロコンピュータが
正常に動作しているか否かを監視するためのタイマカウ
ンタを設け、プログラム命令によって一定間隔毎に発生
するタイミング信号でタイマカウンタのタイマ動作をリ
セットする様にしていた。詳しくは、プログラム命令が
正常に実行されている場合、タイマカウンタがオーバー
フロー出力を発生する以前にタイミング信号によって該
タイマカウンタがリセットされる様になっており、即ち
タイマカウンタからはオーバーフロー出力が得られなく
なっており、これよりマイクロコンピュータが正常動作
しているものと判断していた。反対に、プログラムが暴
走してしまった場合、タイミング信号が発生しなくなっ
てしまう。その為、タイマカウンタからはオーバーフロ
ー出力が発生し、このオーバーフロー出力によってマイ
クロコンピュータが誤動作しているものと判断し、マイ
クロコンピュータの動作をリセットしていた。
Therefore, conventionally, a timer counter for monitoring whether or not the microcomputer is normally operating is provided, and the timer operation of the timer counter is reset by a timing signal generated at regular intervals by a program command. I was doing Specifically, when the program instruction is executed normally, the timer counter is reset by the timing signal before the timer counter generates the overflow output, that is, the overflow output is obtained from the timer counter. It disappeared, and it was judged from this that the microcomputer was operating normally. On the contrary, if the program goes out of control, the timing signal will not be generated. Therefore, an overflow output is generated from the timer counter, and it is determined that the microcomputer is malfunctioning due to this overflow output, and the operation of the microcomputer is reset.

【0005】[0005]

【発明が解決しようとする課題】上記した説明はあくま
でもマイクロコンピュータが通常動作状態の時の話であ
り、この場合にはマイクロコンピュータの動作状態を監
視することはできる。ところが、マイクロコンピュータ
を通常動作状態からスタンバイ状態にした場合、発振器
の発振動作が停止し、プログラム命令が実行されなくな
ってしまう。つまり、一定間隔毎のタイミング信号が発
生しなくなり、ウオッチドッグタイマ動作を行えなくな
ってしまう。
The above description is only for the case where the microcomputer is in the normal operating state, and in this case, the operating state of the microcomputer can be monitored. However, when the microcomputer is changed from the normal operation state to the standby state, the oscillation operation of the oscillator is stopped and the program instruction cannot be executed. That is, the timing signal is not generated at regular intervals, and the watchdog timer operation cannot be performed.

【0006】スタンバイ状態においては、仮に電源電圧
が何らかの原因によって低下してしまうと、スタンバイ
状態から通常動作状態への移行時にROMからプログラ
ムデータを正しく読み出せなくなって、プログラムの暴
走が起こり得る。また、電源電圧の低下によって、スタ
ンバイ状態から通常動作状態への移行時に発振器を起動
できなくなることも起こり得る。更には、スタンバイ状
態においては、RAM、レジスタ等にプログラム命令に
基づいた演算結果を保持したりしているが、外来ノイズ
等によって保持データが破壊されることもあり得る。つ
まり、従来のマイクロコンピュータでは、スタンバイ状
態でウオッチドッグタイマ動作を行えない為に、上記し
た不都合な状態を監視できないのである。
In the standby state, if the power supply voltage drops for some reason, the program data cannot be read correctly from the ROM when the standby state shifts to the normal operation state, and program runaway may occur. Further, it may happen that the oscillator cannot be started when the standby state shifts to the normal operation state due to the decrease in the power supply voltage. Further, in the standby state, the operation result based on the program instruction is held in the RAM, the register or the like, but the held data may be destroyed by external noise or the like. In other words, the conventional microcomputer cannot monitor the above-mentioned inconvenient state because the watchdog timer operation cannot be performed in the standby state.

【0007】これより、従来のマイクロコンピュータで
は、該マイクロコンピュータがスタンバイ状態から通常
動作状態へ移行する際に、異常状態があるか否かを監視
できない問題点があった。そこで、本発明は、スタンバ
イ状態においてもマイクロコンピュータの状態を監視で
きるウオッチドッグタイマ装置を提供することを目的と
する。
Therefore, the conventional microcomputer has a problem that it cannot monitor whether or not there is an abnormal state when the microcomputer shifts from the standby state to the normal operation state. Therefore, an object of the present invention is to provide a watchdog timer device capable of monitoring the state of the microcomputer even in the standby state.

【0008】[0008]

【課題を解決するための手段】本発明は、前記問題点を
解決する為に成されたものであり、その特徴とするとこ
ろは、CPUが通常動作状態の時、発振器を動作させ該
発振器の発振出力に基づいてプログラム命令を実行し、
該プログラム命令に基づいて一定間隔毎に発生する第1
のタイミング信号に同期してウオッチドッグタイマ動作
を行い、また、前記CPUがスタンバイ状態の時、前記
発振器の動作を停止させるマイクロコンピュータにおい
て、前記第1のタイミング信号に同期して充電(又は放
電)を行い、当該第1のタイミング信号から次の第1の
タイミング信号が発生するまでの間、時定数に基づいて
放電(又は充電)を行う充放電回路と、第1のスレッショ
ルドレベルを有し、前記充放電回路の充放電出力が印加
される第1のバッファ回路と、該第1のバッファ回路の
出力に基づいて前記マイクロコンピュータのリセット制
御を行うリセット制御回路と、第2のタイミング信号を
一定間隔毎に発生するタイミング信号発生回路と、第2
のスレッショルドレベルを有し、前記充放電回路の充放
電出力が印加される第2のバッファ回路と、該第2のバ
ッファ回路の出力に基づいて前記タイミング信号発生回
路の制御を行うタイミング信号制御回路と、を備え、前
記CPUがスタンバイ状態となって前記充放電回路の充
放電出力が前記第2のバッファ回路の第2のスレッショ
ルドレベルに達した時、前記タイミング信号発生回路か
ら前記第2のタイミング信号を強制的に発生させ、前記
充放電回路を充放電動作させる点である。
The present invention has been made to solve the above-mentioned problems, and is characterized in that when the CPU is in a normal operation state, the oscillator is operated to operate. Execute program instruction based on oscillation output,
First generated at constant intervals based on the program instruction
In a microcomputer that performs a watchdog timer operation in synchronization with the timing signal of 1) and stops the operation of the oscillator when the CPU is in a standby state, the microcomputer charges (or discharges) in synchronization with the first timing signal. And a charging / discharging circuit for discharging (or charging) based on a time constant from the first timing signal until the next first timing signal is generated, and having a first threshold level, A first buffer circuit to which the charge / discharge output of the charge / discharge circuit is applied, a reset control circuit that performs reset control of the microcomputer based on the output of the first buffer circuit, and a second timing signal that is constant. A timing signal generating circuit which is generated at every interval;
And a timing signal control circuit for controlling the timing signal generation circuit based on the output of the second buffer circuit, the second buffer circuit having a threshold level of And when the CPU is in a standby state and the charge / discharge output of the charge / discharge circuit reaches the second threshold level of the second buffer circuit, the timing signal generating circuit outputs the second timing signal. The point is that a signal is forcibly generated and the charge / discharge circuit is charged / discharged.

【0009】[0009]

【作用】本発明によれば、スタンバイ状態において充放
電回路の充放電出力が第2のスレッショルドレベルに達
すると、タイミング信号発生回路から第2のタイミング
信号が一定間隔毎に強制的に発生され、これより充放電
回路を充放電動作させてウオッチドッグタイマ動作を実
行でき、マイクロコンピュータのスタンバイ状態におけ
る動作を監視できることになる。
According to the present invention, when the charging / discharging output of the charging / discharging circuit reaches the second threshold level in the standby state, the timing signal generating circuit forcibly generates the second timing signal at regular intervals, As a result, the charge / discharge circuit can be charged / discharged to execute the watchdog timer operation, and the operation of the microcomputer in the standby state can be monitored.

【0010】[0010]

【実施例】本発明の詳細を図面に従って具体的に説明す
る。図1は本発明のウオッチドッグタイマ装置を示す図
である。図1において、(1)はマイクロコンピュータで
あり、該マイクロコンピュータ(1)は、内部にプログラ
ムデータの記憶されたROM(図示せず)を有している。
そして、通常動作状態において、発振器の発振出力を分
周することによって得られるシステムクロックに同期し
て、ROMからプログラムデータを読み出してプログラ
ム命令を実行し、CPU(図示せず)を所定の状態で動作
させている。この時、各プログラム命令を実行する度に
一定時間間隔でパルス状の第1のタイミング信号が発生
しており、このタイミング信号は、後述するが、マイク
ロコンピュータ(1)がプログラム命令によって正常に動
作しているか否かを監視するための制御信号として使用
される。
The details of the present invention will be described in detail with reference to the drawings. FIG. 1 is a diagram showing a watchdog timer device of the present invention. In FIG. 1, (1) is a microcomputer, and the microcomputer (1) has a ROM (not shown) in which program data is stored.
Then, in the normal operation state, in synchronization with the system clock obtained by dividing the oscillation output of the oscillator, the program data is read from the ROM and the program instruction is executed, and the CPU (not shown) is kept in a predetermined state. It's working. At this time, each time a program instruction is executed, a pulse-shaped first timing signal is generated at a constant time interval. This timing signal will be described later, but the microcomputer (1) normally operates according to the program instruction. It is used as a control signal for monitoring whether or not it is.

【0011】コンデンサ(2)及び抵抗(3)はマイクロコ
ンピュータ(1)外部に設けられており、コンデンサ(2)
及び抵抗(3)は端子(4)とアースVSSとの間に並列接続
されている。(5)はドレイン・ソース路が電源VDDと端
子(4)との間に接続されたP型MOSトランジスタ(充
放電トランジスタ)であり、コンデンサ(2)及び抵抗
(3)による充放電動作を制御するためのものである。即
ち、プログラムの正常動作時、P型MOSトランジスタ
(5)のゲートには前述した第1のタイミング信号が印加
されており、このタイミングに同期してコンデンサ(2)
及び抵抗(3)は充放電動作している。詳しくは、一定間
隔毎にローレベル(以下「L」と称する)となるパルス状
の第1のタイミング信号がP型MOSトランジスタ(5)
のゲートに印加されると、コンデンサ(2)が充電動作を
行い、端子(4)の電位はVDDに急速に立ち上がることに
なる。また、第1のタイミング信号が発生してから次の
第1のタイミング信号が発生するまでの間では、コンデ
ンサ(2)の充電電荷はコンデンサ(2)及び抵抗(3)で定
まる時定数に応じて放電され、即ち端子(4)の電位は時
定数に応じて徐々に立ち下がることになる。この充放電
動作が第1のタイミング信号に同期して繰り返されるの
である。尚、コンデンサ(2)、抵抗(3)、及びP型MO
Sトランジスタ(5)より充放電回路が構成されている。
The capacitor (2) and the resistor (3) are provided outside the microcomputer (1), and the capacitor (2)
And resistor (3) are connected in parallel between terminal (4) and ground V SS . (5) is a P-type MOS transistor (charging / discharging transistor) whose drain / source path is connected between the power source V DD and the terminal (4), and includes a capacitor (2) and a resistor.
This is for controlling the charging / discharging operation according to (3). That is, during normal operation of the program, P-type MOS transistor
The first timing signal described above is applied to the gate of (5), and the capacitor (2) is synchronized with this timing.
And the resistor (3) is in charge / discharge operation. Specifically, the pulse-shaped first timing signal which becomes a low level (hereinafter referred to as “L”) at regular intervals is the P-type MOS transistor (5).
When applied to the gate of the capacitor, the capacitor (2) performs a charging operation and the potential of the terminal (4) rises rapidly to V DD . In addition, from the generation of the first timing signal to the generation of the next first timing signal, the charged charge of the capacitor (2) depends on the time constant determined by the capacitor (2) and the resistor (3). Is discharged, that is, the potential of the terminal (4) gradually falls according to the time constant. This charging / discharging operation is repeated in synchronization with the first timing signal. In addition, the capacitor (2), the resistor (3), and the P-type MO
A charging / discharging circuit is constituted by the S transistor (5).

【0012】(6)は第1のスレッショルドレベルVL
有するインバータ(第1のバッファ回路)であり、入力に
は端子(4)に現れる充放電回路の出力が印加される。
(7)はリセット回路であり、インバータ(6)の出力がハ
イレベル(以下「H」と称する)となった時にリセット信
号を発生するものである。該リセット信号は、マイクロ
コンピュータ(1)内部のCPU、ROM、RAM、及び
周辺回路等をシステム的にリセットする信号であっても
よいし、マイクロコンピュータ(1)のポート、クロック
発生回路等を特定の状態にセットした後に該マイクロコ
ンピュータ(1)の動作を完全に停止させる信号であって
もよい。つまり、プログラム命令が正常に実行されてい
る時は、端子(4)の電位即ちインバータ(6)への充放電
入力は常に第1のスレッショルドレベルVLより大なる
レベルで変化しており、即ちインバータ(6)出力が常に
「L」となってリセット回路(7)からはリセット信号が
発生することなくマイクロコンピュータ(1)は通常動作
することになる。また、プログラムが暴走した時は、第
1のタイミング信号が発生しなくなる為、インバータ
(6)への充放電入力が第1のスレッショルドレベルVL
まで立ち下がってしまい、即ちインバータ(6)出力が
「H」となってリセット回路(7)から出力されるリセッ
ト信号によってマイクロコンピュータ(1)はリセットさ
れることになる。
(6) is an inverter (first buffer circuit) having a first threshold level V L, to which the output of the charging / discharging circuit appearing at the terminal (4) is applied.
Reference numeral (7) is a reset circuit, which generates a reset signal when the output of the inverter (6) becomes high level (hereinafter referred to as "H"). The reset signal may be a signal that systematically resets the CPU, ROM, RAM, peripheral circuits, etc. inside the microcomputer (1), or specifies the port, clock generation circuit, etc. of the microcomputer (1). The signal may be a signal for completely stopping the operation of the microcomputer (1) after being set to the state. That is, when the program command is normally executed, the potential of the terminal (4), that is, the charge / discharge input to the inverter (6) is constantly changing at a level higher than the first threshold level V L , that is, The output of the inverter (6) is always "L" and the reset signal (7) does not generate a reset signal, and the microcomputer (1) normally operates. Also, when the program runs out of control, the first timing signal is not generated, so the inverter
The charge / discharge input to (6) is the first threshold level V L.
Thus, the output of the inverter (6) becomes "H" and the reset signal output from the reset circuit (7) resets the microcomputer (1).

【0013】(8)は、インバータ(6)に設定された第1
のスレッショルドレベルVLより大なる第2のスレッシ
ョルドレベルVHを有するインバータ(第2のバッファ回
路)であり、その入力はインバータ(6)と同様に端子
(4)と接続されている。尚、インバータ(8)は、通常動
作状態においてディセーブルであり、スタンバイ状態に
おいてイネーブルとなるものである。
(8) is a first inverter set in the inverter (6)
Is an inverter (second buffer circuit) having a second threshold level V H higher than the threshold level V L of
It is connected to (4). The inverter 8 is disabled in the normal operation state and enabled in the standby state.

【0014】(9)は、スタンバイ状態において第1のタ
イミング信号に代わる第2のタイミング信号*TIMを
発生するタイミング信号発生回路である。スタンバイ状
態においては、発振器の動作停止に基づいてシステムク
ロックが発生しなくなり、そしてプログラムが実行され
なくなって第1のタイミング信号が発生しなくなり、そ
の結果、マイクロコンピュータ(1)の動作を監視できな
くなってしまう。その為、スタンバイ状態においても、
マイクロコンピュータ(1)の状態を監視できる様に、タ
イミング信号発生回路(9)を設けたのである。タイミン
グ信号発生回路(9)には発振器から得られる発振クロッ
クが印加されており、後述するタイミング信号制御回路
の出力を受けて発振クロックの分周動作を行い、一定間
隔毎に「L」となるパルス状の第2のタイミング信号*
TIMを発生する。(10)は前述したタイミング信号制御
回路であり、インバータ(8)の出力に応じてタイミング
信号発生回路(9)から第2のタイミング信号*TIMを
強制的に発生させるものである。詳しくは、スタンバイ
状態の初期状態において、コンデンサ(2)を満充電の状
態としておくと、第1のタイミング信号が発生しないこ
とから、端子(4)の電位はコンデンサ(2)及び抵抗(3)
の時定数に応じて徐々に立ち下がることになる。そし
て、端子(4)の電位が第2のスレッショルドレベルVH
まで立ち下がると、インバータ(8)の「H」出力がタイ
ミング信号制御回路(10)に印加され、停止中の発振器の
発振を再開させてROMに記憶されたスタンバイ状態監
視用のサービスルーチンプログラムが読み出され、タイ
ミング信号発生回路(9)からは「L」の第2のタイミン
グ信号*TIMが強制的に発生されることになる。これ
より、P型MOSトランジスタ(5)がオンしてコンデン
サ(2)が急速充電を行い、端子(4)の電位は瞬時にVDD
に立ち上がることになる。尚、端子(4)の電位がV DD
立ち上がってしまうと、タイミング信号制御回路(10)に
インバータ(8)の「H」出力が再び印加されるまで発振
器は発振動作を停止することになる。
(9) is the first task in the standby state.
The second timing signal * TIM instead of the imming signal
It is a timing signal generation circuit for generation. Standby
State, the system clock is set based on the stoppage of the oscillator.
The lock no longer occurs and the program runs
And the first timing signal is no longer generated
As a result, the operation of the microcomputer (1) cannot be monitored.
It gets worse. Therefore, even in the standby state,
In order to monitor the status of the microcomputer (1),
The imming signal generating circuit (9) is provided. Thymin
The oscillation signal obtained from the oscillator is included in the signal generator circuit (9).
Timing signal control circuit to be described later.
The oscillation clock is divided by the output of
Second pulse-shaped timing signal that becomes “L” at every interval *
Generate a TIM. (10) is the timing signal control described above
Circuit, timing according to the output of the inverter (8)
The second timing signal * TIM from the signal generation circuit (9)
It is forcibly generated. For more information, stand by
In the initial state of the state, fully charge the capacitor (2).
In this state, the first timing signal is not generated.
Therefore, the potential of the terminal (4) is the capacitor (2) and the resistor (3).
It will gradually fall according to the time constant of. That
The potential of the terminal (4) becomes the second threshold level VH
When it goes down, the “H” output of the inverter (8) is tied.
Applied to the ming signal control circuit (10)
Standby state monitor stored in ROM by restarting oscillation
The service routine program for viewing is read and
The second timing of "L" is output from the minging signal generating circuit (9).
Signal * TIM will be forcibly generated. this
Turns on the P-type MOS transistor (5)
The terminal (4) instantly changes to VDD
Will stand up. The potential of the terminal (4) is V DDTo
When it rises, the timing signal control circuit (10)
Oscillation until the "H" output of the inverter (8) is applied again
The instrument will stop oscillating.

【0015】この状態を示したのが図2に示す波形図で
ある。つまり、一定間隔Tで電源V DDと第2のスレッシ
ョルドレベルVHとの間で、コンデンサ(2)及び抵抗
(3)の時定数に応じて充放電が繰り返され、スタンバイ
状態におけるマイクロコンピュータの状態(電源状態、
データの保持状態等)が監視されることになる。従っ
て、端子(4)の電位が電源VDDと第2のスレッショルド
レベルVHとの間で変化している状態であるならば、マ
イクロコンピュータ(1)のスタンバイ状態における動作
状態は正常であると判定されるのである。ところが、外
来ノイズ等がマイクロコンピュータ(1)に影響を及ぼ
し、タイミング発生回路(9)が発振クロックの分周動作
を行えなくなり、第2のタイミング信号*TIMが発生
しなくなってしまった場合、RAM、レジスタ等の保持
データも同時に破壊されてしまったとする。あるいは、
電源電圧VDDが何らかの原因によって低下してしまい、
発振器が正常に発振しなくなったり、RAM、レジスタ
等にデータが保持されなくなったり、あるいは、スタン
バイ状態から通常動作状態に移行してもROMからのプ
ログラムデータの読み出しが正常に行えなくなってしま
うとする。この場合、端子(4)の電位がインバータ(6)
の第1のスレッショルドレベルVLまで立ち下がること
になり、これより、リセット回路(7)からリセット信号
が発生し、マイクロコンピュータ(1)はリセットされる
ことになる。従って、マイクロコンピュータ(1)がスタ
ンバイ状態から通常動作状態へ移行するにしても、不都
合な状態のままで通常動作するのを防止できることにな
る。
This state is shown in the waveform diagram of FIG.
is there. That is, the power source V DDAnd the second thresh
Level VHBetween the capacitor (2) and the resistor
Charging / discharging is repeated according to the time constant of (3), and standby
State of the microcomputer (power state,
Data retention status, etc.) will be monitored. Obey
And the potential of the terminal (4) is the power supply VDDAnd the second threshold
Level VHIf there is a change between
Operation of the black computer (1) in standby mode
The condition is judged to be normal. However, outside
Incoming noise affects microcomputer (1)
Then, the timing generator circuit (9) divides the oscillation clock.
Cannot be performed and the second timing signal * TIM is generated
Hold RAM, registers, etc.
Suppose the data is also destroyed at the same time. Alternatively,
Power supply voltage VDDIs lowered for some reason,
Oscillator does not oscillate normally, RAM, register
Data is no longer retained in the
Even if the standby state is changed to the normal operation state, the
Program data cannot be read normally.
To try In this case, the potential of the terminal (4) is the inverter (6)
First threshold level V ofLGoing down to
From this, the reset signal from the reset circuit (7)
Occurs, the microcomputer (1) is reset
It will be. Therefore, the microcomputer (1) is
Even if you shift from the standby state to the normal operation state,
It is possible to prevent normal operation in a proper state.
It

【0016】尚、第1のタイミング信号と第2のタイミ
ング信号*TIMは同一波形となってもよく、また、プ
ログラムの正常動作時において端子(4)の電位が電源V
DDと第1のスレッショルドレベルVLとの間で変化する
のであれば、第1のタイミング信号が発生する間隔はT
以上であってもT未満であってもよい。図3、図4、及
び図5は、図1に示した充放電回路の他の実施例を示す
図である。尚、図1と同一素子には同一番号を記してあ
る。
The first timing signal and the second timing signal * TIM may have the same waveform, and the potential of the terminal (4) is the power source V when the program operates normally.
If it changes between DD and the first threshold level V L , the interval at which the first timing signal is generated is T
It may be more than or less than T. 3, 4, and 5 are diagrams showing other embodiments of the charging / discharging circuit shown in FIG. The same elements as those in FIG. 1 are designated by the same reference numerals.

【0017】図3は、コンデンサ(2)及び抵抗(3)を電
源VDDとアースVSSとの間に直列接続し、P型MOSト
ランジスタ(5)のドレイン・ソース路をコンデンサ(2)
と並列接続したものである。この場合、「L」となる第
1のタイミング信号又は第2のタイミング信号*TIM
がP型MOSトランジスタ(5)のゲートに印加される
と、コンデンサ(2)が放電動作を行ってインバータ(6)
(8)入力は瞬時にVDDに立ち上がり、P型MOSトラン
ジスタ(5)のゲートに第1又は第2のタイミング信号が
印加されない期間は、コンデンサ(2)及び抵抗(3)で定
まる時定数で充電動作を行い、インバータ(6)(8)入力
は徐々に立ち下がることになる。図1の充放電回路の代
わりに図3の充放電回路を用いても端子(4)に現れる充
放電出力が同一となる為、図1のその他の構成を変える
ことなくウオッチドッグタイマ装置を構成できることに
なる。
In FIG. 3, the capacitor (2) and the resistor (3) are connected in series between the power source V DD and the ground V SS, and the drain / source path of the P-type MOS transistor (5) is connected to the capacitor (2).
It is connected in parallel with. In this case, the first timing signal or the second timing signal * TIM that becomes “L”
Is applied to the gate of the P-type MOS transistor (5), the capacitor (2) discharges and the inverter (6)
(8) The input instantly rises to V DD, and during the period when the first or second timing signal is not applied to the gate of the P-type MOS transistor (5), the time constant is determined by the capacitor (2) and the resistor (3). The charging operation is performed, and the inputs of the inverters (6) and (8) gradually fall. Even if the charging / discharging circuit of FIG. 3 is used instead of the charging / discharging circuit of FIG. 1, the charging / discharging output appearing at the terminal (4) is the same, so the watchdog timer device is configured without changing the other configurations of FIG. You can do it.

【0018】また、図4は、コンデンサ(2)及び抵抗
(3)の一端を電源VDDと接続し、他端をN型MOSトラ
ンジスタ(11)を介してアースVSSと接続したものであ
る。この場合、N型MOSトランジスタ(11)のゲートに
印加される第1のタイミング信号及び第2のタイミング
信号TIMはパルス的に「H」となる信号に設定され
る。N型MOSトランジスタ(11)のゲートが「H」とな
ると、コンデンサ(2)が充電動作を行い、充放電回路の
出力は瞬時にVSSまで立ち下がることになる。その後
「H」となる第1又は第2のタイミング信号が発生する
までに間においては、コンデンサ(2)及び抵抗(3)で定
まる時定数に応じて放電動作が行われ、充放電回路の出
力は徐々に立ち上がることになる。ここで、図3の充放
電回路と図4の充放電回路との充放電特性を比較する
と、図3が瞬時に放電動作を行う時に図4が瞬時に充電
動作を行い、また図3が時定数に応じて充電動作を行う
時に図4は時定数に応じて放電動作を行っており、即ち
図3及び図4の充放電特性は反対となっている。従っ
て、図1の充放電回路に代わって図4の充放電回路を使
用する場合、リセット制御回路(7)に接続されたインバ
ータ(6)の代わりに高いスレッショルドレベルVH'を有
するインバータ(12)及び該インバータ(12)の出力を反転
するインバータ(13)を直列接続して設ければよいことに
なる。また、タイミング信号制御回路(10)に接続された
インバータ(8)に代わりに低いスレッショルドレベルV
L'(<VH')を有するインバータ(14)及び該インバータ(1
4)の出力を反転するインバータ(15)を直列接続して設け
ればよいことになる。
FIG. 4 shows a capacitor (2) and a resistor.
One end of (3) is connected to the power supply V DD, and the other end is connected to the ground V SS via the N-type MOS transistor (11). In this case, the first timing signal and the second timing signal TIM applied to the gate of the N-type MOS transistor (11) are set to pulse-like "H" signals. When the gate of the N-type MOS transistor (11) becomes "H", the capacitor (2) performs a charging operation, and the output of the charge / discharge circuit instantly falls to V SS . After that, until the first or second timing signal that becomes "H" is generated, the discharging operation is performed according to the time constant determined by the capacitor (2) and the resistor (3), and the output of the charge / discharge circuit is output. Will gradually rise. Here, comparing the charging / discharging characteristics of the charging / discharging circuit of FIG. 3 and the charging / discharging circuit of FIG. 4, when FIG. 3 instantaneously performs the discharging operation, FIG. 4 instantaneously performs the charging operation, and FIG. When performing the charging operation according to the constant, FIG. 4 performs the discharging operation according to the time constant, that is, the charge / discharge characteristics of FIGS. 3 and 4 are opposite. Therefore, when the charge / discharge circuit of FIG. 4 is used instead of the charge / discharge circuit of FIG. 1, an inverter (12) having a high threshold level V H ′ is used instead of the inverter (6) connected to the reset control circuit (7). ) And an inverter (13) for inverting the output of the inverter (12) are connected in series. Further, instead of the inverter (8) connected to the timing signal control circuit (10), a low threshold level V
An inverter (14) having L '(< VH ') and the inverter (1
The inverter (15) for inverting the output of 4) may be connected in series.

【0019】また、図5は、抵抗(3)及びコンデンサ
(2)を電源VDDとアースVSSとの間に直列接続し、N型
MOSトランジスタ(11)のドレイン・ソース路をコンデ
ンサ(2)と並列接続している。この場合、パルス状の
「H」の第1のタイミング信号又は第2のタイミング信
号TIMがN型MOSトランジスタ(11)のゲートに印加
されると、コンデンサ(2)が放電動作を行って充放電回
路の出力は瞬時にVSSまで立ち下がり、次の第1又は第
2のタイミング信号が発生するまでの期間においては、
充放電回路の出力は時定数に応じて徐々に立ち上がるこ
とになる。従って、図4及び図5の充放電波形は同一と
なる為、図4の充放電回路を図1の充放電回路に代えて
使用した場合の構成に対して、図4及び図5の充放電回
路を交換するだけでよいことになる。
FIG. 5 shows a resistor (3) and a capacitor.
(2) is connected in series between the power supply V DD and the ground V SS, and the drain-source path of the N-type MOS transistor (11) is connected in parallel with the capacitor (2). In this case, when the pulse-shaped "H" first timing signal or second timing signal TIM is applied to the gate of the N-type MOS transistor (11), the capacitor (2) performs a discharging operation to charge and discharge. The output of the circuit instantaneously falls to V SS, and in the period until the next first or second timing signal is generated,
The output of the charge / discharge circuit gradually rises according to the time constant. Therefore, since the charge / discharge waveforms of FIGS. 4 and 5 are the same, the charge / discharge waveforms of FIGS. 4 and 5 are compared with the configuration when the charge / discharge circuit of FIG. 4 is used instead of the charge / discharge circuit of FIG. All you have to do is replace the circuit.

【0020】[0020]

【発明の効果】本発明によれば、マイクロコンピュータ
のスタンバイ状態におけるノイズ到来、電源電圧低下等
の誤動作を監視できる為、スタンバイ状態から通常動作
状態に正常に移行できる利点が得られる。
According to the present invention, it is possible to monitor the malfunction of the microcomputer such as the arrival of noise and the drop of the power supply voltage in the standby state. Therefore, there is an advantage that the standby state can be normally shifted to the normal operating state.

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

【図1】本発明のウオッチドッグタイマ装置を示す図で
ある。
FIG. 1 is a diagram showing a watchdog timer device of the present invention.

【図2】図1のスタンバイ状態における充放電波形を示
す波形図である。
FIG. 2 is a waveform diagram showing charge / discharge waveforms in the standby state of FIG.

【図3】図1に使用される充放電回路の第2の実施例を
示す図である。
FIG. 3 is a diagram showing a second embodiment of the charging / discharging circuit used in FIG.

【図4】図1に使用される充放電回路の第3の実施例を
示す図である。
FIG. 4 is a diagram showing a third embodiment of the charge / discharge circuit used in FIG.

【図5】図1に使用される充放電回路の第4の実施例を
示す図である。
5 is a diagram showing a fourth embodiment of the charging / discharging circuit used in FIG. 1. FIG.

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

(1) マイクロコンピュータ (2) コンデンサ (3) 抵抗 (5) P型MOSトランジスタ (6)(8)(12)(14) インバータ (7) リセット制御回路 (9) タイミング信号発生回路 (10) タイミング信号制御回路 (1) Microcomputer (2) Capacitor (3) Resistor (5) P-type MOS transistor (6) (8) (12) (14) Inverter (7) Reset control circuit (9) Timing signal generation circuit (10) Timing Signal control circuit

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 CPUが通常動作状態の時、発振器を動
作させ該発振器の発振出力に基づいてプログラム命令を
実行し、該プログラム命令に基づいて一定間隔毎に発生
する第1のタイミング信号に同期してウオッチドッグタ
イマ動作を行い、また、前記CPUがスタンバイ状態の
時、前記発振器の動作を停止させるマイクロコンピュー
タにおいて、 前記第1のタイミング信号に同期して充電(又は放電)を
行い、当該第1のタイミング信号から次の第1のタイミ
ング信号が発生するまでの間、時定数に基づいて放電
(又は充電)を行う充放電回路と、 第1のスレッショルドレベルを有し、前記充放電回路の
充放電出力が印加される第1のバッファ回路と、 該第1のバッファ回路の出力に基づいて前記マイクロコ
ンピュータのリセット制御を行うリセット制御回路と、 第2のタイミング信号を一定間隔毎に発生するタイミン
グ信号発生回路と、 第2のスレッショルドレベルを有し、前記充放電回路の
充放電出力が印加される第2のバッファ回路と、 該第2のバッファ回路の出力に基づいて前記タイミング
信号発生回路の制御を行うタイミング信号制御回路と、
を備え、 前記CPUがスタンバイ状態となって前記充放電回路の
充放電出力が前記第2のバッファ回路の第2のスレッシ
ョルドレベルに達した時、前記タイミング信号発生回路
から前記第2のタイミング信号を強制的に発生させ、前
記充放電回路を充放電動作させることを特徴とするウオ
ッチドッグタイマ装置。
1. When a CPU is in a normal operation state, an oscillator is operated to execute a program command based on an oscillation output of the oscillator, and is synchronized with a first timing signal generated at regular intervals based on the program command. In the microcomputer that stops the operation of the oscillator when the CPU is in the standby state by performing the watchdog timer operation, the charging (or discharging) is performed in synchronization with the first timing signal. Discharge based on the time constant from the timing signal of 1 to the generation of the next timing signal
A charging / discharging circuit for performing (or charging), a first buffer circuit having a first threshold level, to which the charging / discharging output of the charging / discharging circuit is applied, and based on the output of the first buffer circuit. A reset control circuit that performs reset control of the microcomputer, a timing signal generation circuit that generates a second timing signal at regular intervals, a second threshold level, and a charge / discharge output of the charge / discharge circuit is applied. A second buffer circuit, and a timing signal control circuit for controlling the timing signal generation circuit based on the output of the second buffer circuit,
When the CPU is in the standby state and the charge / discharge output of the charge / discharge circuit reaches the second threshold level of the second buffer circuit, the second timing signal is output from the timing signal generation circuit. A watchdog timer device characterized in that it is forcibly generated and the charge / discharge circuit is charged / discharged.
【請求項2】 前記充放電回路は、コンデンサと、抵抗
と、前記コンデンサ及び前記抵抗による充放電動作が定
期的に実行される様に前記クロック信号が印加される充
放電トランジスタと、を備えてなることを特徴とする請
求項1記載のウオッチドッグタイマ装置。
2. The charging / discharging circuit includes a capacitor, a resistor, and a charging / discharging transistor to which the clock signal is applied so that a charging / discharging operation by the capacitor and the resistor is periodically executed. The watchdog timer device according to claim 1, wherein:
JP3312576A 1991-11-27 1991-11-27 Watchdog timer device Expired - Lifetime JP2698260B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3312576A JP2698260B2 (en) 1991-11-27 1991-11-27 Watchdog timer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3312576A JP2698260B2 (en) 1991-11-27 1991-11-27 Watchdog timer device

Publications (2)

Publication Number Publication Date
JPH05151029A true JPH05151029A (en) 1993-06-18
JP2698260B2 JP2698260B2 (en) 1998-01-19

Family

ID=18030872

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3312576A Expired - Lifetime JP2698260B2 (en) 1991-11-27 1991-11-27 Watchdog timer device

Country Status (1)

Country Link
JP (1) JP2698260B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008537237A (en) * 2005-04-20 2008-09-11 ブラウン ゲーエムベーハー A time base for microcontrollers and a method for producing circuit devices therefor
US9817707B2 (en) 2014-10-23 2017-11-14 Denso Corporation Controller for reducing power

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008537237A (en) * 2005-04-20 2008-09-11 ブラウン ゲーエムベーハー A time base for microcontrollers and a method for producing circuit devices therefor
US9817707B2 (en) 2014-10-23 2017-11-14 Denso Corporation Controller for reducing power

Also Published As

Publication number Publication date
JP2698260B2 (en) 1998-01-19

Similar Documents

Publication Publication Date Title
US5936452A (en) Device for detecting a plurality of signal levels indicating stopping of a clock signal
KR100231810B1 (en) Cluck signal actuating circuit and method
JPH06332755A (en) Watch dog timer circuit
US6763471B1 (en) Single chip microcomputer with reduced channel leakage current during a stable low speed operation state
EP0103755A2 (en) CMOS single chip microprocessor
US6166564A (en) Control circuit for clock enable staging
US20030226054A1 (en) Clock generation circuit and clock generation method
KR20030024619A (en) Clock monitoring apparatus
US4736119A (en) Dynamic CMOS current surge control
US6900701B2 (en) Automatic detection, selection and configuration of clock oscillator circuitry
JP2698260B2 (en) Watchdog timer device
KR19990086718A (en) Clock Monitor Circuit and Synchronous Semiconductor Memory Device Using the Same
CN110232278B (en) Frequency-reducing time-sharing A2 Trojan horse detection method and device based on composite ring oscillator
US4564954A (en) Noise reduction circuit of synthetic speech generating apparatus
US6486717B2 (en) Divider with cycle time correction
JPH0321928B2 (en)
JP2853342B2 (en) Abnormal oscillation detection circuit
JP7018095B2 (en) Power control circuit
JP3080785B2 (en) System clock selection circuit
CN217238254U (en) Clock oscillator&#39;s logic signal detection circuitry, MCU chip and BMS chip
KR910009556B1 (en) Back bias voltage generating circuit
JPH05218834A (en) Reset circuit
KR100407569B1 (en) Oscillator circuit with oscillation control function
JPH0876877A (en) Circuit for detecting abnormal oscillation
JPH118538A (en) Repeat signal stop detection circuit

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070919

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20080919

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20090919

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20100919

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20100919

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20110919

Year of fee payment: 14

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

Free format text: PAYMENT UNTIL: 20110919

Year of fee payment: 14

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

Free format text: PAYMENT UNTIL: 20120919

Year of fee payment: 15

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120919

Year of fee payment: 15