【0001】
【発明の属する技術分野】
本発明は、コンピュータ装置に関するものである。
【0002】
【従来の技術】
パーソナルコンピュータ(PC:Personal Computer)等のコンピュータ装置における不具合は、部品の経年変化及び寿命に起因するもの(例:冷却ファンの故障による温度上昇)、外的要因(例:停電)に起因するものがある。部品の経年変化及び寿命、停電に起因するものについては、冷却ファンの回転状態、コンピュータ装置に接続した無停電電源装置等の停電信号を、コンピュータ装置内のCPU(Central Processing Unit)が監視することによって検出することができる。
【0003】
このような従来の技術の例が、特開2001−92738公報「コンピュータのサーバのシステム保全及びデータ保護システム」に記載されている。これは、障害監視ボード(停電・電圧・温度監視用)及び予備ユニット(予備電源、予備ハードディスク等)をコンピュータに備え、停電が発生した場合、予備電源に切り替えて電力を供給し、緊急停止処理を行った後、停電から復旧したことを検出した場合、自動的に電力の再供給を行ったり、正常な温度範囲を越える温度上昇時に、ハードディスクに記憶されたデータを予備ハードディスクにバックアップしたりすることによって、コンピュータのサーバのシステムの障害発生時の対応、及びデータの保護を行うことができるようにするものである。
【0004】
PCにおける不具合として、PC上でアプリケーションプログラムを動作させたとき、アプリケーションプログラムが確保したメモリを動作終了後も解放しないことにより使用可能なメモリ容量が低減し(メモリリーク)、PCが停止しキーボードやマウスの入力を受け付けなくなること(ハングアップ)がある。
メモリリークによるPCのハングアップを回避する方法としては、PCのプログラムによって使用可能なメモリ容量を監視し、使用可能なメモリ容量が一定値以下になった場合にPCを自動的に再起動するという方法が一般的に用いられている。
【0005】
また、PCにおける不具合として、電源スイッチを入れて装置を起動する場合、又はリセットして再起動する場合における起動不良がある。起動不良とは、PCの起動処理が途中で停止し起動しないことであり、原因としては、振動や塵埃等による各種コネクタの接触不良などがある。
【0006】
【発明が解決しようとする課題】
従来の技術において、コンピュータ装置の電源スイッチを入れて起動した場合、又はリセット操作による再起動を行った場合に、起動不良が発生し、コンピュータ装置を起動することができない場合があった。
本発明が解決しようとする課題は、コンピュータ装置において、起動不良が発生した場合、自動的に再起動を行い、可能な限り、起動不良によるコンピュータ装置の停止を回避することにある。
【0007】
【課題を解決するための手段】
本発明の請求項1に記載のコンピュータ装置は、キーボードを備えるコンピュータ装置において、コンピュータ装置を起動するとき自己診断を行う自己診断手段と、コンピュータ装置とキーボードの通信状態を監視する監視手段と、前記自己診断手段による自己診断結果又は前記監視手段による監視結果が起動異常を示すときコンピュータ装置及びキーボードをリセットするリセット手段を備えるものである。
【0008】
本発明の請求項2に記載のコンピュータ装置は、請求項1に記載のコンピュータ装置であって、前記リセット手段によるリセット回数をカウントするカウント手段と、前記カウント手段がカウントしたリセット回数が予め定めた回数以上であるか否かを判別する回数判別手段と、前記回数判別手段によってリセット回数が予め定めた回数以上であると判別されたとき警報を出力する警報出力手段を備えるものである。
【0009】
【発明の実施の形態】
図1は、本発明のコンピュータ装置の一実施例の構成を示すブロック図である。主CPU(Central Processing Unit)1は、演算処理を行うものであり、プログラムを実行する。また、主CPU1は、コンピュータ装置の電源スイッチを入れて(ON)起動するとき、又はコンピュータ装置がリセットされて再起動するときに、自己診断(POST:Power On Self Test)を行い、自己診断結果を示すPOSTコードを出力する。
【0010】
監視回路2は、主CPU1に接続され、コンピュータ装置の電源電圧、温度、空冷ファンの回転状態を監視する。インタフェース回路3は、主CPU1に接続され、メモリ4、ビデオインタフェース5とバス6との間のデータの入出力を行う。メモリ4は、インタフェース回路3に接続され、コンピュータ装置で実行されるプログラム、プログラムの実行に使用されるデータ等を記憶する。ビデオインタフェース5は、インタフェース回路3に接続され、画像表示データの入出力を行う。
【0011】
バス6には、インタフェース回路3、通信入出力回路7、インタフェース回路9が接続され、データの伝送を行う。バス6は、図示しないが、ハードディスクの接続、ネットワーク通信用のLAN(Local Area Network)入出力回路の接続、システム監視用カードの接続にも用いられる。通信入出力回路7は、バス6、シリアルインタフェース回路11、スイッチ12に接続され、シリアル通信、キーボード通信の入出力を行う。
【0012】
副CPU8は、主CPU1の動作を監視するためのCPUであり、主CPU1に接続され、インタフェース回路9を介してバス6に接続される。インタフェース回路9は、副CPU8とバス6との間のデータの入出力を行う。フラッシュメモリ10は、副CPU8に接続され、POSTコード、エラーコードを記憶する。シリアルインタフェース回路11は、通信入出力回路7及び副CPU8に接続され、シリアル通信の入出力を行う。主CPU1と副CPU8は、インタフェース回路3、バス6、通信入出力回路7、シリアルインタフェース回路11を介してデータの通信をする。
【0013】
スイッチ12は、副CPU8に接続され、通信入出力回路7とコンソールエミュレータ14との間の通信(キーボード通信)の接続(ON)と切断(OFF)を切り換える。通信入出力回路7のキーボード通信線は、副CPU8に接続される。
【0014】
リセットスイッチ13は、副CPU8に接続され、副CPU8のリセット操作を行う。インタフェース回路9は、バス6に接続されるが、バス6を介して伝送されるリセット信号の副CPU8への入力を阻止する。副CPU8は、主CPU1の動作を監視するため、リセットスイッチ13によってのみリセットされる構成とする。
【0015】
コンソールエミュレータ14には、スイッチ12、キーボード15、マウス16が接続される。コンソールエミュレータ14は、キーボード15、マウス16を外した場合であっても、コンピュータ装置によりキーボードやマウスと同様に認識される。本実施例では、通信入出力回路7にスイッチ12を介してコンソールエミュレータ14を接続し、コンソールエミュレータ14にキーボード15、マウス16を接続することによって、コンピュータ装置の電源スイッチがONされ動作している状態で、キーボード15、マウス16を着脱することができる。アラーム出力部17は、副CPU8に接続され、使用者に起動不良を伝える警報(アラーム)を、文字表示、音声等で出力する。
なお、本実施例は、コンソールエミュレータ14を介してキーボード15をスイッチ12、通信入出力回路7に接続する構成としたが、コンソールエミュレータ14を介さずに、キーボード15をスイッチ12、通信入出力回路7に直接接続する構成として、実施することもできる。
【0016】
図2は、本実施例の通信入出力回路7とコンソールエミュレータ14の接続の詳細構成を示す図である。通信入出力回路7とコンソールエミュレータ14は、データ(DATA)線とクロック(CLK)線により、双方向の通信を行う。DATAはシリアル通信で伝送されるデータ、CLKはDATAが有効であることを示す信号である。主CPU1は、通信入出力回路7、バッファ回路18を介してコンソールエミュレータ14を制御するためのコマンドをコンソールエミュレータ14に送信する。コンソールエミュレータ用の電力(+5V)は、コンピュータ装置本体の電源から供給される。
【0017】
コンソールエミュレータ14は、DATA線、CLK線が、バッファ回路19を介してマイクロコンピュータ(マイコン)20に接続される。キーマトリックス21は、マイコン20に接続され、入力されたキーのデータをマイコン20に入力する。
【0018】
通信入出力回路7、マイコン20のDATA線及びCLK線の入出力は、各々、オープンコレクタタイプのバッファ回路18、19を介して接続されているので、双方が同時に出力しても動作停止又は動作不良を起こさない回路構成である。DATA線、CLK線、+5Vの電力供給線は、副CPU8によって制御されるスイッチ12によってONとOFFが切り換えられる。スイッチ12をOFFすることによって、マイコン20はリセットされる。ここで、電力供給線だけでなく、DATA線、CLK線もONとOFFを切り換える構成としたのは、DATA線、CLK線を接続したままの状態で電力供給線だけをOFFしても、バッファ回路19内のDATA線、CLK線に接続されたダイオードを経由してコンソールエミュレータ14に電力が供給されるのでリセットがかからないためである。
【0019】
図3は、本実施例の通信入出力回路7とコンソールエミュレータ14との通信状況を示す図である。コンピュータ装置の起動処理において、通信入出力回路7からコンソールエミュレータ14に、CPU1がコンソールエミュレータ14を認識するためのコマンド「イネーブル」を示すコードF4hが送信される。次に、コンソールエミュレータ14から通信入出力回路7に、受信確認(ACK)を示すコードFAhが送信される。
【0020】
通信入出力回路7からコンソールエミュレータ14に、マイコン20のリセットと自己診断(BAT)を指示するコマンド「リセット」を示すコードFFhが送信される。次に、コンソールエミュレータ14から通信入出力回路7に、受信確認(ACK)を示すコードFAhが送信される。
コンソールエミュレータ14から通信入出力回路7に、リセットコマンド受信後の自己診断の終了を示すコードAAhが送信される。
【0021】
ここで、コンピュータ装置が再起動されると、通信入出力回路7からコンソールエミュレータ14に、コンソールエミュレータ14からのDATA送信を禁止するCLK=Lが送信される。
通信入出力回路7からコンソールエミュレータ14に、マイコン20のリセットと自己診断(BAT)を指示するコマンド「リセット」を示すコードFFhが送信される。次に、コンソールエミュレータ14から通信入出力回路7に、受信確認(ACK)を示すコードFAhが送信される。
コンソールエミュレータ14から通信入出力回路7に、リセットコマンド受信後の自己診断の終了を示すコードAAhが送信される。
【0022】
コンピュータ装置の正常時の起動処理は、図3に示したパターンで毎回行われる。そこで、起動処理における通信状況(送受信されるコード、コードの送受信される順番)をフラッシュメモリ10に記憶しておき、副CPU8は、起動処理の通信状況をフラッシュメモリ10に記憶した正常時の通信状況と比較し、比較結果が異なる場合に異常が発生したと判断する。
【0023】
副CPU8は、主CPU1とコンソールエミュレータ14との通信状況を監視し、通信が異常であると判断した場合、主CPU1にリセット信号を送信しリセットをかけ、スイッチ12を制御してコンソールエミュレータ14への電力供給及び信号線を切断した後に接続し再起動させる。
副CPU8は、主CPU1とコンソールエミュレータ14の通信状況の監視に加えて、主CPU1がバス6を介して出力するPOSTコードを受信し監視する。
【0024】
主CPU1は、コンピュータ装置の電源スイッチを入れたときに、主CPU1、インタフェース回路3などの主要な回路を自己診断する。POSTコードは、自己診断が終了したステップを示し、インタフェース回路3を介してバス6に出力される。副CPU8は、自己診断が停止したときのPOSTコードを受信し、フラッシュメモリ10に記憶した後、主CPU1をリセットし、再起動させる。主CPU1他の回路に不具合があって自己診断が途中で停止すると、POSTコードは自己診断が停止したステップを示すので、使用者はPOSTコードを知ることによって不具合がある回路を判断することができる。
【0025】
副CPU8は、キーボード通信の監視、POSTコードの監視に加え、シリアル通信を利用して、OS(Operating System)の起動、アプリケーションプログラムの起動を監視する。
アプリケーションプログラムが起動したとき、主CPU1は副CPU8にシリアルインタフェースを介して起動終了を示すデータを送信し、副CPU8は、アプリケーションプログラムが起動したと判断する。
正常時のコンピュータ装置の起動時間を予め測定して、タイムアウト時間を決めてフラッシュメモリ10に記憶しておく。OS及びアプリケーションプログラムがタイムアウト時間を経過した後も起動しない場合に、副CPU8から主CPU1にリセットをかけ、再起動する。
【0026】
図4は、本実施例の副CPU8の動作を示すフローチャートである。コンピュータ装置の電源スイッチがONされると、副CPU8は起動回数のカウントを1にセットする(ST1)。これは、コンピュータ装置に不具合が発生した場合、再起動を延々と繰り返していつまでもアラームを出力できないことを防止し、再起動の回数を制限するためである。
【0027】
次に、時間の計測を開始する(ST2)。副CPU8は、通信入出力回路7とコンソールエミュレータ14とのキーボード通信の状態を監視し、コンソールエミュレータ14が自己診断を終了したとき通信入出力回路7に出力するコード=AAhを、時間の計測開始後10秒経過する前に受信した場合、コンピュータ装置の動作を正常と判断する(ST3a,ST3b)。ここで、10秒経過するまでに、AAhを受信しなかった場合、副CPU8は、バスインタフェース9、バス6を介して主CPU1からのPOSTコードを受信し、フラッシュメモリ10に、POSTコード、及びAAhを受信しなかったことを示すエラーコードを記憶する(ST3a,ST3b,ST7)。エラーコードは、予め副CPU8に記憶されている。
【0028】
副CPU8は、バス6、バスインタフェース9を介して主CPU1からPOSTコードを受信し、時間の計測開始後30秒経過する前に主CPU1の自己診断を終了し起動した状態を示すPOSTコード=FFhを受信した場合、コンピュータ装置の動作を正常と判断する(ST4a,ST4b)。副CPU8は、30秒経過するまでにPOSTコード=FFhを受信しなかった場合、フラッシュメモリ10にPOSTコード、及びFFhを受信しなかったことを示すエラーコードを記憶する(ST4a,ST4b,ST7)。
【0029】
主CPU1による自己診断が正常に終了した後、コンピュータ装置のOS(Operating System)が起動し、OSによってマウスの接続検出が行われ、シリアル通信の通信レートが、例えば、19200bpsから9600bpsに切り替わる。副CPU8は、このシリアル通信の通信レートの切り替わりによってOSの起動を判断することができる。時間の計測開始後3分経過する前に通信レートが切り替われば、副CPU8は、コンピュータ装置のOSが正常に起動したと判断する(ST5a,ST5b)。3分経過するまでに通信レートが切り替わらない場合、副CPU8は、フラッシュメモリ10にOSの起動不良を示すエラーコードを記憶する(ST5a,ST5b,ST7)。
【0030】
副CPU8は、主CPU1からアプリケーションプログラムの起動終了後にシリアルインタフェース回路11を介して送信される起動終了通知を、時間の計測開始後10分経過する前に受信すれば、アプリケーションプログラムが正常に起動したと判断する(ST6a,ST6b)。10分経過するまでに起動終了通知を受信しない場合、副CPU8は、フラッシュメモリ10にアプリケーションプログラムの起動不良を示すエラーコードを記憶する(ST6a,ST6b,ST7)。
以上の各処理で正常と判断されなかった場合(ST3b,ST4b,ST5b,又はST6bでYES)、起動回数のカウントが1であれば2にセットした後、主CPU1とコンソールエミュレータ14をリセットし、ST2の時間計測開始に戻って再起動する(ST8,ST10〜ST15)。
【0031】
起動回数のカウントが2であった場合、再起動をしても回復できなかったと判断し、副CPU8は、アラーム出力部17を介して、使用者に起動不良を伝えるアラームを、文字表示、音声等で出力する(ST8,ST9)。アラームを出力する場合、フラッシュメモリ10に記憶されたエラーコード、POSTコードを併せて出力することにより、使用者は不具合のあった箇所を判断することができる。
【0032】
図4で説明した、起動回数の制限値、コンピュータ装置の動作を正常と判断するための経過時間は、実際に使用されるコンピュータ装置に対応して変更して実施することができる。
【0033】
【発明の効果】
本発明のコンピュータ装置によれば、コンピュータ装置の起動不良による動作停止を回避し、再起動することができる。
本発明のコンピュータ装置によれば、コンピュータ装置の再起動を繰り返し行って起動しない場合、警報を出力することができる。
【図面の簡単な説明】
【図1】本発明のコンピュータ装置の一実施例の構成を示すブロック図である。
【図2】本実施例の通信入出力回路7とコンソールエミュレータ14の接続の詳細構成を示す図である。
【図3】本実施例の主CPU1とコンソールエミュレータ14との通信状態を示す図である。
【図4】本実施例の副CPU8の動作を示すフローチャートである。
【符号の説明】
1 主CPU
2 監視回路
3、9 インタフェース回路
4 メモリ
5 ビデオインタフェース
6 バス
7 通信入出力回路
8 副CPU
10 フラッシュメモリ
11 シリアルインタフェース回路
12 スイッチ
13 リセットスイッチ
14 コンソールエミュレータ
15 キーボード
16 マウス
17 アラーム出力部
18、19 バッファ回路
20 マイクロコンピュータ(マイコン)
21 キーマトリックス[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a computer device.
[0002]
[Prior art]
Malfunctions in computer devices such as personal computers (PCs) are caused by aging and life of components (eg, temperature rise due to cooling fan failure) and external factors (eg, power failure). There is. The CPU (Central Processing Unit) in the computer device monitors the rotational status of the cooling fan, the power failure signal of the uninterruptible power supply connected to the computer device, etc., due to the aging and life of the parts and the power failure. Can be detected by
[0003]
An example of such a conventional technique is described in Japanese Patent Application Laid-Open No. 2001-92738 “System Maintenance and Data Protection System for Computer Server”. It is equipped with a failure monitoring board (for power failure / voltage / temperature monitoring) and a spare unit (backup power supply, spare hard disk, etc.) in the computer. If a power failure occurs, switch to the backup power supply and supply power, and perform emergency stop processing. If power is restored after a power failure, power is automatically re-supplied, or data stored on the hard disk is backed up to a spare hard disk when the temperature rises beyond the normal temperature range. In this way, it is possible to cope with a failure of the computer server system and to protect data.
[0004]
As a defect in the PC, when the application program is operated on the PC, the memory secured by the application program is not released even after the operation ends, thereby reducing the usable memory capacity (memory leak). Mouse input may not be accepted (hangup).
As a method of avoiding a hang-up of the PC due to a memory leak, the available memory capacity is monitored by a program of the PC, and the PC is automatically restarted when the available memory capacity falls below a certain value. The method is commonly used.
[0005]
Further, as a defect in the PC, there is a start failure when the power switch is turned on to start the apparatus, or when the apparatus is reset and restarted. The start-up failure means that the start-up process of the PC is stopped halfway and does not start up, and causes include poor contact of various connectors due to vibration, dust, or the like.
[0006]
[Problems to be solved by the invention]
In the related art, when a computer device is started by turning on a power switch, or when a restart operation is performed by a reset operation, a start failure occurs and the computer device cannot be started in some cases.
The problem to be solved by the present invention is to automatically restart a computer device when a startup failure occurs, and to avoid stopping the computer device due to the startup failure as much as possible.
[0007]
[Means for Solving the Problems]
The computer device according to claim 1, wherein the computer device includes a keyboard. The computer device includes: a self-diagnosis unit that performs a self-diagnosis when the computer device is started; a monitoring unit that monitors a communication state between the computer device and the keyboard; When the self-diagnosis result by the self-diagnosis means or the monitoring result by the monitoring means indicates a startup abnormality, the computer device and the keyboard are reset.
[0008]
According to a second aspect of the present invention, there is provided the computer apparatus according to the first aspect, wherein the counting means for counting the number of resets by the reset means, and the number of resets counted by the counting means are predetermined. The apparatus includes a number-of-times determining means for determining whether the number of times is equal to or more than a number of times, and an alarm output means for outputting an alarm when the number of times of resetting is determined to be equal to or more than a predetermined number.
[0009]
BEST MODE FOR CARRYING OUT THE INVENTION
FIG. 1 is a block diagram showing a configuration of an embodiment of a computer device according to the present invention. The main CPU (Central Processing Unit) 1 performs arithmetic processing and executes a program. Also, the main CPU 1 performs a self-diagnosis (POST: Power On Self Test) when the computer device is turned on after being turned on (ON) or when the computer device is reset and restarted. Is output.
[0010]
The monitoring circuit 2 is connected to the main CPU 1 and monitors the power supply voltage and temperature of the computer device, and the rotation state of the cooling fan. The interface circuit 3 is connected to the main CPU 1 and inputs and outputs data between the memory 4, the video interface 5 and the bus 6. The memory 4 is connected to the interface circuit 3 and stores a program executed by the computer device, data used for executing the program, and the like. The video interface 5 is connected to the interface circuit 3 and inputs and outputs image display data.
[0011]
The interface circuit 3, the communication input / output circuit 7, and the interface circuit 9 are connected to the bus 6, and perform data transmission. Although not shown, the bus 6 is also used for connecting a hard disk, connecting a LAN (Local Area Network) input / output circuit for network communication, and connecting a system monitoring card. The communication input / output circuit 7 is connected to the bus 6, the serial interface circuit 11, and the switch 12, and performs input / output of serial communication and keyboard communication.
[0012]
The sub CPU 8 is a CPU for monitoring the operation of the main CPU 1, is connected to the main CPU 1, and is connected to the bus 6 via the interface circuit 9. The interface circuit 9 inputs and outputs data between the sub CPU 8 and the bus 6. The flash memory 10 is connected to the sub CPU 8 and stores a POST code and an error code. The serial interface circuit 11 is connected to the communication input / output circuit 7 and the sub CPU 8, and performs input / output of serial communication. The main CPU 1 and the sub CPU 8 communicate data via the interface circuit 3, bus 6, communication input / output circuit 7, and serial interface circuit 11.
[0013]
The switch 12 is connected to the sub CPU 8 and switches connection (ON) and disconnection (OFF) of communication (keyboard communication) between the communication input / output circuit 7 and the console emulator 14. The keyboard communication line of the communication input / output circuit 7 is connected to the sub CPU 8.
[0014]
The reset switch 13 is connected to the sub CPU 8 and performs a reset operation of the sub CPU 8. The interface circuit 9 is connected to the bus 6 and blocks input of a reset signal transmitted via the bus 6 to the sub CPU 8. The sub CPU 8 is configured to be reset only by the reset switch 13 in order to monitor the operation of the main CPU 1.
[0015]
The switch 12, the keyboard 15, and the mouse 16 are connected to the console emulator 14. Even when the keyboard 15 and the mouse 16 are removed, the console emulator 14 is recognized by the computer device in the same manner as the keyboard and the mouse. In this embodiment, a console emulator 14 is connected to the communication input / output circuit 7 via the switch 12, and a keyboard 15 and a mouse 16 are connected to the console emulator 14, so that the power switch of the computer device is turned on to operate. In this state, the keyboard 15 and the mouse 16 can be detached. The alarm output unit 17 is connected to the sub CPU 8 and outputs an alarm (alarm) for notifying the user of a startup failure by character display, voice, or the like.
In this embodiment, the keyboard 15 is connected to the switch 12 and the communication input / output circuit 7 via the console emulator 14. However, the keyboard 15 is connected to the switch 12 and the communication input / output circuit without the console emulator 14. 7 can be directly connected.
[0016]
FIG. 2 is a diagram showing a detailed configuration of connection between the communication input / output circuit 7 and the console emulator 14 according to the present embodiment. The communication input / output circuit 7 and the console emulator 14 perform bidirectional communication using a data (DATA) line and a clock (CLK) line. DATA is data transmitted by serial communication, and CLK is a signal indicating that DATA is valid. The main CPU 1 transmits a command for controlling the console emulator 14 to the console emulator 14 via the communication input / output circuit 7 and the buffer circuit 18. The power (+5 V) for the console emulator is supplied from the power supply of the computer device main body.
[0017]
The console emulator 14 has a DATA line and a CLK line connected to a microcomputer 20 via a buffer circuit 19. The key matrix 21 is connected to the microcomputer 20 and inputs the input key data to the microcomputer 20.
[0018]
The input / output of the communication input / output circuit 7 and the DATA line and the CLK line of the microcomputer 20 are connected via open-collector type buffer circuits 18 and 19, respectively. The circuit configuration does not cause a defect. The DATA line, the CLK line, and the + 5V power supply line are turned on and off by the switch 12 controlled by the sub CPU 8. By turning off the switch 12, the microcomputer 20 is reset. Here, the configuration in which not only the power supply line but also the DATA line and the CLK line are switched on and off is that even if only the power supply line is turned off while the DATA line and the CLK line are connected, the buffer may be used. This is because the power is supplied to the console emulator 14 via the diodes connected to the DATA line and the CLK line in the circuit 19, so that the reset is not performed.
[0019]
FIG. 3 is a diagram illustrating a communication state between the communication input / output circuit 7 and the console emulator 14 according to the present embodiment. In the startup processing of the computer device, a code F4h indicating a command “enable” for the CPU 1 to recognize the console emulator 14 is transmitted from the communication input / output circuit 7 to the console emulator 14. Next, a code FAh indicating reception confirmation (ACK) is transmitted from the console emulator 14 to the communication input / output circuit 7.
[0020]
A code FFh indicating a command “reset” for instructing reset of the microcomputer 20 and self-diagnosis (BAT) is transmitted from the communication input / output circuit 7 to the console emulator 14. Next, a code FAh indicating reception confirmation (ACK) is transmitted from the console emulator 14 to the communication input / output circuit 7.
A code AAh indicating the end of the self-diagnosis after receiving the reset command is transmitted from the console emulator 14 to the communication input / output circuit 7.
[0021]
Here, when the computer device is restarted, CLK = L prohibiting DATA transmission from the console emulator 14 is transmitted from the communication input / output circuit 7 to the console emulator 14.
A code FFh indicating a command “reset” for instructing reset of the microcomputer 20 and self-diagnosis (BAT) is transmitted from the communication input / output circuit 7 to the console emulator 14. Next, a code FAh indicating reception confirmation (ACK) is transmitted from the console emulator 14 to the communication input / output circuit 7.
A code AAh indicating the end of the self-diagnosis after receiving the reset command is transmitted from the console emulator 14 to the communication input / output circuit 7.
[0022]
The normal startup process of the computer device is performed every time according to the pattern shown in FIG. Therefore, the communication status (codes to be transmitted and received, the order in which the codes are transmitted and received) in the startup process is stored in the flash memory 10, and the sub CPU 8 stores the communication status of the startup process in the flash memory 10 during normal communication. It is determined that an abnormality has occurred if the comparison result is different from the situation.
[0023]
The sub CPU 8 monitors the communication status between the main CPU 1 and the console emulator 14, and when it determines that the communication is abnormal, sends a reset signal to the main CPU 1 to reset the main CPU 1, controls the switch 12, and sends the reset signal to the console emulator 14. After disconnecting the power supply and the signal line, it is connected and restarted.
The sub CPU 8 receives and monitors a POST code output from the main CPU 1 via the bus 6 in addition to monitoring the communication status between the main CPU 1 and the console emulator 14.
[0024]
The main CPU 1 performs self-diagnosis of main circuits such as the main CPU 1 and the interface circuit 3 when the power switch of the computer device is turned on. The POST code indicates a step at which the self-diagnosis has been completed, and is output to the bus 6 via the interface circuit 3. The sub CPU 8 receives the POST code when the self-diagnosis has been stopped, stores it in the flash memory 10, and then resets and restarts the main CPU 1. If the self-diagnosis is stopped halfway due to a failure in the main CPU 1 or another circuit, the POST code indicates the step in which the self-diagnosis has stopped, so that the user can determine the defective circuit by knowing the POST code. .
[0025]
The sub CPU 8 monitors activation of an OS (Operating System) and activation of an application program using serial communication in addition to monitoring of keyboard communication and monitoring of a POST code.
When the application program is started, the main CPU 1 transmits data indicating the end of the start to the sub CPU 8 via the serial interface, and the sub CPU 8 determines that the application program is started.
The startup time of the computer device in a normal state is measured in advance, and a timeout time is determined and stored in the flash memory 10. When the OS and the application program do not start even after the elapse of the timeout period, the sub CPU 8 resets the main CPU 1 and restarts.
[0026]
FIG. 4 is a flowchart illustrating the operation of the sub CPU 8 according to the present embodiment. When the power switch of the computer device is turned on, the sub CPU 8 sets the count of the number of times of activation to 1 (ST1). This is to prevent the alarm from being output forever after the restart is repeated endlessly and to limit the number of restarts when a failure occurs in the computer device.
[0027]
Next, time measurement is started (ST2). The sub-CPU 8 monitors the status of keyboard communication between the communication input / output circuit 7 and the console emulator 14, and starts measuring the code = AAh output to the communication input / output circuit 7 when the console emulator 14 completes the self-diagnosis. If received before the elapse of 10 seconds, the operation of the computer device is determined to be normal (ST3a, ST3b). Here, if AAh is not received before 10 seconds elapse, the sub CPU 8 receives the POST code from the main CPU 1 via the bus interface 9 and the bus 6 and stores the POST code and the An error code indicating that AAh was not received is stored (ST3a, ST3b, ST7). The error code is stored in the sub CPU 8 in advance.
[0028]
The sub CPU 8 receives the POST code from the main CPU 1 via the bus 6 and the bus interface 9 and terminates self-diagnosis of the main CPU 1 before 30 seconds have elapsed after the start of time measurement, and the POST code = FFh indicating the activated state. Is received, it is determined that the operation of the computer device is normal (ST4a, ST4b). If the POST code = FFh has not been received before 30 seconds have elapsed, the sub CPU 8 stores the POST code and an error code indicating that the FFh was not received in the flash memory 10 (ST4a, ST4b, ST7). .
[0029]
After the self-diagnosis by the main CPU 1 is completed normally, an OS (Operating System) of the computer device is started, the connection of the mouse is detected by the OS, and the communication rate of serial communication is switched from 19200 bps to 9600 bps, for example. The sub CPU 8 can determine the activation of the OS based on the switching of the communication rate of the serial communication. If the communication rate is switched before three minutes have elapsed after the start of time measurement, the sub CPU 8 determines that the OS of the computer device has started normally (ST5a, ST5b). If the communication rate is not switched before three minutes elapse, the sub CPU 8 stores an error code indicating an OS startup failure in the flash memory 10 (ST5a, ST5b, ST7).
[0030]
If the sub CPU 8 receives the start end notification transmitted from the main CPU 1 via the serial interface circuit 11 after the end of the start of the application program before the elapse of 10 minutes from the start of the time measurement, the application program has started normally. (ST6a, ST6b). If the startup end notification is not received before the elapse of 10 minutes, the sub CPU 8 stores an error code indicating an application program startup failure in the flash memory 10 (ST6a, ST6b, ST7).
If it is not determined that each of the above processes is normal (YES in ST3b, ST4b, ST5b, or ST6b), if the count of the number of startups is 1, it is set to 2, and then the main CPU 1 and console emulator 14 are reset. It returns to the time measurement start of ST2 and restarts (ST8, ST10 to ST15).
[0031]
If the count of the number of times of activation is 2, it is determined that recovery was not possible even after restarting, and the sub CPU 8 outputs an alarm that notifies the user of the activation failure via the alarm output unit 17 to a character display and a voice. And the like (ST8, ST9). When an alarm is output, the error code and the POST code stored in the flash memory 10 are output together, so that the user can determine a portion where a problem has occurred.
[0032]
The limit value of the number of times of activation and the elapsed time for judging that the operation of the computer device is normal as described with reference to FIG. 4 can be changed according to the computer device actually used.
[0033]
【The invention's effect】
According to the computer device of the present invention, the computer device can be restarted while avoiding an operation stop due to a start failure of the computer device.
According to the computer device of the present invention, an alarm can be output when the computer device is not restarted by repeatedly restarting the computer device.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of an embodiment of a computer device of the present invention.
FIG. 2 is a diagram illustrating a detailed configuration of a connection between a communication input / output circuit 7 and a console emulator 14 according to the present embodiment.
FIG. 3 is a diagram showing a communication state between the main CPU 1 and the console emulator 14 of the embodiment.
FIG. 4 is a flowchart illustrating an operation of a sub CPU 8 according to the present embodiment.
[Explanation of symbols]
1 Main CPU
2 Monitoring circuit 3, 9 Interface circuit 4 Memory 5 Video interface 6 Bus 7 Communication input / output circuit 8 Sub CPU
Reference Signs List 10 Flash memory 11 Serial interface circuit 12 Switch 13 Reset switch 14 Console emulator 15 Keyboard 16 Mouse 17 Alarm output unit 18, 19 Buffer circuit 20 Microcomputer (microcomputer)
21 key matrix