JPH03148731A - Single chip microcomputer - Google Patents

Single chip microcomputer

Info

Publication number
JPH03148731A
JPH03148731A JP1289008A JP28900889A JPH03148731A JP H03148731 A JPH03148731 A JP H03148731A JP 1289008 A JP1289008 A JP 1289008A JP 28900889 A JP28900889 A JP 28900889A JP H03148731 A JPH03148731 A JP H03148731A
Authority
JP
Japan
Prior art keywords
instruction
stop
chip microcomputer
watchdog timer
cpu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP1289008A
Other languages
Japanese (ja)
Inventor
Shinichi Hirose
進一 廣瀬
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP1289008A priority Critical patent/JPH03148731A/en
Publication of JPH03148731A publication Critical patent/JPH03148731A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To decrease malfunction to suddenly stop source oscillation by providing a means to select whether an instruction procedure to stop the source oscillation is made valid or invalid. CONSTITUTION:A flip-flop 10 holds setting whether a stop instruction to stop the oscillator of a clock generation part 3 and to stop a clock is made valid or invalid. In the case of an operation to use the STOP instruction, just after a single chip microcomputer 1 is reset, the first instruction to be executed by a CPU 4 is defined as an instruction for making the STOP instruction valid. When the STOP instruction is turned to an invalid state after resetting the single chip microcomputer 1, the clock is not stopped even in case the CPU 4 fetches the STOP instruction by the run away, etc., of the CPU 4. Thus, it can be decreased that the source oscillation is suddenly stopped by the malfunction, etc., and a normal operation can not be recovered.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明はシングルチップマイクロコンピュータに関す
るものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] This invention relates to a single-chip microcomputer.

〔従来の技術J 第6図は従来のシングルチップマイクロコンピュータの
ブロック図であり、図において、(1)はシングルチッ
プマイクロコンピュータ、(8aはバス、■はクロック
発生部、(滲はCP U 、 (6)はROM。
[Prior Art J] Figure 6 is a block diagram of a conventional single-chip microcomputer. (6) is ROM.

<6)LtRAM、cnはつtyチド7グタイマ、(8
)はウォッチドッグタイマ■を有効にするか無効にする
かの設定を保持するフリップフロツブ、(9)は外部割
込み入力端子である。
<6) LtRAM, cn data 7g timer, (8
) is a flip-flop that holds the setting for enabling or disabling the watchdog timer (2), and (9) is an external interrupt input terminal.

次に動作について説明する。Next, the operation will be explained.

シングルチップマイクロコンピュータ(1)はリセント
後、CP U (4)がROM(ωからプログラムを読
み出し逐次実行して行く、この際、シングルチップマイ
クロコンピュータ(1)内部の各動作は、クロッり発生
部(3)で作成されるクロック信号に同期して進行して
行く、なお、クロック発生部(3)は共振子を用いた発
振器を中心に構成されている。CPU(4)はクロフク
発生部(3)の発振器を停止させるための命令(STO
P) 、ウォッチドッグタイマ(りを有効にする命令(
VDT−E) 、ウォッチドッグタイマ(ηを無効にす
る命令(VDT−D) 、ウォッチドッグタイマ(7)
にタイマクリアを指示する命令(W−DT−CLR)を
持っている。
After resetting the single-chip microcomputer (1), the CPU (4) reads programs from the ROM (ω) and executes them sequentially. At this time, each operation inside the single-chip microcomputer (1) is controlled by the clock generator Note that the clock generator (3) is mainly composed of an oscillator using a resonator.The CPU (4) runs in synchronization with the clock signal generated in step (3). 3) Command to stop the oscillator (STO
P), an instruction to enable the watchdog timer (
VDT-E), watchdog timer (instruction to disable η (VDT-D), watchdog timer (7)
has an instruction (W-DT-CLR) to instruct timer clear.

ウォッチドッグタイマを用いたシングルチップマイクロ
コンピュータの場合、リセット後、CPU (4)はW
DT−Hの命令を行ない、フリツブフロップ(81の設
定をウォッチドッグタイマ(?)有効とする。ウォッチ
ドッグタイマ(刀はクロフク発生部(3)から供給され
るクロックをカウントし、そのカウント値がある値に達
すると、システムを異常と見做し、シングルチップマイ
クロコンピュータ(1)のリセントを行なう、従って、
プログラム内の適当な各箇所にVDT−CLR命令を配
置してお(事により、ウォッチドッグタイマ(ηがシン
グルチップマイクロコンピュータ(1)のリセットを行
なう前に、ウォッチドッグタイマ(7)のタイマクリア
を行ない、カウント値を初期値に戻してやるようにすれ
ば、シングルチップマイクロコンピュータ(1)はリセ
ントがかかることなく、必要な処理を実行することがで
きる。なお、実行中に誤動作を生じ、ウォッチドッグタ
イマ(1のカウント値が所定の値になる前にVDT−C
LR命令が行なわれなかった場合、ウォッチドッグタイ
マ(7)はシングルチップマイクロコンピュータ(1)
のリセットを行なう。
In the case of a single-chip microcomputer that uses a watchdog timer, after reset, the CPU (4)
Execute the DT-H command and enable the watchdog timer (?) by setting the flipflop (81). When a certain value is reached, the system is considered abnormal and the single-chip microcomputer (1) is re-centered.
Place VDT-CLR instructions at appropriate locations in the program (by clearing the watchdog timer (7) before the watchdog timer (η) resets the single-chip microcomputer (1)). If the count value is returned to the initial value by performing Dog timer (VDT-C before the count value of 1 reaches the specified value)
If the LR instruction is not executed, the watchdog timer (7) is activated by the single-chip microcomputer (1).
Perform a reset.

そして、初めから実行をやり直す。Then restart the execution from the beginning.

また、STOP命令を使用する場合はSTOP命令実行
後、外部割込み入力端子(9)に割込要求信号が到着し
てクロフク発生部(3)の発振器の発振が再開し、クロ
ックの供給が再開されるまで、ウォッチドッグタイマ(
7)のカウント動作は停止する。
In addition, when using the STOP instruction, after the STOP instruction is executed, an interrupt request signal arrives at the external interrupt input terminal (9), and the oscillator of the clock generator (3) resumes oscillation, and the clock supply is resumed. watchdog timer (
The counting operation in 7) is stopped.

なお、ウォッチドッグタイマI″I)の機能を使用しな
いワンチップマイクロコンピュータの場合WDT−Dの
命令を行なっておけば良い。
Note that in the case of a one-chip microcomputer that does not use the function of the watchdog timer I''I), the WDT-D instruction may be executed in advance.

〔発明が解決しようとする!I!If)従来のシングル
チップマイクロコンピュータは以上のように構成されて
いたので、外来雑音その他の理由により、ウォッチドッ
グタイマの有効/無効の設定を保持するフリップフロッ
プの内容が書き換わって無効になったり、応用上、ST
OP命令を1度も使わないにもかかわらず、誤動作によ
りSTOP命令を実行してしまうとウォッチドッグタイ
マも停止してしきい、正常動作に復帰できないなどの問
題点があった。
[Invention tries to solve it! I! If) Conventional single-chip microcomputers were configured as described above, so the contents of the flip-flop that holds the enable/disable setting of the watchdog timer may be rewritten and become invalid due to external noise or other reasons. ,In application, ST
Even though the OP instruction is never used, if the STOP instruction is executed due to a malfunction, the watchdog timer also stops and cannot return to normal operation.

この発明は上記のような問題点を解消するためになされ
たもので、第1の発明は誤動作等により、不用意に源発
振が止まって正常動作に復帰できない状態におちいりに
くいシングルチップマイクロコンピュータを得ることを
目的とする。
This invention was made to solve the above-mentioned problems, and the first invention is a single-chip microcomputer that is less likely to fall into a state where the source oscillation stops unexpectedly due to malfunction or the like and cannot return to normal operation. The purpose is to obtain.

さらに第2の発明は誤動作により、ウォッチドッグタイ
マそのものが無効になって誤動作検出を行なわなくなる
状態におちいりにくいシングルチップマイクロコンピュ
ータを得ることを目的とする。
A further object of the second invention is to provide a single-chip microcomputer that is unlikely to fall into a state where the watchdog timer itself becomes invalid due to malfunction and no longer detects malfunction.

〔課題を解決するための手段〕[Means to solve the problem]

第1の発明に係るシングルチップマイクロコンピュータ
は、CPUがある特殊な条件て所定の手続きを行なった
場合にのみSTOP命令が有効となるようにするととも
に、殆んどいつでもSTOP命令を無効となるようにす
る命令を受けつける機構を設けたものである。
The single-chip microcomputer according to the first invention makes the STOP instruction valid only when the CPU performs a predetermined procedure under certain special conditions, and makes the STOP instruction invalid almost at any time. A mechanism is provided to accept commands to do so.

さらに、第2の発明に係るシングルチップマイクロコン
ピュータは、CPUがある特殊な手続きを行なった場合
にのみウォッチドッグタイマが無効となるようにすると
ともに、殆んどいつでもウォッチドッグタイマを有効と
なるようにする命令を受けつける機構を設けたものであ
る。
Furthermore, the single-chip microcomputer according to the second invention disables the watchdog timer only when the CPU performs a certain special procedure, and enables the watchdog timer almost at all times. A mechanism is provided to accept commands to do so.

(作用〕 第1の発明におけるシングルチップマイクロコンピュー
タはSTOP命令が実行されるための制約条件を設けた
ことにより、条件が満たされない場合、STOP命令に
出会ってもシングルチップマイクロコンピュータが停止
しない。
(Operation) Since the single-chip microcomputer according to the first invention has a constraint condition for executing the STOP instruction, the single-chip microcomputer does not stop even if the STOP instruction is encountered unless the condition is met.

第2の発明におけるシングルチップマイクロコンピュー
タはウォッチドッグタイマを無効にするだめの制約条件
を設けたことにより、条件が満たされない場合、ウォッ
チドッグタイマが無効にならない。
In the single-chip microcomputer according to the second aspect of the invention, the watchdog timer is not disabled if the conditions are not met because a constraint is provided to disable the watchdog timer.

〔実施例〕〔Example〕

以下、第1、第2.第3の発明の一実施例を図について
説明する。第1図において、(υはシングルチップマイ
クロコンピュータ、偉)はバス、(3)は源発振回路を
含むクロック発生部、(イ)はcpu。
Below, the first, second... An embodiment of the third invention will be described with reference to the drawings. In FIG. 1, (υ) is a single-chip microcomputer, (W) is a bus, (3) is a clock generator including a source oscillation circuit, and (A) is a CPU.

(5)はROM、(6)はROM%(7)はウォッチド
ッグタイマ、(鴫はウォッチドッグタイマ(7)を有効
にするか無効にするかの設定を保持するフリップフロア
ブ、(9)は外部入力、端子、(至)は源発振を止めて
クリアりを停止させる命令を有効にするか無効にするか
の設定を保持するフリップフロアブである。
(5) is the ROM, (6) is the ROM% (7) is the watchdog timer, (Sushi is a flip-floor probe that holds the setting for enabling or disabling the watchdog timer (7), (9) is an external input, a terminal, and (to) is a flip floor that holds the setting to enable or disable the command to stop source oscillation and clearing.

第2図はフリップフロップ側まわりのやや詳細なブロッ
ク図の実施例であり、図において、lI場は源発振を止
めてクロフクを停止させる命令を有効にするか、無効に
するかの設定を保持するRSフリップフロアブ、aDは
リセント直後の最初の命令か否かを検出する第1命令検
出回路、(ロ)はSYNC信号入力部、a1はリセット
信号入力部、鱒は第1命令の検出出力があられれるDE
T信号出力部である。
Figure 2 is an example of a slightly more detailed block diagram around the flip-flop side. aD is the first instruction detection circuit that detects whether it is the first instruction immediately after re-cent, (b) is the SYNC signal input section, a1 is the reset signal input section, and trout is the detection output of the first instruction. A hail DE
This is a T signal output section.

次に動作について説明する。シングルチップマイクロコ
ンピュータ(1)はりセント後、c P U <aがR
OM (5)からプログラムを読み出し、逐次、実行し
て行く、この際、シングルチップマイクロコンピュータ
(1)内部の各動作はクロック発生部(jで作成される
クロフク信号に同JIIIL、て進行して行く。
Next, the operation will be explained. Single-chip microcomputer (1) After centrifugation, c P U <a is R
The program is read from the OM (5) and executed one after another. At this time, each operation inside the single-chip microcomputer (1) proceeds based on the clock signal generated by the clock generator (j). go.

c p U (4)はクロンク発生部(3)の発振器を
停止させクロックをとめるための命令STOP%STO
P命令を有効にするための命令STOP−E、無効にす
るための命令STOP−D、ウォッチドッグタイマ(7
)を有効にする命令VDT−E、ウォッチドッグタイマ
(7)を無効にする命令VDT−D、ウォッチドッグタ
イマ(7)にタイマクリアを指示する命令VDT−CL
Rを持っている。
c p U (4) is a command STOP%STO to stop the oscillator of the clock generator (3) and stop the clock.
Instruction STOP-E to enable the P instruction, instruction STOP-D to disable it, watchdog timer (7
) instruction VDT-E to enable, instruction VDT-D to disable watchdog timer (7), instruction VDT-CL to instruct watchdog timer (7) to clear the timer.
I have R.

STOP命令を使用する動作の場合は第4図に示すよう
にシングルチップマイクロコンピュータ(1)のリセン
ト直後、CP U (4)の実行する最初の命令をST
OP−Eにして置く、すると、以降STOP命令を実行
すると、発振がとまりクロフクが停止する。
In the case of an operation using the STOP instruction, as shown in FIG.
If you set it to OP-E, then when you execute the STOP command from now on, the oscillation will stop and the clock will stop.

またSTOP命令を使用しない動作の場合はシングルチ
フブマイクロコンピエータ(1)のリセット後・810
P命令1無効状態9″−74! O?・lCP U (
4)の暴走等によりSTOP命令をCP U (4がフ
ェッチすることになってもクロックは停止しない、なお
、第2図について説明すると、この実施例で云うSTO
P−E命令とは、ビット3〜ビット0が1110 (2
進)であるような値をRIEGA01番地に書き込む機
作を行なうi令である。SYNC入力部(財)に人力さ
れるSYNC信号とは、CPU(肩が命令読み出し状態
になる毎にパルスが1つ発生する信号である。リセット
信号入力部側に人力されるRESlt号はシングルチッ
プマイクロコンピュータがリセット状態である事を示す
信号である。WR信号はCP U (4)があるアドレ
スをアドレスバスに出力しあるデータをデータバスに出
力している状態すなわち、CP U (4)が書き込み
動作中であることを示す信号である。
In addition, in the case of operation that does not use the STOP command, after resetting the single-chip microcomputer (1), 810
P command 1 invalid state 9″-74! O?・lCP U (
The clock does not stop even if CPU (4) fetches the STOP instruction due to a runaway in CPU (4).
The P-E instruction means that bits 3 to 0 are 1110 (2
This is an i instruction that performs a function of writing a value such as The SYNC signal that is manually input to the SYNC input section is a signal that generates one pulse every time the CPU (shoulder) enters the instruction reading state.The RESlt signal that is manually input to the reset signal input section is a single-chip signal. This signal indicates that the microcomputer is in the reset state.The WR signal indicates that the CPU (4) is outputting a certain address to the address bus and certain data to the data bus. This is a signal indicating that a write operation is in progress.

第1命令検出回路aυはリセット後の最初の命令の間だ
けDET信号出力部−から1が−出力されるように彷き
、2番目の命令を読み込むときに、DET信号出力部■
の信号はOになる。また、内部のカウンタのカウント入
力が禁止され、以後RES信号が来ないかぎりSYNC
信号を受けつはないので、以後、何ヶ命令が来ても出力
部(社)の信号値はOのままである。
The first instruction detection circuit aυ wanders so that 1 is output from the DET signal output section only during the first instruction after reset, and when reading the second instruction, the DET signal output section
The signal becomes O. In addition, count input to the internal counter is prohibited, and SYNC is disabled unless the RES signal is received.
Since no signal is received, the signal value of the output section remains O no matter how many commands are received thereafter.

また、STOP命令を有効にするか無効にするかの設定
を行なうRSフリップフロップ(至)のQ出力は1のと
き、STOP命令有効Q出力がOのときSTOP命令無
効になる。従って、リセットの直後の最初の命令が上述
のSTOP−E命令であれば、RSフリップフロアブa
・のS入力に1のパルスが入り、Q出力が1となり、S
TOP命令有効となる。リセット後、STOP−F、命
令を行なわなければ、リセット時にRSフリップフロア
ブ(2)のR入力に入ったlパルスでQ出力はOになっ
ており、STOP命令は無効である。また、最初にST
OP−E命令を行なわなければ、論理的には以後リセッ
トが入力されない限り、Q出力を1にすることはできな
い、しかし、ノイズ誤動作等で1になった場合、これを
0に戻す方法として、ビット3〜ビフト0が1110 
(2進)以外の値をREGADR番地に書き込む操作が
ある。これが前述めSTOP−D命令に相当する。ST
OP命令を使用しない動作では、第5図に1例を示す様
にSTOP−D命令をプログラム内のところどころに挿
入しておくことにより、クロックが停止する可能性がよ
り低くなる。
Further, when the Q output of the RS flip-flop (to) which sets whether to enable or disable the STOP instruction is 1, the STOP instruction becomes invalid when the STOP instruction valid Q output is O. Therefore, if the first instruction immediately after reset is the above-mentioned STOP-E instruction, the RS flip floor block a
A pulse of 1 enters the S input of ・, the Q output becomes 1, and the S
The TOP command becomes valid. If the STOP-F command is not executed after reset, the Q output becomes O due to the l pulse input to the R input of the RS flip floor probe (2) at the time of reset, and the STOP command is invalid. Also, first ST
If the OP-E command is not executed, logically the Q output cannot be set to 1 unless a reset is input thereafter. However, if it becomes 1 due to noise malfunction etc., the method to return it to 0 is as follows: Bit 3 to bit 0 is 1110
There is an operation to write a value other than (binary) to the REGADR address. This corresponds to the STOP-D command mentioned above. ST
In an operation that does not use an OP instruction, the possibility that the clock will stop is reduced by inserting STOP-D instructions here and there in the program, as shown in an example in FIG.

次に、第2の発明の一実施例を第1図と第3図を用いて
説明する。第3図はフリアブフロップ(8)まわりのや
や詳細なブロック図の一実施例であり、図において、(
8)はウォッチドッグタイマ(71のlatl?。
Next, an embodiment of the second invention will be described using FIG. 1 and FIG. 3. FIG. 3 is an example of a somewhat detailed block diagram around the Friab flop (8).
8) is the watchdog timer (71 latl?.

を有効にするか無効にするかを設定するRSフリップフ
ロップである。このRSフリアブフロップ(8)のQ出
力が1のとき、ウォッチドッグタイマ(ηの機能は有効
、Q出力が0のとき、ウォッチドッグタイマ【7]の機
能は無効となる。シングルチップマイクロコンピュータ
(1)にリセットがかかると、RSフリアブフロップ(
8)のS入力に1の信号が入るので、Q出力は1となり
、ウォッチドッグタイマ(刀の機能は有効となる。ウォ
ッチドッグタイマ(7)の機能を掩効にするには、DE
T信号が1となるリセット直後の最初の命令で、ビット
フルとット4が1101(2進)の値をREGADR番
地に書き込む操作を行なう必要がある。前述のVDT−
D命令はこの操作を行なうものである。リセット直後に
VDT−D命令を行なわなければ上述のようにフリアブ
フロップ(8)のQ出力はlであり、論理的には以後リ
セットが入力されない限りQ出力をOにすることはでき
ず、ウォッチドッグタイマCηの機能は有効のままであ
る。しかし、ノイズ誤動作等でOになった場合、これを
1に戻す方法としてビットフルビフト4が1101(2
進)以外の値をREGADR番地に書き込む操作がある
。これが前述のWDT−E命令に相当する。ウォッチド
ッグタイマ(7]の機能を使用する応用ではVDT−E
命令をプログラム内のとことどころに挿入しておくこと
により、ウォッチドッグタイマ(7)の機能が無効にな
ったままになる可能性がより低くなる。
This is an RS flip-flop for setting whether to enable or disable. When the Q output of this RS Friab flop (8) is 1, the function of the watchdog timer (η) is enabled; when the Q output is 0, the function of the watchdog timer [7] is disabled. Single-chip microcomputer (1) is reset, the RS Friab flop (
Since a signal of 1 is input to the S input of 8), the Q output becomes 1, and the watchdog timer (sword) function is enabled.
In the first instruction immediately after reset when the T signal becomes 1, it is necessary to write the value of bit full bit 4 of 1101 (binary) to the REGADR address. The aforementioned VDT-
The D command performs this operation. If the VDT-D command is not executed immediately after reset, the Q output of the Friab flop (8) will be 1 as described above, and logically, unless a reset is input thereafter, the Q output cannot be set to 0. The function of watchdog timer Cη remains valid. However, if it becomes O due to a noise malfunction, etc., the way to return it to 1 is to set Bitfull Bift 4 to 1101 (2
There is an operation to write a value other than (address) to the REGADR address. This corresponds to the above-mentioned WDT-E command. For applications that use the watchdog timer (7) function, VDT-E
By inserting instructions here and there in the program, the possibility that the function of the watchdog timer (7) remains disabled is reduced.

なお−上記実施例では第1の発明と第2の発明を独立に
説明したが組合せることによってSTOP有効かつウォ
ッチドッグ無効、STOP無効かつウォッチド、グ有効
等、4種のバリエーションを得ることができる。
In the above embodiment, the first invention and the second invention were explained independently, but by combining them, it is possible to obtain four variations such as STOP enabled and watchdog disabled, STOP disabled and watched, and watchdog enabled. can.

また、上記実施例ではSTOP無効時にSTOP命令を
実行させた場合の動作についてクロフクが停止しない点
しか触れなかったが、不当命令の実行と同様に処理して
も良く、リセット動作を生じさせるなどの処理を行なっ
ても良い。
Furthermore, in the above embodiment, only the point that Kurofuku does not stop when the STOP command is executed when the STOP command is invalid has been mentioned, but it may be processed in the same way as the execution of an illegal command. Processing may be performed.

また、上記実施例では限定された条件すなわちリセット
直後の命令以外で、STOP命令あるいはウォッチド、
グタイマの有効/無効を切り替え、あるいは切り替えよ
うとすると、そのように実行しようとする動作が行なわ
れるようになっていたが、限定された条件以外で変更し
ようとした場合、不当命令の実行あるいはリセット動作
を生じさせるなどの処理を行なっても良い。
In addition, in the above embodiment, under limited conditions, that is, other than the instruction immediately after reset, the STOP instruction or the watched instruction,
If you enable/disable the timer or attempt to switch it, the intended operation will be executed, but if you try to change it outside of the limited conditions, an illegal instruction will be executed or a reset will occur. Processing such as causing an action may also be performed.

また、上記実施例ではSTOP命令あるいはウォッチド
ッグタイマの有効/無効を設定する命令手続きは1命令
で済む単純なものであったが、もっと複雑であっても良
い。
Further, in the above embodiment, the instruction procedure for setting the STOP instruction or the validity/invalidity of the watchdog timer is a simple one requiring only one instruction, but it may be more complicated.

また、上記実施例ではSTOP命令の有効/無効とウォ
ッチドッグタイマの有効/無効を独立に設定するように
なっているが、設定用のフリアブフロップを共用にして
STOP命令有効かつウォッチドッグタイマ無効とST
OP命令無効かつウォッチド、グタイマ有効などの2状
態の選択にしても良い。
Furthermore, in the above embodiment, enabling/disabling of the STOP instruction and enabling/disabling of the watchdog timer are set independently, but by sharing the FRIAB flop for setting, the STOP instruction is enabled and the watchdog timer is disabled. and ST
Two states may be selected, such as OP instruction disabled and watched, and watch timer enabled.

また、上記実施例ではSTOP命令の有効/無効とウォ
ッチドッグタイマの有効/無効の設定用にフリアブフロ
ップが各1ヶずつであるが、たとえば、STOPf効/
無効設定用フリアブフロアブを2ヶ以上設けて、すべて
のフリップフロップがSTOP有効の場合のみに真にS
TOP有効にするなどの構成にしても良い。
In addition, in the above embodiment, there is one FLAB flop each for setting the enable/disable of the STOP instruction and the enable/disable of the watchdog timer.
Two or more flip-flops for invalid setting are provided, and STOP is true only when all flip-flops are STOP enabled.
The configuration may be such that TOP is enabled.

また、上記実施例ではSTOP命令の実態が明らかでな
いが、例えば、インヘレンド命令であっても良く、また
、あるアドレスをアクセスする命令てあっても良く、さ
らに小さな命令の集合体であっても良い。
Further, although the actual state of the STOP instruction is not clear in the above embodiment, it may be an inherence instruction, an instruction to access a certain address, or even a collection of smaller instructions. good.

〔発明の効果〕〔Effect of the invention〕

以上のようにこの第1の発明によれば、源発振を止める
命令手続きを有効にするか、無効にするかを選択する手
段を設け、特に有効にする手「きを行なう事ができる条
件を限定したので、特に源発振を止めずに用いる動作に
おいては源発振が不用意に停止する誤動作が減少する。
As described above, according to the first invention, a means is provided for selecting whether to enable or disable the command procedure for stopping source oscillation, and in particular, a condition under which the enabling procedure can be performed is provided. Since this is limited, malfunctions in which the source oscillation is inadvertently stopped are reduced, especially in operations where the source oscillation is used without stopping.

従って、ソフトフェア的に正常に復帰できる手段を設け
ておけば正常に復帰でき−る確率が高くなると共に、ク
ロックカウント方式のウォッチドッグタイマがあればこ
のウォッチドッグタイマが有効に働く確率が高くなるの
で、安全性の高いシングルチップマイクロコンピュータ
が得られる効果がある。
Therefore, if you provide a software-based means of returning to normality, the probability of a normal recovery will increase, and if you have a clock-counting watchdog timer, the probability that this watchdog timer will work effectively will increase. Therefore, a highly secure single-chip microcomputer can be obtained.

また、第2の発明によれば特にウォッチドッグタイマを
使用する動作において、ウォッチドッグタイマを無効に
する手続きが行なえる条件を限定したので、暴走したC
PUがウォッチドッグタイマを無効にする命令手続きを
実行しようとしてもウォッチドッグタイマは無効になら
ないので、安全性の高いシングルチップマイクロコンピ
ュータが得られる効果がある。
Furthermore, according to the second invention, the conditions under which the watchdog timer can be disabled are limited, especially in operations that use the watchdog timer, so that runaway C
Even if the PU attempts to execute an instruction procedure to disable the watchdog timer, the watchdog timer will not be disabled, resulting in a highly secure single-chip microcomputer.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図はこの発明の一実施例によるシングルチップマイ
クロコンピュータのブロック図、第2図はこの発明の一
実施例における源発振を止めてクロックを停止させる命
令を有効にするか、無効にするかの設定を保持するフリ
ツブフロップ(至)まわりのやや詳細なブロック図、第
3図はこの発明の一実施例におけるウォッチドッグタイ
マを有効にするか無効にするかの設定を保持するフリツ
ブフロツブ(lまわりのやや詳細なブロック図、第4図
はこの発明の一実施例による源発振を止めるソフトフェ
アのフローチャート、第5図はこの発明の一実施例によ
る源発振を止めないソフトフェアのフローチャート、第
6図は従来のシングルチップマイクロコンピュータのブ
ロック図である。 図において、(l)はシングルチーツブマイクロコンビ
エータ、セ)はバス、(3)はクロック発生部、(4)
はCPU、(5)はROM、(6)はRAM、(7)は
ウォッチドッグタイマ、(8)はウォッチドッグタイマ
の有効無効の設定を保持するフリツブフロップ、(9]
は外部割込み入力端子、側は源発振を止めてクロフクを
停止させる命令を有効にするか無効にするかの設定を保
持するフリツブフロツブ、Iは第1命令検出回路、(2
)はSYNC信号人力部、Iはリセット信号入力部、α
旬はDET信号出力部を示す。 なお、図中、同一符号は同一、又は相当部分を示す。
Fig. 1 is a block diagram of a single-chip microcomputer according to an embodiment of the present invention, and Fig. 2 shows whether to enable or disable the instruction to stop source oscillation and stop the clock in an embodiment of the present invention. FIG. 3 is a somewhat detailed block diagram of the fritub flop (to) that holds the settings for the watchdog timer in one embodiment of the present invention. 4 is a flowchart of software that stops source oscillation according to an embodiment of the present invention, and FIG. 5 is a flowchart of software that does not stop source oscillation according to an embodiment of this invention. Figure 6 is a block diagram of a conventional single-chip microcomputer. In the figure, (l) is a single chip micro combinator, (c) is a bus, (3) is a clock generator, and (4) is a block diagram of a conventional single-chip microcomputer.
is a CPU, (5) is a ROM, (6) is a RAM, (7) is a watchdog timer, (8) is a flip-flop that holds the enable/disable setting of the watchdog timer, (9)
is an external interrupt input terminal, the side is a flipflop that holds the setting to enable or disable the instruction to stop the source oscillation and stop the clock, I is the first instruction detection circuit, (2
) is the SYNC signal input section, I is the reset signal input section, α
The symbol indicates the DET signal output section. In addition, in the figures, the same reference numerals indicate the same or equivalent parts.

Claims (2)

【特許請求の範囲】[Claims] (1)シングルチップマイクロコンピュータにおいて、
ある限定された条件において所定の命令手続きを実行し
た場合にのみ、源発振を止める命令手続きを有効にする
手段と、 上記シングルチップマイクロコンピュータが命令実行可
能な状態であるときに、所定の命令手続きを実行すると
上記源発振を止める命令を無効にする、手段を有するこ
とを特徴とするシングルチップマイクロコンピュータ。
(1) In a single-chip microcomputer,
means for enabling a command procedure to stop source oscillation only when a predetermined command procedure is executed under certain limited conditions; A single-chip microcomputer comprising means for invalidating the instruction to stop source oscillation when executed.
(2)シングルチップマイクロコンピュータにおいて、
ある限定された条件において所定の命令手続きを実行し
た場合のみ、ウォッチドッグタイマを無効にする手段と
、 上記シングルチップマイクロコンピュータが命令実行可
能な状態であるときに、所定の命令手続きを実行すると
上記ウォッチドッグタイマを有効にする、手段を有する
上記シングルチップマイクロコンピュータ。
(2) In a single-chip microcomputer,
means for disabling the watchdog timer only when a predetermined command procedure is executed under certain limited conditions; The single-chip microcomputer described above has means for enabling a watchdog timer.
JP1289008A 1989-11-06 1989-11-06 Single chip microcomputer Pending JPH03148731A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1289008A JPH03148731A (en) 1989-11-06 1989-11-06 Single chip microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1289008A JPH03148731A (en) 1989-11-06 1989-11-06 Single chip microcomputer

Publications (1)

Publication Number Publication Date
JPH03148731A true JPH03148731A (en) 1991-06-25

Family

ID=17737641

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1289008A Pending JPH03148731A (en) 1989-11-06 1989-11-06 Single chip microcomputer

Country Status (1)

Country Link
JP (1) JPH03148731A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5555225A (en) * 1994-12-14 1996-09-10 Mitsubishi Denki Kabushiki Kaisha Clock generating circuit and microcomputer incorporating same

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5555225A (en) * 1994-12-14 1996-09-10 Mitsubishi Denki Kabushiki Kaisha Clock generating circuit and microcomputer incorporating same

Similar Documents

Publication Publication Date Title
US4979102A (en) Microprocessor operable under direct connection to coprocessor
JP2002041489A (en) Synchronizing signal generation circuit, processor system using the same and synchronizing signal generating method
JPH06103472B2 (en) Microprocessor for debugging
US7480812B2 (en) Microprocessor
US6463492B1 (en) Technique to automatically notify an operating system level application of a system management event
JPH03148731A (en) Single chip microcomputer
CN114625639A (en) Debugging method, system and chip based on system on chip
JP2004310514A (en) Information processing terminal and history information saving method
JPS6218939B2 (en)
JPS6336023B2 (en)
JP7276755B2 (en) Processing speed matching circuit and microprocessor
JPH0485630A (en) Interruption controller
JPH0764886A (en) Processor provided with serial interface device
JP2006099654A (en) Semiconductor circuit apparatus
KR100314805B1 (en) A booting circuit for pipeline-controlled processor
KR100497377B1 (en) Method for detecting synchronizing signal of image and apparatus thereof
JP2755205B2 (en) Low power consumption method for data processing equipment
JP2870083B2 (en) Microcomputer with built-in watchdog timer
JPH0764822A (en) Microcomputer
JPS63155330A (en) Microprogram controller
JPH0540666A (en) Interruption monitoring device for integrated circuit microprocessor
JPH06324956A (en) Data processor
JP2009205351A (en) Microcomputer
JPH03252886A (en) Single chip microcomputer
JPH10161887A (en) Method and device for interruption signal synchronization