JP2002229817A - Watchdog timer - Google Patents

Watchdog timer

Info

Publication number
JP2002229817A
JP2002229817A JP2001025513A JP2001025513A JP2002229817A JP 2002229817 A JP2002229817 A JP 2002229817A JP 2001025513 A JP2001025513 A JP 2001025513A JP 2001025513 A JP2001025513 A JP 2001025513A JP 2002229817 A JP2002229817 A JP 2002229817A
Authority
JP
Japan
Prior art keywords
value
limit value
timer
watchdog timer
measurement
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
JP2001025513A
Other languages
Japanese (ja)
Inventor
Shuji Otsuka
修 司 大▲塚▼
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2001025513A priority Critical patent/JP2002229817A/en
Publication of JP2002229817A publication Critical patent/JP2002229817A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a watchdog timer controllable without spending a resource such as an address space, a bit space or the like. SOLUTION: This watchdog timer is equipped with a CPU 1, a timer 2 for executing measuring operation by control from the CPU 1, and an initial value memory part 3 for memorizing a restriction value and a measurement start value to be set in the timer 2. First of all, the restriction value is set in the timer 2, and the measurement operation of the timer 2 is started from the restriction value, to thereby acquire a sufficient spare time until the measurement start value which is the most important value is set. Since the restriction value and the measurement start value can be set without losing the address space or the bit space, control of each watchdog timer can be executed without reducing decoding speed of an address or multiplexer speed of data even in a system incorporating many watchdog timers.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、ウォッチドックタ
イマに関し、特に、ウォッチドックタイマの制御方式に
関する。
The present invention relates to a watchdog timer, and more particularly, to a watchdog timer control system.

【0002】[0002]

【従来の技術】ウォッチドックタイマは、まずCPUに
より制限値(タイムアップ・カウント値)が設定され、
この制限値に向かって計測動作を行っている最中に、C
PUがタイマクリアを行うものである。この種のウォッ
チドックタイマは、CPUの暴走防止だけでなく、ソレ
ノイドやモータ等の破損防止の目的でも用いられ、シス
テムの制御ロジックに内蔵されることも多い。
2. Description of the Related Art First, a limit value (time-up count value) of a watchdog timer is set by a CPU.
During the measurement operation toward this limit value, C
The PU clears the timer. This type of watchdog timer is used not only to prevent runaway of the CPU but also to prevent damage to solenoids, motors, and the like, and is often incorporated in control logic of the system.

【0003】[0003]

【発明が解決しようとする課題】ウォッチドックタイマ
の中には、駆動対象や駆動状態により、制限値を変更で
きるものがある。このような制限値を変更可能なウォッ
チドックタイマは、制限値設定用のアドレスと計測値ク
リア用のアドレスとを別個に備えていることが多い。た
だし、このようにすると、主記憶のアドレス空間を余計
に必要としてしまう。特に、システムの中に多数のウォ
ッチドックタイマが存在する場合には、アドレスのデコ
ード回路が必要になり、システムの回路構成が複雑にな
ってしまう。
Some watchdog timers can change the limit value depending on the drive target and the drive state. Such a watchdog timer that can change the limit value often has a separate address for setting the limit value and an address for clearing the measured value. However, in this case, an additional address space of the main memory is required. In particular, when a large number of watchdog timers exist in the system, an address decoding circuit is required, which complicates the circuit configuration of the system.

【0004】一方、制限値設定用のアドレスと計測値ク
リア用のアドレスとを別個に設ける代わりに、一つのア
ドレスでアクセス可能なビット列中の一部のビットを制
限値設定用に割り当て、残りのビットを計測値クリア用
に割り当てるウォッチドックタイマも提案されている。
On the other hand, instead of separately providing an address for setting a limit value and an address for clearing a measured value, some bits in a bit string accessible by one address are assigned for setting a limit value, and the remaining bits are set. A watchdog timer that allocates bits for clearing measurement values has also been proposed.

【0005】しかしながら、ビット列の内容を解析する
には時間がかかるため、制限値の設定と計測値のクリア
を迅速に行えなくなるおそれがある。
However, since it takes time to analyze the contents of the bit string, it may not be possible to quickly set the limit value and clear the measured value.

【0006】本発明は、このような点に鑑みてなされた
ものであり、その目的は、アドレス空間やビット空間な
どのリソースを無駄に消費しなくて済むウォッチドック
タイマを提供することにある。
The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a watchdog timer that does not waste resources such as an address space and a bit space.

【0007】[0007]

【課題を解決するための手段】上述した課題を解決する
ために、本発明は、制限値を記憶する制限値記憶手段
と、前記制限値に向かって計測動作を行う計測手段と、
前記計測手段の計測値が前記制限値に達する前に、前記
制限値記憶手段を前記制限値の設定以外の目的に利用す
る記憶制御手段と、を備える。
In order to solve the above-mentioned problems, the present invention provides a limit value storing means for storing a limit value, a measuring means for performing a measuring operation toward the limit value,
A storage control unit that uses the limit value storage unit for a purpose other than the setting of the limit value before the measurement value of the measurement unit reaches the limit value.

【0008】本発明では、計測手段の計測値が制限値に
達する前に、制限値記憶手段を制限値の設定以外の目的
に利用するため、記憶手段の数を削減できる。
According to the present invention, before the measured value of the measuring means reaches the limit value, the limit value storage means is used for purposes other than the setting of the limit value, so that the number of storage means can be reduced.

【0009】ここで、制限値の設定以外の目的とは、例
えば、計測手段の計測開始値の設定である。
Here, the purpose other than the setting of the limit value is, for example, the setting of the measurement start value of the measuring means.

【0010】また、制限値は、例えば計測手段が計測可
能な最大値である。
The limit value is, for example, the maximum value that can be measured by the measuring means.

【0011】[0011]

【発明の実施の形態】以下、本発明に係るウォッチドッ
クタイマについて、図面を参照しながら具体的に説明す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, a watchdog timer according to the present invention will be specifically described with reference to the drawings.

【0012】図1は本発明に係るウォッチドックタイマ
の概略構成を示すブロック図である。図1のウォッチド
ックタイマは、例えばプリンタに内蔵されるものであ
り、CPU1と、CPU1からの制御により計測動作を
行うタイマ2と、タイマ2に設定するための制限値およ
び計測開始値を記憶する初期値記憶部3とを備えてい
る。CPU1は、初期値記憶部3に制限値を記憶する制
御を行う。
FIG. 1 is a block diagram showing a schematic configuration of a watchdog timer according to the present invention. The watchdog timer of FIG. 1 is built in a printer, for example, and stores a CPU 1, a timer 2 that performs a measurement operation under the control of the CPU 1, a limit value for setting the timer 2, and a measurement start value. An initial value storage unit 3 is provided. The CPU 1 performs control for storing the limit value in the initial value storage unit 3.

【0013】図2は図1のウォッチドックタイマの処理
手順を示すフローチャートである。まず、CPU1は初
期値記憶部3に制限値を記憶する(ステップS1)。こ
こで、制限値とは、タイマ2が計測する最大値であり、
例えば0xffffである。
FIG. 2 is a flowchart showing the processing procedure of the watchdog timer of FIG. First, the CPU 1 stores a limit value in the initial value storage unit 3 (step S1). Here, the limit value is the maximum value measured by the timer 2,
For example, 0xffff.

【0014】次に、タイマ2は、制限値を初期値として
計測動作を開始する(ステップS2)。タイマ2の計測
値は最初のクロックが入力された時点でクリアされた後
(ステップS3)、クロックが入力されるたびに計測値
をカウントアップする(ステップS4)。
Next, the timer 2 starts a measurement operation with the limit value as an initial value (step S2). After the measurement value of the timer 2 is cleared when the first clock is input (step S3), the measurement value is counted up every time a clock is input (step S4).

【0015】その後、適当なタイミングで、CPU1は
初期値記憶部3に計測開始値を記憶する(ステップS
5)。このステップS5の処理を行う前にタイマ2はい
ったんクリアされているため、ステップS5の処理を急
いで行う必要はない。すなわち、計測開始値の設定を行
うのに十分な時間的な余裕ができる。
Thereafter, at an appropriate timing, the CPU 1 stores the measurement start value in the initial value storage unit 3 (Step S).
5). Since the timer 2 is once cleared before performing the processing in step S5, it is not necessary to perform the processing in step S5 in a hurry. That is, there is sufficient time margin to set the measurement start value.

【0016】初期値記憶部3に記憶された計測開始値
は、タイマ2に設定され(ステップS6)、この値から
タイマ2は計測動作を再開する(ステップS7)。
The measurement start value stored in the initial value storage unit 3 is set in the timer 2 (step S6), and the timer 2 restarts the measurement operation from this value (step S7).

【0017】次に、タイマ2の計測値が初期値記憶部3
に記憶された制限値に達したか否かを判定し(ステップ
S8)、制限値に達していない場合にはタイマ2の計測
動作を継続させながらステップS8の判定処理を繰り返
し、制限値に達すると次のクロックで計測値をクリアす
る(ステップS9)。
Next, the measured value of the timer 2 is stored in the initial value storage unit 3.
It is determined whether or not the limit value stored in step S8 has been reached (step S8). If the limit value has not been reached, the determination process of step S8 is repeated while continuing the measurement operation of the timer 2 to reach the limit value. Then, the measured value is cleared at the next clock (step S9).

【0018】システムが正常動作している場合、CPU
1はタイマ2が計測動作を行っている最中にタイマ2の
計測値をクリアする。
When the system is operating normally, the CPU
1 clears the measured value of the timer 2 while the timer 2 is performing the measuring operation.

【0019】このように、本実施形態では、アドレス空
間やビット空間をロスすることなく、制限値と計測開始
値を設定できるため、数多くのウォッチドックタイマが
内蔵されているシステムであっても、アドレスのデコー
ド速度やデータのマルチプレクサの速度を下げることな
く各ウォッチドックタイマの制御を行える。
As described above, in the present embodiment, the limit value and the measurement start value can be set without losing the address space or the bit space. Therefore, even if the system has many watchdog timers, Each watchdog timer can be controlled without reducing the address decoding speed or the data multiplexer speed.

【0020】また、まずタイマ2に制限値を設定し、こ
の制限値からタイマ2の計測動作を開始させるため、最
も重要な値である計測開始値を設定するまでに十分な時
間的な余裕ができる。したがって、CPU1は余裕をも
って計測開始値を設定でき、ウォッチドックタイマ2を
安定動作させることができる。
Further, first, a limit value is set in the timer 2 and the measurement operation of the timer 2 is started from the limit value. Therefore, there is a sufficient time margin before the measurement start value which is the most important value is set. it can. Therefore, the CPU 1 can set the measurement start value with a margin, and the watchdog timer 2 can operate stably.

【0021】また、制限値を初期値記憶部3に記憶して
から計測開始値を初期値記憶部3に記憶するまでの間に
CPU1が暴走しても、タイマ2は制限値を初期値とし
て正常動作するため、CPU1の暴走に影響されずに、
ウォッチドックタイマ2として正常に機能することがで
きる。
Even if the CPU 1 runs away between the time when the limit value is stored in the initial value storage unit 3 and the time when the measurement start value is stored in the initial value storage unit 3, the timer 2 sets the limit value as the initial value. Because it operates normally, it is not affected by runaway of CPU1,
It can function normally as the watchdog timer 2.

【0022】さらに、その後にCPU1が復帰した場合
には、制限値自体は有効であり、新たにタイマ2に設定
された計測開始値から計測動作を正常に再開することが
できる。
Further, when the CPU 1 returns thereafter, the limit value itself is valid, and the measurement operation can be normally resumed from the measurement start value newly set in the timer 2.

【0023】本実施形態は、タイマ2にまず制限値を設
定した後に計測開始値を設定しており、タイマ2に2回
アクセスしているが、一般的に、ウォッチドックタイマ
2へのアクセスは数百ms以上の時間間隔をおいて行われ
るため、タイマ2へのアクセス回数が1回から2回にな
ったことは0.0001%程度の時間的なロスにすぎない。し
たがって、従来のように制限値と計測開始値とを別個の
アドレスで設定する場合と比べて、処理速度にほとんど
違いがない。
In this embodiment, the measurement start value is set after setting the limit value in the timer 2 first, and the timer 2 is accessed twice, but in general, the access to the watchdog timer 2 is Since the access is performed at intervals of several hundred ms or more, the number of accesses to the timer 2 from one to two is only a time loss of about 0.0001%. Therefore, there is almost no difference in the processing speed as compared with the conventional case where the limit value and the measurement start value are set at different addresses.

【0024】なお、プリンタ内に設けられるウォッチド
ックタイマ2は、必ずしも一つとは限らない。プリンタ
の各部を制御するためにそれぞれ別個のウォッチドック
タイマが用いられることもある。このような場合、CP
U1は各ウォッチドックタイマを図2の処理手順に従っ
て制御してもよいし、あるいは図3に示すようにメイン
となるウォッチドックタイマ2aの制御により他のウォ
ッチドックタイマ2b〜2nを制御してもよい。
The number of watchdog timers 2 provided in the printer is not always one. A separate watchdog timer may be used to control each part of the printer. In such a case, the CP
U1 may control each watchdog timer according to the processing procedure of FIG. 2, or may control other watchdog timers 2b to 2n by controlling the main watchdog timer 2a as shown in FIG. Good.

【0025】また、ウォッチドックタイマ2の設定値を
種々の目的に利用してもよい。例えば、図4は、ウォッ
チドックタイマ2の設定値が0xfff0〜0xfff6のときにそ
れぞれポート0〜6に対するウォッチドックタイマ2を
クリアし、0xfff8〜0xfffb,0xfffeのときにプランジャ
制御の時間単位をそれぞれ異なる値に変更する例を示し
ている。
The set value of the watchdog timer 2 may be used for various purposes. For example, in FIG. 4, when the set value of the watchdog timer 2 is 0xfff0 to 0xfff6, the watchdog timer 2 for the ports 0 to 6 is cleared, respectively, and when the set value of the watchdog timer 2 is 0xfff8 to 0xfffb, 0xfffe, the time units of the plunger control are different. An example of changing to a value is shown.

【0026】ウォッチドックタイマ2の値が0xfffeにな
ると、プランジャやウォッチドックタイマ2を駆動する
クロックを極端に速くする。これは、通常の動作状態で
使用するのではなく、ASICのテストやシミュレーション
を合理的に行うためである。すなわち、ウォッチドック
タイマ2の値が0xfffeになると、システムのクロック周
波数が速くなるため、ASICのテスト等を高速に行うこと
ができる。
When the value of the watchdog timer 2 becomes 0xfffe, the clock for driving the plunger and the watchdog timer 2 is made extremely fast. This is to test and simulate the ASICs rationally instead of using them under normal operating conditions. That is, when the value of the watchdog timer 2 becomes 0xfffe, the clock frequency of the system increases, so that the ASIC test and the like can be performed at high speed.

【0027】上述した実施形態では、プリンタに内蔵さ
れるウォッチドックタイマ2について説明したが、本発
明はプリンタ以外の各種電気機器に適用可能である。
In the embodiment described above, the watchdog timer 2 built in the printer has been described, but the present invention is applicable to various electric devices other than the printer.

【0028】[0028]

【発明の効果】以上詳細に説明したように、本発明によ
れば、計測手段の計測値が制限値に達する前に制限値記
憶手段を別の目的に利用するため、この別の目的のため
の記憶手段を別個に設けなくて済み、記憶領域の削減す
なわちリソースの無駄な消費を防止できる。特に、本発
明の場合、制限値と計測開始値とをいずれも制限値記憶
手段に記憶でき、記憶手段の数を削減できる。
As described above in detail, according to the present invention, the limit value storage means is used for another purpose before the measured value of the measuring means reaches the limit value. It is not necessary to separately provide the storage means, and the storage area can be reduced, that is, unnecessary consumption of resources can be prevented. In particular, in the case of the present invention, both the limit value and the measurement start value can be stored in the limit value storage means, and the number of storage means can be reduced.

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

【図1】本発明に係るウォッチドックタイマの概略構成
を示すブロック図。
FIG. 1 is a block diagram showing a schematic configuration of a watchdog timer according to the present invention.

【図2】図1のウォッチドックタイマの処理手順を示す
フローチャート。
FIG. 2 is a flowchart showing a processing procedure of a watchdog timer in FIG. 1;

【図3】メインとなるウォッチドックタイマの制御によ
り他のウォッチドックタイマを制御する例を示すブロッ
ク図。
FIG. 3 is a block diagram showing an example in which another watchdog timer is controlled by controlling a main watchdog timer.

【図4】ウォッチドックタイマの設定値を種々の目的に
利用する例を示す図。
FIG. 4 is a diagram showing an example in which a set value of a watchdog timer is used for various purposes.

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

1 CPU 2 タイマ 3 初期値記憶部 1 CPU 2 timer 3 initial value storage

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】制限値を記憶する制限値記憶手段と、 前記制限値に向かって計測動作を行う計測手段と、 前記計測手段の計測値が前記制限値に達する前に、前記
制限値記憶手段を前記制限値の設定以外の目的に利用す
る記憶制御手段と、を備えることを特徴とするウォッチ
ドックタイマ。
A limit value storing means for storing a limit value; a measuring means for performing a measuring operation toward the limit value; and a limit value storing means before a measured value of the measuring means reaches the limit value. And a storage control unit that uses the limit value for purposes other than the setting of the limit value.
【請求項2】前記計測手段は、前記制限値記憶手段に記
憶された制限値から計測動作を開始することを特徴とす
る請求項1に記載のウォッチドックタイマ。
2. The watchdog timer according to claim 1, wherein said measuring means starts a measuring operation from the limit value stored in said limit value storing means.
【請求項3】前記記憶制御手段は、前記計測手段の計測
値が前記制限値に達する前に、前記計測手段の計測開始
値を前記制限値記憶手段に記憶し、 前記計測手段は、前記計測開始値から計測動作を再開
し、前記制限値に達すると計測値をリセットすることを
特徴とする請求項2に記載のウォッチドックタイマ。
3. The storage control means stores a measurement start value of the measurement means in the limit value storage means before the measurement value of the measurement means reaches the limit value, wherein the measurement means The watchdog timer according to claim 2, wherein the measurement operation is restarted from a start value, and the measurement value is reset when the limit value is reached.
【請求項4】前記制限値記憶手段は、前記計測手段が計
測可能な最大値を前記制限値として記憶することを特徴
とする請求項1〜3のいずれかに記載のウォッチドック
タイマ。
4. The watchdog timer according to claim 1, wherein said limit value storage means stores a maximum value measurable by said measurement means as said limit value.
【請求項5】前記計測手段の計測値が所定値になると、
前記計測手段の基準クロックの周波数を速くすることを
特徴とする請求項1〜4のいずれかに記載のウォッチド
ックタイマ。
5. When the measured value of said measuring means reaches a predetermined value,
5. The watchdog timer according to claim 1, wherein a frequency of a reference clock of said measuring means is increased.
JP2001025513A 2001-02-01 2001-02-01 Watchdog timer Pending JP2002229817A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001025513A JP2002229817A (en) 2001-02-01 2001-02-01 Watchdog timer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001025513A JP2002229817A (en) 2001-02-01 2001-02-01 Watchdog timer

Publications (1)

Publication Number Publication Date
JP2002229817A true JP2002229817A (en) 2002-08-16

Family

ID=18890490

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001025513A Pending JP2002229817A (en) 2001-02-01 2001-02-01 Watchdog timer

Country Status (1)

Country Link
JP (1) JP2002229817A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009114932A (en) * 2007-11-06 2009-05-28 Keihin Corp Communication abnormality detection device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009114932A (en) * 2007-11-06 2009-05-28 Keihin Corp Communication abnormality detection device

Similar Documents

Publication Publication Date Title
US8533444B2 (en) Booting system, image forming apparatus having the system and control method thereof
US20070283139A1 (en) Information processing apparatus and control method used thereby
JP5875558B2 (en) Information processing device
US20060004975A1 (en) Methods and apparatus to manage memory access
JP2002229817A (en) Watchdog timer
WO2013048536A1 (en) Apparatus and method for managing register information in a processing system
JPH0844594A (en) Data processor
KR19980029728A (en) Reset device and operation mode setting method using the reset device
JP2009230425A (en) Information processor
JP2003167649A (en) Information processor
JP2001166954A (en) Virtual computer device and its control method
GB2456656A (en) Controlling timeouts of an error recovery procedure in a digital circuit
US10761581B2 (en) Method and module for programmable power management, and system on chip
JPS6217847Y2 (en)
JPH07146814A (en) Memory device
JP4062478B2 (en) Device access method
JP4587000B2 (en) Chip select circuit
JP3695078B2 (en) Programmable controller with pulse output instructions
JP2005071203A (en) Microprocessor
JP2003036241A (en) Wait cycle control device and wait cycle control method
JP3190945B2 (en) Micro program control circuit
JPH0574154A (en) Microcomputer
JP2666717B2 (en) Microprocessor
KR100693559B1 (en) Method for initializing RAM of electronic device
JP2000250786A (en) Watchdog timer

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060210

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060214

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060417

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061010

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061211

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070109