JPH0581928B2 - - Google Patents
Info
- Publication number
- JPH0581928B2 JPH0581928B2 JP1075058A JP7505889A JPH0581928B2 JP H0581928 B2 JPH0581928 B2 JP H0581928B2 JP 1075058 A JP1075058 A JP 1075058A JP 7505889 A JP7505889 A JP 7505889A JP H0581928 B2 JPH0581928 B2 JP H0581928B2
- Authority
- JP
- Japan
- Prior art keywords
- power supply
- supply circuit
- circuit
- cpu
- current
- 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.)
- Expired - Fee Related
Links
Description
【発明の詳細な説明】
(産業上の利用分野)
本発明は、マイクロコンピユータのリセツト装
置に関し、特に、プログラムが正常に処理されて
いない場合にリセツト動作を行うためのマイクロ
コンピユータのリセツト装置に関する。DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a microcomputer reset device, and more particularly to a microcomputer reset device for performing a reset operation when a program is not being processed normally.
(従来の技術)
マイクロコンピユータには、プログラムが暴走
した場合に、これを検出してリセツト動作を行
い、プログラムの動作を正常に戻す(暴走の解
除)手段が設けられていることがある。第6図に
上記の暴走解除手段の一例を示す。(Prior Art) Microcomputers are sometimes provided with means for detecting runaway of a program and performing a reset operation to return the program to normal operation (cancellation of runaway). FIG. 6 shows an example of the above runaway canceling means.
同図は車載用のマイクロコンピユータの例であ
つて、主電源1はバツテリである。この主電源1
は2つに分岐され、その一方はイグニツシヨンス
イツチ(メインスイツチ)SW1を介してVCC電
源回路2に接続され、他方はVDD電源回路3に接
続される。 The figure shows an example of a microcomputer for use in a vehicle, and the main power source 1 is a battery. This main power supply 1
is branched into two parts, one of which is connected to the V CC power supply circuit 2 via the ignition switch (main switch) SW1, and the other to the V DD power supply circuit 3.
VCC電源回路2では周辺回路4を動作させるた
めの定電圧電源が作られ、VDD電源回路3では
CPUまたはRAM等の特定の回路(以下、単に
CPUという)5を動作させるための定電圧電源
が作られる。 The V CC power supply circuit 2 creates a constant voltage power supply for operating the peripheral circuit 4, and the V DD power supply circuit 3 creates a constant voltage power supply for operating the peripheral circuit 4.
Specific circuits such as CPU or RAM (hereinafter simply referred to as
A constant voltage power supply is created to operate the CPU (5).
ウオツチドツグタイマ8では、CPU5から一
定間隔T1で出力される信号Aの間隔を監視し、
T1より長い時間CPU5からの信号Aを検出し
なかつた場合は、プログラムの暴走が発生したと
判断してオアゲート9にリセツト信号Bを出力す
る。 The watchdog timer 8 monitors the interval of the signal A output from the CPU 5 at a constant interval T1,
If the signal A from the CPU 5 is not detected for a period longer than T1, it is determined that a program runaway has occurred and a reset signal B is output to the OR gate 9.
このリセツト信号Bは、プログラムの暴走を検
出した時に1パルスだけ出力される信号であり、
この信号Bに応答してリセツト動作が行われる
と、プログラムは初期状態から立上がつて正常動
作に戻る。この場合、依然としてプログラム暴走
の原因が排除されていないと、再びリセツト動作
が行われる。 This reset signal B is a signal that is output only one pulse when a program runaway is detected.
When a reset operation is performed in response to this signal B, the program rises from its initial state and returns to normal operation. In this case, if the cause of the program runaway has not been eliminated, the reset operation will be performed again.
このように、ウオツチドツグタイマ8によつて
プログラムの暴走を検出してリセツト動作を行わ
せ、プログラムの暴走を解除するようにしてい
る。 In this manner, the watchdog timer 8 detects program runaway and performs a reset operation to release the program from runaway.
一方、主電源1に、消耗および断線等の主電源
に関するトラブルがあつた場合にも、前記リセツ
ト動作は行われる。つまり、前記トラブルが生じ
た場合、VDD電源回路3の出力電圧が低下する。
そして、この電圧低下がVDD電圧低下検知回路
(以下、VDD検知回路という)7で検知され、オ
アゲート9にリセツト信号Cを出力する。 On the other hand, the above-mentioned reset operation is also performed when the main power supply 1 has a trouble related to the main power supply, such as consumption or disconnection. That is, when the above trouble occurs, the output voltage of the V DD power supply circuit 3 decreases.
This voltage drop is detected by a V DD voltage drop detection circuit (hereinafter referred to as a V DD detection circuit) 7 and outputs a reset signal C to the OR gate 9 .
このように、CPU5は前記信号B,Cの論理
和信号Dによつて一切の動作が停止され、この信
号Dの解除によつてプログラムの初期スタートが
なされる。 In this way, all operations of the CPU 5 are stopped by the logical sum signal D of the signals B and C, and when this signal D is released, the initial start of the program is made.
また、メインスイツチSW1が切られてVCC電
源回路2への電源供給が断たれた場合には、VCC
電圧低下検知回路(以下、VCC検知回路という)
6によつて、VCC電源回路2の出力電圧低下が検
知され、パワーダウントリガE1がCPU5に対
して出力される。 In addition, when the main switch SW1 is turned off and the power supply to the V CC power supply circuit 2 is cut off, the V CC
Voltage drop detection circuit (hereinafter referred to as V CC detection circuit)
6, a drop in the output voltage of the V CC power supply circuit 2 is detected, and a power down trigger E1 is output to the CPU 5.
このパワーダウントリガE1によつてプログラ
ムの進行は停止され、メモリにデータを記憶して
おく機能等の一部の機能だけを保持する状態(以
下、パワーダウンモードという)に入る。このパ
ワーダウンモードでは電流消費を極端に低減でき
る。 The progress of the program is stopped by this power down trigger E1, and the program enters a state (hereinafter referred to as power down mode) in which only some functions, such as the function of storing data in memory, are retained. This power-down mode can dramatically reduce current consumption.
このパワーダウンモードへの切換えは、車載用
マイクロコンピユータ等のように、主電源1とし
てバツテリが使用されているような場合には消費
電力を節約する意味で特に重要な機能である。 Switching to the power down mode is a particularly important function in terms of saving power consumption in cases where a battery is used as the main power source 1, such as in a vehicle-mounted microcomputer.
なお、前記VCC検知回路6からパワーダウント
リガE1と同時に出力される信号E2で、前記ウ
オツチドツグタイマ8の動作が停止されるため、
パワーダウンモードへの移行動作に入つた後はリ
セツト信号Bは出力されない。 Note that since the operation of the watchdog timer 8 is stopped by the signal E2 output from the V CC detection circuit 6 at the same time as the power down trigger E1,
After entering the power down mode transition operation, the reset signal B is not output.
周辺回路4およびCPU5の間では各種信号の
やりとりが行われる。 Various signals are exchanged between the peripheral circuit 4 and the CPU 5.
(発明が解決しようとする課題)
上記説明のように、従来技術では、ウオツチド
ツグタイマによつてプログラムが正常に動作して
いるかどうかを監視していたために、ウオツチド
ツグタイマを含めた大幅な追加回路の実装スペー
スを確保する必要があるとか、回路が複雑化する
等の問題点があつた。(Problem to be Solved by the Invention) As explained above, in the conventional technology, since the watchdog timer was used to monitor whether the program was operating normally, the watchdog timer was not included. There were problems such as the need to secure mounting space for a large additional circuit and the complexity of the circuit.
また、パワーダウントリガが出力された後は、
ウオツチドツグタイマは監視動作をしないので、
実際にパワーダウンモードに移行したか否かが判
断できない。そのためにCPUに対してRAMの内
容保持のためのほか、CPUの動作にもバツクア
ツプ用電流が供給されるという不具合が生じ、特
に電源がバツテリの場合には、長時間の不使用時
にバツテリが過放電してしまうこともあるという
問題点がある。 Also, after the power down trigger is output,
Since the watchdog timer does not perform monitoring operation,
It is not possible to determine whether or not the system has actually entered power down mode. As a result, a problem arises in that backup current is supplied to the CPU not only to maintain the contents of RAM but also to operate the CPU.Especially when the power supply is battery-powered, the battery may become overcharged when not in use for a long time. There is a problem that discharge may occur.
本発明の目的は、上記問題点を解消し、簡単な
回路構成によつてプログラムの暴走時にリセツト
動作を行わせ、正常なプログラムの処理が初期状
態から行えるようにしたマイクロコンピユータの
リセツト装置を提供することにある。 SUMMARY OF THE INVENTION An object of the present invention is to provide a reset device for a microcomputer that solves the above-mentioned problems and that uses a simple circuit configuration to perform a reset operation when a program runs out of control, so that normal program processing can be performed from the initial state. It's about doing.
(課題を解決するための手段および作用)
上記の問題点を解決し、目的を達成するため
に、本発明は、主電源が断たれたことが検出され
てパワーダウントリガがCPUに供給された後は
VDD電源回路に供給する電流を制限する手段と、
CPUをパワーダウンモードに保持するのに必要
な予定値以上の電流が消費された場合には、この
消費電流超過に起因して生ずるVDD電源回路の出
力電圧低下を検出してCPUにリセツト信号を供
給するVDD出力電圧検知手段を具備すると共に、
前記VDD電源回路の出力電圧がその動作保証電圧
以下になつたときは当該VDD電源回路の出力を停
止するように構成されている点に特徴がある。(Means and Effects for Solving the Problems) In order to solve the above problems and achieve the objects, the present invention provides a system for detecting that the main power is cut off and supplying a power down trigger to the CPU. After that
means for limiting the current supplied to the V DD power supply circuit;
If more current is consumed than the planned value required to keep the CPU in power-down mode, a drop in the output voltage of the V DD power supply circuit caused by the excess current consumption is detected and a reset signal is sent to the CPU. V DD output voltage detection means for supplying VDD, and
A feature of the present invention is that when the output voltage of the V DD power supply circuit falls below its guaranteed operation voltage, the output of the V DD power supply circuit is stopped.
上記特徴を有する本発明では、パワーダウンモ
ードで必要とされる値以上の電流が供給された場
合に、VDD電源回路の出力電圧が低下する。この
出力電圧の低下を検知することにより、パワーダ
ウントリガがCPUに供給されたにもかかわらず
CPUがパワーダウンモードに入つていないこと
が検知される。 In the present invention having the above characteristics, the output voltage of the V DD power supply circuit decreases when a current greater than the value required in the power down mode is supplied. By detecting this drop in output voltage, a power down trigger is provided to the CPU.
It is detected that the CPU is not in power down mode.
CPUがパワーダウンモードに入つていないこ
とがVDD出力電圧検知手段で検知されると、プロ
グラムが暴走していると判断してCPUにリセツ
ト信号が出力される。 When the V DD output voltage detection means detects that the CPU is not in power down mode, it is determined that the program is running out of control and a reset signal is output to the CPU.
したがつて、従来技術のようなウオツチドツグ
タイマで動作の異常を監視する必要がない。 Therefore, there is no need to monitor abnormalities in operation using a watchdog timer as in the prior art.
また、長時間リセツト状態が続いてVDD電源回
路の出力電圧がその動作保証電圧以下になるよう
なときには当該VDD電源回路の出力が停止され、
過放電が防止される。 In addition, if the reset state continues for a long time and the output voltage of the V DD power supply circuit becomes lower than its guaranteed operation voltage, the output of the V DD power supply circuit will be stopped.
Over-discharge is prevented.
(実施例)
以下に図面を参照して本発明の実施例を説明す
る。(Example) Examples of the present invention will be described below with reference to the drawings.
第1図は、本発明の第1実施例を示すブロツク
図である。同図において第6図と同符号は、同一
または同等部分を示す。 FIG. 1 is a block diagram showing a first embodiment of the present invention. In this figure, the same reference numerals as in FIG. 6 indicate the same or equivalent parts.
同図において、主電源1とVDD電源回路3との
間に設けられている電流制限回路11によつて
VDD電源回路3に入力する電流が制限される。メ
インスイツチSW1が切られると、VIG電圧低下
検知回路(以下、VIG検知回路という)10にお
いて、VCC電源回路2の入力電圧VIGが第3基準
値以下に低下したことが検知されて検知信号Fが
出力される。この検知信号FはスイツチSW2に
供給されて該スイツチSW2が開かれ、その結
果、主電源1から直接VDD電源回路3へ電流を供
給していた回路が、主電源1から電流制限回路1
1を介してVDD電源回路3へ電流を供給する回路
へと切換えられる。すなわち、主電源とVDD電源
回路3との間に電流制限回路が直列に挿入される
回路が形成される。 In the figure, the current limit circuit 11 provided between the main power supply 1 and the V DD power supply circuit 3
The current input to the V DD power supply circuit 3 is limited. When the main switch SW1 is turned off, the V IG voltage drop detection circuit (hereinafter referred to as the V IG detection circuit) 10 detects that the input voltage V IG of the V CC power supply circuit 2 has fallen below the third reference value. A detection signal F is output. This detection signal F is supplied to the switch SW2 and the switch SW2 is opened. As a result, the circuit that was supplying current directly from the main power supply 1 to the V DD power supply circuit 3 is changed from the main power supply 1 to the current limiting circuit 1.
1 to a circuit that supplies current to the VDD power supply circuit 3. That is, a circuit is formed in which a current limiting circuit is inserted in series between the main power supply and the VDD power supply circuit 3.
VCC電源回路2の入力電圧VIGが前記第3基準
値以上の場合は、スイツチSW2は閉じているの
で、主電源1からの電流は、電流制限回路11を
介さずVDD電源回路3へ直接供給される。 When the input voltage V IG of the V CC power supply circuit 2 is equal to or higher than the third reference value, the switch SW2 is closed, so the current from the main power supply 1 is routed to the V DD power supply circuit 3 without passing through the current limiting circuit 11. Supplied directly.
電流制限回路11では、電流は次のような値
ILMTに制限される。すなわち、CPU5、VDD電源
回路3およびVDD検知回路7で消費される電流の
総和が、CPU5が正常に動作していなくてパワ
ーダウンモードに入ならかつた場合と、CPU5
が正常に動作してパワーダウンモードに入つた場
合とで、それぞれIERR、およびIBUとした時、
IERR>ILMT>IBUの関係が成立するようにILMTが制
限される。 In the current limit circuit 11, the current has the following value
I Limited to LMT . In other words, the total current consumed by the CPU 5, the V DD power supply circuit 3, and the V DD detection circuit 7 is
I LMT is limited so that the relationship I ERR > I LMT > I BU holds, where I ERR and I BU are the case where the I LMT operates normally and enters the power down mode, respectively.
上記関係が成立する値ILMTにVDD電源回路3に
供給される電流が制限されるので、この制限電流
ILMT以上の電流が消費されようとするとVDD電源
回路3の出力電圧は低下し、VDD検知回路7でこ
の電圧低下が検知されてリセツト信号Cが出力さ
れる。 Since the current supplied to the V DD power supply circuit 3 is limited to the value I LMT where the above relationship holds, this limited current
When a current exceeding I LMT is about to be consumed, the output voltage of the V DD power supply circuit 3 decreases, and the V DD detection circuit 7 detects this voltage drop and outputs a reset signal C.
なお、前記VCC検知回路6とVIG検知回路10
とにそれぞれ設定されている第1および第3基準
値は、メインスイツチSW1が切られて電流の供
給が断たれたときにパワーダウンモードへ移行す
る際の必要な処理、例えばレジスタの内容をバツ
クアツプ用のRAMに転送する等、電源「断」の
時の周知の処理(パワーダウン処理)を行うため
の時間(以下、パワーダウン処理時間という)を
確保することができるように設定される。すなわ
ち、VCC検知回路6に設定される第1基準値を
VIG検知回路10に設定される第3基準値より高
い値に設定し、電流の供給が断たれたとき、VCC
電源回路2の出力電圧の低下によつて、まずVCC
検知回路6からパワーダウントリガEが出力さ
れ、その後、VCC電源回路2の入力電圧の低下に
よつてVIG検知回路10から検知信号Fが出力さ
れるようにする。そして、このパワーダウントリ
ガEが出力されてから検知信号Fが出力されるま
での時間が、少なくとも前記パワーダウン処理時
間に相当するように第1および第3基準値の具体
的な値がそれぞれ決定される。 Note that the V CC detection circuit 6 and the V IG detection circuit 10
The first and third reference values respectively set in the main switch SW1 are used to perform necessary processing when transitioning to power down mode when the main switch SW1 is turned off and the current supply is cut off, such as backing up the contents of the register. The settings are made so that time (hereinafter referred to as power-down processing time) can be secured for performing well-known processing (power-down processing) when the power is turned off, such as transferring data to a dedicated RAM. In other words, the first reference value set in the V CC detection circuit 6 is
V CC is set to a value higher than the third reference value set in the V IG detection circuit 10, and when the current supply is cut off, V CC
Due to the decrease in the output voltage of power supply circuit 2, V CC
A power down trigger E is outputted from the detection circuit 6, and thereafter, a detection signal F is outputted from the V IG detection circuit 10 due to a decrease in the input voltage of the V CC power supply circuit 2. Then, specific values of the first and third reference values are determined so that the time from when the power down trigger E is output to when the detection signal F is output corresponds to at least the power down processing time. be done.
上記構成において、メインスイツチSW1が開
かれ、パワーダウントリガEおよび検知信号Fが
順次出力されると、CPU5はパワーダウントリ
ガEに応答してパワーダウン処理を実行し、
CPU5はパワーダウンモードすなわち該CPU5
内のRAMの内容を保持するだけの状態に移行す
る。また、検知信号FによつてSW2が開かれ、
主電源1から電流制限回路11を介してVDD検知
回路7へ電流が供給されるようになる。 In the above configuration, when the main switch SW1 is opened and the power down trigger E and the detection signal F are sequentially output, the CPU 5 executes power down processing in response to the power down trigger E.
CPU5 is in power down mode, that is, the CPU5 is in power down mode.
transitions to a state where it only retains the contents of RAM within. Further, SW2 is opened by the detection signal F,
Current is now supplied from the main power supply 1 to the V DD detection circuit 7 via the current limiting circuit 11 .
この時の消費電流IBUは制限電流ILMT以下であ
り、VDD電源回路の出力電圧は低下しないので、
VDD検知回路7からリセツト信号Cが出力される
ことはない。 The current consumption I BU at this time is less than the limit current I LMT , and the output voltage of the V DD power supply circuit does not drop, so
The reset signal C is never output from the V DD detection circuit 7.
ところで、プログラムが正常に処理されていな
い場合は、パワーダウントリガEが出力されても
パワーダウンモードに入らないので、CPU5全
体の動作に要する大きな電流IERRが流れようとす
る。しかし、電流はILMTに制限されるのでVDD電
源回路3の出力は低下する。このVDD電源回路3
の出力がVDD検知回路7に設定される第2基準値
以下になると、該VDD検知回路7からリセツト信
号Cが出力されてCPU5にリセツトがかかる。 By the way, if the program is not processed normally, the power down mode will not be entered even if the power down trigger E is output, so a large current I ERR required for the entire operation of the CPU 5 will flow. However, since the current is limited to ILMT , the output of the V DD power supply circuit 3 decreases. This V DD power supply circuit 3
When the output of the CPU 5 becomes equal to or less than the second reference value set in the V DD detection circuit 7, a reset signal C is outputted from the V DD detection circuit 7 and the CPU 5 is reset.
次に、第2図を参照して上記VIG検知回路10、
スイツチSW2、電流制限回路11の回路例を説
明する。 Next, referring to FIG. 2, the V IG detection circuit 10,
A circuit example of the switch SW2 and the current limiting circuit 11 will be explained.
同図において、電流制限回路11は抵抗R1,
R2とトランジスタQ2とからなり、VIG検知回
路10は抵抗R3,R4とトランジスタQ4とか
らなる。スイツチSW2はトランジスタQ3と抵
抗R5,R6とからなる。また、VDD電源回路3
はVDDレギユレータおよびトランジスタQ1から
なる。 In the figure, the current limiting circuit 11 includes a resistor R1,
The V IG detection circuit 10 consists of resistors R3 and R4 and a transistor Q4. The switch SW2 consists of a transistor Q3 and resistors R5 and R6. In addition, V DD power supply circuit 3
consists of the V DD regulator and transistor Q1.
メインスイツチSW1が閉じている状態では、
トランジスタQ4のベースに主電源1の電圧VIG
から順バイアスが印加されているので、トランジ
スタQ4はオン状態である。トランジスタQ4が
オンであると、トランジスタQ3がオンとなり、
抵抗R1は短絡されるのでVDD電源回路3に供給
される電流は抵抗R2のみによつて制限される。 When main switch SW1 is closed,
The voltage V IG of main power supply 1 is applied to the base of transistor Q4.
Transistor Q4 is in an on state because a forward bias is applied from . When transistor Q4 is on, transistor Q3 is on,
Since resistor R1 is shorted, the current supplied to V DD power supply circuit 3 is limited only by resistor R2.
メインスイツチSW1が開かれ、トランジスタ
Q4のベースに印加される電圧が下がつてトラン
ジスタQ4がオフになると、Q3もオフとなるの
で、VDD電源回路3に供給される電流は抵抗R1
およびR2の値によつて決定される電流、すなわ
ち前記制限電流ILMTに制限されるようになる。ト
ランジスタQ4がオフになるときの電圧VIGは抵
抗R3,R4の組合わせで決定される。 When the main switch SW1 is opened and the voltage applied to the base of the transistor Q4 drops and the transistor Q4 is turned off, Q3 is also turned off, so the current supplied to the V DD power supply circuit 3 flows through the resistor R1.
and the current determined by the value of R2, that is, the limiting current I LMT . The voltage V IG at which transistor Q4 turns off is determined by the combination of resistors R3 and R4.
次に、本発明の第2実施例を第3図を参照して
説明する。同図において、第1図と同符号は同
一、または同等部分を示す。この第2実施例で
は、VCC電源回路2の出力電圧低下を第1のVCC
電圧低下検知回路(第1のVCC検知回路)6、お
よび第2のVCC電圧低下検知回路(第2のVCC検
知回路)12で検知するように構成した。このよ
うに構成することによつて、VCC電源回路2から
出力されるVCC電圧が低下するに従つてパワート
リガEが先に出力され、続いて検知信号Fが出力
される。 Next, a second embodiment of the present invention will be described with reference to FIG. In this figure, the same reference numerals as in FIG. 1 indicate the same or equivalent parts. In this second embodiment, the output voltage drop of the V CC power supply circuit 2 is reduced by the first V CC
The configuration is such that a voltage drop detection circuit (first V CC detection circuit) 6 and a second V CC voltage drop detection circuit (second V CC detection circuit) 12 are used for detection. With this configuration, as the V CC voltage output from the V CC power supply circuit 2 decreases, the power trigger E is output first, and then the detection signal F is output.
このために、第1のVCC検知回路6からパワー
トリガEを出力するための第1基準値をVCC3と
し、第2のVCC検知回路12から検知信号Fを出
力するための第4基準値をVCC4とした場合、
VCC4<VCC3となる値を選択してそれぞれ設定
する。 For this purpose, the first reference value for outputting the power trigger E from the first V CC detection circuit 6 is set to V CC 3, and the fourth reference value for outputting the detection signal F from the second V CC detection circuit 12 is set to V CC 3. When the reference value is V CC 4,
Select and set the values such that V CC 4 < V CC 3.
また、VCC電源回路2の出力電圧を検知する
VCC検知回路は1つだけとし、このVCC検知回路
に遅延回路を設けることによつて、それぞれ異な
るタイミングで2つの信号E,Fを出力させるよ
うに構成してもよい。前記遅延回路には、パワー
ダウン処理が完了する以前に電流制限がかかるこ
とがないように、パワーダウン処理時間を確保す
るための遅延時間を設定する。こうすることによ
つて前記第2のVCC検知回路12は省略できる。 It also detects the output voltage of V CC power supply circuit 2.
It is also possible to use only one V CC detection circuit and provide a delay circuit to this V CC detection circuit so that the two signals E and F are output at different timings. A delay time is set in the delay circuit to ensure the power down processing time so that current limitation is not applied before the power down processing is completed. By doing so, the second V CC detection circuit 12 can be omitted.
以上説明した実施例では、プログラムの暴走を
検知してプログラムをリセツトすることができる
が、このプログラムのリセツト状態では一般に、
電流の消費量は極端には制限できないので、リセ
ツトを行つた後、メインスイツチSW1を投入し
て正常な状態でプログラムを走らせてから、再び
メインスイツチSW1を切り、パワーダウンモー
ドで動作を終了するようにしなければならない。 In the embodiment described above, runaway of the program can be detected and the program can be reset, but in the reset state of the program, generally,
Since the amount of current consumption cannot be extremely limited, after performing a reset, turn on main switch SW1, run the program under normal conditions, and then turn off main switch SW1 again to end the operation in power down mode. You must do so.
車載のマイクロコンピユータでは実際のエンジ
ンの不調状態を運転者が感じとつて、このよう
な、メインスイツチSW1の操作を行うこともで
きるが、前記リセツト信号Cを検出して表示する
手段によつて運転者にプログラムの暴走を知らせ
るようにしてもよい。 With the in-vehicle microcomputer, the driver can sense the actual malfunction of the engine and operate the main switch SW1 as described above. It may also be possible to notify the user of a runaway program.
次に本発明の第3実施例を第4図を参照して説
明する。同図において、第1図と同符号は同一、
または同等部分を示す。 Next, a third embodiment of the present invention will be described with reference to FIG. In the figure, the same symbols as in Figure 1 are the same.
or indicate equivalent parts.
この第3実施例は、一般にCPU5は、リセツ
トされてもその内部クロツクは停止されないため
に、CPU5の消費電流は極端に低下しないとい
う前記事情を考慮して対策を施した例であつて、
プログラムが正常に動作していないためにリセツ
トがかかるような状態では、CPU5への電流の
供給を停止するようにしたものである。 This third embodiment is an example in which measures have been taken in consideration of the above-mentioned situation in which the current consumption of the CPU 5 does not drop extremely because the internal clock of the CPU 5 is generally not stopped even when the CPU 5 is reset.
In a situation where a reset is required because the program is not operating normally, the supply of current to the CPU 5 is stopped.
第4図においては、VCC電源回路2とVDD電源
回路3との間に、VCC電源回路2からVDD電源回
路3の方向にのみ電流を流す整流器13が設けら
れている。この整流器13は、VCC>VDDの時に
オンし、VCC<VDDの時にオフするスイツチでも
よい。 In FIG. 4, a rectifier 13 is provided between the V CC power supply circuit 2 and the V DD power supply circuit 3 to allow current to flow only in the direction from the V CC power supply circuit 2 to the V DD power supply circuit 3. This rectifier 13 may be a switch that is turned on when V CC >V DD and turned off when V CC <V DD .
また、VDD電源回路3は、その出力に基づいて
自らの出力電圧を予定の値に維持する定電圧回路
(第5図参照)に構成されている。電流制限回路
11で制限される電流値は前記電流ILMTの設定基
準と同様の基準で設定される。 Further, the V DD power supply circuit 3 is configured as a constant voltage circuit (see FIG. 5) that maintains its own output voltage at a predetermined value based on its output. The current value limited by the current limiting circuit 11 is set using the same criteria as the setting criteria for the current ILMT .
このような構成によつて、メインスイツチSW
1が開かれると、プログラムが正常に動作してい
ない場合、VDD電源回路3に供給される電流は電
流制限回路11でILMTに制限されるようになる。 With this configuration, the main switch
1 is opened, the current supplied to the V DD power supply circuit 3 is limited to ILMT by the current limit circuit 11 if the program is not operating normally.
そしてこの状態で、電流制限回路11の制限以
上の電流がCPU5の動作およびVDD電圧低下検知
回路7、VDD電源回路3の動作のために消費され
ようとすると、VDD電源回路3の出力が低下す
る。VDD検知回路7は、この出力低下を検知して
リセツト信号Cを出力し、CPU5の動作を停止
(リセツト)する。 In this state, if a current exceeding the limit of the current limit circuit 11 is consumed for the operation of the CPU 5, the V DD voltage drop detection circuit 7, and the V DD power supply circuit 3, the output of the V DD power supply circuit 3 decreases. The V DD detection circuit 7 detects this output drop and outputs a reset signal C to stop (reset) the operation of the CPU 5.
さらに、VDD電源回路3は、詳細を第5図に関
して後述するように、その出力電圧が自身の動作
保証電圧以下に低下すると、動作を停止して出力
電圧VDDを0Vにするように構成される。 Further, as will be described in detail later with reference to FIG. 5, the V DD power supply circuit 3 is configured to stop operating and set the output voltage V DD to 0V when its output voltage drops below its own guaranteed operating voltage. be done.
メインスイツチSW1を再びオンにすると、整
流器またはスイツチ13を介してVDD電源回路3
にVCC電源回路2から電圧VCCが印加される。VDD
電源回路3は電圧VCCが印加されると再び予定の
電圧を出力する。 When the main switch SW1 is turned on again, V DD power supply circuit 3 is connected via the rectifier or switch 13.
A voltage V CC is applied from the V CC power supply circuit 2 to the V CC power supply circuit 2 . VDD
When the voltage V CC is applied, the power supply circuit 3 outputs the expected voltage again.
このように、プログラムが正常に動作していな
い場合でも、メインスイツチSW1を開くと主電
源1の電力は全く消費されなくなる。したがつ
て、例えば、車載マイクロコンピユータにおい
て、プログラムが正常に動作していなくてエンジ
ンの調子が悪いような場合に、修理待ちのため長
期間車庫に自動車を入れつぱなしにしておくよう
なことがあつても、その間にバツテリ(主電源
1)が放電してしまうということは避けられる。 In this way, even if the program is not operating normally, when the main switch SW1 is opened, no power from the main power supply 1 is consumed. Therefore, for example, if a program in a car's microcomputer is not working properly and the engine is running poorly, the car may be left in a garage for a long time waiting for repairs. Even if this happens, it is possible to avoid the battery (main power supply 1) being discharged during that time.
第5図に、第4図の実施例に好適なVDD電源回
路3の一例を示す。 FIG. 5 shows an example of the V DD power supply circuit 3 suitable for the embodiment of FIG. 4.
同図において、前記スイツチSW1に相当する
図示されていないスイツチがオンされると、VCC
電源回路2から整流器13を介してコンパレータ
14に電圧VCCが動作電源として供給され、VDD
電源回路3は動作可能状態になる。そして、コン
パレータの一方の入力となる抵抗R7とR8で分
圧された電圧が、他方の入力である基準電圧より
高い場合に、コンパレータ14の出力によつてト
ランジスタQ1がオンする。一旦トランジスタQ
1がオンするとVCC電源回路2から電流が供給さ
れなくてもVDD電源回路3は出力を継続する。 In the figure, when a switch (not shown) corresponding to the switch SW1 is turned on, V CC
The voltage V CC is supplied from the power supply circuit 2 to the comparator 14 as an operating power source via the rectifier 13, and V DD
The power supply circuit 3 becomes operational. When the voltage divided by resistors R7 and R8, which is one input of the comparator, is higher than the reference voltage which is the other input, the output of the comparator 14 turns on the transistor Q1. Once transistor Q
1 is turned on, the VDD power supply circuit 3 continues to output even if no current is supplied from the VCC power supply circuit 2.
この状態から前記スイツチSW1に相当する図
示されていないスイツチをオフすると、プログラ
ムが正常に動作している場合は、第1図で説明し
た第1実施例と同様に動作し、VDD電源回路3は
出力を継続する。 When a switch (not shown) corresponding to the switch SW1 is turned off from this state, if the program is operating normally, the program operates in the same manner as the first embodiment explained in FIG. 1, and the V DD power supply circuit 3 continues outputting.
しかし、プログラム動作異常が発生してパワー
ダウンモードに入ることができない場合、電流は
通常の動作に必要な電流IERRだけ流れようとす
る。ところが供給される電流はILMTに制限される
のでVDD電源回路3の出力は低下し、前記コンパ
レータ14の動作保証電圧より低下した時点でト
ランジスタQ1はオフとなり、出力電圧VDDは
“0”になる。トランジスタQ1がオフの状態は、
再びVCC電源回路2からコンパレータ14に、そ
の動作保証電圧より大きい電圧が供給された場合
に解除される。 However, if a program operation error occurs and the power down mode cannot be entered, the current I ERR necessary for normal operation will flow. However, since the supplied current is limited to I LMT , the output of the V DD power supply circuit 3 decreases, and when it drops below the operation guaranteed voltage of the comparator 14, the transistor Q1 turns off, and the output voltage V DD becomes "0". become. When transistor Q1 is off,
When a voltage higher than the guaranteed operation voltage is supplied to the comparator 14 again from the V CC power supply circuit 2, the comparator 14 is released.
上記説明のように、本発明では、電流制限回路
11を設けることによつて、プログラムの動作が
正常でない場合にメインスイツチを切つても、電
流が制限電流以上消費されようとするとVDD電源
回路3の出力が低下する。その結果、VDD検知回
路7で電圧低下が検知されてリセツト信号Cが出
力される。 As described above, in the present invention, by providing the current limiting circuit 11, even if the main switch is turned off when the program operation is not normal, if the current is about to be consumed beyond the limit current, the V DD power supply circuit 3 output decreases. As a result, the V DD detection circuit 7 detects a voltage drop and outputs a reset signal C.
さらに、第3実施例に示したように、リセツト
信号Cが出力されるような状態では、電流の供給
を全く停止させてしまい、主電源1がバツテリの
場合に、このバツテリが放電することを回避でき
るようにした。 Furthermore, as shown in the third embodiment, in a state where the reset signal C is output, the supply of current is completely stopped, and if the main power source 1 is a battery, this battery is prevented from discharging. Made it possible to avoid it.
また、第3実施例つまり第4図、第5図に示し
た構成を有するVDD電源回路3は、第1図もしく
は第3図に関して説明した実施例にも適用するこ
とができる。 Further, the third embodiment, that is, the V DD power supply circuit 3 having the configuration shown in FIGS. 4 and 5, can also be applied to the embodiments described with reference to FIG. 1 or 3.
なお、本実施例ではVDD電源回路3の出力電圧
の低下を検知してリセツト信号を出力するように
したが、電流制限回路11に流れる電流を検出し
てリセツト信号を出力することもできる。具体的
には、例えば第2図の抵抗R1に流れる電流を検
出する等すれば良い。 In this embodiment, the reset signal is output by detecting a drop in the output voltage of the V DD power supply circuit 3, but it is also possible to detect the current flowing through the current limiting circuit 11 and output the reset signal. Specifically, for example, the current flowing through the resistor R1 in FIG. 2 may be detected.
(発明の効果)
以上の説明から明らかなように、本発明によれ
ば、プログラムの動作が正常か否かをパワーダウ
ンモードに入つたか否かで判断しているので、従
来のようにウオツチドツグタイマで監視する必要
がなくなつた。その結果、ウオツチドツグタイマ
を装着していた分のスペースを節約でき、マイク
ロコンピユータの回路構成が簡単になつた。(Effects of the Invention) As is clear from the above explanation, according to the present invention, whether the program is operating normally or not is determined based on whether or not it has entered the power down mode. There is no longer a need for monitoring with the Tsuchidotsugu timer. As a result, the space required for installing a watchdog timer was saved, and the circuit configuration of the microcomputer became simpler.
また、パワーダウンモードに入れなかつた場合
には、リセツト後、主電源からの電流の供給を全
く停止できるので、プログラムが正常に動作して
いない状態でメインスイツチを切つた場合にも消
費電流は大幅に低減できる。 In addition, if the power down mode is not entered, the supply of current from the main power supply can be completely stopped after resetting, so even if the main switch is turned off while the program is not operating normally, the current consumption will be reduced. This can be significantly reduced.
第1図は本発明の第1実施例を示すブロツク
図、第2図は第1実施例の要部回路図、第3図は
本発明の第2実施例を示すブロツク図、第4図は
同第3実施例を示すブロツク図、第5図は第3実
施例の要部回路図、第6図は従来技術を示すブロ
ツク図である。
1……主電源、2……VCC電源回路、3……
VDD電源回路、5……CPU、6,7,10,12
……電圧低下検知回路、11……電流制限回路、
13……整流器。
Fig. 1 is a block diagram showing a first embodiment of the present invention, Fig. 2 is a main circuit diagram of the first embodiment, Fig. 3 is a block diagram showing a second embodiment of the invention, and Fig. 4 is a block diagram showing a second embodiment of the invention. FIG. 5 is a block diagram showing a main part of the third embodiment, and FIG. 6 is a block diagram showing a conventional technique. 1...Main power supply, 2...V CC power supply circuit, 3...
V DD power supply circuit, 5...CPU, 6, 7, 10, 12
... Voltage drop detection circuit, 11 ... Current limiting circuit,
13... Rectifier.
Claims (1)
と、CPUを動作させるためのVDD電源回路と、前
記VCC電源回路およびVDD電源回路に電源を供給
する共通の主電源としてのバツテリと、前記VCC
電源回路の出力電圧が第1基準値以下に低下した
ときにパワーダウントリガを前記CPUに供給す
るVCC出力電圧検知手段とを有し、 前記パワーダウントリガに応答して、前記
CPUをパワーダウンモードへ移行させるように
構成されたマイクロコンピユータのリセツト装置
において、 前記VDD電源回路に供給する電流を前記パワー
ダウンモードを維持するのに必要な電流値に制限
する電流制限手段と、 前記パワーダウントリガが前記CPUに供給さ
れたとき、主電源と前記VDD電源回路との間に前
記電流制限手段を直列に挿入する回路を形成する
ための回路切換手段と、 前記VDD電源回路の出力電圧が第2基準値以下
に低下したことを検知して前記CPUにリセツト
信号を出力するVDD出力電圧検知手段とを具備
し、 前記VDD電源回路は、その出力が当該VDD電源
回路の動作保証電圧以下に低下したときは出力を
停止するように構成されていることを特徴とする
マイクロコンピユータのリセツト装置。 2 周辺回路を動作させるためのVCC電源回路
と、CPUを動作させるためのVDD電源回路と、前
記VCC電源回路およびVDD電源回路に電源を供給
する共通の主電源としてのバツテリと、前記VCC
電源回路の出力電圧が第1基準値以下に低下した
ときにパワーダウントリガを前記CPUに供給す
るVCC出力電圧検知手段とを有し、 前記パワーダウントリガに応答して、前記
CPUをパワーダウンモードへ移行させるように
構成されたマイクロコンピユータのリセツト装置
において、 前記VDD電源回路に供給する電流を前記パワー
ダウンモードを維持するのに必要な電流値に制限
する電流制限手段と、 前記パワーダウントリガが前記CPUに供給さ
れたとき、主電源と前記VDD電源回路との間に前
記電流制限手段を直列に挿入する回路を形成する
ための回路切換手段と、 前記電流制限手段に前記パワーダウンモードで
必要とされる予定値以上の電流が流れようとして
この電流制限手段が作動した場合に、これを検知
してCPUにリセツト信号を出力する電流検出手
段とを具備し、 前記VDD電源回路は、その出力が当該VDD電源
回路の動作保証電圧以下に低下したときは出力を
停止するように構成されていることを特徴とする
マイクロコンピユータのリセツト装置。 3 前記VCC電源回路の入力電圧が前記第1基準
値より低い第3基準値以下に低下したことを検知
して、前記切換手段の切換信号を出力するVCC入
力電圧検知手段を具備したことを特徴とする請求
項1または2記載のマイクロコンピユータのリセ
ツト装置。 4 前記VCC電源回路の出力電圧が、前記第1基
準値よりも低い第4基準値まで低下したときに、
前記切換手段の切換信号を出力する第2のVCC出
力電圧検知手段を具備したことを特徴とする請求
項1または2記載のマイクロコンピユータのリセ
ツト装置。 5 前記パワーダウントリガに応答して起動さ
れ、パワーダウン処理時間の経過後に、前記切換
手段の切換信号を出力する遅延手段を具備したこ
とを特徴とする請求項1または2記載のマイクロ
コンピユータのリセツト装置。[Claims] 1. A V CC power supply circuit for operating peripheral circuits, a V DD power supply circuit for operating the CPU, and a common main power supply circuit for supplying power to the V CC power supply circuit and the V DD power supply circuit. The battery as a power source and the V CC
V CC output voltage detection means for supplying a power down trigger to the CPU when the output voltage of the power supply circuit drops below a first reference value;
A microcomputer reset device configured to shift a CPU to a power down mode, comprising current limiting means for limiting the current supplied to the V DD power supply circuit to a current value necessary to maintain the power down mode. , circuit switching means for forming a circuit for inserting the current limiting means in series between the main power supply and the V DD power supply circuit when the power down trigger is supplied to the CPU ; V DD output voltage detection means detects that the output voltage of the circuit has fallen below a second reference value and outputs a reset signal to the CPU, and the V DD power supply circuit has an output that is lower than the second reference value . A reset device for a microcomputer, characterized in that the reset device for a microcomputer is configured to stop output when the voltage drops below the guaranteed operation voltage of a power supply circuit. 2. A V CC power supply circuit for operating peripheral circuits, a V DD power supply circuit for operating the CPU, and a battery serving as a common main power supply for supplying power to the V CC power supply circuit and the V DD power supply circuit; Said V CC
V CC output voltage detection means for supplying a power down trigger to the CPU when the output voltage of the power supply circuit drops below a first reference value;
A microcomputer reset device configured to shift a CPU to a power down mode, comprising current limiting means for limiting the current supplied to the V DD power supply circuit to a current value necessary to maintain the power down mode. , circuit switching means for forming a circuit for inserting the current limiting means in series between the main power supply and the V DD power supply circuit when the power down trigger is supplied to the CPU; and the current limiting means. current detecting means for detecting this and outputting a reset signal to the CPU when the current limiting means is activated to cause a current exceeding a predetermined value required in the power down mode to flow; A reset device for a microcomputer, characterized in that the V DD power supply circuit is configured to stop outputting when its output drops below the guaranteed operation voltage of the V DD power supply circuit. 3. V CC input voltage detection means for detecting that the input voltage of the V CC power supply circuit has fallen below a third reference value lower than the first reference value and outputting a switching signal for the switching means. A microcomputer reset device according to claim 1 or 2, characterized in that: 4. When the output voltage of the V CC power supply circuit decreases to a fourth reference value lower than the first reference value,
3. The microcomputer reset device according to claim 1, further comprising second V CC output voltage detection means for outputting a switching signal of said switching means. 5. The microcomputer reset according to claim 1 or 2, further comprising a delay means that is activated in response to the power down trigger and outputs a switching signal for the switching means after a power down processing time has elapsed. Device.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1075058A JPH02254515A (en) | 1989-03-29 | 1989-03-29 | Resetting device for microcomputer |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1075058A JPH02254515A (en) | 1989-03-29 | 1989-03-29 | Resetting device for microcomputer |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH02254515A JPH02254515A (en) | 1990-10-15 |
| JPH0581928B2 true JPH0581928B2 (en) | 1993-11-16 |
Family
ID=13565224
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1075058A Granted JPH02254515A (en) | 1989-03-29 | 1989-03-29 | Resetting device for microcomputer |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH02254515A (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4095778B2 (en) * | 2001-08-24 | 2008-06-04 | 株式会社東芝 | Semiconductor device and power supply voltage control method |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS59187837U (en) * | 1983-05-31 | 1984-12-13 | ソニー株式会社 | Reset device |
| JPH0624900Y2 (en) * | 1984-08-29 | 1994-06-29 | 八重洲無線株式会社 | Memory backup power supply |
-
1989
- 1989-03-29 JP JP1075058A patent/JPH02254515A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPH02254515A (en) | 1990-10-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6144887A (en) | Electronic control unit with reset blocking during loading | |
| US6675305B1 (en) | Power saving in a USB peripheral by providing gated clock signal to CSR block in response to a local interrupt generated when an operation is to be performed | |
| US6393589B1 (en) | Watchdog timer control circuit with permanent and programmable enablement | |
| US20040037156A1 (en) | Semiconductor integrated circuit | |
| JPH08161886A (en) | Storage device | |
| JPH0630541B2 (en) | Operation stop and reset circuit device | |
| JP3097580B2 (en) | Electronic control unit | |
| CN118426991A (en) | Reset signal failure protection method and device, vehicle and storage medium | |
| JP2000172384A (en) | On-vehicle computer and its control method | |
| JPH0460245B2 (en) | ||
| JPH0581928B2 (en) | ||
| CN101194291A (en) | Apparatus with recording device | |
| JPS62258154A (en) | Data back-up device | |
| JPH0532142A (en) | Watchdog timer device for microcomputer system | |
| JP2000276267A (en) | Vehicle electronic control unit | |
| JPH07114401A (en) | RAM backup circuit | |
| JPH04347541A (en) | Power supply circuit for computer | |
| US6148409A (en) | Data transmission system | |
| JP2007028812A (en) | Power supply | |
| JP3859916B2 (en) | Circuit equipment | |
| JP2782784B2 (en) | Microcomputer control device | |
| JPH0236003B2 (en) | ||
| US20030142573A1 (en) | Battery backed memory with low battery voltage trip, disconnect and lockout | |
| JPH0325813B2 (en) | ||
| JPH0443436A (en) | Device with microprocessor |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |