JPH05189078A - System clock selecting circuit - Google Patents
System clock selecting circuitInfo
- Publication number
- JPH05189078A JPH05189078A JP4208042A JP20804292A JPH05189078A JP H05189078 A JPH05189078 A JP H05189078A JP 4208042 A JP4208042 A JP 4208042A JP 20804292 A JP20804292 A JP 20804292A JP H05189078 A JPH05189078 A JP H05189078A
- Authority
- JP
- Japan
- Prior art keywords
- clock
- stop detection
- detection signal
- output
- system clock
- 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
Links
Landscapes
- Hardware Redundancy (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、マイクロコンピュータ
等のようにシステムクロックに同期して動作する回路に
おいて、システムクロックに異常が発生した場合にバッ
クアップ処理等の動作を行なうことを可能にするシステ
ムクロック選択回路に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a system, such as a microcomputer, which operates in synchronism with a system clock and is capable of performing a backup process or the like when an abnormality occurs in the system clock. The present invention relates to a clock selection circuit.
【0002】[0002]
【従来の技術】一般的に、マイクロコンピュータは、発
振回路により生成されたシステムクロックに同期して動
作するようになっている。また、マイクロコンピュータ
は命令を処理する場合に、通常、システムクロックに基
づいて種々のタイミング信号を発生し、このタイミング
信号に基づいて、命令コードのフェッチ、デコード、デ
ータのロード、演算及びデータのストアという処理を順
番に実行する。従って、一般的には、回路が動作してい
る間は常にシステムクロックが供給されていることが必
要である。2. Description of the Related Art Generally, a microcomputer operates in synchronization with a system clock generated by an oscillator circuit. In addition, when processing an instruction, the microcomputer usually generates various timing signals based on the system clock, and fetches and decodes instruction codes, loads data, operates and stores data based on the timing signals. The processing is sequentially executed. Therefore, it is generally necessary that the system clock is always supplied while the circuit is operating.
【0003】なお、CMOS(Complementary Metal Ox
ide Semiconductor )により構成されたCMOSコンピ
ュータでは、内部のデータのバックアップのみを行なう
モード(以下、スタンバイモードという)を備えている
ことが多い。このスタンバイモードにおいては、システ
ムクロックを停止させて命令の実行を停止し、消費電流
を削減する。この場合は、ある特定のタイミングで内部
のシステムクロックを停止するので、マイクロコンピュ
ータは正しくデータのバックアップ処理を実行し、シス
テムクロックの入力を再開すれば、それ以降は正常な命
令処理を実行することができる。CMOS (Complementary Metal Ox)
In many cases, a CMOS computer configured by ide Semiconductor) has a mode in which only internal data is backed up (hereinafter referred to as a standby mode). In this standby mode, the system clock is stopped to stop the execution of instructions and reduce current consumption. In this case, the internal system clock is stopped at a specific timing, so the microcomputer should execute the data backup processing correctly, and if the system clock input is restarted, normal instruction processing should be executed thereafter. You can
【0004】[0004]
【発明が解決しようとする課題】しかしながら、マイク
ロコンピュータでは、前述のスタンバイモードを備えた
コンピュータがスタンバイモードにある場合等を除き、
システムクロックが何らかの原因により突然停止する
と、そのマイクロコンピュータを応用したシステム全体
が動作しなくなる。このため、データ等が失われてしま
い、その後システムクロックが正常な状態に復帰して
も、システムクロック停止前の動作を続行することがで
きない。However, in the microcomputer, except when the computer provided with the standby mode described above is in the standby mode, etc.
If the system clock suddenly stops for some reason, the entire system to which the microcomputer is applied will stop operating. Therefore, even if the system clock is restored to a normal state after the data is lost, the operation before the system clock is stopped cannot be continued.
【0005】即ち、マイクロコンピュータ内部でダイナ
ミック回路(DRAM)が使用されていると、クロック
停止中にデータ等が失われてしまう。また、ダイナミッ
ク回路が使用されていなくても、クロックが停止する直
前はそのパルスの時間的な幅及び電圧レベルが不安定な
状態になり、非同期でクロックが停止するため、一旦ク
ロックが停止した後、再びクロックを供給しても、正常
な動作を期待できない。That is, if a dynamic circuit (DRAM) is used inside the microcomputer, data and the like will be lost while the clock is stopped. Even if the dynamic circuit is not used, the temporal width and voltage level of the pulse become unstable immediately before the clock stops, and the clock stops asynchronously. , Even if the clock is supplied again, normal operation cannot be expected.
【0006】システムクロックの停止を検出するだけで
あれば、例えばウォッチドッグタイマをマイクロコンピ
ュータの外部に設ければよい。即ち、外部のウォッチド
ッグタイマがオーバーフローしないように、マイクロコ
ンピュータから所定の周期以内でタイマをクリアする信
号を出力するようにしておく。そうすると、システムク
ロックが停止したときには、マイクロコンピュータから
タイマのクリア信号が出力されないので、ウォッチドッ
グタイマがオーバーフローする。これにより、システム
クロックの停止又はマイクロコンピュータのプログラム
の暴走を検知することができる。If only the stop of the system clock is detected, for example, a watchdog timer may be provided outside the microcomputer. That is, in order to prevent the external watchdog timer from overflowing, the microcomputer outputs a signal for clearing the timer within a predetermined period. Then, when the system clock stops, the watchdog timer overflows because the timer clear signal is not output from the microcomputer. Thereby, the stop of the system clock or the runaway of the program of the microcomputer can be detected.
【0007】しかし、この場合は、ウォッチドッグタイ
マをマイクロコンピュータ外部に設けることによりシス
テムクロックの停止を検出することはできても、システ
ムクロックそのものが停止しているため、データ等を退
避させるバックアップ処理を実行することができない。However, in this case, although the stop of the system clock can be detected by providing the watchdog timer outside the microcomputer, the system clock itself is stopped, so that the backup processing for saving the data etc. Can not be executed.
【0008】ウォッチドッグタイマの出力を利用して、
システムクロックが停止した場合に他のクロックをシス
テムクロックとして供給し、このクロックによりバック
アップ処理を実行することも考えられるが、ウォッチド
ッグタイマは、タイマのオーバーフローを利用するとい
う構成上、異常検出に対する応答性は遅い。このため、
システムクロックが停止してから他のクロックに切替え
るまでの間にデータ等が失われてしまう。Utilizing the output of the watchdog timer,
If the system clock stops, another clock may be supplied as the system clock and the backup process may be executed by this clock. However, the watchdog timer uses the overflow of the timer to respond to the abnormality detection. The sex is slow. For this reason,
Data and the like will be lost between the time when the system clock is stopped and the time when it is switched to another clock.
【0009】なお、上述のマイクロコンピュータに限ら
ず、システムクロックに同期して動作するLSI(大規
模集積回路)においては、システムクロックが突然停止
すると、システムクロックが正常な状態に復帰しても、
誤動作する虞れがある。Not only the above-mentioned microcomputer but also an LSI (large-scale integrated circuit) which operates in synchronization with the system clock, when the system clock suddenly stops, even if the system clock returns to a normal state,
There is a risk of malfunction.
【0010】本発明はかかる問題点に鑑みてなされたも
のであって、システムクロックに異常が発生した場合に
バックアップ処理等を実行するためのクロックを供給す
ることができるシステムクロック選択回路を提供するこ
とを目的とする。The present invention has been made in view of the above problems, and provides a system clock selection circuit capable of supplying a clock for performing backup processing or the like when an abnormality occurs in the system clock. The purpose is to
【0011】[0011]
【課題を解決するための手段】本発明に係るシステムク
ロック選択回路は、第1のクロックが停止すると停止検
知信号を発生するクロック停止検出部と、前記第1のク
ロック及び第2のクロックを入力し前記クロック停止検
出部から前記停止検知信号が出力されていないときには
前記第1のクロックを出力し前記停止検知信号が出力さ
れると前記第2のクロックを出力するクロック切替回路
とを有することを特徴とする。A system clock selection circuit according to the present invention receives a clock stop detection unit for generating a stop detection signal when a first clock stops, and inputs the first clock and the second clock. A clock switching circuit that outputs the first clock when the stop detection signal is not output from the clock stop detection unit and outputs the second clock when the stop detection signal is output. Characterize.
【0012】[0012]
【作用】本発明においては、第1のクロックが停止する
と、クロック停止検出部が停止検知信号を発生する。ま
た、本発明においては、クロック切替回路に第1及び第
2のクロックが与えられる。このクロック切替回路は、
前記クロック停止検出部から前記停止検知信号が出力さ
れていない場合は前記第1のクロックを出力する。そし
て、前記クロック停止検出部から前記停止検知信号が出
力されると、その出力を前記第1のクロックから前記第
2のクロックに切替える。従って、第1のクロックが何
らかの原因により停止しても、システムには第2のクロ
ックが供給される。これにより、データの退避等のバッ
クアップ処理を実行することが可能になる。In the present invention, when the first clock is stopped, the clock stop detector generates the stop detection signal. Further, in the present invention, the clock switching circuit is supplied with the first and second clocks. This clock switching circuit
When the stop detection signal is not output from the clock stop detection unit, the first clock is output. When the stop detection signal is output from the clock stop detection unit, the output is switched from the first clock to the second clock. Therefore, even if the first clock is stopped for some reason, the second clock is supplied to the system. This makes it possible to execute a backup process such as saving data.
【0013】なお、第1のクロックが停止した場合にデ
ータの退避等の動作を行なうためには、例えばマイクロ
コンピュータに割込み要求信号を出力し、割込み処理に
よってデータ退避等を即時実行することが好ましい。こ
のため、前記停止検知信号に応じて割込み要求信号を発
生する割込み要求発生部を備えていることが好ましい。In order to perform operations such as saving data when the first clock is stopped, it is preferable to output an interrupt request signal to, for example, a microcomputer and immediately execute saving data by interrupt processing. .. Therefore, it is preferable to include an interrupt request generation unit that generates an interrupt request signal according to the stop detection signal.
【0014】[0014]
【実施例】次に、本発明の実施例について添付の図面を
参照して説明する。Embodiments of the present invention will now be described with reference to the accompanying drawings.
【0015】図1は本発明の第1の実施例に係るシステ
ムクロック選択回路を示す回路図である。FIG. 1 is a circuit diagram showing a system clock selection circuit according to the first embodiment of the present invention.
【0016】クロック停止検出部5は第1のクロック3
が停止した場合にクロック停止信号14として“1”を
出力し、第1のクロック3が正常な場合は“0”を出力
する。マルチプレクサ2は、第1のクロック3及び第2
のクロック4を入力し、クロック停止検出部5の出力に
基づいていずれか一方をシステムクロック1として出力
する。即ち、マルチプレクサ2は、クロック停止検出信
号14が“0”のときには第1のクロック3を出力し、
クロック停止検出信号14が“1”のときには、第2の
クロック4を出力する。The clock stop detection unit 5 uses the first clock 3
When the first clock 3 is stopped, "1" is output as the clock stop signal 14, and when the first clock 3 is normal, "0" is output. The multiplexer 2 has a first clock 3 and a second clock 3.
The clock 4 is input, and one of them is output as the system clock 1 based on the output of the clock stop detection unit 5. That is, the multiplexer 2 outputs the first clock 3 when the clock stop detection signal 14 is “0”,
When the clock stop detection signal 14 is "1", the second clock 4 is output.
【0017】また、ワンショットマルチバイブレータ1
5は、クロック停止検出信号14が“0”から“1”に
変化するとワンショットパルスを発生する。このワンシ
ョットパルスは、ORゲート15aを介してシステムリ
セット信号16として出力される。なお、リセット信号
17も、このORゲート15aを介してシステム内の各
回路にシステムリセット信号16として供給される。Further, the one-shot multivibrator 1
No. 5 generates a one-shot pulse when the clock stop detection signal 14 changes from "0" to "1". This one-shot pulse is output as the system reset signal 16 via the OR gate 15a. The reset signal 17 is also supplied as a system reset signal 16 to each circuit in the system via the OR gate 15a.
【0018】クロック停止検出部5は、抵抗6,7と、
コンデンサ8,9と、Nチャネルトランジスタ10,1
1と、インバータ12と、ORゲート13とにより構成
されている。即ち、抵抗6及びコンデンサ8は電源と接
地との間に直列接続されており、トランジスタ10はコ
ンデンサ8に並列に接続されている。そして、トランジ
スタ10のゲートには第1のクロック3が与えられる。
また、抵抗6、コンデンサ8及びトランジスタ10の相
互接続点Aは、ORゲート13の一方の入力端に接続さ
れている。The clock stop detector 5 includes resistors 6 and 7,
Capacitors 8 and 9 and N-channel transistors 10 and 1
1, an inverter 12, and an OR gate 13. That is, the resistor 6 and the capacitor 8 are connected in series between the power supply and the ground, and the transistor 10 is connected in parallel with the capacitor 8. Then, the first clock 3 is applied to the gate of the transistor 10.
The interconnection point A of the resistor 6, the capacitor 8 and the transistor 10 is connected to one input end of the OR gate 13.
【0019】これと同様に、抵抗7及びコンデンサ9も
電源と接地との間に直列に接続されており、トランジス
タ11はコンデンサ9に並列に接続されている。そし
て、トランジスタ11のゲートには、第1のクロック3
がインバータ12により反転されて与えられるようにな
っている。また、抵抗7、コンデンサ9及びトランジス
タ11の相互接続点BはORゲート13の他方の入力端
に接続されている。クロック停止検出信号14は、この
ORゲート13の出力である。Similarly, the resistor 7 and the capacitor 9 are also connected in series between the power source and the ground, and the transistor 11 is connected in parallel to the capacitor 9. The gate of the transistor 11 has the first clock 3
Are inverted and provided by the inverter 12. The interconnection point B of the resistor 7, capacitor 9 and transistor 11 is connected to the other input terminal of the OR gate 13. The clock stop detection signal 14 is the output of the OR gate 13.
【0020】次に、クロック停止検出部5の動作を説明
する。Next, the operation of the clock stop detector 5 will be described.
【0021】コンデンサ8は抵抗6を介して充電され、
接続点Aの電圧がORゲート13の論理スレショルド電
圧を超えると、ORゲート13の出力であるクロック停
止検出信号14が“1”になる。しかし、第1のクロッ
ク3が正常な場合は、接続点Aの電圧がORゲート13
の論理スレショルド電圧を超える前に、第1のクロック
3が“1”になり、Nチャネルトランジスタ10がオン
状態になって、コンデンサ8の電荷が放電されて接続点
Aの電圧が低下する。The capacitor 8 is charged via the resistor 6,
When the voltage at the connection point A exceeds the logic threshold voltage of the OR gate 13, the clock stop detection signal 14 which is the output of the OR gate 13 becomes "1". However, when the first clock 3 is normal, the voltage at the connection point A is OR gate 13
Before the logic threshold voltage of 1 is exceeded, the first clock 3 becomes "1", the N-channel transistor 10 is turned on, the charge of the capacitor 8 is discharged, and the voltage of the connection point A decreases.
【0022】コンデンサ9、抵抗7及びNチャネルトラ
ンジスタ11により構成された回路ついても、これと同
様に、第1のクロック3が正常な場合は、接続点Bの電
圧がORゲート13の論理スレショルド電圧を超える前
にNチャネルトランジスタ11がオン状態になり、接続
点Bの電圧が低下する。但し、第1のクロック3はイン
バータ12を介してNチャネルトランジスタ11のゲー
トに加えられるので、第1のクロック3が“0”のとき
に、コンデンサ9の電荷が放電される。Similarly to the circuit formed by the capacitor 9, the resistor 7 and the N-channel transistor 11, when the first clock 3 is normal, the voltage at the connection point B is the logic threshold voltage of the OR gate 13. Before exceeding N, the N-channel transistor 11 is turned on, and the voltage at the connection point B decreases. However, since the first clock 3 is applied to the gate of the N-channel transistor 11 via the inverter 12, the charge of the capacitor 9 is discharged when the first clock 3 is "0".
【0023】従って、第1のクロック3が“0”又は
“1”のいずれの状態で停止しても、接続点A又は接続
点Bのいずれか一方の電圧がORゲート13の論理スレ
ショルド電圧を超え、クロック停止検出信号14が
“1”になる。Therefore, even when the first clock 3 is stopped in either "0" or "1" state, the voltage at either the connection point A or the connection point B becomes the logic threshold voltage of the OR gate 13. And the clock stop detection signal 14 becomes "1".
【0024】図2は本実施例回路の動作を示すタイミン
グチャート図である。FIG. 2 is a timing chart showing the operation of the circuit of this embodiment.
【0025】第1のクロック3が“1”になるタイミン
グ(T1,T3,T5)でコンデンサ8の電荷は放電さ
れ、接続点Aの電圧は0Vになる。しかし、第1のクロ
ック3が停止すると(T6)、接続点Aの電圧は上昇を
続ける。そして、この接続点Aの電圧がORゲート13
の論理スレショルド電圧を超えるタイミング(T7)
で、クロック停止検出信号14が“1”になり、システ
ムクロック1が第1のクロック3から第2のクロック4
に切替わる。At the timing (T1, T3, T5) when the first clock 3 becomes "1", the electric charge of the capacitor 8 is discharged and the voltage at the connection point A becomes 0V. However, when the first clock 3 is stopped (T6), the voltage at the connection point A continues to rise. The voltage at the connection point A is the OR gate 13.
Timing of exceeding the logic threshold voltage of (T7)
Then, the clock stop detection signal 14 becomes "1", and the system clock 1 changes from the first clock 3 to the second clock 4
Switch to.
【0026】クロックの切替わり時にシステムリセット
信号16が出力されるが、これはクロックの停止(T
6)からクロックの切替え(T7)までが長い場合や、
第1のクロック3が停止するまでに不安定なクロックが
発生した場合にプログラムが暴走することを回避するた
めのものである。The system reset signal 16 is output when the clock is switched, but this is the stop of the clock (T
If the time from 6) to clock switching (T7) is long,
This is to prevent the program from running away when an unstable clock is generated before the first clock 3 stops.
【0027】本実施例においては、システムクロック1
としての第1のクロック3が何らかの原因により突然停
止しても、クロック停止検出部5がこれを検出し、その
出力に基づいてマルチプレクサ2が第2のクロック4を
システムクロック1として出力するため、バックアップ
処理等を実行することができる。また、クロック停止検
出信号14を利用して、異常の発生を外部に知らせるこ
ともできる。In this embodiment, the system clock 1
Even if the first clock 3 is suddenly stopped for some reason, the clock stop detection unit 5 detects this and the multiplexer 2 outputs the second clock 4 as the system clock 1 based on the output, Backup processing and the like can be executed. Further, the clock stop detection signal 14 can be used to notify the occurrence of an abnormality to the outside.
【0028】図3は本発明の第2の実施例に係るシステ
ムクロック選択回路を示す回路図である。FIG. 3 is a circuit diagram showing a system clock selection circuit according to the second embodiment of the present invention.
【0029】本実施例が第1の実施例と異なる点はクロ
ック停止検出部の構成が異なることにあり、その他の構
成は基本的には第1の実施例と同様であるので、第3図
において第1図と同一物には同一符号を付してその詳し
い説明は省略する。The present embodiment is different from the first embodiment in that the configuration of the clock stop detection unit is different, and the other configurations are basically the same as those in the first embodiment. In FIG. 1, the same parts as those in FIG. 1 are designated by the same reference numerals, and detailed description thereof will be omitted.
【0030】クロック停止検出部5aはD−フリップフ
ロップ回路(以下、D−F/Fという)18,19,2
0,21と、ORゲート13a,22,23とにより構
成されている。D−F/F18,20は第2のクロック
4をカウントする1ビットカウンタで、キャリーが発生
するとD−F/F19,21のQ出力が“1”になり、
クロック停止検出信号14が“1”になる。また、D−
F/F18,20は、第1のクロック3によりクリアさ
れるようになっている。The clock stop detector 5a is a D-flip-flop circuit (hereinafter referred to as D-F / F) 18, 19, 2.
0, 21 and OR gates 13a, 22 and 23. The D-F / Fs 18 and 20 are 1-bit counters that count the second clock 4, and when a carry occurs, the Q output of the D-F / Fs 19 and 21 becomes "1".
The clock stop detection signal 14 becomes "1". Also, D-
The F / Fs 18 and 20 are adapted to be cleared by the first clock 3.
【0031】従って、第2のクロック4をD−F/F1
8,19がカウントし、キャリーが発生するまでの間に
第1のクロック3が入力されるとクロック停止検出信号
14は“0”を維持する。Therefore, the second clock 4 is set to DF / F1.
When the first clock 3 is input by the time 8 and 19 count and carry occurs, the clock stop detection signal 14 maintains "0".
【0032】第1のクロック3が“0”で停止するとす
ると、D−F/F18がクリアされず、“1”で停止す
るとD−F/F20がクリアされないので、いずれにし
てもクロックの停止が検出され、クロック停止検出信号
14が“1”になる。If the first clock 3 is stopped at "0", the DF / F18 is not cleared, and if stopped at "1", the DF / F20 is not cleared. Is detected and the clock stop detection signal 14 becomes "1".
【0033】図4は本実施例回路の動作を示すタイミン
グチャート図である。FIG. 4 is a timing chart showing the operation of the circuit of this embodiment.
【0034】第2のクロック4が立上がるタイミング
(T1,T3,T6,T7)でD−F/F18で構成さ
れる1ビットのカウンタがカウントアップする。第1の
クロック3が正常なときは第1のクロック3が立上がる
タイミング(T2,T4)でD−F/F18はクリアさ
れる。ところが、第1のクロック3が停止(タイミング
T5)すると、D−F/F18はクリアされないため、
タイミングT7でキャリーが発生し、クロック停止検出
信号14が“1”になる。これにより、第1の実施例と
同様に、マルチプレクサ2は、システムクロック1とし
て第2のクロック4を出力する。また、同時に、システ
ムリセット信号16が出力される。At the timing (T1, T3, T6, T7) when the second clock 4 rises, the 1-bit counter composed of the DF / F 18 counts up. When the first clock 3 is normal, the D-F / F 18 is cleared at the timing (T2, T4) when the first clock 3 rises. However, when the first clock 3 is stopped (timing T5), the DF / F18 is not cleared,
A carry occurs at timing T7 and the clock stop detection signal 14 becomes "1". As a result, the multiplexer 2 outputs the second clock 4 as the system clock 1 as in the first embodiment. At the same time, the system reset signal 16 is output.
【0035】本実施例においても、第1の実施例と同様
の効果を得ることができる。Also in this embodiment, the same effect as that of the first embodiment can be obtained.
【0036】図5は本発明の第3の実施例に係るシステ
ムクロック選択回路を示す回路図である。FIG. 5 is a circuit diagram showing a system clock selection circuit according to the third embodiment of the present invention.
【0037】本実施例が第1の実施例と異なる点はクロ
ック停止検出部5の出力が割込み要求発生部としてのR
S−フリップフロップ回路(以下、RS−F/Fとい
う)33にも与えられることにあり、その他の構成は基
本的には第1の実施例と同様であるので、第5図におい
て第1図と同一物には同一符号を付してその詳しい説明
は省略する。The present embodiment is different from the first embodiment in that the output of the clock stop detector 5 is R as an interrupt request generator.
Since it is also applied to the S-flip-flop circuit (hereinafter referred to as RS-F / F) 33, and the other configuration is basically the same as that of the first embodiment, FIG. The same reference numerals are given to the same components, and detailed description thereof will be omitted.
【0038】クロック停止検出部5から出力されたクロ
ック停止検出信号は、ワンショットマルチバイブレータ
31、RS−F/F33及びマルチプレクサ2に与えら
れる。The clock stop detection signal output from the clock stop detector 5 is applied to the one-shot multivibrator 31, RS-F / F 33 and multiplexer 2.
【0039】マルチプレクサ2は、クロック停止検出信
号14が“0”のときには第1のクロック3をシステム
クロック1として出力し、クロック停止検出信号14が
“1”のときには第2のクロック4をシステムクロック
1として出力する。The multiplexer 2 outputs the first clock 3 as the system clock 1 when the clock stop detection signal 14 is "0", and outputs the second clock 4 when the clock stop detection signal 14 is "1". Output as 1.
【0040】また、クロック停止検出信号14が“1”
になると、RS−F/F33が“1”にセットされ、割
込み要求信号34が発生して、マイクロコンピュータに
出力される。この割込み要求信号34は、マイクロコン
ピュータから与えられる割込み受付信号35が“1”に
なると、“0”にリセットされる。The clock stop detection signal 14 is "1".
Then, the RS-F / F 33 is set to "1", and the interrupt request signal 34 is generated and output to the microcomputer. The interrupt request signal 34 is reset to "0" when the interrupt acceptance signal 35 given from the microcomputer becomes "1".
【0041】更に、クロック停止検出信号14が“1”
になると、ワンショットマルチバイブレータ31からハ
ードウェアリセット信号32が出力される。Further, the clock stop detection signal 14 is "1".
Then, the one-shot multivibrator 31 outputs the hardware reset signal 32.
【0042】図6は本実施例回路の動作を示すタイミン
グチャート図である。FIG. 6 is a timing chart showing the operation of the circuit of this embodiment.
【0043】第1のクロック3が“1”になるタイミン
グ(T1,T3,T5)でコンデンサ8の電荷は放電さ
れ、接続点Aの電圧は0Vになる。しかし、第1のクロ
ック3が停止すると(T6)、接続点Aの電圧は上昇を
続ける。そして、この接続点Aの電圧がORゲート13
の論理スレショルド電圧を超えるタイミング(T7)
で、クロック停止検出信号14が“1”になり、システ
ムクロック1が第1のクロック3から第2のクロック4
に切替わる。At the timing (T1, T3, T5) when the first clock 3 becomes "1", the electric charge of the capacitor 8 is discharged and the voltage at the connection point A becomes 0V. However, when the first clock 3 is stopped (T6), the voltage at the connection point A continues to rise. The voltage at the connection point A is the OR gate 13.
Timing of exceeding the logic threshold voltage of (T7)
Then, the clock stop detection signal 14 becomes "1", and the system clock 1 changes from the first clock 3 to the second clock 4
Switch to.
【0044】これと同時に、RS−F/F33が“1”
にセットされて割込み要求信号34が発生すると共に、
ワンショットマルチバイブレータ31からハードウェア
リセット信号32が出力される。マイクロコンピュータ
は、割込み要求信号34を入力すると、所定の割込み処
理を実行し、例えばデータを退避させる。なお、クロッ
クの停止(T6)からクロックの切替え(T7)までが
長い場合や、第1のクロック3が停止するまでに不安定
なクロックが発生した場合に、マイクロコンピュータの
内部回路が異常状態になって、正常に割込み処理を実行
できない可能性があるので、ハードウェアリセット信号
32は回路を初期化するために使用される。At the same time, RS-F / F33 becomes "1".
And an interrupt request signal 34 is generated,
A hardware reset signal 32 is output from the one-shot multivibrator 31. When the interrupt request signal 34 is input, the microcomputer executes a predetermined interrupt process and saves data, for example. If the clock stop (T6) to the clock switch (T7) is long, or if an unstable clock occurs before the first clock 3 stops, the internal circuit of the microcomputer becomes abnormal. Therefore, the hardware reset signal 32 is used for initializing the circuit because the interrupt processing may not be normally executed.
【0045】本実施例においては、RS−F/F33に
より割込み要求信号を発生し、この割込み要求信号をマ
イクロコンピュータに出力する。このため、データの退
避等の処理を割込み処理として即時実行することができ
る。In this embodiment, the RS-F / F 33 generates an interrupt request signal and outputs the interrupt request signal to the microcomputer. Therefore, processing such as data saving can be immediately executed as interrupt processing.
【0046】図7は本発明の第4の実施例に係るシステ
ムクロック選択回路を示す回路図である。FIG. 7 is a circuit diagram showing a system clock selection circuit according to the fourth embodiment of the present invention.
【0047】本実施例が第3の実施例と異なる点はクロ
ック停止検出部5aの構成が異なることにあり、その他
の構成は基本的には第3の実施例と同様であるので、第
7図において第5図と同一物には同一符号を付してその
詳しい説明は省略する。The seventh embodiment is different from the third embodiment in that the clock stop detector 5a has a different configuration, and the other configurations are basically the same as those in the third embodiment. In the figure, the same parts as those in FIG. 5 are designated by the same reference numerals, and detailed description thereof will be omitted.
【0048】クロック停止検出部5aは、D−F/F1
8,19,20,21と、インバータ12と、ORゲー
ト13aとにより構成されている。D−F/F18,2
0は第2のクロック4をカウントする1ビットのカウン
タで、キャリーが発生するとD−F/F19,21のQ
出力が“1”になり、クロック停止検出信号14が
“1”になる。また、D−F/F18〜21は、第1の
クロック3によりクリアされる。The clock stop detection unit 5a has a D-F / F1
It is composed of 8, 19, 20, and 21, an inverter 12, and an OR gate 13a. DF / F18, 2
0 is a 1-bit counter that counts the second clock 4, and when a carry occurs, Q of DF / F 19, 21
The output becomes "1" and the clock stop detection signal 14 becomes "1". The D-F / Fs 18 to 21 are cleared by the first clock 3.
【0049】従って、第2のクロック4をD−F/F1
8,20がカウントし、キャリーが発生するまでの間に
第1のクロック3が入力されると、クロック停止検出信
号14は“0”を維持する。Therefore, the second clock 4 is set to D-F / F1.
If the first clock 3 is input by the time 8 and 20 count and the carry occurs, the clock stop detection signal 14 maintains "0".
【0050】第1のクロック3が“0”で停止すると、
D−F/F18がクリアされず、第1のクロック3が
“1”で停止するとD−F/F20がクリアされないの
で、いずれにしてもキャリーが発生して、クロックの停
止が検出され、クロック停止信号14が“1”になる。When the first clock 3 stops at "0",
If the D-F / F 18 is not cleared and the first clock 3 is stopped at "1", the D-F / F 20 is not cleared. In any case, a carry occurs, the stop of the clock is detected, and the clock is detected. The stop signal 14 becomes "1".
【0051】図8は本実施例回路の動作を示すタイミン
グチャート図である。FIG. 8 is a timing chart showing the operation of the circuit of this embodiment.
【0052】第2のクロック4が立上がるタイミング
(T1,T3,T6,T7)でD−F/F18で構成さ
れる1ビットのカウンタがカウントアップする。第1の
クロック3が正常なときは、第1のクロック3が立上が
るタイミング(T2,T4)でD−F/F18はクリア
される。ところが、タイミングT6で第1のクロック3
が停止すると、D−F/F18はクリアされないため、
タイミングT7でキャリーが発生し、クロック停止信号
14が“1”になる。これにより、システムクロック1
が第1のクロック3から第2のクロック4に切替わる。At the timing (T1, T3, T6, T7) when the second clock 4 rises, the 1-bit counter composed of the DF / F 18 counts up. When the first clock 3 is normal, the D-F / F 18 is cleared at the timing (T2, T4) when the first clock 3 rises. However, at timing T6, the first clock 3
When is stopped, DF / F18 is not cleared, so
A carry occurs at timing T7 and the clock stop signal 14 becomes "1". This allows the system clock 1
Switches from the first clock 3 to the second clock 4.
【0053】これと同時に、RS−F/F33が“1”
にセットされて割込み要求信号34が発生すると共に、
ワンショットマルチバイブレータ33からハードウェア
リセット信号34が出力される。At the same time, RS-F / F33 becomes "1".
And an interrupt request signal 34 is generated,
A hardware reset signal 34 is output from the one-shot multivibrator 33.
【0054】本実施例においても、第3の実施例と同様
の効果を得ることができる。Also in this embodiment, the same effect as that of the third embodiment can be obtained.
【0055】[0055]
【発明の効果】以上説明したように本発明によれば、ク
ロック切替回路は第1のクロックが正常な場合は第1の
クロックを出力し、クロック停止検出部が第1のクロッ
クの異常を検出すると第2のクロックを出力するから、
マイクロコンピュータ等のシステムにおいて、システム
クロックに異常が発生してもデータの退避処理等のバッ
クアップ処理を実行することができる。これにより、正
常な状態に復帰したときの動作を保証することができる
ようになり、システムの信頼性を向上させることができ
るという効果を奏する。As described above, according to the present invention, the clock switching circuit outputs the first clock when the first clock is normal, and the clock stop detector detects the abnormality of the first clock. Then, because the second clock is output,
In a system such as a microcomputer, a backup process such as a data saving process can be executed even if an abnormality occurs in the system clock. As a result, it is possible to guarantee the operation when returning to the normal state, and it is possible to improve the reliability of the system.
【図1】本発明の第1の実施例に係るシステムクロック
選択回路を示す回路図である。FIG. 1 is a circuit diagram showing a system clock selection circuit according to a first embodiment of the present invention.
【図2】同じくその動作を示すタイミングチャート図で
ある。FIG. 2 is a timing chart diagram showing the same operation.
【図3】本発明の第2の実施例に係るシステムクロック
選択回路を示す回路図である。FIG. 3 is a circuit diagram showing a system clock selection circuit according to a second embodiment of the present invention.
【図4】同じくその動作を示すタイミングチャート図で
ある。FIG. 4 is a timing chart showing the operation of the same.
【図5】本発明の第3の実施例に係るシステムクロック
選択回路を示す回路図である。FIG. 5 is a circuit diagram showing a system clock selection circuit according to a third embodiment of the present invention.
【図6】同じくその動作を示すタイミングチャート図で
ある。FIG. 6 is a timing chart showing the same operation.
【図7】本発明の第4の実施例に係るシステムクロック
選択回路を示す回路図である。FIG. 7 is a circuit diagram showing a system clock selection circuit according to a fourth embodiment of the present invention.
【図8】同じくその動作を示すタイミングチャート図で
ある。FIG. 8 is a timing chart diagram showing the same operation.
2;マルチプレクサ 5,5a;クロック停止検出部 6,7;抵抗 8,9;コンデンサ 10,11;トランジスタ 12;インバータ 13,13a,15a,22,23;ORゲート 15,31;ワンショットマルチバイブレータ 18〜21;D−F/F 33;RS−F/F 2; Multiplexer 5, 5a; Clock stop detecting unit 6, 7; Resistor 8, 9; Capacitor 10, 11; Transistor 12; Inverter 13, 13a, 15a, 22, 23; OR gate 15, 31; One-shot multivibrator 18 ~ 21; D-F / F 33; RS-F / F
Claims (2)
号を発生するクロック停止検出部と、前記第1のクロッ
ク及び第2のクロックを入力し前記クロック停止検出部
から前記停止検知信号が出力されていないときには前記
第1のクロックを出力し前記停止検知信号が出力される
と前記第2のクロックを出力するクロック切替回路とを
有することを特徴とするシステムクロック選択回路。1. A clock stop detection unit that generates a stop detection signal when a first clock stops, and the clock stop detection unit outputs the stop detection signal by inputting the first clock and the second clock. And a clock switching circuit which outputs the first clock when the stop detection signal is output and outputs the second clock when the stop detection signal is output.
号を発生する割込み要求発生部を有することを特徴とす
る請求項1に記載のシステムクロック選択回路。2. The system clock selection circuit according to claim 1, further comprising an interrupt request generator that generates an interrupt request signal in response to the stop detection signal.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP04208042A JP3080785B2 (en) | 1991-08-23 | 1992-08-04 | System clock selection circuit |
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP23735991 | 1991-08-23 | ||
| JP3-237359 | 1991-08-23 | ||
| JP04208042A JP3080785B2 (en) | 1991-08-23 | 1992-08-04 | System clock selection circuit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH05189078A true JPH05189078A (en) | 1993-07-30 |
| JP3080785B2 JP3080785B2 (en) | 2000-08-28 |
Family
ID=26516607
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP04208042A Expired - Fee Related JP3080785B2 (en) | 1991-08-23 | 1992-08-04 | System clock selection circuit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3080785B2 (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2003022144A (en) * | 2001-07-09 | 2003-01-24 | Mitsubishi Electric Corp | Microcomputer oscillation switching circuit |
| US6597204B2 (en) | 2000-11-10 | 2003-07-22 | Nec Corporation | Clock interruption detection circuit |
| JP2012231224A (en) * | 2011-04-25 | 2012-11-22 | Yamaha Corp | Detection circuit for detecting damage to semiconductor element |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS534823U (en) * | 1976-06-30 | 1978-01-17 | ||
| JPH0248836A (en) * | 1988-08-10 | 1990-02-19 | Fujitsu Ltd | Clock switching circuit |
| JPH0443436A (en) * | 1990-06-08 | 1992-02-13 | Fujitsu Ltd | Device with microprocessor |
-
1992
- 1992-08-04 JP JP04208042A patent/JP3080785B2/en not_active Expired - Fee Related
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS534823U (en) * | 1976-06-30 | 1978-01-17 | ||
| JPH0248836A (en) * | 1988-08-10 | 1990-02-19 | Fujitsu Ltd | Clock switching circuit |
| JPH0443436A (en) * | 1990-06-08 | 1992-02-13 | Fujitsu Ltd | Device with microprocessor |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6597204B2 (en) | 2000-11-10 | 2003-07-22 | Nec Corporation | Clock interruption detection circuit |
| JP2003022144A (en) * | 2001-07-09 | 2003-01-24 | Mitsubishi Electric Corp | Microcomputer oscillation switching circuit |
| JP2012231224A (en) * | 2011-04-25 | 2012-11-22 | Yamaha Corp | Detection circuit for detecting damage to semiconductor element |
Also Published As
| Publication number | Publication date |
|---|---|
| JP3080785B2 (en) | 2000-08-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5237699A (en) | Nonvolatile microprocessor with predetermined state on power-down | |
| CA2210024C (en) | Method and apparatus for power supply switching with logic integrity protection | |
| US5842028A (en) | Method for waking up an integrated circuit from low power mode | |
| US5657483A (en) | Computer system with power management feature for stopping the internal clock of a microprocessor | |
| JP2696511B2 (en) | Return method from power down mode | |
| JP4151566B2 (en) | Microcomputer | |
| KR20030024619A (en) | Clock monitoring apparatus | |
| JPH0450629B2 (en) | ||
| US6272630B1 (en) | Method and device for reserving wake-up functions of computer system after power loss | |
| US6321289B1 (en) | Apparatus for automatically notifying operating system level applications of the occurrence of system management events | |
| US6463492B1 (en) | Technique to automatically notify an operating system level application of a system management event | |
| CN105320028A (en) | Load control backup signal generating circuit | |
| JP3080785B2 (en) | System clock selection circuit | |
| US7952401B2 (en) | Standby control circuit and method | |
| CN116009678B (en) | A clock switching method and switching circuit | |
| JPH08339308A (en) | Digital processor | |
| JPS61262827A (en) | Semiconductor integrated circuit device | |
| JPH11259340A (en) | Reactivation control circuit for computer | |
| JPS5971525A (en) | State controller | |
| JP4463115B2 (en) | Semiconductor device | |
| KR20070012351A (en) | Electronic circuit device and method for bringing the electronic circuit device into a predetermined state | |
| JP4394622B2 (en) | Automatic recovery circuit and automatic recovery method | |
| JPH0756774A (en) | Watching timer | |
| CN114696809B (en) | Signal generating circuit and operating system | |
| JPH11316615A (en) | Power noise preventing circuit for mcu |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 19980930 |
|
| LAPS | Cancellation because of no payment of annual fees |