JP2011248396A - Electronic circuit system, microcomputer, and operation method for electronic circuit system - Google Patents

Electronic circuit system, microcomputer, and operation method for electronic circuit system Download PDF

Info

Publication number
JP2011248396A
JP2011248396A JP2010117543A JP2010117543A JP2011248396A JP 2011248396 A JP2011248396 A JP 2011248396A JP 2010117543 A JP2010117543 A JP 2010117543A JP 2010117543 A JP2010117543 A JP 2010117543A JP 2011248396 A JP2011248396 A JP 2011248396A
Authority
JP
Japan
Prior art keywords
signal
circuit
cpu
port
output
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.)
Withdrawn
Application number
JP2010117543A
Other languages
Japanese (ja)
Inventor
Kunihiko Yanagibashi
邦彦 柳橋
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.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics 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 Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2010117543A priority Critical patent/JP2011248396A/en
Publication of JP2011248396A publication Critical patent/JP2011248396A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Microcomputers (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an electronic circuit system that can more certainly relieve an external device in case of CPU failure than before.SOLUTION: A first microcomputer includes: a CPU; a plurality of ports; an interface circuit for outputting a CPU output signal generated by the CPU to an external device through any one of the plurality of ports; and a failure mode detection circuit for determining whether the CPU is in failure, and generating a failure signal to provide it to the interface circuit when determining the CPU is in failure. A simulation signal generation circuit generates a simulation signal that simulates the CPU output signal. The plurality of ports include a first port to which the simulation signal is input when the CPU is in failure. The interface circuit changes a transmission path of signals so that the simulation signal input by the first port is output through a second port that is different from the first port without intervening the CPU when the failure signal is received.

Description

本発明は、電気回路システム、マイクロコンピュータ、及び電気回路システムの動作方法に関する。   The present invention relates to an electric circuit system, a microcomputer, and an operation method of the electric circuit system.

マイクロコンピュータなどの電気回路装置は、CPUを備えており、CPUによって外部装置の制御などを行う。CPUの動作に異常が生じると、外部装置に対して異常な信号が供給され、外部装置が誤動作してしまう可能性がある。   An electric circuit device such as a microcomputer includes a CPU, and an external device is controlled by the CPU. When an abnormality occurs in the operation of the CPU, an abnormal signal is supplied to the external device, and the external device may malfunction.

上記に関連して、特許文献1(特開平10−49404号公報)には、ウォッチドッグタイマによるリセット動作の回数を監視して、的確な障害処理を行うリセット処理システムが開示されている。図1は、特許文献1に記載されたリセット処理システムを示すブロック図である。このリセット処理システムは、CPU111、マルチバイブレータ112、マルチバイブレータ113、オア回路114、カウンタ116、及び異常処理起動部121を備えている。リセット時には、CPUが、カウンタ116から、リセット回数情報信号を取得する。リセット回数が設定回数を超えている場合、CPU111は、信号D7をハイレベルに強制制御する。信号D7は、オア回路114に供給され、オア回路114ではCPUALM+信号D8がハイレベルに制御される。信号D8はシステムの外部に供給され、CPUが異常動作したことを報知する。さらに、異常処理起動部21は、CPU111における実行プログラムを変更し、別途に用意した異常時専用プログラムを起動する。異常時専用プログラムは、最低限の機能だけをサポートしており、CPU111が管理しているデバイスの誤動作が防止される。   In relation to the above, Patent Document 1 (Japanese Patent Laid-Open No. 10-49404) discloses a reset processing system that monitors the number of reset operations by a watchdog timer and performs an appropriate failure process. FIG. 1 is a block diagram showing a reset processing system described in Patent Document 1. As shown in FIG. The reset processing system includes a CPU 111, a multivibrator 112, a multivibrator 113, an OR circuit 114, a counter 116, and an abnormal process activation unit 121. At the time of resetting, the CPU acquires a reset number information signal from the counter 116. When the reset count exceeds the set count, the CPU 111 forcibly controls the signal D7 to a high level. The signal D7 is supplied to the OR circuit 114, and the CPUALM + signal D8 is controlled to a high level in the OR circuit 114. A signal D8 is supplied to the outside of the system to notify that the CPU has operated abnormally. Furthermore, the abnormal process starting unit 21 changes an execution program in the CPU 111 and starts a special program for abnormal times prepared separately. The dedicated program at the time of abnormality supports only the minimum functions, and the malfunction of the device managed by the CPU 111 is prevented.

特開平10−49404号公報JP-A-10-49404

特許文献1に記載されたリセット処理システムによれば、プログラムバグによってCPUが異常状態となった場合には、外部装置の誤動作を防止することができる。しかしながら、CPUを構成する回路素子が故障した場合や、異常時専用プログラム自体が故障した場合には、外部装置に対して期待しない信号が出力されてしまう可能性がある。従って、外部装置を救済することができない、という問題点があった。   According to the reset processing system described in Patent Document 1, when the CPU is in an abnormal state due to a program bug, it is possible to prevent malfunction of the external device. However, when a circuit element that constitutes the CPU fails or when the abnormal dedicated program itself fails, an unexpected signal may be output to the external device. Therefore, there is a problem that the external device cannot be relieved.

本発明に係る電気回路システムは、マイクロコンピュータと、模擬信号生成回路とを具備する。前記マイクロコンピュータは、CPUと、複数のポートと、前記CPUにより生成された出力信号を前記複数のポートのいずれかを介して外部装置に出力する、インタフェース回路と、前記CPUが故障しているか否かを判定し、故障していると判定した場合に故障信号を生成して前記インタフェース回路に供給する、故障モード検出回路とを備える。前記模擬信号生成回路は、前記出力信号を模擬した模擬信号を生成する。前記複数のポートは、故障時に前記模擬信号が入力される、第1ポートを有している。前記インタフェース回路は、前記故障信号を取得した場合に、前記出力信号がマスクされ、前記模擬信号が前記第1ポートから前記CPUを介さずに前記外部装置へ出力されるように、信号の伝達経路を変更する。   The electric circuit system according to the present invention includes a microcomputer and a simulation signal generation circuit. The microcomputer includes a CPU, a plurality of ports, an interface circuit that outputs an output signal generated by the CPU to an external device via any of the plurality of ports, and whether the CPU is out of order. A failure mode detection circuit that generates a failure signal and supplies the failure signal to the interface circuit when it is determined that a failure has occurred. The simulation signal generation circuit generates a simulation signal that simulates the output signal. The plurality of ports have a first port through which the simulation signal is input when a failure occurs. When the interface circuit acquires the failure signal, the output signal is masked, and the simulated signal is output from the first port to the external device without passing through the CPU. To change.

本発明に係るマイクロコンピュータは、上述の電気回路システムで用いられる、マイクロコンピュータである。   The microcomputer according to the present invention is a microcomputer used in the above-described electric circuit system.

本発明に係る電気回路システムの動作方法は、正常時に、CPUにより生成された出力信号を複数のポートのいずれかを介して外部装置に出力するステップと、前記CPUが故障しているか否かを判定するステップと、前記CPUが故障した場合に、前記出力信号を模擬した模擬信号を生成し、前記複数のポートに含まれる第1ポートに入力するステップと、前記CPUが故障した場合に、前記出力信号がマスクされ、前記模擬信号が前記第1ポートから前記CPUを介さずに外部装置へ出力されるように、信号の伝達経路を変更するステップとを具備する。   The operation method of the electric circuit system according to the present invention includes a step of outputting an output signal generated by the CPU to an external device through one of a plurality of ports in a normal state, and whether or not the CPU is out of order. Determining, generating a simulation signal that simulates the output signal when the CPU fails, and inputting the simulation signal to a first port included in the plurality of ports; And changing the signal transmission path so that the output signal is masked and the simulation signal is output from the first port to the external device without going through the CPU.

本発明によれば、CPUが故障した場合に、より確実に外部装置を救済することのできる、電気回路システム、マイクロコンピュータ、及び電気回路システムの動作方法が提供される。   According to the present invention, there are provided an electric circuit system, a microcomputer, and an operation method of the electric circuit system that can more reliably relieve an external device when a CPU fails.

特許文献1に記載されたリセット処理システムを示すブロック図である。It is a block diagram which shows the reset processing system described in patent document 1. 第1の実施形態に係る電気回路システムを示す概略図である。1 is a schematic diagram showing an electric circuit system according to a first embodiment. マイクロコンピュータの構成を示すブロック図である。It is a block diagram which shows the structure of a microcomputer. 出力制御回路を示す概略図である。It is the schematic which shows an output control circuit. 出力イネーブル信号制御回路を示す概略図である。It is the schematic which shows an output enable signal control circuit. 第1の実施形態に係る電気回路システムの動作方法を示すフローチャートである。It is a flowchart which shows the operation | movement method of the electric circuit system which concerns on 1st Embodiment. 第2の実施形態に係る電気回路システムを示す概略図である。It is the schematic which shows the electric circuit system which concerns on 2nd Embodiment. 第2の実施形態に係る電気回路システムを示す概略図である。It is the schematic which shows the electric circuit system which concerns on 2nd Embodiment. 入出力制御回路の一例を示す概略図である。It is the schematic which shows an example of an input-output control circuit. 入力イネーブル信号制御回路の一例を示す概略図である。It is the schematic which shows an example of an input enable signal control circuit. 出力イネーブル信号制御回路の一例を示す概略図である。It is the schematic which shows an example of an output enable signal control circuit. 電気回路システムの動作方法を示すタイミングチャートである。It is a timing chart which shows the operation | movement method of an electric circuit system. 故障時における入力ポートと出力ポートとの組み合わせの一例を示す概念図である。It is a conceptual diagram which shows an example of the combination of the input port and output port at the time of a failure.

以下に、図面を参照しつつ、本発明の実施形態について説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

(第1の実施形態)
図2は、本実施形態に係る電気回路システム1を示す概略図である。図2に示されるように、この電気回路システム1は、マイクロコンピュータ2(第1マイクロコンピュータ)、及びマスターマイコン3(第2マイクロコンピュータ)を備えている。
(First embodiment)
FIG. 2 is a schematic diagram showing an electric circuit system 1 according to the present embodiment. As shown in FIG. 2, the electric circuit system 1 includes a microcomputer 2 (first microcomputer) and a master microcomputer 3 (second microcomputer).

マイクロコンピュータ2は、CPU4、故障モード検出回路5、リセット生成回路6、入出力インタフェース7、シリアル通信回路10、及び複数のポート13(13−0〜13−4)を有している。CPU4、故障モード検出回路5、リセット生成回路6、及び入出力インタフェース7は、システムバス8を介してアクセス可能に接続されている。入出力インタフェース7は、ポート13−0〜ポート13−3を介した信号の入出力を制御する回路である。シリアル通信回路10は、ポート13−4(第1ポート;シリアル通信ポート)を介した信号の入出力を制御する回路である。マイクロコンピュータ2は、複数のポート13を介して、制御対象となる外部装置(セット)に接続されている。   The microcomputer 2 includes a CPU 4, a failure mode detection circuit 5, a reset generation circuit 6, an input / output interface 7, a serial communication circuit 10, and a plurality of ports 13 (13-0 to 13-4). The CPU 4, failure mode detection circuit 5, reset generation circuit 6, and input / output interface 7 are connected via a system bus 8 so as to be accessible. The input / output interface 7 is a circuit that controls input / output of signals via the port 13-0 to the port 13-3. The serial communication circuit 10 is a circuit that controls input / output of signals via the port 13-4 (first port; serial communication port). The microcomputer 2 is connected to an external device (set) to be controlled via a plurality of ports 13.

マスターマイコン3は、マイクロコンピュータ2を制御する機能を有している。マスターマイコン3は、模擬信号生成回路11、及びシリアル通信回路12を備えている。シリアル通信回路12は、マイクロコンピュータ2のポート13−4に接続されている。模擬信号生成回路11は、模擬信号及びポート設定信号を生成し、シリアル通信回路12を介してマイクロコンピュータ2に供給する機能を有している。   The master microcomputer 3 has a function of controlling the microcomputer 2. The master microcomputer 3 includes a simulation signal generation circuit 11 and a serial communication circuit 12. The serial communication circuit 12 is connected to the port 13-4 of the microcomputer 2. The simulation signal generation circuit 11 has a function of generating a simulation signal and a port setting signal and supplying the simulation signal and the port setting signal to the microcomputer 2 via the serial communication circuit 12.

マイクロコンピュータ2において、CPU4が故障した場合には、外部装置に対して期待しない信号が出力され、外部装置が誤動作する可能性がある。そこで、電気回路システム1には、CPU4が故障した場合に外部装置を救済する機能が搭載されている。以下に、電気回路システム1の概略動作について説明する。   In the microcomputer 2, when the CPU 4 fails, an unexpected signal is output to the external device, and the external device may malfunction. Therefore, the electric circuit system 1 is equipped with a function for relieving the external device when the CPU 4 fails. Below, schematic operation | movement of the electric circuit system 1 is demonstrated.

通常動作時には、CPU4により生成された出力信号(以下、CPU出力信号と称す)は、入出力インタフェース7に供給される。入出力インタフェース7は、CPU出力信号を、複数のポート13の何れかを介して、マイクロコンピュータ2によって管理される外部装置に出力する。   During normal operation, an output signal (hereinafter referred to as a CPU output signal) generated by the CPU 4 is supplied to the input / output interface 7. The input / output interface 7 outputs a CPU output signal to an external device managed by the microcomputer 2 via any of the plurality of ports 13.

一方、CPU4が故障した場合には、故障モード検出回路5が、CPU4の故障を検知し、故障信号を生成する。故障信号は、入出力インタフェース7に供給され、ポート13−3を介してマスターマイコン3に送信される。また、故障信号を取得した入出力インタフェース7は、信号の伝達経路を変更する。具体的には、入出力インタフェース7は、CPU出力信号が外部装置に出力されないように(CPU出力信号がマスクされるように)、信号の伝達経路を変更する。また、入出力インタフェース7は、シリアル通信回路10から送られてくる信号が、CPU4を介することなく、複数のポート13(13−0〜13−3)を介して出力されるように、信号の伝達経路を変更する。一方、マスターマイコン3では、故障信号を取得すると、模擬信号生成回路11が、模擬信号及びポート設定信号を生成する。ここで、模擬信号とは、CPU出力信号を模擬した信号である。また、ポート設定信号は、故障時に出力ポートとして使用するポート(以下、第2ポート)を特定する信号である。模擬信号及びポート設定信号は、シリアル通信回路12を介して、マイクロコンピュータ2に供給される。マイクロコンピュータ2では、シリアル通信回路10が、模擬信号及びポート設定信号を取得する。シリアル通信回路10は、ポート設定信号に基いて、複数のポート13(13−0〜13−3)のなかから第2ポートを選択する。更に、シリアル通信回路10は、模擬信号を入出力インタフェース7に供給する。入出力インタフェース7は、模擬信号を、第2ポートを介して、外部装置に向けて出力する。   On the other hand, when the CPU 4 fails, the failure mode detection circuit 5 detects the failure of the CPU 4 and generates a failure signal. The failure signal is supplied to the input / output interface 7 and transmitted to the master microcomputer 3 via the port 13-3. The input / output interface 7 that has acquired the failure signal changes the signal transmission path. Specifically, the input / output interface 7 changes the signal transmission path so that the CPU output signal is not output to the external device (so that the CPU output signal is masked). In addition, the input / output interface 7 outputs the signal so that the signal transmitted from the serial communication circuit 10 is output via the plurality of ports 13 (13-0 to 13-3) without passing through the CPU 4. Change the transmission path. On the other hand, when the master microcomputer 3 acquires the failure signal, the simulation signal generation circuit 11 generates a simulation signal and a port setting signal. Here, the simulated signal is a signal that simulates a CPU output signal. The port setting signal is a signal for specifying a port (hereinafter referred to as a second port) used as an output port at the time of failure. The simulation signal and the port setting signal are supplied to the microcomputer 2 via the serial communication circuit 12. In the microcomputer 2, the serial communication circuit 10 acquires a simulation signal and a port setting signal. The serial communication circuit 10 selects the second port from the plurality of ports 13 (13-0 to 13-3) based on the port setting signal. Further, the serial communication circuit 10 supplies a simulation signal to the input / output interface 7. The input / output interface 7 outputs the simulation signal to the external device via the second port.

尚、模擬信号としては、外部装置を最低限必要な程度に動作させることのできる信号が用いられればよく、必ずしもCPU出力信号と全く同じ信号が用いられる必要はない。   As the simulation signal, a signal that can operate the external device to the minimum necessary level may be used, and it is not always necessary to use the same signal as the CPU output signal.

上述の動作により、故障時には、CPU出力信号は、マスクされ、外部装置に供給されない。そのため、外部装置が誤動作してしまうことが防止される。また、マイクロコンピュータ2においては、ポート13−4(第1ポート)から入力された模擬信号が、CPU4を介することなく、ポート設定信号によって指定された出力ポート(第2ポート)を介して、外部装置へ出力される。これにより、故障したCPU4を用いることなく、マスターマイコン3によって外部装置の動作を制御することができ、外部装置を救済することができる。   By the above-described operation, the CPU output signal is masked and not supplied to the external device at the time of failure. This prevents the external device from malfunctioning. In the microcomputer 2, the simulation signal input from the port 13-4 (first port) is externally output via the output port (second port) designated by the port setting signal without passing through the CPU 4. Output to the device. Accordingly, the operation of the external device can be controlled by the master microcomputer 3 without using the failed CPU 4, and the external device can be relieved.

次いで、本実施形態に係る電気回路システム1について詳細に説明する。   Next, the electric circuit system 1 according to the present embodiment will be described in detail.

図3は、マイクロコンピュータ2の構成を示すブロック図であり、故障モード検出回路5の構成が詳細に示している。図3に示されるように、故障モード検出回路5は、異常動作検出回路14、及び異常動作カウンタ回路18を備えている。   FIG. 3 is a block diagram showing the configuration of the microcomputer 2, and shows the configuration of the failure mode detection circuit 5 in detail. As shown in FIG. 3, the failure mode detection circuit 5 includes an abnormal operation detection circuit 14 and an abnormal operation counter circuit 18.

異常動作検出回路14は、CPU4が異常状態であるか否かを検出し、異常状態である場合にリセット要求信号を生成する回路である。異常動作検出回路14は、ウォッチドッグタイマ15、不正アクセス監視回路16、及びOR回路17を備えている。   The abnormal operation detection circuit 14 is a circuit that detects whether the CPU 4 is in an abnormal state and generates a reset request signal when the CPU 4 is in an abnormal state. The abnormal operation detection circuit 14 includes a watchdog timer 15, an unauthorized access monitoring circuit 16, and an OR circuit 17.

ウォッチドッグタイマ15は、カウント値を保持しており、そのカウント値は時間経過に応じてインクリメントされる。ウォッチドッグタイマ15には、CPU4から所定の時間間隔でWDTカウント値クリア命令が供給される。ウォッチドッグタイマ15は、WDTカウント値クリア命令に応じて、カウント値をリセットする。ここで、カウント値がオーバーフローした場合には、CPU4の動作が異常であると判断される。この場合、ウォッチドッグタイマ15は、WDTリセット要求信号を生成してOR回路17に供給する。   The watchdog timer 15 holds a count value, and the count value is incremented as time elapses. The watchdog timer 15 is supplied with a WDT count value clear command from the CPU 4 at predetermined time intervals. The watchdog timer 15 resets the count value in response to the WDT count value clear command. Here, when the count value overflows, it is determined that the operation of the CPU 4 is abnormal. In this case, the watchdog timer 15 generates a WDT reset request signal and supplies it to the OR circuit 17.

不正アクセス監視回路16は、不正なアクセスが行なわれているか否かを監視する回路である。不正アクセス監視回路16は、CPU4から、アクセスメモリ情報及び実行命令情報を取得し、これらに基いて不正なアクセスの有無を判定する。不正なアクセスが発生した場合、不正アクセス監視回路16は、不正アクセスリセット要求信号を生成してOR回路17に供給する。   The unauthorized access monitoring circuit 16 is a circuit that monitors whether unauthorized access is being performed. The unauthorized access monitoring circuit 16 obtains access memory information and execution command information from the CPU 4 and determines the presence or absence of unauthorized access based on these. When unauthorized access occurs, the unauthorized access monitoring circuit 16 generates an unauthorized access reset request signal and supplies it to the OR circuit 17.

OR回路17は、WDTリセット要求信号または不正アクセスリセット要求信号を取得した場合、リセット要求信号を生成して、異常動作カウント回路18及びリセット生成回路6に供給する。   When acquiring the WDT reset request signal or the unauthorized access reset request signal, the OR circuit 17 generates a reset request signal and supplies it to the abnormal operation count circuit 18 and the reset generation circuit 6.

異常動作カウンタ回路18は、CPU4が故障したのか否かを判定する回路である。異常動作カウンタ回路18は、リセット処理が行われた回数(リセット要求信号の発生回数)をカウントする機能を有している。すなわち、異常動作カウンタ回路18は、リセット要求信号を取得すると、カウント値をインクリメントする。異常動作カウンタ回路18は、カウンタ値が予め設定された回数(n回)を超えたか否かを判定し、超えた場合には、故障信号を生成する。故障信号は、リセット生成回路6、シリアル通信回路10、及び入出力インタフェース7に供給される。本実施形態では、故障信号として、ハイレベル信号が供給されるものとする。   The abnormal operation counter circuit 18 is a circuit that determines whether or not the CPU 4 has failed. The abnormal operation counter circuit 18 has a function of counting the number of times reset processing has been performed (the number of times the reset request signal has been generated). That is, when the abnormal operation counter circuit 18 acquires the reset request signal, the abnormal operation counter circuit 18 increments the count value. The abnormal operation counter circuit 18 determines whether or not the counter value has exceeded a preset number of times (n times), and if it exceeds, generates a failure signal. The failure signal is supplied to the reset generation circuit 6, the serial communication circuit 10, and the input / output interface 7. In the present embodiment, a high level signal is supplied as a failure signal.

リセット生成回路6は、CPU4の異常時に、CPU4をリセットする回路である。リセット生成回路6は、リセット要求信号を取得すると、リセット信号を生成する。本実施形態では、リセット信号として、ローレベル信号が供給されるものとする。リセット信号は、CPU4、シリアル通信回路10、及び入出力インタフェース7に供給される。CPU4は、リセット信号を取得した場合、動作をリセットする。リセット時には、CPU4は、動作を行わない。ここで、異常動作カウント回路18により故障信号が生成されなかった場合には、リセット生成回路6は、CPU4のリセット処理が終了した後に、リセット信号の供給を停止する。一方、異常動作カウンタ回路18から故障信号が送られてきた場合には、リセット生成回路6は、リセット信号を供給し続ける。尚、故障信号が送られてくるよりも前にリセット処理が終了していた場合、リセット生成回路6は、故障信号を取得した時点で、ローレベルのリセット信号を生成しなおす。   The reset generation circuit 6 is a circuit that resets the CPU 4 when the CPU 4 is abnormal. When the reset generation circuit 6 acquires the reset request signal, the reset generation circuit 6 generates a reset signal. In this embodiment, it is assumed that a low level signal is supplied as the reset signal. The reset signal is supplied to the CPU 4, the serial communication circuit 10, and the input / output interface 7. When the CPU 4 acquires the reset signal, the CPU 4 resets the operation. At the time of reset, the CPU 4 does not perform an operation. Here, when a failure signal is not generated by the abnormal operation count circuit 18, the reset generation circuit 6 stops supplying the reset signal after the reset process of the CPU 4 is completed. On the other hand, when a failure signal is sent from the abnormal operation counter circuit 18, the reset generation circuit 6 continues to supply the reset signal. If the reset process has been completed before the failure signal is sent, the reset generation circuit 6 regenerates a low-level reset signal when the failure signal is acquired.

次いで、シリアル通信回路10について説明する。シリアル通信回路10は、シリアル通信ポート13−4(図1参照)を介して、マスターマイコン3とシリアル通信を行なう回路である。正常動作時には、シリアル通信回路10は、マスターマイコン3から受信したシリアル信号を、システムバス8を介してCPU4に供給する。また、CPU4により生成されたマスターマイコン3に向けのシリアル出力信号は、シリアル通信回路10を介してマスターマイコン3に送信される。一方、故障時(故障信号を取得した場合)には、既述のように、マスターマイコン3から模擬信号及びポート設定信号が、シリアル通信回路10に送られる。シリアル通信回路10は、模擬信号およびポート設定信号を、入出力インタフェース7に供給する。   Next, the serial communication circuit 10 will be described. The serial communication circuit 10 is a circuit that performs serial communication with the master microcomputer 3 via the serial communication port 13-4 (see FIG. 1). During normal operation, the serial communication circuit 10 supplies the serial signal received from the master microcomputer 3 to the CPU 4 via the system bus 8. A serial output signal generated by the CPU 4 and directed to the master microcomputer 3 is transmitted to the master microcomputer 3 via the serial communication circuit 10. On the other hand, at the time of failure (when a failure signal is acquired), a simulation signal and a port setting signal are sent from the master microcomputer 3 to the serial communication circuit 10 as described above. The serial communication circuit 10 supplies a simulation signal and a port setting signal to the input / output interface 7.

次いで、図4および図5を参照し、入出力インタフェース7について詳細に説明する。入出力インタフェース7は、出力制御回路30、及び出力イネーブル信号制御回路31を備えている。出力制御回路30は、信号の伝達経路を制御する回路である。出力イネーブル信号制御回路31は、出力イネーブル信号を制御する回路である。出力制御回路30は、各ポート13に対応して設けられている。出力イネーブル信号制御回路31も、各ポート13に対応して設けられている。   Next, the input / output interface 7 will be described in detail with reference to FIGS. 4 and 5. The input / output interface 7 includes an output control circuit 30 and an output enable signal control circuit 31. The output control circuit 30 is a circuit that controls a signal transmission path. The output enable signal control circuit 31 is a circuit that controls the output enable signal. The output control circuit 30 is provided corresponding to each port 13. An output enable signal control circuit 31 is also provided corresponding to each port 13.

図4は、出力制御回路30の一例を示す概略図である。図4には、一例として、ポート13−0に対応して設けられた出力制御回路30−0の構成が詳細に示されている。図4に示されるように、出力制御回路30は、AND回路19、AND回路20、OR回路21、及びAND回路22を備えている。AND回路19の一方の入力端は、異常動作カウンタ回路18に接続されており、故障時には故障信号(MODE)が供給される。AND回路19の他方の入力端は、リセット生成回路6に接続されており、故障時にはリセット信号(RESTET)の反転信号が供給される。AND回路20の一方の入力端は、CPU出力信号(Dout0(fromCPU))が供給されるように構成されている。AND回路20の他方の入力端は、AND回路19の出力端に接続されている。AND回路22は、一方の入力端でシリアル通信回路10に接続され、他方の入力端でAND回路19の出力端に接続されている。シリアル通信回路10からは、AND回路19に対して、模擬信号が供給される。OR回路21は、一方の入力端でAND回路20の出力端に接続され、他方の入力端でAND回路22の出力端に接続されている。OR回路21の出力端は、各ポート13に接続されている。   FIG. 4 is a schematic diagram illustrating an example of the output control circuit 30. FIG. 4 shows in detail the configuration of the output control circuit 30-0 provided corresponding to the port 13-0 as an example. As shown in FIG. 4, the output control circuit 30 includes an AND circuit 19, an AND circuit 20, an OR circuit 21, and an AND circuit 22. One input terminal of the AND circuit 19 is connected to the abnormal operation counter circuit 18, and a failure signal (MODE) is supplied when a failure occurs. The other input terminal of the AND circuit 19 is connected to the reset generation circuit 6 and an inverted signal of the reset signal (RESETT) is supplied in the event of a failure. One input terminal of the AND circuit 20 is configured to be supplied with a CPU output signal (Dout0 (fromCPU)). The other input terminal of the AND circuit 20 is connected to the output terminal of the AND circuit 19. The AND circuit 22 is connected to the serial communication circuit 10 at one input end, and is connected to the output end of the AND circuit 19 at the other input end. A simulation signal is supplied from the serial communication circuit 10 to the AND circuit 19. The OR circuit 21 is connected to the output terminal of the AND circuit 20 at one input terminal and connected to the output terminal of the AND circuit 22 at the other input terminal. The output terminal of the OR circuit 21 is connected to each port 13.

上述の入出力制御回路30の動作について説明する。   The operation of the input / output control circuit 30 will be described.

正常時には、AND回路19の一方の入力端には、故障信号(ハイレベル)は供給されず、ローレベルの信号が供給される。そのため、AND回路19の出力端からは、ローレベルの信号が出力される。その結果、AND回路20の他方の入力端には、ハイレベルの信号が供給される。従って、AND回路20の出力端からは、CPU出力信号Doutが出力される。また、AND回路22の他方の入力端には、AND回路19から、ローレベル信号が供給される。そのため、AND回路22の出力端からは、模擬信号に関係なく、ローレベル信号が供給される。OR回路21の他方の入力端には、AND回路22から、ローレベル信号が供給される。従って、OR回路21の出力端からは、AND回路20から出力された信号(出力信号Dout)が出力されることになる。すなわち、正常時には、CPU出力信号が各ポート13から出力される。   During normal operation, a failure signal (high level) is not supplied to one input terminal of the AND circuit 19, but a low level signal is supplied. Therefore, a low level signal is output from the output terminal of the AND circuit 19. As a result, a high level signal is supplied to the other input terminal of the AND circuit 20. Therefore, the CPU output signal Dout is output from the output terminal of the AND circuit 20. Further, a low level signal is supplied from the AND circuit 19 to the other input terminal of the AND circuit 22. Therefore, a low level signal is supplied from the output terminal of the AND circuit 22 regardless of the simulation signal. A low level signal is supplied from the AND circuit 22 to the other input terminal of the OR circuit 21. Therefore, a signal (output signal Dout) output from the AND circuit 20 is output from the output terminal of the OR circuit 21. That is, during normal operation, a CPU output signal is output from each port 13.

一方、故障時には、AND回路19の一方の入力端に故障信号(ハイレベル)が供給され、他方の入力端にリセット信号の反転信号(ハイレベル)が供給される。その結果、AND回路19の出力端からは、ハイレベル信号が出力される。これにより、AND回路20の他方の入力端には、ローレベル信号が供給される。従って、AND回路20は、CPU出力信号(Dout)に関わらず、ローレベル信号を出力する。すなわち、CPU出力信号がマスクされる。また、AND回路22の他方の入力端には、AND回路19から、ハイレベル信号が供給される。その結果、AND回路22は、シリアル通信回路10から受け取った模擬信号を出力することになる。更に、OR回路21には、AND回路20からローレベル信号が入力され、AND回路22から模擬信号が入力される。その結果、OR回路21は、模擬信号を各ポート13に向けて出力することになる。すなわち、故障時には、CPU出力信号Doutはマスクされ、模擬信号が各ポート13から出力される。   On the other hand, when a failure occurs, a failure signal (high level) is supplied to one input terminal of the AND circuit 19, and an inverted signal (high level) of a reset signal is supplied to the other input terminal. As a result, a high level signal is output from the output terminal of the AND circuit 19. As a result, a low level signal is supplied to the other input terminal of the AND circuit 20. Therefore, the AND circuit 20 outputs a low level signal regardless of the CPU output signal (Dout). That is, the CPU output signal is masked. A high level signal is supplied from the AND circuit 19 to the other input terminal of the AND circuit 22. As a result, the AND circuit 22 outputs the simulation signal received from the serial communication circuit 10. Further, a low level signal is input to the OR circuit 21 from the AND circuit 20, and a simulation signal is input from the AND circuit 22. As a result, the OR circuit 21 outputs a simulation signal toward each port 13. That is, when a failure occurs, the CPU output signal Dout is masked, and a simulation signal is output from each port 13.

図5は、出力イネーブル信号制御回路31を示す概略図である。図5を参照して、出力イネーブル信号制御回路31について説明する。各ポート13には、図示しないラッチ回路などが設けられている。ラッチ回路では、出力イネーブル信号としてハイレベル信号が供給された場合にのみ、各ポート13を介して外部装置へ信号を出力することが許可される。出力イネーブル信号制御回路31は、出力イネーブル信号を制御するために設けられている。   FIG. 5 is a schematic diagram showing the output enable signal control circuit 31. The output enable signal control circuit 31 will be described with reference to FIG. Each port 13 is provided with a latch circuit (not shown). The latch circuit is permitted to output a signal to an external device via each port 13 only when a high level signal is supplied as an output enable signal. The output enable signal control circuit 31 is provided for controlling the output enable signal.

図5には、ポート13−0に対応する出力イネーブル信号制御回路31−0の構成が詳細に示されている。図5に示されるように、出力イネーブル信号制御回路31は、シリアル通信回路10に接続されている。シリアル通信回路10からは、各出力イネーブル信号制御回路31に対して、ポート設定信号が供給される。ここで、対応するポート13が出力ポート(第2ポート)として用いられる場合には、ポート設定信号として、ハイレベルの信号が供給される。   FIG. 5 shows the configuration of the output enable signal control circuit 31-0 corresponding to the port 13-0 in detail. As shown in FIG. 5, the output enable signal control circuit 31 is connected to the serial communication circuit 10. The serial communication circuit 10 supplies a port setting signal to each output enable signal control circuit 31. Here, when the corresponding port 13 is used as an output port (second port), a high level signal is supplied as the port setting signal.

図5に示されるように、出力イネーブル信号制御回路31は、AND回路23、AND回路24、AND回路25、及びOR回路26を備えている。AND回路23の一方の入力端には、故障時に故障信号(MODE)が供給される。AND回路23の他方の入力端には、リセット信号(RESET)の反転信号が供給される。AND回路25は、一方の入力端でシリアル通信回路10に接続されており、他方の入力端でAND回路23の出力端に接続されている。AND回路25には、シリアル通信回路10からポート設定信号が供給される。AND回路24の一方の入力端には、CPU4によって生成された出力イネーブル信号EnoO’が供給される。AND回路24の他方の入力端は、AND回路23の出力端に接続されている。OR回路26の一方の入力端は、AND回路24の出力端に接続されている。OR回路26の他方の入力端は、AND回路25の出力端に接続されている。OR回路26は、その出力端から、出力イネーブル信号を出力する。   As shown in FIG. 5, the output enable signal control circuit 31 includes an AND circuit 23, an AND circuit 24, an AND circuit 25, and an OR circuit 26. A failure signal (MODE) is supplied to one input terminal of the AND circuit 23 when a failure occurs. An inverted signal of the reset signal (RESET) is supplied to the other input terminal of the AND circuit 23. The AND circuit 25 is connected to the serial communication circuit 10 at one input end, and is connected to the output end of the AND circuit 23 at the other input end. A port setting signal is supplied from the serial communication circuit 10 to the AND circuit 25. An output enable signal EnoO ′ generated by the CPU 4 is supplied to one input terminal of the AND circuit 24. The other input terminal of the AND circuit 24 is connected to the output terminal of the AND circuit 23. One input terminal of the OR circuit 26 is connected to the output terminal of the AND circuit 24. The other input terminal of the OR circuit 26 is connected to the output terminal of the AND circuit 25. The OR circuit 26 outputs an output enable signal from its output terminal.

図5に示される回路において、正常時には、AND回路23には、ハイレベルの故障信号(MODE)は供給されず、ローレベルの信号が供給される。そのため、AND回路23は、ローレベルの信号を出力する。AND回路25には、AND回路23から、ローレベル信号が供給される。従って、AND回路25は、ポート設定信号に関係なく、ローレベル信号を出力する。また、AND回路24には、AND回路23からハイレベル信号が供給される。そのため、AND回路24は、CPUにより生成された出力イネーブル信号EnoO’を出力する。OR回路26には、AND回路25からローレベル信号が供給され、AND回路24からCPU4による出力イネーブル信号EnoO’が供給される。その結果、OR回路26は、CPU4によって生成された出力イネーブル信号EnoO’を出力する。すなわち、各ポート13の出力可否は、CPU4によって制御される。   In the circuit shown in FIG. 5, in a normal state, the AND circuit 23 is not supplied with a high level fault signal (MODE) but is supplied with a low level signal. Therefore, the AND circuit 23 outputs a low level signal. A low level signal is supplied from the AND circuit 23 to the AND circuit 25. Therefore, the AND circuit 25 outputs a low level signal regardless of the port setting signal. The AND circuit 24 is supplied with a high level signal from the AND circuit 23. Therefore, the AND circuit 24 outputs the output enable signal EnoO ′ generated by the CPU. The OR circuit 26 is supplied with a low level signal from the AND circuit 25, and is supplied with an output enable signal EnoO ′ from the CPU 4 from the AND circuit 24. As a result, the OR circuit 26 outputs the output enable signal EnoO ′ generated by the CPU 4. That is, whether the output of each port 13 is possible or not is controlled by the CPU 4.

一方、故障時には、AND回路23に、ハイレベルの故障信号、及びリセット信号の反転信号(ハイレベル)が供給される。そのため、AND回路23は、ハイレベル信号を出力する。AND回路25には、AND回路23からハイレベル信号が供給され、シリアル通信回路からポート設定信号が供給される。そのため、AND回路25は、ポート設定信号を出力する。また、AND回路24には、AND回路23から、ハイレベル信号の反転信号(ローレベル信号)が供給される。そのため、AND回路24は、出力イネーブル信号EnoO’に関係なく、ローレベル信号を出力する。OR回路26には、ポート設定信号、及びローレベル信号が供給される。その結果、OR回路26は、ポート設定信号を、出力イネーブル信号EnoOとして出力する。すなわち、各ポート13の出力可否は、ポート設定信号により制御される。これにより、ポート設定信号により第2ポートとして示されるポート13が、信号を出力することが可能な状態に設定される。そのため、模擬信号を出力ポートを介して出力することが可能になる。   On the other hand, at the time of failure, a high level failure signal and an inverted signal (high level) of the reset signal are supplied to the AND circuit 23. Therefore, the AND circuit 23 outputs a high level signal. The AND circuit 25 is supplied with a high level signal from the AND circuit 23 and is supplied with a port setting signal from the serial communication circuit. Therefore, the AND circuit 25 outputs a port setting signal. The AND circuit 24 is supplied with an inverted signal (low level signal) of the high level signal from the AND circuit 23. Therefore, the AND circuit 24 outputs a low level signal regardless of the output enable signal EnoO ′. The OR circuit 26 is supplied with a port setting signal and a low level signal. As a result, the OR circuit 26 outputs the port setting signal as the output enable signal EnoO. That is, whether or not each port 13 can be output is controlled by the port setting signal. As a result, the port 13 indicated as the second port by the port setting signal is set to a state in which a signal can be output. Therefore, it becomes possible to output a simulation signal via the output port.

入出力インタフェース7が上述のような構成を有していることにより、正常時にはCPU4によってポート操作を行い、故障時にはシリアル通信回路10を介してマスターマイコン3側でポート操作を行うことが可能である。尚、図4及び図5に示した回路はあくまで一例であり、同様の機能を実現することができるのであれば、他の構成が入出力インタフェース7として採用されてもよい。   Since the input / output interface 7 has the above-described configuration, the port operation can be performed by the CPU 4 when it is normal, and the port operation can be performed on the master microcomputer 3 side via the serial communication circuit 10 when a failure occurs. . The circuits shown in FIGS. 4 and 5 are merely examples, and other configurations may be adopted as the input / output interface 7 as long as the same function can be realized.

続いて、電気回路システム1の動作方法を説明する。図6は、本実施形態にかかる電気回路システム1の動作方法を示すフローチャートである。   Subsequently, an operation method of the electric circuit system 1 will be described. FIG. 6 is a flowchart showing an operation method of the electric circuit system 1 according to the present embodiment.

ステップS1;異常動作検出
まず、異常動作検出回路14が、CPU4の動作が異常であるか否かを検出する。異常動作検出回路は、異常動作を検出した場合、リセット要求信号を生成する。
Step S1: Abnormal operation detection First, the abnormal operation detection circuit 14 detects whether or not the operation of the CPU 4 is abnormal. The abnormal operation detection circuit generates a reset request signal when detecting an abnormal operation.

ステップS2;カウンタ値のインクリメント
リセット要求信号が生成されると、異常動作カウンタ回路18は、リセット回数を示すカウント値をインクリメントする。
Step S2: Increment of counter value When a reset request signal is generated, the abnormal operation counter circuit 18 increments a count value indicating the number of resets.

ステップS3;リセット処理
リセット生成回路6は、リセット要求信号を取得すると、リセット信号を生成する。リセット信号は、CPU4及び入出力インタフェース7に供給される。リセット信号を取得したCPU4は、リセット状態になり、動作を停止する。
Step S3: Reset Processing When the reset generation circuit 6 acquires the reset request signal, the reset generation circuit 6 generates a reset signal. The reset signal is supplied to the CPU 4 and the input / output interface 7. CPU4 which acquired the reset signal will be in a reset state, and will stop operation | movement.

ステップS4;リセット回数の判定
また、異常動作カウンタ回路18は、カウント値が予め設定された回数(n回)を超えたか否かを判定する。
Step S4: Determination of the number of resets The abnormal operation counter circuit 18 determines whether or not the count value exceeds a preset number (n times).

ステップS5;故障信号生成
カウント値が予め設定された回数(n回)を超えた場合、異常動作カウンタ回路18は、故障信号を生成する。故障信号は、入出力インタフェース7、リセット生成回路6、及びシリアル通信回路10に供給される。リセット生成回路6は、故障信号を取得すると、リセット信号を生成し続けるように動作する。
Step S5: Fault signal generation When the count value exceeds a preset number (n times), the abnormal operation counter circuit 18 generates a fault signal. The failure signal is supplied to the input / output interface 7, the reset generation circuit 6, and the serial communication circuit 10. When the reset generation circuit 6 acquires the failure signal, the reset generation circuit 6 operates to continue generating the reset signal.

ステップS6;信号伝達経路変更
入出力インタフェース7は、故障信号を取得すると、信号の伝達経路を変更する。具体的には、入出力インタフェース7は、CPU出力信号がマスクされ、シリアル通信回路10から送られる信号が各ポート13を介して出力されるように、信号の伝達経路を変更する。また、入出力インタフェース7は、マスターマイコン3に対して、故障信号を送信する。
Step S6: Signal transmission path change When the input / output interface 7 obtains a failure signal, it changes the signal transmission path. Specifically, the input / output interface 7 masks the CPU output signal and changes the signal transmission path so that the signal transmitted from the serial communication circuit 10 is output via each port 13. Further, the input / output interface 7 transmits a failure signal to the master microcomputer 3.

ステップS7;模擬信号の入出力
マスターマイコン3は、故障信号を取得すると、模擬信号生成回路11により、模擬信号及びポート設定信号を生成する。模擬信号及びポート設定信号は、シリアル通信回路12を介して、マイクロコンピュータ2に送られる。マイクロコンピュータ2では、シリアル通信回路10が、シリアル通信ポート13−4を介して、模擬信号及びポート設定信号を取得する。シリアル通信回路10は、模擬信号及びポート設定信号を、入出力インタフェース7に供給する。入出力インタフェース7では、ポート設定信号により指定されたポートが出力ポートに設定され、出力ポートを介して模擬信号が外部装置に出力される。
Step S7; Input / Output of Simulated Signal When the master microcomputer 3 acquires the failure signal, the simulated signal generating circuit 11 generates a simulated signal and a port setting signal. The simulation signal and the port setting signal are sent to the microcomputer 2 via the serial communication circuit 12. In the microcomputer 2, the serial communication circuit 10 acquires a simulation signal and a port setting signal via the serial communication port 13-4. The serial communication circuit 10 supplies a simulation signal and a port setting signal to the input / output interface 7. In the input / output interface 7, the port specified by the port setting signal is set as the output port, and the simulation signal is output to the external device via the output port.

ステップS8;故障時動作のリセット
その後、マイクロコンピュータ2の故障が解消された場合には、マスターマイコン3などを介して、外部リセット信号がマイクロコンピュータ2に送られる。外部リセット信号を取得したマイクロコンピュータ2は、通常時の動作に戻る。
Step S8: Reset of operation at the time of failure Thereafter, when the failure of the microcomputer 2 is resolved, an external reset signal is sent to the microcomputer 2 via the master microcomputer 3 or the like. The microcomputer 2 that has acquired the external reset signal returns to the normal operation.

以上説明したように、本実施形態によれば、CPU4が故障した場合に、CPU出力信号がマスクされる。これによって、故障したCPU4の誤動作によって外部装置が誤動作してしまうことが防止される。また、故障時には、マスターマイコン3によって生成された模擬信号が、所望するポートから外部装置へ供給される。そのため、本来マイクロコンピュータ2によって制御される外部装置の動作を、マスターマイコン3によって救済することが可能である。   As described above, according to this embodiment, when the CPU 4 fails, the CPU output signal is masked. This prevents the external device from malfunctioning due to malfunction of the failed CPU 4. Further, when a failure occurs, a simulation signal generated by the master microcomputer 3 is supplied from a desired port to an external device. Therefore, the operation of the external device originally controlled by the microcomputer 2 can be relieved by the master microcomputer 3.

尚、本実施形態では、マスターマイコン3が、模擬信号がシリアル通信により、マイクロコンピュータ2に送信する場合について説明した。但し、模擬信号は必ずしもシリアル通信により送信される必要はない。   In the present embodiment, the case where the master microcomputer 3 transmits the simulation signal to the microcomputer 2 by serial communication has been described. However, the simulation signal is not necessarily transmitted by serial communication.

(第2の実施形態)
続いて、第2の実施形態について説明する。尚、第1の実施形態と同様の構成を採用することができる部分については、その詳細な説明を省略する。
(Second Embodiment)
Next, the second embodiment will be described. Note that a detailed description of portions that can adopt the same configuration as that of the first embodiment is omitted.

図7は、本実施形態に係る電気回路システム1を示す概略図である。第1の実施形態においては、模擬信号生成回路11が、マスターマイコン3に内蔵されている。また、第1の実施形態では、故障時には、マスターマイコン3により、どのポートが出力ポート(第2ポート)に設定されるかが決められる。これに対して、本実施形態では、模擬信号生成回路11が、マスターマイコン3とは関係なく配置されている。具体的には、模擬信号生成回路11は、スイッチ回路32を介して、ポート13−2に接続されている。ポート13−2は、正常動作時に、外部装置との間で信号の入出力を行うポートである。また、故障時に出力ポートとして使用されるポート(第2ポート)は、インタフェース回路7において予め決められている。すなわち、故障時において、インタフェース回路7は、スイッチ回路32に接続されたポート13−2(第1ポート)から入力された模擬信号が、第2ポートから出力されるように、信号の伝達経路を変更する。   FIG. 7 is a schematic diagram showing the electric circuit system 1 according to the present embodiment. In the first embodiment, the simulation signal generation circuit 11 is built in the master microcomputer 3. In the first embodiment, when a failure occurs, the master microcomputer 3 determines which port is set as the output port (second port). On the other hand, in this embodiment, the simulation signal generation circuit 11 is arranged irrespective of the master microcomputer 3. Specifically, the simulation signal generation circuit 11 is connected to the port 13-2 via the switch circuit 32. The port 13-2 is a port for inputting / outputting a signal to / from an external device during normal operation. Further, the port (second port) used as an output port at the time of failure is determined in advance in the interface circuit 7. That is, at the time of failure, the interface circuit 7 sets the signal transmission path so that the simulated signal input from the port 13-2 (first port) connected to the switch circuit 32 is output from the second port. change.

また、第1の実施形態では、マイクロコンピュータ2には、シリアル通信ポート13−4及びシリアル通信回路10が設けられている。これに対して、本実施形態では、シリアル通信ポート13−4及びシリアル通信回路10は必ずしも必要なく、図7においては図示されていない。   In the first embodiment, the microcomputer 2 is provided with the serial communication port 13-4 and the serial communication circuit 10. On the other hand, in this embodiment, the serial communication port 13-4 and the serial communication circuit 10 are not necessarily required and are not shown in FIG.

本実施形態に係る電気回路システム1の動作を概略的に説明する。   An operation of the electric circuit system 1 according to the present embodiment will be schematically described.

上述のように、本実施形態においては、複数のポート13において、故障時に入力ポートとして用いられるポート(第1ポート)と、故障時に出力ポートとして用いられるポート(第2ポート)との対応関係が、予め決定されている。図7に示される例では、ポート13−2が第1ポートであり、ポート13−1が第2ポートであるものとする。   As described above, in the present embodiment, in the plurality of ports 13, there is a correspondence relationship between a port (first port) used as an input port at the time of failure and a port (second port) used as an output port at the time of failure. , Have been determined in advance. In the example shown in FIG. 7, it is assumed that the port 13-2 is the first port and the port 13-1 is the second port.

正常動作時には、CPU4によって複数のポート13の中から出力ポート及び入力ポートが決定される。そして、決定された出力ポート及び入力ポートを介して、外部装置との間で信号が入出力される。尚、スイッチ回路32は、第1ポート13−2を外部装置と接続する。第1ポート13−2においては、外部装置との間で信号の入出力が行われる。   During normal operation, the CPU 4 determines an output port and an input port from among the plurality of ports 13. A signal is input / output to / from an external device via the determined output port and input port. The switch circuit 32 connects the first port 13-2 to an external device. In the first port 13-2, signals are input / output to / from an external device.

一方、図8は、故障時における電気回路システム1を示す概略図である。故障時には、入出力インタフェース7が、第1ポート13−2から入力された信号がCPU4を介することなく第2ポート13−1から出力されるように、信号の伝達経路を切り替える。また、故障時には、マイクロコンピュータ2からスイッチ回路32に故障信号が供給される。故障信号を取得したスイッチ回路32は、模擬信号生成回路11と第1ポート13−2とが接続されるように、接続状態を切り替える。模擬信号生成回路11は、例えばユーザによって操作されるボタンに連結されており、ユーザによる操作に応じて模擬信号を生成する。この際、第1の実施形態のようにポート設定信号は生成される必要がない。生成された模擬信号は、第1ポート13−2を介してマイクロコンピュータ2に入力される。マイクロコンピュータ2では、第1ポート13−2から入力された模擬信号が、CPU4を介することなく、第2ポート13−1から出力される。これにより、第1の実施形態と同様に、模擬信号を救済対象の外部装置に供給することができ、外部装置を救済することが可能となる。   On the other hand, FIG. 8 is a schematic diagram showing the electric circuit system 1 at the time of failure. When a failure occurs, the input / output interface 7 switches the signal transmission path so that the signal input from the first port 13-2 is output from the second port 13-1 without passing through the CPU 4. Further, when a failure occurs, a failure signal is supplied from the microcomputer 2 to the switch circuit 32. The switch circuit 32 that has acquired the failure signal switches the connection state so that the simulation signal generation circuit 11 and the first port 13-2 are connected. The simulation signal generation circuit 11 is connected to a button operated by the user, for example, and generates a simulation signal in accordance with the operation by the user. At this time, the port setting signal does not need to be generated as in the first embodiment. The generated simulation signal is input to the microcomputer 2 via the first port 13-2. In the microcomputer 2, the simulation signal input from the first port 13-2 is output from the second port 13-1 without going through the CPU 4. As a result, similar to the first embodiment, the simulation signal can be supplied to the external device to be rescued, and the external device can be rescued.

上述のような動作を実現するため、入出力インタフェース7は、入出力制御回路27、入力イネーブル信号制御回路28、及び出力イネーブル信号制御回路29を備えている。以下に、これらの回路について説明する。   In order to realize the operation as described above, the input / output interface 7 includes an input / output control circuit 27, an input enable signal control circuit 28, and an output enable signal control circuit 29. Hereinafter, these circuits will be described.

図9は、入出力制御回路27の一例を示す概略図である。図9に示されるように、入出力制御回路27は、AND回路33、AND回路34、OR回路35、AND回路36、及びAND回路37を有している。AND回路33の一方の入力端には、故障時に故障信号(MODE)が供給される。AND回路33の他方の入力端には、リセット信号の反転信号が供給される。AND回路34の一方の入力端には、CPU出力信号DoutBが供給される。AND回路34の他方の入力端には、AND回路33の出力を反転させた信号が供給される。OR回路35は、一方の入力端でAND回路34の出力端に接続されており、他方の入力端でAND回路36の出力端に接続されている。AND回路36は、一方の入力端でAND回路33の出力端に接続されており、他方の入力端で第1ポート13−2に接続されている。AND回路37の一方の入力端には、AND回路33の出力を反転させた信号が供給される。AND回路37の他方の出力端は、第1ポート13−2に接続されている。AND回路37の出力信号は、CPUに供給される。   FIG. 9 is a schematic diagram illustrating an example of the input / output control circuit 27. As shown in FIG. 9, the input / output control circuit 27 includes an AND circuit 33, an AND circuit 34, an OR circuit 35, an AND circuit 36, and an AND circuit 37. A failure signal (MODE) is supplied to one input terminal of the AND circuit 33 when a failure occurs. An inverted signal of the reset signal is supplied to the other input terminal of the AND circuit 33. The CPU output signal DoutB is supplied to one input terminal of the AND circuit 34. A signal obtained by inverting the output of the AND circuit 33 is supplied to the other input terminal of the AND circuit 34. The OR circuit 35 is connected to the output terminal of the AND circuit 34 at one input terminal and is connected to the output terminal of the AND circuit 36 at the other input terminal. The AND circuit 36 is connected to the output terminal of the AND circuit 33 at one input terminal, and is connected to the first port 13-2 at the other input terminal. A signal obtained by inverting the output of the AND circuit 33 is supplied to one input terminal of the AND circuit 37. The other output terminal of the AND circuit 37 is connected to the first port 13-2. The output signal of the AND circuit 37 is supplied to the CPU.

入出力制御回路27の動作について説明する。   The operation of the input / output control circuit 27 will be described.

正常動作時には、AND回路33には、故障信号(ハイレベル)が供給されず、ローレベルの信号が供給される。そのため、AND回路33は、ローレベル信号を出力する。その結果、AND回路34には、ハイレベル信号が供給される。これにより、AND回路34は、CPU出力信号DoutBを出力する。また、AND回路36にはAND回路33から、ローレベル信号が供給される。そのため、AND回路36は、ポート13−2から取得した信号に関係なく、ローレベル信号を取得する。OR回路35には、AND回路34からCPU出力信号DoutBが供給され、AND回路36からローレベル信号が供給される。そのため、OR回路35は、CPU出力信号DoutBを出力する。その結果、ポート13−1からは、CPU出力信号DoutBが出力される。一方、AND回路37には、AND回路33の反転信号として、ハイレベル信号が供給される。そのため、AND回路37は、ポート13−2から取得した信号をCPUに向けて出力する。このように、正常動作時には、CPU出力信号がポート13−1から出力され、ポート13−2から入力された信号がCPU4に向けて供給される。   During normal operation, the failure signal (high level) is not supplied to the AND circuit 33, but a low level signal is supplied. Therefore, the AND circuit 33 outputs a low level signal. As a result, a high level signal is supplied to the AND circuit 34. As a result, the AND circuit 34 outputs the CPU output signal DoutB. The AND circuit 36 is supplied with a low level signal from the AND circuit 33. Therefore, the AND circuit 36 acquires a low level signal regardless of the signal acquired from the port 13-2. The CPU output signal DoutB is supplied from the AND circuit 34 to the OR circuit 35, and the low level signal is supplied from the AND circuit 36. Therefore, the OR circuit 35 outputs the CPU output signal DoutB. As a result, the CPU output signal DoutB is output from the port 13-1. On the other hand, a high level signal is supplied to the AND circuit 37 as an inverted signal of the AND circuit 33. Therefore, the AND circuit 37 outputs the signal acquired from the port 13-2 to the CPU. Thus, during normal operation, the CPU output signal is output from the port 13-1, and the signal input from the port 13-2 is supplied to the CPU 4.

一方、故障時には、AND回路33に、故障信号(ハイレベル信号)及びリセット信号の反転信号(ハイレベル信号)が供給される。AND回路33は、ハイレベル信号を出力する。AND回路34には、AND回路33から、ローレベル信号が供給される。その結果、AND回路34は、CPU出力信号に関係なく、ローレベル信号を出力する。これにより、CPU出力信号がマスクされる。また、AND回路36には、AND回路33からハイレベル信号が供給される。その結果、AND回路36は、ポート13−2から取得される模擬信号を出力する。OR回路35には、AND回路34からローレベル信号が供給され、AND回路36から模擬信号が供給される。そのため、OR回路35は、模擬信号を出力する。すなわち、第2ポート13−1からは、模擬信号が出力される。一方、AND回路37には、AND回路33から、ハイレベル信号の反転信号(ローレベル信号)が供給される。そのため、AND回路37は、ポート13−2から取得した信号(模擬信号)に関係なく、ローレベル信号を出力する。このように、故障時には、第1ポート13−2から供給された模擬信号が、CPU4を介することなく、第2ポート13−1から出力される。   On the other hand, when a failure occurs, a failure signal (high level signal) and an inverted signal (high level signal) of the reset signal are supplied to the AND circuit 33. The AND circuit 33 outputs a high level signal. A low level signal is supplied from the AND circuit 33 to the AND circuit 34. As a result, the AND circuit 34 outputs a low level signal regardless of the CPU output signal. As a result, the CPU output signal is masked. The AND circuit 36 is supplied with a high level signal from the AND circuit 33. As a result, the AND circuit 36 outputs a simulation signal acquired from the port 13-2. A low level signal is supplied from the AND circuit 34 to the OR circuit 35, and a simulation signal is supplied from the AND circuit 36. Therefore, the OR circuit 35 outputs a simulation signal. That is, a simulation signal is output from the second port 13-1. On the other hand, the AND circuit 37 is supplied with an inverted signal (low level signal) of the high level signal from the AND circuit 33. Therefore, the AND circuit 37 outputs a low level signal regardless of the signal (simulated signal) acquired from the port 13-2. Thus, at the time of failure, the simulation signal supplied from the first port 13-2 is output from the second port 13-1 without passing through the CPU 4.

次いで、入力イネーブル信号制御回路28について説明する。入力イネーブル信号制御回路28は、第1ポート13−2に対応して設けられている。図10は、入力イネーブル信号制御回路28の一例を示す概略図である。入力イネーブル信号制御回路28は、AND回路38、及びOR回路39を有している。AND回路38の一方の入力端は、異常動作カウンタ回路18に接続されており、故障には故障信号(MODE)が供給される。AND回路38の他方の入力端は、リセット生成回路6に接続されており、故障時にはリセット信号(RESET)の反転信号が供給される。OR回路39の一方の入力端は、AND回路38の出力端に接続されている。OR回路39の他方の入力端には、CPU4により生成された入力イネーブル信号EniA’が供給される。OR回路39の出力信号は、ハイレベルの場合に、入力イネーブル信号として用いられる。   Next, the input enable signal control circuit 28 will be described. The input enable signal control circuit 28 is provided corresponding to the first port 13-2. FIG. 10 is a schematic diagram illustrating an example of the input enable signal control circuit 28. The input enable signal control circuit 28 includes an AND circuit 38 and an OR circuit 39. One input terminal of the AND circuit 38 is connected to the abnormal operation counter circuit 18, and a failure signal (MODE) is supplied to the failure. The other input terminal of the AND circuit 38 is connected to the reset generation circuit 6, and an inverted signal of the reset signal (RESET) is supplied when a failure occurs. One input terminal of the OR circuit 39 is connected to the output terminal of the AND circuit 38. An input enable signal EniA ′ generated by the CPU 4 is supplied to the other input terminal of the OR circuit 39. The output signal of the OR circuit 39 is used as an input enable signal when it is at a high level.

入力イネーブル信号制御回路28の動作について説明する。正常時には、AND回路38の一方の入力端には、故障信号(ハイレベル)が供給されず、ローレベル信号が供給される。その結果、AND回路38は、ローレベル信号を出力する。OR回路39には、AND回路38から、ローレベル信号が供給される。そのため、OR回路39は、CPU4による入力イネーブル信号EniA’を出力する。従って、ポート13−2の入力可否は、CPUにより生成された入力イネーブル信号EniA’により制御されることになる。一方、故障時には、AND回路38には、一方の入力端に故障信号(ハイレベル)が供給され、他方の入力端でリセット信号の反転信号(ハイレベル)が供給される。そのため、AND回路38は、ハイレベル信号を出力する。OR回路39には、AND回路38からハイレベル信号が供給される。その結果、OR回路39は、CPUによる入力イネーブル信号EniA’に関係なく、ハイレベル信号を出力する。従って、第1ポート13−2は、CPU4の動作に関係なく、強制的に入力可能な状態に設定される。   The operation of the input enable signal control circuit 28 will be described. During normal operation, a failure signal (high level) is not supplied to one input terminal of the AND circuit 38, but a low level signal is supplied. As a result, the AND circuit 38 outputs a low level signal. A low level signal is supplied from the AND circuit 38 to the OR circuit 39. Therefore, the OR circuit 39 outputs the input enable signal EniA ′ from the CPU 4. Therefore, whether or not to input the port 13-2 is controlled by the input enable signal EniA 'generated by the CPU. On the other hand, when a failure occurs, a failure signal (high level) is supplied to one input terminal of the AND circuit 38, and an inverted signal (high level) of a reset signal is supplied to the other input terminal. Therefore, the AND circuit 38 outputs a high level signal. A high level signal is supplied from the AND circuit 38 to the OR circuit 39. As a result, the OR circuit 39 outputs a high level signal regardless of the input enable signal EniA 'by the CPU. Therefore, the first port 13-2 is set in a state where it can be forcibly input regardless of the operation of the CPU 4.

次いで、出力イネーブル信号制御回路29について説明する。出力イネーブル信号制御回路29は、第2ポート13−1に対応して設けられている。図11は、出力イネーブル信号制御回路29の一例を示す概略図である。出力イネーブル信号制御回路29は、AND回路40、及びOR回路41を有している。AND回路40の一方の入力端は、異常動作カウンタ回路18に接続されており、故障には故障信号(MODE)が供給される。AND回路40の他方の入力端は、リセット生成回路6に接続されており、故障時にはリセット信号(RESET)の反転信号が供給される。OR回路41の一方の入力端は、AND回路40の出力端に接続されている。OR回路40の他方の入力端には、CPU4により生成された入力イネーブル信号EnoB’が供給される。OR回路40の出力信号は、ハイレベルの場合に、出力可能な状態であることを示す出力イネーブル信号として用いられる。   Next, the output enable signal control circuit 29 will be described. The output enable signal control circuit 29 is provided corresponding to the second port 13-1. FIG. 11 is a schematic diagram illustrating an example of the output enable signal control circuit 29. The output enable signal control circuit 29 has an AND circuit 40 and an OR circuit 41. One input terminal of the AND circuit 40 is connected to the abnormal operation counter circuit 18, and a failure signal (MODE) is supplied to the failure. The other input terminal of the AND circuit 40 is connected to the reset generation circuit 6, and an inverted signal of the reset signal (RESET) is supplied in the event of a failure. One input terminal of the OR circuit 41 is connected to the output terminal of the AND circuit 40. An input enable signal EnoB ′ generated by the CPU 4 is supplied to the other input terminal of the OR circuit 40. The output signal of the OR circuit 40 is used as an output enable signal indicating that output is possible when it is at a high level.

入力イネーブル信号制御回路29の動作について説明する。正常時には、AND回路40の一方の入力端には、故障信号(ハイレベル)が供給されず、ローレベル信号が供給される。その結果、AND回路40は、ローレベル信号を出力する。OR回路41には、AND回路40から、ローレベル信号が供給される。そのため、OR回路41は、CPU4による出力イネーブル信号EnoB’を出力する。従って、ポート13−1の出力可否は、CPU4により制御されることになる。一方、故障時には、AND回路40には、一方の入力端に故障信号(ハイレベル)が供給され、他方の入力端でリセット信号の反転信号(ハイレベル)が供給される。そのため、AND回路40は、ハイレベル信号を出力する。OR回路41には、AND回路40からハイレベル信号が供給される。その結果、OR回路41は、CPUによる出力イネーブル信号EnoB’に関係なく、ハイレベル信号を出力する。従って、第2ポート13−1は、CPU4の動作に関係なく、強制的に出力可能な状態に設定される。   The operation of the input enable signal control circuit 29 will be described. During normal operation, a failure signal (high level) is not supplied to one input terminal of the AND circuit 40, but a low level signal is supplied. As a result, the AND circuit 40 outputs a low level signal. A low level signal is supplied from the AND circuit 40 to the OR circuit 41. Therefore, the OR circuit 41 outputs an output enable signal EnoB ′ from the CPU 4. Therefore, whether or not to output the port 13-1 is controlled by the CPU 4. On the other hand, when a failure occurs, the AND circuit 40 is supplied with a failure signal (high level) at one input end and an inverted signal (high level) of a reset signal at the other input end. Therefore, the AND circuit 40 outputs a high level signal. A high level signal is supplied from the AND circuit 40 to the OR circuit 41. As a result, the OR circuit 41 outputs a high level signal regardless of the output enable signal EnoB 'by the CPU. Accordingly, the second port 13-1 is set to a state in which it can be forcibly output regardless of the operation of the CPU 4.

以上、図9〜図11に示した回路を採用することで、正常時には入出力ポートとして用いられているポートを、故障時に入力ポートまたは出力ポートに強制的に設定することができる。また、故障時には、第1ポート13−2から入力される模擬信号を、第2ポート13−1からそのまま出力することができる。尚、図9〜図11に示される回路はあくまで一例であり、同様の機能を実現できる回路であれば、他の構成が用いられてもよい。   As described above, by employing the circuits shown in FIGS. 9 to 11, the port used as the input / output port in the normal state can be forcibly set as the input port or the output port in the case of a failure. Further, at the time of failure, the simulated signal input from the first port 13-2 can be output as it is from the second port 13-1. Note that the circuits shown in FIGS. 9 to 11 are merely examples, and other configurations may be used as long as they can realize the same function.

次いで、本実施形態に係る電気回路システム1の動作方法について説明する。図12は、電気回路システム1の動作方法を示すタイミングチャートである。図12において、横軸は時刻を示している。図12には、クロック信号clock、故障信号MODE、リセット信号RESET、第1ポート13−2の入力イネーブル信号EniA、第2ポート13−2の出力イネーブル信号EnoB、第1ポート13−2に供給される信号(PortA)、及び第2ポート13−1から出力される信号(PortB)の波形が示されている。マイクロコンピュータ2に含まれる各構成は、クロック信号clockのタイミングに応じて、動作するものとする。   Next, an operation method of the electric circuit system 1 according to the present embodiment will be described. FIG. 12 is a timing chart showing an operation method of the electric circuit system 1. In FIG. 12, the horizontal axis indicates time. In FIG. 12, the clock signal clock, the failure signal MODE, the reset signal RESET, the input enable signal EniA of the first port 13-2, the output enable signal EnoB of the second port 13-2, and the first port 13-2 are supplied. The waveform of the signal (Port A) and the signal (Port B) output from the second port 13-1 are shown. Each component included in the microcomputer 2 operates according to the timing of the clock signal clock.

図12に示されるように、時刻t0において、異常動作カウンタ回路18がハイレベルの故障信号MODEを生成したとする。尚、時刻t0においては、リセット生成回路6が既にリセット処理を終えており、ハイレベルの信号がリセット生成回路6から出力されているものとする。   As shown in FIG. 12, it is assumed that the abnormal operation counter circuit 18 generates a high-level failure signal MODE at time t0. At time t0, it is assumed that the reset generation circuit 6 has already completed the reset process, and a high level signal is output from the reset generation circuit 6.

故障信号MODEがリセット生成回路6に供給されることにより、リセット生成回路6は、次のクロック信号の立ち上がりタイミング(時刻t1)において、ローレベルのリセット信号を生成する。すなわち、時刻t1において、リセット信号RESETとしてローレベルの信号が生成される。故障信号MODE及びリセット信号RESETは、入出力インタフェース7に供給される。入出力インタフェース7では、信号の伝達経路が変更される。また、出力イネーブル信号EnoB及び入力イネーブル信号EniAとして、ハイレベルの信号が生成される。   By supplying the failure signal MODE to the reset generation circuit 6, the reset generation circuit 6 generates a low-level reset signal at the rising timing (time t1) of the next clock signal. That is, at time t1, a low level signal is generated as the reset signal RESET. The failure signal MODE and the reset signal RESET are supplied to the input / output interface 7. In the input / output interface 7, the signal transmission path is changed. In addition, high level signals are generated as the output enable signal EnoB and the input enable signal EniA.

その後、時刻t2において、第1ポート13−1(PortA)に模擬信号が入力されたとする。模擬信号は、ラッチ回路などに取り込まれ、次のクロック信号が立ち上がるタイミング(時刻t3)において、第2ポート13−1(PortB)から出力される。   Thereafter, it is assumed that a simulation signal is input to the first port 13-1 (Port A) at time t2. The simulation signal is taken into a latch circuit or the like, and is output from the second port 13-1 (Port B) at the timing (time t3) when the next clock signal rises.

以上説明したように、本実施形態によれば、第1の実施形態と同様に、故障時にCPU出力信号がマスクさる。また、故障時には、第1ポート13−1から入力された模擬信号が、CPU4を介さずに、第2ポート13−2から出力される。従って、故障時に、外部装置を救済することが可能となる。   As described above, according to the present embodiment, the CPU output signal is masked at the time of failure as in the first embodiment. Further, at the time of failure, the simulation signal input from the first port 13-1 is output from the second port 13-2 without going through the CPU 4. Therefore, it is possible to rescue the external device at the time of failure.

尚、本実施形態では、模擬信号が第1ポート13−2から入力され、第2ポート13−1から出力される場合について説明した。但し、故障時における出力ポートと入力ポートとの組み合わせは、1つに限られるものではない。図13は、故障時における入力ポートと出力ポートとの組み合わせの一例を示す概念図である。図13に示されるように、正常時(故障信号がローレベル「0」の場合)には、任意のポートがCPU4によって入力ポートに設定され、任意のポートがCPU4によって出力ポートに設定される。一方、故障時(故障信号がハイレベル「1」の場合)には、予め決められたポート(ポートA、C、E、G、およびI)が入力ポートに設定され、予め決められたポート(ポートB、D、F、H、及びJ)が出力ポートに設定される。ポートAはポートBに対応している。すなわち、故障時には、ポートAから入力された模擬信号が、ポートBから出力される。また、ポートCはポートDに対応している。すなわち、故障時には、ポートCから入力された模擬信号が、ポートDから出力される。このように、故障時における入力ポートと出力ポートとの組み合わせが複数決められていても、本実施形態と同様の作用効果を奏することができる。   In the present embodiment, the simulation signal is input from the first port 13-2 and output from the second port 13-1. However, the combination of the output port and the input port at the time of failure is not limited to one. FIG. 13 is a conceptual diagram illustrating an example of a combination of an input port and an output port at the time of failure. As shown in FIG. 13, when normal (when the failure signal is low level “0”), an arbitrary port is set as an input port by the CPU 4, and an arbitrary port is set as an output port by the CPU 4. On the other hand, when a failure occurs (when the failure signal is high level “1”), predetermined ports (ports A, C, E, G, and I) are set as input ports, and predetermined ports ( Ports B, D, F, H, and J) are set as output ports. Port A corresponds to port B. That is, the simulated signal input from port A is output from port B at the time of failure. Port C corresponds to port D. That is, a simulated signal input from port C is output from port D when a failure occurs. Thus, even if a plurality of combinations of input ports and output ports at the time of failure are determined, the same operational effects as in the present embodiment can be achieved.

以上、本発明について、第1及び第2の実施形態を用いて説明した。尚、これらの実施形態は互いに独立するものではなく、矛盾のない範囲内で互いに組み合わせて用いることも可能である。   The present invention has been described above using the first and second embodiments. These embodiments are not independent of each other, and can be used in combination with each other within a consistent range.

1 電気回路システム
2 マイクロコンピュータ
3 マスターマイクロコンピュータ
4 CPU
5 故障モード検出回路
6 リセット発生回路
7 入出力インタフェース回路
8 システムバス
9 入出力制御部
10 シリアル通信回路
11 模擬信号生成回路
12 シリアル通信回路
13 ポート群
14 異常動作検出回路
15 ウォッチドッグタイマ
16 不正アクセス監視回路
17 OR回路
18 異常動作カウンタ回路
19 AND回路
20 AND回路
21 OR回路
22 AND回路
23 AND回路
24 AND回路
25 AND回路
26 OR回路
27 入出力制御回路
28 入力イネーブル信号制御回路
29 出力イネーブル信号制御回路
30 入出力制御回路
31 イネーブル信号制御回路
32 スイッチ回路
33 AND回路
34 AND回路
35 OR回路
36 AND回路
37 AND回路
38 AND回路
39 OR回路
40 AND回路
41 OR回路
111 CPU
112 マルチバイブレータ
113 マルチバイブレータ
116 カウンタ
121 異常処理起動部
1 Electrical Circuit System 2 Microcomputer 3 Master Microcomputer 4 CPU
DESCRIPTION OF SYMBOLS 5 Failure mode detection circuit 6 Reset generation circuit 7 Input / output interface circuit 8 System bus 9 Input / output control part 10 Serial communication circuit 11 Simulated signal generation circuit 12 Serial communication circuit 13 Port group 14 Abnormal operation detection circuit 15 Watchdog timer 16 Unauthorized access Monitor circuit 17 OR circuit 18 Abnormal operation counter circuit 19 AND circuit 20 AND circuit 21 OR circuit 22 AND circuit 23 AND circuit 24 AND circuit 25 AND circuit 26 OR circuit 27 Input / output control circuit 28 Input enable signal control circuit 29 Output enable signal control circuit 29 Circuit 30 Input / output control circuit 31 Enable signal control circuit 32 Switch circuit 33 AND circuit 34 AND circuit 35 OR circuit 36 AND circuit 37 AND circuit 38 AND circuit 39 OR circuit 40 AND Road 41 OR circuit 111 CPU
112 Multivibrator 113 Multivibrator 116 Counter 121 Abnormal processing start unit

Claims (8)

第1マイクロコンピュータと、
模擬信号生成回路と、
を具備し、
前記第1マイクロコンピュータは、
CPUと、
複数のポートと、
前記CPUにより生成されたCPU出力信号を前記複数のポートのいずれかを介して外部装置に出力する、インタフェース回路と、
前記CPUが故障しているか否かを判定し、故障していると判定した場合に故障信号を生成して前記インタフェース回路に供給する、故障モード検出回路とを備え、
前記模擬信号生成回路は、前記CPU出力信号を模擬した模擬信号を生成し、
前記複数のポートは、故障時に前記模擬信号が入力される、第1ポートを有し、
前記インタフェース回路は、前記故障信号を取得した場合に、前記第1ポートから入力された模擬信号が、前記CPUを介することなく、前記第1ポートとは別の第2ポートを介して出力されるように、信号の伝達経路を変更する
電気回路システム。
A first microcomputer;
A simulation signal generation circuit;
Comprising
The first microcomputer is
CPU,
Multiple ports,
An interface circuit that outputs a CPU output signal generated by the CPU to an external device via any of the plurality of ports;
A failure mode detection circuit that determines whether or not the CPU is faulty and generates a fault signal and supplies the fault signal to the interface circuit when it is determined that the CPU is faulty;
The simulation signal generation circuit generates a simulation signal that simulates the CPU output signal,
The plurality of ports have a first port to which the simulation signal is input when a failure occurs,
When the interface circuit acquires the failure signal, the simulated signal input from the first port is output via the second port different from the first port without passing through the CPU. Thus, an electric circuit system for changing a signal transmission path.
請求項1に記載された電気回路システムであって、
前記インタフェース回路は、前記故障信号を取得した場合に、前記CPU出力信号がマスクされるように、信号の伝達経路を変更する
電気回路システム。
An electrical circuit system according to claim 1,
The interface circuit is an electric circuit system that changes a signal transmission path so that the CPU output signal is masked when the failure signal is acquired.
請求項1または2に記載された電気回路システムであって、
更に、
第2マイクロコンピュータ、
を具備し、
前記模擬信号生成回路は、前記第2マイクロコンピュータに内蔵され、
前記インタフェース回路は、前記故障信号を前記第2マイクロコンピュータに送信し、
前記模擬信号生成回路は、前記第2マイクロコンピュータが前記故障信号を取得した場合に、前記模擬信号を生成する
電気回路システム。
An electric circuit system according to claim 1 or 2,
Furthermore,
A second microcomputer,
Comprising
The simulation signal generation circuit is built in the second microcomputer,
The interface circuit transmits the failure signal to the second microcomputer;
The simulation signal generation circuit is an electric circuit system that generates the simulation signal when the second microcomputer acquires the failure signal.
請求項1乃至3のいずれかに記載された電気回路システムであって、
前記模擬信号生成回路は、さらに、前記複数のポートのうちのどのポートを前記第2ポートに設定するかを示すポート設定信号を生成し、前記ポート設定信号を前記第1マイクロコンピュータに送信し、
前記インタフェース回路は、前記ポート設定信号に基づいて、前記第2ポートを特定する
電気回路システム。
An electric circuit system according to any one of claims 1 to 3,
The simulation signal generation circuit further generates a port setting signal indicating which port of the plurality of ports is set as the second port, and transmits the port setting signal to the first microcomputer,
The interface circuit is an electrical circuit system that identifies the second port based on the port setting signal.
請求項1乃至3のいずれかに記載された電気回路システムであって、
前記インタフェース回路において、前記第2ポートは、前記第1ポートに対応して予め決められている
電気回路システム。
An electric circuit system according to any one of claims 1 to 3,
In the interface circuit, the second port is an electric circuit system determined in advance corresponding to the first port.
請求項1乃至5のいずれかに記載された電気回路システムであって、
前記故障モード検出回路は、
前記CPUが異常状態であるか否かを判定し、異常状態である場合にリセット要求信号を生成する、異常動作検出回路と、
前記リセット要求信号が生成された場合に、リセット信号を生成して前記CPUに供給する、リセット生成回路と、
前記リセット要求信号が生成された回数をカウントし、前記回数が予め設定された設定回数を超えた場合に、前記CPUが故障していると判定する、異常動作カウンタ回路とを備え、
前記CPUは、前記リセット信号を取得した場合に、動作を停止する
電気回路システム。
An electric circuit system according to any one of claims 1 to 5,
The failure mode detection circuit includes:
An abnormal operation detection circuit that determines whether the CPU is in an abnormal state and generates a reset request signal when the CPU is in an abnormal state;
A reset generation circuit that generates a reset signal and supplies the reset signal to the CPU when the reset request signal is generated;
An abnormal operation counter circuit that counts the number of times that the reset request signal has been generated and determines that the CPU has failed when the number of times exceeds a preset number of times,
The CPU is an electric circuit system that stops operation when the reset signal is acquired.
請求項1乃至6のいずれかに記載された電気回路システムにおける前記第1マイクロコンピュータとして用いられる、マイクロコンピュータ。   A microcomputer used as the first microcomputer in the electric circuit system according to claim 1. 正常時に、CPUにより生成されたCPU出力信号を複数のポートのいずれかを介して外部装置に出力するステップと、
前記CPUが故障しているか否かを判定するステップと、
前記CPUが故障した場合に、前記複数のポートに含まれる第1ポートを介して、前記CPU出力信号を模擬した模擬信号を取得するステップと、
前記CPUが故障した場合に、前記第1ポートを介して取得した模擬信号が、前記CPUを介することなく、前記第1ポートとは別の第2ポートを介して外部装置に出力されるように、信号の伝達経路を変更するステップと、
を具備する
マクロコンピュータの動作方法。
Outputting a CPU output signal generated by the CPU to an external device via one of a plurality of ports at a normal time;
Determining whether the CPU is faulty;
Obtaining a simulation signal simulating the CPU output signal via a first port included in the plurality of ports when the CPU fails;
When the CPU fails, the simulation signal acquired via the first port is output to the external device via the second port different from the first port without passing through the CPU. Changing the signal transmission path;
A method of operating a macro computer comprising:
JP2010117543A 2010-05-21 2010-05-21 Electronic circuit system, microcomputer, and operation method for electronic circuit system Withdrawn JP2011248396A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010117543A JP2011248396A (en) 2010-05-21 2010-05-21 Electronic circuit system, microcomputer, and operation method for electronic circuit system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010117543A JP2011248396A (en) 2010-05-21 2010-05-21 Electronic circuit system, microcomputer, and operation method for electronic circuit system

Publications (1)

Publication Number Publication Date
JP2011248396A true JP2011248396A (en) 2011-12-08

Family

ID=45413631

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010117543A Withdrawn JP2011248396A (en) 2010-05-21 2010-05-21 Electronic circuit system, microcomputer, and operation method for electronic circuit system

Country Status (1)

Country Link
JP (1) JP2011248396A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9477542B2 (en) 2013-12-24 2016-10-25 Denso Corporation Electronic control unit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9477542B2 (en) 2013-12-24 2016-10-25 Denso Corporation Electronic control unit

Similar Documents

Publication Publication Date Title
JP5715257B2 (en) Method for monitoring at least two microcontrollers
JP5739290B2 (en) Electronic control unit
US9311206B2 (en) Method and apparatus for monitoring general purpose input output, GPIO, signals
CN104639380A (en) Server monitoring method
US20120137159A1 (en) Monitoring system and method of power sequence signal
US20190162760A1 (en) Semiconductor device and power monitoring method therefor
EP2889775A1 (en) Computer provided with a self-monitoring function, and monitoring program
JP6139386B2 (en) Programmable controller
KR20150039508A (en) Watchdog apparatus and method thereof
US20170288677A1 (en) Clock signal stop detection circuit
KR101560497B1 (en) Method for controlling reset of lockstep replicated processor cores and lockstep system using the same
KR20190058310A (en) Semiconductor device
JP2016081340A (en) Multiplex control device
US8762792B2 (en) Event monitor having switch matrix, separate counter, and compare circuitry
US10986556B2 (en) Circuit for monitoring a data processing system
JP6736980B2 (en) System and semiconductor device
JP2011248396A (en) Electronic circuit system, microcomputer, and operation method for electronic circuit system
US7627774B2 (en) Redundant manager modules to perform management tasks with respect to an interconnect structure and power supplies
TW201422923A (en) Fan rotation speed control system and method for controlling rotation speed of fan
KR102104967B1 (en) Duplicated board setting method and the board thereof
JP6138591B2 (en) Control system
JP2012088815A (en) Microprocessor operation monitoring system
JP2019121033A (en) Control device for aircrafts and mutual diagnosis method
JP6274947B2 (en) Abnormality diagnosis method for microprocessor of in-vehicle control device
KR101540975B1 (en) Apparatus and method for checking operation integrity on fpga based controller

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20130806