JP2009164933A - Semiconductor integrated circuit - Google Patents

Semiconductor integrated circuit Download PDF

Info

Publication number
JP2009164933A
JP2009164933A JP2008000991A JP2008000991A JP2009164933A JP 2009164933 A JP2009164933 A JP 2009164933A JP 2008000991 A JP2008000991 A JP 2008000991A JP 2008000991 A JP2008000991 A JP 2008000991A JP 2009164933 A JP2009164933 A JP 2009164933A
Authority
JP
Japan
Prior art keywords
signal
circuit
external terminal
input
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.)
Granted
Application number
JP2008000991A
Other languages
Japanese (ja)
Other versions
JP5194804B2 (en
Inventor
Hideki Nakamura
英樹 中村
Masaru Tachibana
大 橘
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.)
Fujitsu Semiconductor Ltd
Original Assignee
Fujitsu Semiconductor Ltd
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 Fujitsu Semiconductor Ltd filed Critical Fujitsu Semiconductor Ltd
Priority to JP2008000991A priority Critical patent/JP5194804B2/en
Publication of JP2009164933A publication Critical patent/JP2009164933A/en
Application granted granted Critical
Publication of JP5194804B2 publication Critical patent/JP5194804B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a technology of detecting an abnormal state (output short circuit state and input-open state) of an external terminal without increasing costs in a semiconductor integrated circuit. <P>SOLUTION: The semiconductor integrated circuit (MCU) includes a plurality of I/O circuits (IO1 to IO4), a monitor target designating circuit (DPSEL), and an abnormality detecting circuit (PCDET). The plurality of I/O circuits (IO1 to IO4) are provided corresponding to a plurality of external terminals (P1 to P4). The monitor target designating circuit (DPSEL) variably designates a monitor target external terminal from among the plurality of external terminals (P1 to P4). The abnormality detecting circuit (PCDET) detects the output short circuit state of the monitor target external terminal when the I/O circuit corresponding to the monitor target external terminal functions as an output circuit, and detects the input-open state of the monitor target external terminal when the I/O circuit corresponding to the monitor target external terminal functions as an input circuit. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、マイクロコントローラ(MCU:Micro Controller Unit)等の半導体集積回路に関する。   The present invention relates to a semiconductor integrated circuit such as a microcontroller (MCU).

マイクロコントローラ等のLSI(Large Scale Integration)を使用したシステムでは、ソフトウェアあるいはハードウェアの設計ミスに起因してLSIの外部端子で出力短絡(信号衝突)が発生することがある。LSIにおいては、外部端子で出力短絡が発生すると、外部端子に接続される内部素子(トランジスタ)に過電流が流れ、内部素子が破壊されたり、内部素子の寿命が短縮されたりする等の問題が生じる。このため、LSIにおいて外部端子の出力短絡状態を検出する技術が提案されている(例えば、特許文献1、2を参照)。   In a system using an LSI (Large Scale Integration) such as a microcontroller, an output short circuit (signal collision) may occur at an external terminal of the LSI due to a software or hardware design error. In an LSI, when an output short circuit occurs at an external terminal, an overcurrent flows through the internal element (transistor) connected to the external terminal, causing damage to the internal element or shortening the lifetime of the internal element. Arise. For this reason, a technique for detecting an output short-circuit state of an external terminal in an LSI has been proposed (see, for example, Patent Documents 1 and 2).

図11は、LSIの入出力ポート回路の従来例(その1)を示している。図11の入出力ポート回路は、特許文献2(図5)に開示されたものに相当し、方向レジスタDDR、データレジスタPDRおよび入出力回路IOを備えて構成されている。方向レジスタDDRは、入出力回路IOを入力回路として使用する場合に“0”に設定され、入出力回路IOを出力回路として使用する場合に“1”に設定される。信号DDROは、方向レジスタDDRの設定値を示す信号である。データレジスタPDRは、入出力回路IOを出力回路として使用する際、“0”に設定された信号を外部端子Pから出力する場合に“0”に設定され、“1”に設定された信号を外部端子Pから出力する場合に“1”に設定される。信号PDROは、データレジスタPDRの設定値を示す信号である。   FIG. 11 shows a conventional example (part 1) of an input / output port circuit of an LSI. The input / output port circuit of FIG. 11 corresponds to that disclosed in Patent Document 2 (FIG. 5), and includes a direction register DDR, a data register PDR, and an input / output circuit IO. The direction register DDR is set to “0” when the input / output circuit IO is used as an input circuit, and is set to “1” when the input / output circuit IO is used as an output circuit. The signal DDRO is a signal indicating the set value of the direction register DDR. When the input / output circuit IO is used as an output circuit, the data register PDR is set to “0” when the signal set to “0” is output from the external terminal P, and the signal set to “1” is output. When outputting from the external terminal P, it is set to “1”. The signal PDRO is a signal indicating the set value of the data register PDR.

入出力回路IOは、NAND回路NAa、インバータIVa、IVb、NOR回路NRa、PMOSトランジスタPMaおよびNMOSトランジスタNMaを備えて構成されている。NAND回路NAaは、信号DDROが“0”に設定されている場合に信号PDROとは無関係に信号NAaOを“1”に設定し、信号DDROが“1”に設定されている場合に信号PDROを反転させて信号NAaOとして出力する。インバータIVaは、信号DDROを反転させて信号IVaOとして出力する。NOR回路NRaは、信号IVaOが“0”に設定されている場合に信号PDROを反転させて信号NRaOとして出力し、信号IVaOが“1”に設定されている場合に信号PDROとは無関係に信号NRaOを“0”に設定する。PMOSトランジスタPMaは、外部端子Pに接続される信号線INOUT(信号INOUTを伝送する信号線)と電源線VDD(例えば、3V)との間に接続されている。NMOSトランジスタNMaは、信号線INOUTと接地線GND(0V)との間に接続されている。PMOSトランジスタPMaの制御端子には信号NAaOが入力され、NMOSトランジスタNMaの制御端子には信号NRaOが入力されている。インバータIVbは、信号INOUTを反転させて信号IVbOとして出力する。   The input / output circuit IO includes a NAND circuit NAa, inverters IVa and IVb, a NOR circuit NRa, a PMOS transistor PMa, and an NMOS transistor NMa. The NAND circuit NAa sets the signal NAaO to “1” regardless of the signal PDRO when the signal DDRO is set to “0”, and outputs the signal PDRO when the signal DDRO is set to “1”. Inverted and output as signal NAaO. Inverter IVa inverts signal DDRO and outputs the inverted signal as signal IVaO. The NOR circuit NRa inverts the signal PDRO when the signal IVaO is set to “0” and outputs the inverted signal PDRO, and outputs the signal NRaO regardless of the signal PDRO when the signal IVaO is set to “1”. NRaO is set to “0”. The PMOS transistor PMa is connected between a signal line INOUT (signal line for transmitting the signal INOUT) connected to the external terminal P and a power supply line VDD (for example, 3V). The NMOS transistor NMa is connected between the signal line INOUT and the ground line GND (0 V). The signal NAaO is input to the control terminal of the PMOS transistor PMa, and the signal NRaO is input to the control terminal of the NMOS transistor NMa. Inverter IVb inverts signal INOUT and outputs the inverted signal as signal IVbO.

このような構成の入出力回路IOでは、信号DDROが“1”に設定されると、信号NAaO、NRaOが信号PDROとは反対の論理値に設定される。信号PDROが“0”に設定されている場合には、信号NAaO、NRaOが“1”に設定されるため、PMOSトランジスタPMaがオフ状態になるとともに、NMOSトランジスタNMaがオン状態になり、その結果、外部端子Pから出力される信号INOUTが“0”に設定される。また、信号PDROが“1”に設定されている場合には、信号NAaO、NRaOが“0”に設定されるため、PMOSトランジスタPMaがオン状態になるとともに、NMOSトランジスタNMaがオフ状態になり、その結果、外部端子Pから出力される信号INOUTが“1”に設定される。このように、入出力回路IOは、信号DDROが“1”に設定されている場合に出力回路として機能する。一方、信号DDROが“0”に設定されると、信号PDROとは無関係に、信号NAaOが“1”に設定されるとともに、信号NRaOが“0”に設定されるため、PMOSトランジスタPMaおよびNMOSトランジスタNMaがオフ状態になる。これにより、外部端子Pに入力される信号INOUTがインバータIVbを介してLSIの内部回路に出力される。このように、入出力回路IOは、信号DDROが“0”に設定されている場合に入力回路として機能する。   In the input / output circuit IO having such a configuration, when the signal DDRO is set to “1”, the signals NAaO and NRaO are set to a logical value opposite to that of the signal PDRO. When the signal PDRO is set to “0”, the signals NAaO and NRaO are set to “1”, so that the PMOS transistor PMa is turned off and the NMOS transistor NMa is turned on. As a result The signal INOUT output from the external terminal P is set to “0”. When the signal PDRO is set to “1”, the signals NAaO and NRaO are set to “0”, so that the PMOS transistor PMa is turned on and the NMOS transistor NMa is turned off. As a result, the signal INOUT output from the external terminal P is set to “1”. Thus, the input / output circuit IO functions as an output circuit when the signal DDRO is set to “1”. On the other hand, when the signal DDRO is set to “0”, the signal NAaO is set to “1” and the signal NRaO is set to “0” regardless of the signal PDRO. The transistor NMa is turned off. As a result, the signal INOUT input to the external terminal P is output to the internal circuit of the LSI via the inverter IVb. Thus, the input / output circuit IO functions as an input circuit when the signal DDRO is set to “0”.

以上のような入出力ポート回路によれば、プログラムで1本の外部端子を入力端子としても出力端子としても使用することができ、柔軟なプログラミングが可能になる。また、1本の外部端子で入力端子および出力端子を兼用することが可能になるため、外部端子数を削減でき、その結果、コストの低減を実現できるという効果も得られる。   According to the input / output port circuit as described above, one external terminal can be used as both an input terminal and an output terminal in a program, and flexible programming becomes possible. In addition, since one external terminal can be used as both an input terminal and an output terminal, the number of external terminals can be reduced, and as a result, an effect of realizing cost reduction can be obtained.

図12は、LSIの入出力ポート回路の従来例(その2)を示している。図12の入出力ポート回路は、図11の入出力ポート回路においてコンパレータCMPa、CMPb、インバータIVc、AND回路ANa、ANbおよびOR回路ORaにより具現される出力短絡検出回路(外部端子Pの出力短絡状態を検出する回路)を追加して構成されている。この出力短絡検出回路は、特許文献1(図2)に開示されたものに相当する。   FIG. 12 shows a conventional example (part 2) of the input / output port circuit of the LSI. The input / output port circuit of FIG. 12 is an output short circuit detection circuit (output short circuit state of the external terminal P) implemented by the comparators CMPa, CMPb, inverter IVc, AND circuits ANa, ANb, and OR circuit ORa in the input / output port circuit of FIG. This circuit is configured by adding a circuit for detecting the above. This output short circuit detection circuit corresponds to that disclosed in Patent Document 1 (FIG. 2).

コンパレータCMPaは、信号INOUTの電圧が閾値電圧VTHaより高い場合に信号CMPaOを“0”に設定し、信号INOUTの電圧が閾値電圧VTHaより低い場合に信号CMPaOを“1”に設定する。コンパレータCMPbは、信号INOUTの電圧が閾値電圧VTLa(VTLa<VTHa)より低い場合に信号CMPbOを“0”に設定し、信号INOUTの電圧が閾値電圧VTLaより高い場合に信号CMPbOを“1”に設定する。インバータIVcは、信号NAaOを反転させて信号NAaOXとして出力する。AND回路ANaは、信号NAaOXが“0”に設定されている場合に信号CMPaOとは無関係に信号SSHを“0”に設定し、信号NAaOXが“1”に設定されている場合に信号CMPaOを信号SSHとして出力する。AND回路ANbは、信号NRaOが“0”に設定されている場合に信号CMPbOとは無関係に信号SSLを“0”に設定し、信号NRaOが“1”に設定されている場合に信号CMPbOを信号SSLとして出力する。OR回路ORaは、信号SSH、SSLの双方が“0”に設定されている場合に信号SSを“0”に設定し、信号SSH、SSLの少なくとも一方が“1”に設定されている場合に信号SSを“1”に設定する。   The comparator CMPa sets the signal CMPaO to “0” when the voltage of the signal INOUT is higher than the threshold voltage VTHa, and sets the signal CMPaO to “1” when the voltage of the signal INOUT is lower than the threshold voltage VTHa. The comparator CMPb sets the signal CMPbO to “0” when the voltage of the signal INOUT is lower than the threshold voltage VTLa (VTLa <VTHa), and sets the signal CMPbO to “1” when the voltage of the signal INOUT is higher than the threshold voltage VTLa. Set. Inverter IVc inverts signal NAaO and outputs it as signal NAaOX. The AND circuit ANa sets the signal SSH to “0” regardless of the signal CMPaO when the signal NAaOX is set to “0”, and outputs the signal CMPaO when the signal NAaOX is set to “1”. Output as signal SSH. The AND circuit ANb sets the signal SSL to “0” regardless of the signal CMPbO when the signal NRaO is set to “0”, and outputs the signal CMPbO when the signal NRaO is set to “1”. Output as signal SSL. The OR circuit ORa sets the signal SS to “0” when both the signals SSH and SSL are set to “0”, and sets at least one of the signals SSH and SSL to “1”. The signal SS is set to “1”.

このような構成の出力短絡検出回路では、入出力回路IOが出力回路として機能している場合(信号DDROが“1”に設定されている場合)、以下のように外部端子Pの出力短絡状態が検出される。信号PDROが“1”に設定されている場合(入出力回路IOのPMOSトランジスタPMaがオン状態である場合)、外部端子Pに対して別のLSIから“0”に設定された信号が出力されるようなシステム設計ミスが存在すると、外部端子Pで出力短絡が発生する。このような場合、入出力回路IOにより外部端子P(信号線INOUT)が“1”(高レベル)に駆動されているにも拘わらず、別のLSIにより外部端子P(信号線INOUT)が“0”(低レベル)に駆動されるため、入出力回路IOのPMOSトランジスタPMaに大電流が流れ、別のLSIのトランジスタにも大電流が流れる。このとき、信号INOUTの電圧は、外部端子Pで出力短絡が発生していない場合に比べて低くなる。そこで、例えば、閾値電圧VTHaを電源線VDDの電圧より0.5V低く設定し、外部端子Pでの出力短絡の発生に伴って信号INOUTの電圧が電源線VDDの電圧から下降して閾値電圧VTHaより低くなると、コンパレータCMPaにおいて信号CMPaOが“1”に設定されるようにする。信号PDROが“1”に設定されている場合、信号NAaOXが“1”に設定されるため、信号CMPaOが“1”に設定されるのに伴って信号SSHが“1”に設定され、その結果、信号SSが“1”に設定される。これにより、外部端子Pの出力短絡状態が検出される。   In the output short circuit detection circuit having such a configuration, when the input / output circuit IO functions as an output circuit (when the signal DDRO is set to “1”), the output short circuit state of the external terminal P is as follows: Is detected. When the signal PDRO is set to “1” (when the PMOS transistor PMa of the input / output circuit IO is in an on state), a signal set to “0” is output from another LSI to the external terminal P. If there is such a system design error, an output short circuit occurs at the external terminal P. In such a case, although the external terminal P (signal line INOUT) is driven to “1” (high level) by the input / output circuit IO, the external terminal P (signal line INOUT) is set to “1” by another LSI. Since it is driven to 0 ″ (low level), a large current flows through the PMOS transistor PMa of the input / output circuit IO, and a large current also flows through the transistors of another LSI. At this time, the voltage of the signal INOUT is lower than when no output short-circuit occurs at the external terminal P. Therefore, for example, the threshold voltage VTHa is set 0.5 V lower than the voltage of the power supply line VDD, and the voltage of the signal INOUT decreases from the voltage of the power supply line VDD as the output short circuit occurs at the external terminal P. When it becomes lower, the signal CMPaO is set to “1” in the comparator CMPa. When the signal PDRO is set to “1”, since the signal NAaOX is set to “1”, the signal SSH is set to “1” as the signal CMPaO is set to “1”. As a result, the signal SS is set to “1”. Thereby, the output short circuit state of the external terminal P is detected.

また、信号PDROが“0”に設定されている場合(入出力回路IOのNMOSトランジスタNMaがオン状態である場合)、外部端子Pに対して別のLSIから“1”に設定された信号が出力されるようなシステム設計ミスが存在すると、外部端子Pで出力短絡が発生する。このような場合、入出力回路IOにより外部端子P(信号線INOUT)が“0”に駆動されているにも拘わらず、別のLSIにより外部端子P(信号線INOUT)が“1”に駆動されるため、入出力回路IOのNMOSトランジスタNMaに大電流が流れ、別のLSIのトランジスタにも大電流が流れる。このとき、信号INOUTの電圧は、外部端子Pで出力短絡が発生していない場合に比べて高くなる。そこで、例えば、閾値電圧VTLaを接地線GNDの電圧より0.5V高く設定し、外部端子Pでの出力短絡の発生に伴って信号INOUTの電圧が接地線GNDの電圧から上昇して閾値電圧VTLaより高くなると、コンパレータCMPbにおいて信号CMPbOが“1”に設定されるようにする。信号PDROが“0”に設定されている場合、信号NRaOが“1”に設定されるため、信号CMPbOが“1”に設定されるのに伴って信号SSLが“1”に設定され、その結果、信号SSが“1”に設定される。これにより、外部端子Pの出力短絡状態が検出される。   Further, when the signal PDRO is set to “0” (when the NMOS transistor NMa of the input / output circuit IO is in the on state), a signal set to “1” from another LSI with respect to the external terminal P If there is a system design error that is output, an output short circuit occurs at the external terminal P. In such a case, the external terminal P (signal line INOUT) is driven to “1” by another LSI even though the external terminal P (signal line INOUT) is driven to “0” by the input / output circuit IO. Therefore, a large current flows through the NMOS transistor NMa of the input / output circuit IO, and a large current also flows through the transistor of another LSI. At this time, the voltage of the signal INOUT is higher than that when no output short circuit occurs at the external terminal P. Therefore, for example, the threshold voltage VTLa is set 0.5 V higher than the voltage of the ground line GND, and the voltage of the signal INOUT rises from the voltage of the ground line GND as the output short circuit occurs at the external terminal P, and the threshold voltage VTLa When it becomes higher, the signal CMPbO is set to “1” in the comparator CMPb. When the signal PDRO is set to “0”, the signal NRaO is set to “1”, so that the signal SSL is set to “1” as the signal CMPbO is set to “1”. As a result, the signal SS is set to “1”. Thereby, the output short circuit state of the external terminal P is detected.

しかしながら、現実には、外部端子Pで出力短絡が発生していない場合でも、データレジスタPDRの設定値の変更に伴って信号INOUTが遷移する際には、信号INOUTの電圧が閾値電圧VTHaより低い状態あるいは信号INOUTの電圧が閾値電圧VTLaより高い状態が存在する。従って、データレジスタPDRの設定値の変更に伴う信号INOUTの遷移に起因して信号SSが“1”に設定されることを回避するためのタイミング制御回路等を設ける必要がある。   However, in reality, even when an output short circuit does not occur at the external terminal P, when the signal INOUT transitions with a change in the setting value of the data register PDR, the voltage of the signal INOUT is lower than the threshold voltage VTHa. There exists a state or a state where the voltage of the signal INOUT is higher than the threshold voltage VTLa. Therefore, it is necessary to provide a timing control circuit or the like for avoiding that the signal SS is set to “1” due to the transition of the signal INOUT accompanying the change of the setting value of the data register PDR.

図13は、LSIの入出力ポート回路の従来例(その3)を示している。図13の入出力ポート回路は、図11の入出力ポート回路においてAND回路ANc〜ANf、インバータIVd〜IVh、遅延回路DLYa、DLYb、ENOR回路ENRa、ENRb、コンパレータCMPc、CMPd、NMOSトランジスタNMb、NMcおよびPMOSトランジスタPMb、PMcにより具現される出力短絡検出回路を追加して構成されている。この出力短絡検出回路は、特許文献2(図4)に開示されたものに相当する。   FIG. 13 shows a conventional example (part 3) of the input / output port circuit of the LSI. The input / output port circuit of FIG. 13 is similar to the input / output port circuit of FIG. 11 in that AND circuits ANc to ANf, inverters IVd to IVh, delay circuits DLYa and DLYb, ENOR circuits ENRa and ENRb, comparators CMPc and CMPd, NMOS transistors NMb and NMc. In addition, an output short circuit detection circuit embodied by PMOS transistors PMb and PMc is added. This output short circuit detection circuit corresponds to that disclosed in Patent Document 2 (FIG. 4).

AND回路ANcは、信号DDROが“0”に設定されている場合に信号PDROとは無関係に信号ANcOを“0”に設定し、信号DDROが“1”に設定されている場合に信号PDROを信号ANcOとして出力する。インバータIVdは、信号PDROを反転させて信号PDROXとして出力する。AND回路ANdは、信号DDROが“0”に設定されている場合に信号PDROXとは無関係に信号ANdOを“0”に設定し、信号DDROが“1”に設定されている場合に信号PDROXを信号ANdOとして出力する。遅延回路DLYaは、信号ANcOを所定時間遅らせて信号DLYaOとして出力する。遅延回路DLYbは、信号ANdOを所定時間遅らせて信号DLYbOとして出力する。ENOR回路ENRaは、信号PDRO、DLYaOの論理値が一致しない場合に信号ENRaOを“0”に設定し、信号PDRO、DLYaOの論理値が一致する場合に信号ENRaOを“1”に設定する。ENOR回路ENRbは、信号PDROX、DLYbOの論理値が一致しない場合に信号ENRbOを“0”に設定し、信号PDROX、DLYbOの論理値が一致する場合に信号ENRbOを“1”に設定する。AND回路ANeは、信号ENRaOが“0”に設定されている場合に信号PDROとは無関係に信号ANeOを“0”に設定し、信号ENRaOが“1”に設定されている場合に信号PDROを信号ANeOとして出力する。AND回路ANfは、信号ENRbOが“0”に設定されている場合に信号PDROXとは無関係に信号ANfOを“0”に設定し、信号ENRbOが“1”に設定されている場合に信号PDROXを信号ANfOとして出力する。インバータIVeは、信号ANeOを反転させて信号ANeOXとして出力する。インバータIVfは、信号ANfOを反転させて信号ANfOXとして出力する。   The AND circuit ANc sets the signal ANcO to “0” regardless of the signal PDRO when the signal DDRO is set to “0”, and outputs the signal PDRO when the signal DDRO is set to “1”. Output as signal ANcO. Inverter IVd inverts signal PDRO and outputs it as signal PDROX. The AND circuit ANd sets the signal ANdO to “0” regardless of the signal PDROX when the signal DDRO is set to “0”, and outputs the signal PDROX when the signal DDRO is set to “1”. Output as signal ANdO. The delay circuit DLYa delays the signal ANcO for a predetermined time and outputs it as the signal DLYaO. The delay circuit DLYb delays the signal ANdO for a predetermined time and outputs it as the signal DLYbO. The ENOR circuit ENRa sets the signal ENRaO to “0” when the logical values of the signals PDRO and DLYaO do not match, and sets the signal ENRaO to “1” when the logical values of the signals PDRO and DLYaO match. The ENOR circuit ENRb sets the signal ENRbO to “0” when the logical values of the signals PDROX and DLYbO do not match, and sets the signal ENRbO to “1” when the logical values of the signals PDROX and DLYbO match. The AND circuit ANe sets the signal ANeO to “0” regardless of the signal PDRO when the signal ENRaO is set to “0”, and outputs the signal PDRO when the signal ENRaO is set to “1”. Output as signal ANeO. The AND circuit ANf sets the signal ANfO to “0” regardless of the signal PDROX when the signal ENRbO is set to “0”, and outputs the signal PDROX when the signal ENRbO is set to “1”. Output as signal ANfO. Inverter IVe inverts signal ANeO and outputs it as signal ANeOX. Inverter IVf inverts signal ANfO and outputs it as signal ANfOX.

コンパレータCMPcは、信号INOUTの電圧が閾値電圧VTHbより高い場合に信号CMPcOを“0”に設定し、信号INOUTの電圧が閾値電圧VTHbより低い場合に信号CMPcOを“1”に設定する。コンパレータCMPdは、信号INOUTの電圧が閾値電圧VTLb(VTLb<VTHb)より低い場合に信号CMPdOを“0”に設定し、信号INOUTの電圧が閾値電圧VTLbより高い場合に信号CMPdOを“1”に設定する。NMOSトランジスタNMbおよびPMOSトランジスタPMbは、信号線CMPcOと信号線DETとの間に並列接続されている。NMOSトランジスタNMbの制御端子には信号ANeOが入力され、PMOSトランジスタPMbの制御端子には信号ANeOXが入力されている。NMOSトランジスタNMcおよびPMOSトランジスタPMcは、信号線CMPdOと信号線DETとの間に並列接続されている。NMOSトランジスタNMcの制御端子には信号ANfOが入力され、PMOSトランジスタPMcの制御端子には信号ANfOXが入力されている。インバータIVgは信号DETを反転させて信号DETXとして出力し、インバータIVhは信号DETXを反転させて信号DETとして出力する。即ち、インバータIVg、IVhは、信号DETを保持するラッチ回路を具現している。   The comparator CMPc sets the signal CMPcO to “0” when the voltage of the signal INOUT is higher than the threshold voltage VTHb, and sets the signal CMPcO to “1” when the voltage of the signal INOUT is lower than the threshold voltage VTHb. The comparator CMPd sets the signal CMPdO to “0” when the voltage of the signal INOUT is lower than the threshold voltage VTLb (VTLb <VTHb), and sets the signal CMPdO to “1” when the voltage of the signal INOUT is higher than the threshold voltage VTLb. Set. The NMOS transistor NMb and the PMOS transistor PMb are connected in parallel between the signal line CMPcO and the signal line DET. The signal ANeO is input to the control terminal of the NMOS transistor NMb, and the signal ANeOX is input to the control terminal of the PMOS transistor PMb. The NMOS transistor NMc and the PMOS transistor PMc are connected in parallel between the signal line CMPdO and the signal line DET. The signal ANfO is input to the control terminal of the NMOS transistor NMc, and the signal ANfOX is input to the control terminal of the PMOS transistor PMc. The inverter IVg inverts the signal DET and outputs it as the signal DETX, and the inverter IVh inverts the signal DETX and outputs it as the signal DET. That is, the inverters IVg and IVh implement a latch circuit that holds the signal DET.

このような構成の出力短絡検出回路では、入出力回路IOが出力回路として機能している場合(信号DDROが“1”に設定されている場合)、以下のように外部端子Pの出力短絡状態が検出される。信号PDROが“0”に設定されている場合には、信号ANeOが“0”に設定され、信号ANeOXが“1”に設定されるため、NMOSトランジスタNMbおよびPMOSトランジスタPMbがオフ状態になる。従って、信号CMPcOは信号DETに関与していない。また、信号PDROが“0”に設定されている場合には、信号PDROXが“1”に設定されるため、信号ANdO、DLYbOが“1”に設定され、信号ENRbOが“1”に設定される。これにより、信号ANfOが“1”に設定され、信号ANfOXが“0”に設定されるため、NMOSトランジスタNMcおよびPMOSトランジスタPMcがオン状態になる。従って、信号CMPdOが信号DETとして出力されている。このような状態で外部端子Pにおいて出力短絡が発生すると、信号INOUTの電圧が接地線GNDの電圧から上昇して閾値電圧VTLbより高くなった時点で信号CMPdOが“0”から“1”に遷移し、その結果、信号DETが“0”から“1”に遷移する。これにより、外部端子Pの出力短絡状態が検出される。   In the output short circuit detection circuit having such a configuration, when the input / output circuit IO functions as an output circuit (when the signal DDRO is set to “1”), the output short circuit state of the external terminal P is as follows: Is detected. When the signal PDRO is set to “0”, the signal ANeO is set to “0” and the signal ANeOX is set to “1”, so that the NMOS transistor NMb and the PMOS transistor PMb are turned off. Therefore, the signal CMPcO is not involved in the signal DET. When the signal PDRO is set to “0”, the signal PDROX is set to “1”, so that the signals ANdO and DLYbO are set to “1” and the signal ENRbO is set to “1”. The As a result, the signal ANfO is set to “1” and the signal ANfOX is set to “0”, so that the NMOS transistor NMc and the PMOS transistor PMc are turned on. Therefore, the signal CMPdO is output as the signal DET. When an output short circuit occurs in the external terminal P in such a state, the signal CMPdO changes from “0” to “1” when the voltage of the signal INOUT rises from the voltage of the ground line GND and becomes higher than the threshold voltage VTLb. As a result, the signal DET transitions from “0” to “1”. Thereby, the output short circuit state of the external terminal P is detected.

信号PDROが“0”から“1”に遷移すると、信号PDROXが“1”から“0”に遷移するため、信号ANfOが“1”から“0”に遷移し、信号ANfOXが“0”から“1”に遷移する。これにより、NMOSトランジスタNMcおよびPMOSトランジスタPMcがオフ状態になり、その結果、信号CMPdOは信号DETに関与しなくなる。また、信号PDROが“0”から“1”に遷移すると、信号ANcOが“0”から“1”に遷移し、信号ANcOが遷移してから遅延回路DLYaの遅延時間が経過した後に信号DLYaOが“0”から“1”に遷移する。これにより、信号ENRaOが“0”から“1”に遷移するため、信号ANeOが“0”から“1”に遷移し、信号ANeOXが“1”から“0”に遷移する。このため、NMOSトランジスタNMbおよびPMOSトランジスタPMbがオン状態になり、その結果、信号CMPcOが信号DETとして出力されるようになる。即ち、信号PDROが遷移してから遅延回路DLYaの遅延時間が経過するまでの期間においては、NMOSトランジスタNMbおよびPMOSトランジスタPMbはオフ状態のままであり、信号CMPcOは信号DETに関与しない。信号PDROが“0”から“1”に遷移すると、信号INOUTが“0”から“1”に遷移する。信号INOUTが“0”から“1”に遷移する際には、外部端子Pで出力短絡が発生していない場合でも、信号INOUTの電圧が閾値電圧VTHbより低い状態が存在する。しかしながら、遅延回路DLYaの遅延時間が信号INOUTの遷移時間(外部端子Pの信号遷移時間)より大きく設定されることで、外部端子Pの信号遷移状態が外部端子Pの出力短絡状態として検出されることが回避される。   When the signal PDRO transitions from “0” to “1”, the signal PDROX transitions from “1” to “0”. Therefore, the signal ANfO transitions from “1” to “0”, and the signal ANfOX transitions from “0”. Transition to “1”. As a result, the NMOS transistor NMc and the PMOS transistor PMc are turned off, and as a result, the signal CMPdO does not participate in the signal DET. When the signal PDRO transitions from “0” to “1”, the signal ANcO transitions from “0” to “1”. After the delay time of the delay circuit DLYa elapses after the signal ANcO transitions, the signal DLYaO Transition from “0” to “1”. Accordingly, since the signal ENRaO changes from “0” to “1”, the signal ANeO changes from “0” to “1”, and the signal ANeOX changes from “1” to “0”. Therefore, the NMOS transistor NMb and the PMOS transistor PMb are turned on, and as a result, the signal CMPcO is output as the signal DET. That is, in the period from when the signal PDRO transitions until the delay time of the delay circuit DLYa elapses, the NMOS transistor NMb and the PMOS transistor PMb remain in the off state, and the signal CMPcO is not involved in the signal DET. When the signal PDRO transitions from “0” to “1”, the signal INOUT transitions from “0” to “1”. When the signal INOUT transits from “0” to “1”, there is a state in which the voltage of the signal INOUT is lower than the threshold voltage VTHb even when the output short circuit does not occur at the external terminal P. However, when the delay time of the delay circuit DLYa is set longer than the transition time of the signal INOUT (signal transition time of the external terminal P), the signal transition state of the external terminal P is detected as the output short-circuit state of the external terminal P. It is avoided.

一方、信号PDROが“1”に設定されている場合には、信号PDROXが“0”に設定されるため、信号ANfOが“0”に設定され、信号ANfOXが“1”に設定され、その結果、NMOSトランジスタNMcおよびPMOSトランジスタPMcがオフ状態になる。従って、信号CMPdOは信号DETに関与していない。また、信号PDROが“1”に設定されている場合には、信号ANcO、DLYaOが“1”に設定され、信号ENRaOが“1”に設定される。これにより、信号ANeOが“1”に設定され、信号ANeOXが“0”に設定されるため、NMOSトランジスタNMbおよびPMOSトランジスタPMbがオン状態になる。従って、信号CMPcOが信号DETとして出力されている。このような状態で外部端子Pにおいて出力短絡が発生すると、信号INOUTの電圧が電源線VDDの電圧から下降して閾値電圧VTHbより低くなった時点で信号CMPcOが“0”から“1”に遷移し、その結果、信号DETが“0”から“1”に遷移する。これにより、外部端子Pの出力短絡状態が検出される。   On the other hand, when the signal PDRO is set to “1”, since the signal PDROX is set to “0”, the signal ANfO is set to “0”, and the signal ANfOX is set to “1”. As a result, the NMOS transistor NMc and the PMOS transistor PMc are turned off. Therefore, the signal CMPdO is not involved in the signal DET. Further, when the signal PDRO is set to “1”, the signals ANcO and DLYaO are set to “1”, and the signal ENRaO is set to “1”. As a result, the signal ANeO is set to “1” and the signal ANeOX is set to “0”, so that the NMOS transistor NMb and the PMOS transistor PMb are turned on. Therefore, the signal CMPcO is output as the signal DET. When an output short circuit occurs at the external terminal P in such a state, the signal CMPcO changes from “0” to “1” when the voltage of the signal INOUT drops from the voltage of the power supply line VDD and becomes lower than the threshold voltage VTHb. As a result, the signal DET transitions from “0” to “1”. Thereby, the output short circuit state of the external terminal P is detected.

信号PDROが“1”から“0”に遷移すると、信号ANeOが“1”から“0”に遷移し、信号ANeOXが“0”から“1”に遷移する。これにより、NMOSトランジスタNMbおよびPMOSトランジスタPMbがオフ状態になり、その結果、信号CMPcOは信号DETに関与しなくなる。また、信号PDROが“1”から“0”に遷移すると、信号PDROXが“0”から“1”に遷移するため、信号ANdOが“0”から“1”に遷移し、信号ANdOが遷移してから遅延回路DLYbの遅延時間が経過した後に信号DLYbOが“0”から“1”に遷移する。これにより、信号ENRbOが“0”から“1”に遷移するため、信号ANfOが“0”から“1”に遷移し、信号ANfOXが“1”から“0”に遷移する。このため、NMOSトランジスタNMcおよびPMOSトランジスタPMcがオン状態になり、その結果、信号CMPdOが信号DETとして出力されるようになる。即ち、信号PDROが遷移してから遅延回路DLYbの遅延時間が経過するまでの期間においては、NMOSトランジスタNMcおよびPMOSトランジスタPMcはオフ状態のままであり、信号CMPdOは信号DETに関与しない。信号PDROが“1”から“0”に遷移すると、信号INOUTが“1”から“0”に遷移する。信号INOUTが“1”から“0”に遷移する際には、外部端子Pで出力短絡が発生していない場合でも、信号INOUTの電圧が閾値電圧VTLbより高い状態が存在する。しかしながら、遅延回路DLYbの遅延時間が信号INOUTの遷移時間より大きく設定されることで、外部端子Pの信号遷移状態が外部端子Pの出力短絡状態として検出されることが回避される。   When the signal PDRO transitions from “1” to “0”, the signal ANeO transitions from “1” to “0”, and the signal ANeOX transitions from “0” to “1”. As a result, the NMOS transistor NMb and the PMOS transistor PMb are turned off, and as a result, the signal CMPcO does not participate in the signal DET. Further, when the signal PDRO transitions from “1” to “0”, the signal PDROX transitions from “0” to “1”, so that the signal ANdO transitions from “0” to “1”, and the signal ANdO transitions. After the delay time of the delay circuit DLYb has elapsed, the signal DLYbO transitions from “0” to “1”. Accordingly, since the signal ENRbO changes from “0” to “1”, the signal ANfO changes from “0” to “1”, and the signal ANfOX changes from “1” to “0”. Therefore, the NMOS transistor NMc and the PMOS transistor PMc are turned on, and as a result, the signal CMPdO is output as the signal DET. That is, in the period from when the signal PDRO transitions until the delay time of the delay circuit DLYb elapses, the NMOS transistor NMc and the PMOS transistor PMc remain in the off state, and the signal CMPdO is not involved in the signal DET. When the signal PDRO transitions from “1” to “0”, the signal INOUT transitions from “1” to “0”. When the signal INOUT transitions from “1” to “0”, there is a state in which the voltage of the signal INOUT is higher than the threshold voltage VTLb even when the output short circuit does not occur at the external terminal P. However, setting the delay time of the delay circuit DLYb to be longer than the transition time of the signal INOUT prevents the signal transition state of the external terminal P from being detected as the output short-circuit state of the external terminal P.

また、LSIにおいて外部端子の出力短絡状態を検出する技術とは別に、車載用途向けLSI等においてスイッチやコネクタ等の異常に起因する入力回路の異常を検出する技術も提案されている(例えば、特許文献3、4を参照)。   In addition to a technique for detecting an output short-circuit state of an external terminal in an LSI, a technique for detecting an abnormality in an input circuit due to an abnormality in a switch, a connector, or the like in an in-vehicle LSI or the like has also been proposed (for example, a patent (Ref. 3, 4).

図14は、LSIの入力ポート回路の従来例(その1)を示している。図14の入力ポート回路は、抵抗RaおよびスイッチSWaを介して接地線GNDに接続される外部端子TERMに対応して設けられ、抵抗Rb、Rc、スイッチSWb、バッファBFaおよびレベル判定回路CIRCを備えて構成されている。この入力ポート回路は、特許文献3(図2)に開示されたものに相当する。   FIG. 14 shows a conventional example (No. 1) of an LSI input port circuit. The input port circuit of FIG. 14 is provided corresponding to an external terminal TERM connected to the ground line GND via a resistor Ra and a switch SWa, and includes resistors Rb, Rc, a switch SWb, a buffer BFa, and a level determination circuit CIRC. Configured. This input port circuit corresponds to that disclosed in Patent Document 3 (FIG. 2).

抵抗Rbは、外部端子TERMに接続される信号線INと電源線VDDとの間に接続されている。抵抗RcおよびスイッチSWbは、信号線INと電源線VDDとの間に直列接続されている。バッファBFaは、信号INを受けて信号VBを出力する。レベル判定回路CIRCは、信号Saを介してスイッチSWbを定期的に制御し、その際の信号VBのレベル(論理値)に基づいてスイッチSWaのオン/オフ状態および回路異常(バッファBFaの破損等)の有無を判定する。レベル判定回路CIRCは、スイッチSWaがオン状態であり且つ回路異常が無いと判定した場合にのみ、信号SbをLSIの内部回路に出力する。   The resistor Rb is connected between the signal line IN connected to the external terminal TERM and the power supply line VDD. The resistor Rc and the switch SWb are connected in series between the signal line IN and the power supply line VDD. The buffer BFa receives the signal IN and outputs a signal VB. The level determination circuit CIRC periodically controls the switch SWb via the signal Sa, and on / off state of the switch SWa and circuit abnormality (damage of the buffer BFa, etc.) based on the level (logic value) of the signal VB at that time ) Is determined. The level determination circuit CIRC outputs the signal Sb to the internal circuit of the LSI only when it is determined that the switch SWa is on and there is no circuit abnormality.

このような構成の入力ポート回路では、抵抗Ra、Rb、Rcの抵抗値がRc<Ra<Rbの関係になっており、スイッチSWaがオン状態であり且つスイッチSWbがオフ状態である場合に信号VBが“0”に設定され、その他の場合に信号VBが“1”に設定されるようになっている。従って、レベル判定回路CIRCは、スイッチSWbをオフ状態にして信号VBのレベルを認識した後、スイッチSWbをオン状態にして信号VBのレベルを認識し、スイッチSWbのオン/オフ状態に対応して信号VBが遷移した場合、スイッチSWaがオン状態であり且つ回路異常が無いと判定して信号Sbを出力する。   In the input port circuit having such a configuration, when the resistance values of the resistors Ra, Rb, and Rc are in a relationship of Rc <Ra <Rb, and the switch SWa is in the on state and the switch SWb is in the off state, VB is set to “0”, and in other cases, the signal VB is set to “1”. Accordingly, the level determination circuit CIRC recognizes the level of the signal VB by turning off the switch SWb, and then recognizes the level of the signal VB by turning on the switch SWb, corresponding to the on / off state of the switch SWb. When the signal VB transitions, it is determined that the switch SWa is in the on state and there is no circuit abnormality, and the signal Sb is output.

図15は、LSIの入力ポート回路の従来例(その2)を示している。図15の入力ポート回路は、特許文献4(図2)に開示されたものに相当し、PMOSトランジスタPMd、PMe、NMOSトランジスタNMd、NMe、プルアップ抵抗Rd、Rf、プルダウン抵抗Re、Rg、バッファBFb、BFc、D型フリップフロップDFFa、DFFbおよびセレクタSELaを備えて構成されている。   FIG. 15 shows a conventional example (part 2) of the input port circuit of the LSI. The input port circuit of FIG. 15 corresponds to that disclosed in Patent Document 4 (FIG. 2), and includes PMOS transistors PMd and PMe, NMOS transistors NMd and NMe, pull-up resistors Rd and Rf, pull-down resistors Re and Rg, and buffers. BFb, BFc, D-type flip-flops DFFa, DFFb, and a selector SELa are provided.

PMOSトランジスタPMdおよびプルアップ抵抗Rdは、外部端子に接続される信号線PINaと電源線VDDとの間に直列接続されている。NMOSトランジスタNMdおよびプルダウン抵抗Reは、信号線PINaと接地線GNDとの間に直列接続されている。PMOSトランジスタPMdおよびNMOSトランジスタNMdの制御端子には、信号TSTが入力されている。PMOSトランジスタPMeおよびプルアップ抵抗Rfは、信号線PINaとは別の外部端子に接続される信号線PINbと電源線VDDとの間に直列接続されている。NMOSトランジスタNMeおよびプルダウン抵抗Rgは、信号線PINbと接地線GNDとの間に直列接続されている。PMOSトランジスタPMeおよびNMOSトランジスタNMeの制御端子には、信号TSTが入力されている。バッファBFbは、入力回路を具現しており、信号PINaを受けて信号BFbOをLSIの内部回路に出力する。バッファBFcは、入力回路を具現しており、信号PINbを受けて信号BFcOをLSIの内部回路に出力する。D型フリップフロップDFFa、DFFbおよびセレクタSELaは、信号BFbO、BFcOをLSIの外部に順次出力するスキャン回路を具現している。D型フリップフロップDFFaは、クロック端子CKに入力される信号CLKが“0”から“1”に遷移するのに伴って、入力端子Dに供給される信号BFbOを取り込んで信号DFFaOとして出力端子Qから出力する。セレクタSELaは、信号TSELに応じて信号DFFaO、BFcOのいずれかを選択して信号SELaOとして出力する。D型フリップフロップDFFbは、クロック端子CKに供給される信号CLKが“0”から“1”に遷移するのに伴って、入力端子Dに入力される信号SELaOを取り込んで信号DFFbOとして出力端子Qから出力する。   The PMOS transistor PMd and the pull-up resistor Rd are connected in series between the signal line PINa connected to the external terminal and the power supply line VDD. The NMOS transistor NMd and the pull-down resistor Re are connected in series between the signal line PINa and the ground line GND. A signal TST is input to the control terminals of the PMOS transistor PMd and the NMOS transistor NMd. The PMOS transistor PMe and the pull-up resistor Rf are connected in series between the signal line PINb connected to an external terminal different from the signal line PINa and the power supply line VDD. The NMOS transistor NMe and the pull-down resistor Rg are connected in series between the signal line PINb and the ground line GND. A signal TST is input to the control terminals of the PMOS transistor PMe and the NMOS transistor NMe. The buffer BFb embodies an input circuit, receives the signal PINa, and outputs the signal BFbO to the internal circuit of the LSI. The buffer BFc implements an input circuit, receives the signal PINb, and outputs the signal BFcO to the internal circuit of the LSI. The D-type flip-flops DFFa and DFFb and the selector SELa implement a scan circuit that sequentially outputs the signals BFbO and BFcO to the outside of the LSI. The D-type flip-flop DFFa takes in the signal BFbO supplied to the input terminal D as the signal CLK input to the clock terminal CK transitions from “0” to “1”, and outputs the signal DFbO as the output terminal QFFaO. Output from. The selector SELa selects one of the signals DFFAO and BFcO according to the signal TSEL and outputs it as the signal SELaO. The D-type flip-flop DFFb takes in the signal SELaO input to the input terminal D as the signal CLK supplied to the clock terminal CK transitions from “0” to “1”, and outputs the signal SEFF as the output terminal QFFbO. Output from.

このような構成の入力ポート回路で、信号線PINa(PINb)に接続される外部端子に対して“0”固定の信号を入力し、信号TSTを“0”に設定すると、PMOSトランジスタPMd(PMe)がオン状態になり、プルアップ抵抗Rd(Rf)が信号線PINa(PINb)に接続される。その結果、信号線PINa(PINb)に接続される外部端子が入力開放状態でなければ信号BFbO(BFcO)が“0”に設定され、信号線PINa(PINb)に接続される外部端子が入力開放状態であれば信号BFbO(BFcO)が“1”に設定される。また、信号線PINa(PINb)に接続される外部端子に対して“1”固定の信号を入力し、信号TSTを“1”に設定すると、NMOSトランジスタNMd(NMe)がオン状態になり、プルダウン抵抗Re(Rg)が信号線PINa(PINb)に接続される。その結果、信号線PINa(PINb)に接続される外部端子が入力開放状態でなければ信号BFbO(BFcO)が“1”に設定され、信号線PINa(PINb)に接続される外部端子が入力開放状態であれば信号BFbO(BFcO)が“0”に設定される。従って、信号線PINa、PINbに接続される外部端子に対して入力される信号の論理値に応じて信号TSTの論理値を設定し、D型フリップフロップDFFa、DFFbおよびセレクタSELaにより具現されるスキャン回路を用いて信号BFbO、BFcOをLSIの外部に順次出力させることで、信号線PINa、PINbに接続される外部端子の入力開放の有無を確認できる。
特開昭60−200347号公報 特開2004−48341号公報 特開昭60−41321号公報 特許第3645748号公報
In the input port circuit having such a configuration, when a signal fixed to “0” is input to the external terminal connected to the signal line PINa (PINb) and the signal TST is set to “0”, the PMOS transistor PMd (PMe) ) Is turned on, and the pull-up resistor Rd (Rf) is connected to the signal line PINa (PINb). As a result, if the external terminal connected to the signal line PINa (PINb) is not in the input open state, the signal BFbO (BFcO) is set to “0”, and the external terminal connected to the signal line PINa (PINb) is input open. In the state, the signal BFbO (BFcO) is set to “1”. Further, when a signal fixed to “1” is input to the external terminal connected to the signal line PINa (PINb) and the signal TST is set to “1”, the NMOS transistor NMd (NMe) is turned on and a pull-down is performed. The resistor Re (Rg) is connected to the signal line PINa (PINb). As a result, if the external terminal connected to the signal line PINa (PINb) is not in the input open state, the signal BFbO (BFcO) is set to “1”, and the external terminal connected to the signal line PINa (PINb) is input open. In the state, the signal BFbO (BFcO) is set to “0”. Accordingly, the logical value of the signal TST is set according to the logical value of the signal input to the external terminals connected to the signal lines PINa and PINb, and the scan realized by the D-type flip-flops DFFA and DFFb and the selector SELa. By sequentially outputting the signals BFbO and BFcO to the outside of the LSI using a circuit, it is possible to confirm whether the external terminals connected to the signal lines PINa and PINb are open.
JP-A-60-200347 JP 2004-48341 A JP 60-41321 A Japanese Patent No. 3645748

図12〜図15を用いて前述したように、LSIにおいて外部端子の出力短絡状態あるいは入力開放状態を検出する技術が提案されているが、以下に示すような問題がある。   As described above with reference to FIGS. 12 to 15, a technique for detecting an output short circuit state or an input open state of an external terminal in an LSI has been proposed. However, there are the following problems.

図12の回路構成では、外部端子毎に出力短絡検出回路を設ける必要があるため、LSIのチップ面積が増大してコストが大幅に増加するという問題がある。更に、外部端子の信号遷移状態に関する対策が施されておらず、外部端子の信号遷移状態が外部端子の出力短絡状態として検出される可能性があるという問題もある。図13の回路構成では、外部端子の信号遷移状態に関する対策が施されているが、図12の回路構成と同様に、外部端子毎に出力短絡検出回路を設ける必要があるため、LSIのチップ面積が増大してコストが大幅に増加するという問題がある。図14の回路構成および図15の回路構成においても、外部端子毎に入力開放検出回路(入力異常検出回路)を設ける必要があるため、LSIのチップ面積が増大してコストが大幅に増加するという問題がある。   In the circuit configuration of FIG. 12, since it is necessary to provide an output short circuit detection circuit for each external terminal, there is a problem that the chip area of the LSI is increased and the cost is significantly increased. Furthermore, there is a problem that no countermeasure is taken with respect to the signal transition state of the external terminal, and the signal transition state of the external terminal may be detected as an output short-circuit state of the external terminal. In the circuit configuration of FIG. 13, countermeasures are taken for the signal transition state of the external terminals. However, as in the circuit configuration of FIG. 12, an output short circuit detection circuit must be provided for each external terminal. There is a problem that the cost increases significantly due to an increase in the cost. In the circuit configuration of FIG. 14 and the circuit configuration of FIG. 15 as well, it is necessary to provide an input open detection circuit (input abnormality detection circuit) for each external terminal, which increases the chip area of the LSI and significantly increases the cost. There's a problem.

本発明は、このような問題に鑑みてなされたものであり、半導体集積回路においてコストの増大を伴うことなく外部端子の異常状態(出力短絡状態および入力開放状態)を検出する技術を提供することを目的とする。   The present invention has been made in view of such problems, and provides a technique for detecting an abnormal state (an output short circuit state and an input open state) of an external terminal without increasing the cost in a semiconductor integrated circuit. With the goal.

半導体集積回路は、複数の入出力回路、監視対象指定回路および異常検出回路を備える。複数の入出力回路は、複数の外部端子に対応して設けられる。監視対象指定回路は、複数の外部端子の中から監視対象外部端子を可変指定する。異常検出回路は、監視対象外部端子に対応する入出力回路が出力回路として機能している場合に監視対象外部端子の出力短絡状態を検出し、監視対象外部端子に対応する入出力回路が入力回路として機能している場合に監視対象外部端子の入力開放状態を検出する。このような半導体集積回路では、複数の外部端子で異常検出回路が共用されるため、半導体集積回路のチップ面積を小さくすることができ、コストを増大させることなく外部端子の異常状態を検出する機能を実現できる。   The semiconductor integrated circuit includes a plurality of input / output circuits, a monitoring target specifying circuit, and an abnormality detection circuit. The plurality of input / output circuits are provided corresponding to the plurality of external terminals. The monitoring target designating circuit variably designates the monitoring target external terminal from among the plurality of external terminals. The abnormality detection circuit detects an output short-circuit state of the monitored external terminal when the input / output circuit corresponding to the monitored external terminal functions as an output circuit, and the input / output circuit corresponding to the monitored external terminal is the input circuit. When the function is functioning as an input, the input open state of the monitored external terminal is detected. In such a semiconductor integrated circuit, since the abnormality detection circuit is shared by a plurality of external terminals, the chip area of the semiconductor integrated circuit can be reduced, and the function of detecting the abnormal state of the external terminals without increasing the cost Can be realized.

半導体集積回路においてコストの増大を伴うことなく外部端子の異常状態(出力短絡状態および入力開放状態)を検出することが可能になる。   In a semiconductor integrated circuit, it is possible to detect an abnormal state (an output short circuit state and an input open state) of an external terminal without increasing costs.

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

図1は、本発明の第1実施形態を示している。第1実施形態のマイクロコントローラMCUは、方向レジスタDDR1〜DDR4、データレジスタPDR1〜PDR4、入出力回路IO1〜IO4、端子選択回路DPSEL、異常検出回路PCDETおよび異常検出制御回路PCDCTLを備えて構成されている。なお、図示を省略しているが、マイクロコントローラMCUには、CPU(Central Processing Unit)、フラッシュメモリ(プログラム格納用メモリ)、UART(Universal Asynchronous Receiver Transmitter)やタイマ等も搭載されている。   FIG. 1 shows a first embodiment of the present invention. The microcontroller MCU according to the first embodiment includes direction registers DDR1 to DDR4, data registers PDR1 to PDR4, input / output circuits IO1 to IO4, a terminal selection circuit DPSEL, an abnormality detection circuit PCDET, and an abnormality detection control circuit PCDCTL. Yes. Although not shown, the microcontroller MCU is also equipped with a CPU (Central Processing Unit), a flash memory (program storage memory), a UART (Universal Asynchronous Receiver Transmitter), a timer, and the like.

方向レジスタDDRi(i=1,2,3,4)は、入出力回路IOiを入力回路として使用する場合に“0”に設定され、入出力回路IOiを出力回路として使用する場合に“1”に設定される。信号DDRiOは、方向レジスタDDRiの設定値を示す信号である。データレジスタPDRiは、入出力回路IOiを出力回路として使用する際、“0”に設定された信号を外部端子Piから出力する場合に“0”に設定され、“1”に設定された信号を外部端子Piから出力する場合に“1”に設定される。信号PDRiOは、データレジスタPDRiの設定値を示す信号である。   The direction register DDRi (i = 1, 2, 3, 4) is set to “0” when the input / output circuit IOi is used as an input circuit, and “1” when the input / output circuit IOi is used as an output circuit. Set to The signal DDRiO is a signal indicating the set value of the direction register DDRi. When the input / output circuit IOi is used as an output circuit, the data register PDRi is set to “0” when the signal set to “0” is output from the external terminal Pi, and the signal set to “1” is output. It is set to “1” when outputting from the external terminal Pi. The signal PDRiO is a signal indicating the set value of the data register PDRi.

入出力回路IOiは、外部端子Piに対応して設けられ、NAND回路NA1i、インバータIV1i、IV2i、NOR回路NR1i、PMOSトランジスタPM1iおよびNMOSトランジスタNM1iを備えて構成されている。入出力回路IOiにおけるNAND回路NA1i、インバータIV1i、IV2i、NOR回路NR1i、PMOSトランジスタPM1iおよびNMOSトランジスタNM1iの接続関係は、図11の入出力回路IOにおけるNAND回路NAa、インバータIVa、IVb、NOR回路NRa、PMOSトランジスタPMaおよびNMOSトランジスタNMaの接続関係と同様である。   The input / output circuit IOi is provided corresponding to the external terminal Pi, and includes a NAND circuit NA1i, inverters IV1i and IV2i, a NOR circuit NR1i, a PMOS transistor PM1i, and an NMOS transistor NM1i. The NAND gate NA1i, inverters IV1i, IV2i, NOR circuit NR1i, PMOS transistor PM1i, and NMOS transistor NM1i in the input / output circuit IOi are connected in the following manner: NAND circuit NAa, inverters IVa, IVb, NOR circuit NRa in the input / output circuit IO The connection relationship between the PMOS transistor PMa and the NMOS transistor NMa is the same.

端子選択回路DPSELは、外部端子P1〜P4の中から監視対象外部端子を可変指定し、信号DDR1O〜DDR4Oの中で監視対象外部端子に対応する信号を信号DDRSOとして出力し、信号PDR1O〜PDR4Oの中で監視対象外部端子に対応する信号を信号PDRSOとして出力し、信号INOUT1〜INOUT4の中で監視対象外部端子に対応する信号を信号INOUTSOとして出力する。なお、端子選択回路DPSELの詳細については、図2を用いて後述する。   The terminal selection circuit DPSEL variably designates the monitoring target external terminal from among the external terminals P1 to P4, outputs a signal corresponding to the monitoring target external terminal among the signals DDR1O to DDR4O as the signal DDRSO, and outputs the signals PDR1O to PDR4O. The signal corresponding to the monitoring target external terminal is output as the signal PDRSO, and the signal corresponding to the monitoring target external terminal is output as the signal INOUTSO among the signals INOUT1 to INOUT4. Details of the terminal selection circuit DPSEL will be described later with reference to FIG.

異常検出回路PCDETは、信号PCDEOが“1”に設定されている場合にのみ、信号DDRSO、PDRSO、INOUTSOに基づいて監視対象外部端子の異常状態(出力短絡状態および入力開放状態)を検出する。異常検出回路PCDETは、監視対象外部端子の出力短絡状態の検出に伴って信号DETSOOを“1”に設定し、監視対象外部端子の入力開放状態の検出に伴って信号DETSIOを“1”に設定する。なお、異常検出回路PCDETの詳細については、図3〜図5を用いて後述する。   The abnormality detection circuit PCDET detects the abnormal state (output short-circuit state and input open state) of the monitoring target external terminal based on the signals DDRSO, PDRSO, and INOUTSO only when the signal PCDEO is set to “1”. The abnormality detection circuit PCDET sets the signal DETSOO to “1” when detecting the output short-circuit state of the monitoring target external terminal, and sets the signal DETSIO to “1” when detecting the input open state of the monitoring target external terminal. To do. Details of the abnormality detection circuit PCDET will be described later with reference to FIGS.

異常検出制御回路PCDCTLは、異常検出回路PCDETの検出動作の許可/禁止を示す信号PCDEOを出力する。信号PCDEOは、異常検出回路PCDETの検出動作を禁止する場合に“0”に設定され、異常検出回路PCDETの検出動作を許可する場合に“1”に設定される。また、異常検出制御回路PCDCTLは、信号DETSOO、DETSIOに基づいてCPUに対する割り込み信号IRQPCDを出力する。なお、異常検出制御回路PCDCTLの詳細については、図6を用いて後述する。   The abnormality detection control circuit PCDCTL outputs a signal PCDEO indicating permission / prohibition of the detection operation of the abnormality detection circuit PCDET. The signal PCDEO is set to “0” when the detection operation of the abnormality detection circuit PCDET is prohibited, and is set to “1” when the detection operation of the abnormality detection circuit PCDET is permitted. The abnormality detection control circuit PCDCTL outputs an interrupt signal IRQPCD for the CPU based on the signals DETSOO and DETSIO. The details of the abnormality detection control circuit PCDCTL will be described later with reference to FIG.

図2は、図1の端子選択回路を示している。端子選択回路DPSELは、端子選択制御レジスタDPSELCR、デコーダDEC1およびセレクタSEL1〜SEL3を備えて構成されている。端子選択制御レジスタDPSELCRは、外部端子P1〜P4の中から監視対象外部端子を可変指定するためのレジスタである。信号VDPSELCRは、端子選択制御レジスタDPSELCRの設定値を示す信号である。デコーダDEC1は、信号VDPSELCRをデコードして信号PSEL1〜PSEL4を出力する。具体的には、デコーダDEC1は、信号VDPSELCRが外部端子P1(P2、P3、P4)を示す論理値に設定されている場合、信号PSEL1(PSEL2、PSEL3、PSEL4)を“1”に設定するとともに、信号PSEL1〜PSEL4におけるPSEL1(PSEL2、PSEL3、PSEL4)以外の信号を“0”に設定する。   FIG. 2 shows the terminal selection circuit of FIG. The terminal selection circuit DPSEL includes a terminal selection control register DPSELCR, a decoder DEC1, and selectors SEL1 to SEL3. The terminal selection control register DPSELCR is a register for variably specifying the monitoring target external terminal from among the external terminals P1 to P4. The signal VDPSELCR is a signal indicating the set value of the terminal selection control register DPSELCR. The decoder DEC1 decodes the signal VDPSELCR and outputs signals PSEL1 to PSEL4. Specifically, the decoder DEC1 sets the signal PSEL1 (PSEL2, PSEL3, PSEL4) to “1” when the signal VDPSELCR is set to a logical value indicating the external terminal P1 (P2, P3, P4). The signals other than PSEL1 (PSEL2, PSEL3, PSEL4) in the signals PSEL1 to PSEL4 are set to “0”.

セレクタSEL1は、スイッチSS11〜SS14を備えて構成されている。スイッチSS11(SS12、SS13、SS14)は、信号線DDR1O(DDR2O、DDR3O、DDR4O)と信号線DDRSOとの間に接続されている。スイッチSS11(SS12、SS13、SS14)は、信号PSEL1(PSEL2、PSEL3、PSEL4)が“0”に設定されている場合にオフ状態になり、信号PSEL1(PSEL2、PSEL3、PSEL4)が“1”に設定されている場合にオン状態になる。セレクタSEL2は、スイッチSS21〜SS24を備えて構成されている。スイッチSS21(SS22、SS23、SS24)は、信号線PDR1O(PDR2O、PDR3O、PDR4O)と信号線PDRSOとの間に接続されている。スイッチSS21(SS22、SS23、SS24)は、信号PSEL1(PSEL2、PSEL3、PSEL4)が“0”に設定されている場合にオフ状態になり、信号PSEL1(PSEL2、PSEL3、PSEL4)が“1”に設定されている場合にオン状態になる。セレクタSEL3は、スイッチSS31〜SS34を備えて構成されている。スイッチSS31(SS32、SS33、SS34)は、信号線INOUT1(INOUT2、INOUT3、INOUT4)と信号線INOUTSOとの間に接続されている。スイッチSS31(SS32、SS33、SS34)は、信号PSEL1(PSEL2、PSEL3、PSEL4)が“0”に設定されている場合にオフ状態になり、信号PSEL1(PSEL2、PSEL3、PSEL4)が“1”に設定されている場合にオン状態になる。   The selector SEL1 includes switches SS11 to SS14. The switch SS11 (SS12, SS13, SS14) is connected between the signal line DDR1O (DDR2O, DDR3O, DDR4O) and the signal line DDRSO. The switch SS11 (SS12, SS13, SS14) is turned off when the signal PSEL1 (PSEL2, PSEL3, PSEL4) is set to “0”, and the signal PSEL1 (PSEL2, PSEL3, PSEL4) is set to “1”. Turns on when set. The selector SEL2 includes switches SS21 to SS24. The switch SS21 (SS22, SS23, SS24) is connected between the signal line PDR1O (PDR2O, PDR3O, PDR4O) and the signal line PDRSO. The switch SS21 (SS22, SS23, SS24) is turned off when the signal PSEL1 (PSEL2, PSEL3, PSEL4) is set to “0”, and the signal PSEL1 (PSEL2, PSEL3, PSEL4) is set to “1”. Turns on when set. The selector SEL3 includes switches SS31 to SS34. The switch SS31 (SS32, SS33, SS34) is connected between the signal line INOUT1 (INOUT2, INOUT3, INOUT4) and the signal line INOUTSO. The switch SS31 (SS32, SS33, SS34) is turned off when the signal PSEL1 (PSEL2, PSEL3, PSEL4) is set to “0”, and the signal PSEL1 (PSEL2, PSEL3, PSEL4) is set to “1”. Turns on when set.

このような構成の端子選択回路DPSELでは、端子選択制御レジスタDPSELCRが外部端子P1(P2、P3、P4)を示すレジスタ値に設定されると、デコーダDEC1において信号PSEL1(PSEL2、PSEL3、PSEL4)が“1”に設定される。この結果、セレクタSEL1においてスイッチSS11(SS12、SS13、SS14)がオン状態になって信号DDR1O(DDR2O、DDR3O、DDR4O)が信号DDRSOとして出力され、セレクタSEL2においてスイッチS21(SS22、SS23、SS24)がオン状態になって信号PDR1O(PDR2O、PDR3O、PDR4O)が信号PDRSOとして出力され、セレクタSEL3においてスイッチSS31(SS32、SS33、SS34)がオン状態になって信号INOUT1(INOUT2、INOUT3、INOUT4)が信号INOUTSOとして出力される。   In the terminal selection circuit DPSEL having such a configuration, when the terminal selection control register DPSELCR is set to a register value indicating the external terminal P1 (P2, P3, P4), the signal PSEL1 (PSEL2, PSEL3, PSEL4) is output from the decoder DEC1. Set to “1”. As a result, the switch SS11 (SS12, SS13, SS14) is turned on in the selector SEL1, and the signal DDR1O (DDR2O, DDR3O, DDR4O) is output as the signal DDRSO, and the switch S21 (SS22, SS23, SS24) is output in the selector SEL2. The signal PDR1O (PDR2O, PDR3O, PDR4O) is output as the signal PDRSO in the on state, the switch SS31 (SS32, SS33, SS34) is turned on in the selector SEL3, and the signal INOUT1 (INOUT2, INOUT3, INOUT4) is the signal Output as INOUTSO.

図3は、図1の異常検出回路を示している。異常検出回路PCDETは、AND回路AN1〜AN7、インバータIV3〜IV8、遅延時間制御レジスタPCDDLYCR、可変遅延回路VDLY1、VDLY2、閾値電圧生成回路PCDVTG、コンパレータCMP1、CMP2、NMOSトランジスタNM2、NM3、PMOSトランジスタPM2、PM3、NOR回路NR2、スイッチSW1、SW2、プルアップ抵抗R1およびプルダウン抵抗R2を備えて構成されている。   FIG. 3 shows the abnormality detection circuit of FIG. The abnormality detection circuit PCDET includes AND circuits AN1 to AN7, inverters IV3 to IV8, delay time control registers PCDDLYCR, variable delay circuits VDLY1 and VDLY2, threshold voltage generation circuits PCDVTG, comparators CMP1 and CMP2, NMOS transistors NM2, NM3, and PMOS transistor PM2. , PM3, NOR circuit NR2, switches SW1, SW2, pull-up resistor R1, and pull-down resistor R2.

AND回路AN1は、信号PCDEOが“0”に設定されている場合に信号DDRSOとは無関係に信号AN1Oを“0”に設定し、信号PCDEOが“1”に設定されている場合に信号DDRSOを信号AN1Oとして出力する。AND回路AN2は、信号AN1Oが“0”に設定されている場合に信号PDRSOとは無関係に信号AN2Oを“0”に設定し、信号AN1Oが“1”に設定されている場合に信号PDRSOを信号AN2Oとして出力する。インバータIV3は、信号PDRSOを反転させて信号PDRSOXとして出力する。AND回路AN3は、信号AN1Oが“0”に設定されている場合に信号PDRSOXとは無関係に信号AN3Oを“0”に設定し、信号AN1Oが“1”に設定されている場合に信号PDRSOXを信号AN3Oとして出力する。遅延時間制御レジスタPCDDLYCRは、可変遅延回路VDLY1、VDLY2の遅延時間を可変指定するためのレジスタである。例えば、遅延時間制御レジスタPCDDLYCRは、遅延時間TD1〜TD4(TD1<TD2<TD3<TD4)のいずれかを示すレジスタ値に設定される。信号VPCDDLYCRは、遅延時間制御レジスタPCDDLYCRの設定値を示す信号である。可変遅延回路VDLY1は、信号AN2Oを信号VPCDDLYCRの論理値に対応する時間遅らせて信号VDLY1Oとして出力する。可変遅延回路VDLY2は、信号AN3Oを信号VPCDDLYCRの論理値に対応する時間遅らせて信号VDLY2Oとして出力する。AND回路AN4は、信号AN2O、VDLY1Oの少なくとも一方が“0”に設定されている場合に信号AN4Oを“0”に設定し、信号AN2O、VDLY1Oの双方が“1”に設定されている場合に信号AN4Oを“1”に設定する。AND回路AN5は、信号AN3O、VDLY2Oの少なくとも一方が“0”に設定されている場合に信号AN5Oを“0”に設定し、信号AN3O、VDLY2Oの双方が“1”に設定されている場合に信号AN5Oを“1”に設定する。インバータIV4は、信号AN4Oを反転させて信号AN4OXとして出力する。インバータIV5は、信号AN5Oを反転させて信号AN5OXとして出力する。   The AND circuit AN1 sets the signal AN1O to “0” regardless of the signal DDRSO when the signal PCDEO is set to “0”, and outputs the signal DDRSO when the signal PCDEO is set to “1”. Output as signal AN1O. The AND circuit AN2 sets the signal AN2O to “0” regardless of the signal PDRSO when the signal AN1O is set to “0”, and outputs the signal PDRSO when the signal AN1O is set to “1”. Output as signal AN2O. Inverter IV3 inverts signal PDRSO and outputs it as signal PDRSOX. The AND circuit AN3 sets the signal AN3O to “0” regardless of the signal PDRSOX when the signal AN1O is set to “0”, and outputs the signal PDRSOX when the signal AN1O is set to “1”. Output as signal AN3O. The delay time control register PCDDLYCR is a register for variably specifying the delay times of the variable delay circuits VDLY1 and VDLY2. For example, the delay time control register PCDDLYCR is set to a register value indicating one of the delay times TD1 to TD4 (TD1 <TD2 <TD3 <TD4). The signal VPCDDLYCR is a signal indicating the set value of the delay time control register PCDDLYCR. The variable delay circuit VDLY1 delays the signal AN2O by a time corresponding to the logical value of the signal VPCDDLYCR and outputs it as the signal VDLY1O. The variable delay circuit VDLY2 delays the signal AN3O by a time corresponding to the logical value of the signal VPCDDLYCR and outputs it as the signal VDLY2O. The AND circuit AN4 sets the signal AN4O to “0” when at least one of the signals AN2O and VDLY1O is set to “0”, and sets both the signals AN2O and VDLY1O to “1”. The signal AN4O is set to “1”. The AND circuit AN5 sets the signal AN5O to “0” when at least one of the signals AN3O and VDLY2O is set to “0”, and sets both the signals AN3O and VDLY2O to “1”. The signal AN5O is set to “1”. Inverter IV4 inverts signal AN4O and outputs it as signal AN4OX. Inverter IV5 inverts signal AN5O and outputs it as signal AN5OX.

閾値電圧生成回路PCDVTGは、信号PCDEOが“1”に設定されている場合にのみ、電圧値可変の閾値電圧VTH、VTL(VTL<VTH)を生成する。コンパレータCMP1は、信号INOUTSOの電圧が閾値電圧VTHより高い場合に信号CMP1Oを“0”に設定し、信号INOUTSOの電圧が閾値電圧VTHより低い場合に信号CMP1Oを“1”に設定する。コンパレータCMP2は、信号INOUTSOの電圧が閾値電圧VTLより低い場合に信号CMP2Oを“0”に設定し、信号INOUTSOの電圧が閾値電圧VTLより高い場合に信号CMP2Oを“1”に設定する。NMOSトランジスタNM2およびPMOSトランジスタPM2は、信号線CMP1Oと信号線DETSOOとの間に並列接続されている。NMOSトランジスタNM2の制御端子には信号AN4Oが入力され、PMOSトランジスタPM2の制御端子には信号AN4OXが入力されている。NMOSトランジスタNM3およびPMOSトランジスタPM3は、信号線CMP2Oと信号線DETSOOとの間に並列接続されている。NMOSトランジスタNM3の制御端子には信号AN5Oが入力され、PMOSトランジスタPM3の制御端子には信号AN5OXが入力されている。インバータIV6は信号DETSOOを反転させて信号DETSOOXとして出力し、インバータIV7は信号DETSOOXを反転させて信号DETSOOとして出力する。即ち、インバータIV6、IV7は、信号DETSOOを保持するラッチ回路を具現している。   The threshold voltage generation circuit PCDVTG generates variable voltage threshold voltages VTH and VTL (VTL <VTH) only when the signal PCDEO is set to “1”. The comparator CMP1 sets the signal CMP1O to “0” when the voltage of the signal INOUTSO is higher than the threshold voltage VTH, and sets the signal CMP1O to “1” when the voltage of the signal INOUTSO is lower than the threshold voltage VTH. The comparator CMP2 sets the signal CMP2O to “0” when the voltage of the signal INOUTSO is lower than the threshold voltage VTL, and sets the signal CMP2O to “1” when the voltage of the signal INOUTSO is higher than the threshold voltage VTL. The NMOS transistor NM2 and the PMOS transistor PM2 are connected in parallel between the signal line CMP1O and the signal line DETSOO. The signal AN4O is input to the control terminal of the NMOS transistor NM2, and the signal AN4OX is input to the control terminal of the PMOS transistor PM2. The NMOS transistor NM3 and the PMOS transistor PM3 are connected in parallel between the signal line CMP2O and the signal line DETSOO. The signal AN5O is input to the control terminal of the NMOS transistor NM3, and the signal AN5OX is input to the control terminal of the PMOS transistor PM3. Inverter IV6 inverts signal DETSOO and outputs it as signal DETSOOX, and inverter IV7 inverts signal DETSOOX and outputs it as signal DETSOO. That is, the inverters IV6 and IV7 embody a latch circuit that holds the signal DETSOO.

インバータIV8は、信号PCDEOを反転させて信号PCDEOXとして出力する。NOR回路NR2は、信号PCDEOXが“0”に設定されている場合に信号DDRSOを反転させて信号NR2Oとして出力し、信号PCDEOXが“1”に設定されている場合に信号DDRSOとは無関係に信号NR2Oを“0”に設定する。スイッチSW1およびプルアップ抵抗R1は、信号線INOUTSOと電源線VDD(例えば、3V)との間に直列接続されている。スイッチSW2およびプルダウン抵抗R2は、信号線INOUTSOと接地線GND(0V)との間に直列接続されている。スイッチSW1、SW2は、信号NR2Oが“0”に設定されている場合にオフ状態になり、信号NR2Oが“1”に設定されている場合にオン状態になる。AND回路AN6は、信号CMP1O、CMP2Oの少なくとも一方が“0”に設定されている場合に信号AN6Oを“0”に設定し、信号CMP1O、CMP2Oの双方が“1”に設定されている場合に信号AN6Oを“1”に設定する。AND回路AN7は、信号NR2Oが“0”に設定されている場合に信号AN6Oとは無関係に信号DETSIOを“0”に設定し、信号NR2Oが“1”に設定されている場合に信号AN6Oを信号DETSIOとして出力する。   Inverter IV8 inverts signal PCDEO and outputs the inverted signal as PCDEOX. The NOR circuit NR2 inverts the signal DDRSO and outputs it as the signal NR2O when the signal PCDEOX is set to “0”, and the signal NRSO regardless of the signal DDRSO when the signal PCDEOX is set to “1”. NR2O is set to “0”. The switch SW1 and the pull-up resistor R1 are connected in series between the signal line INOUTSO and a power supply line VDD (for example, 3V). The switch SW2 and the pull-down resistor R2 are connected in series between the signal line INOUTSO and the ground line GND (0 V). The switches SW1 and SW2 are turned off when the signal NR2O is set to “0”, and are turned on when the signal NR2O is set to “1”. The AND circuit AN6 sets the signal AN6O to “0” when at least one of the signals CMP1O and CMP2O is set to “0”, and sets both the signals CMP1O and CMP2O to “1”. The signal AN6O is set to “1”. The AND circuit AN7 sets the signal DETSIO to “0” regardless of the signal AN6O when the signal NR2O is set to “0”, and outputs the signal AN6O when the signal NR2O is set to “1”. Output as signal DETSIO.

以上のような構成の異常検出回路PCDETでは、異常検出回路PCDETの検出動作が許可されており、監視対象外部端子に対応する入出力回路が出力回路として機能している場合(信号PCDEOが“1”に設定されており、信号DDRSOが“1”に設定されている場合)、以下のように監視対象外部端子の出力短絡状態が検出される。信号PDRSOが“0”に設定されている場合には、信号AN2Oが“0”に設定されるため、信号AN4Oが“0”に設定され、信号AN4OXが“1”に設定され、その結果、NMOSトランジスタNM2およびPMOSトランジスタPM2がオフ状態になる。従って、信号CMP1Oは信号DETSOOに関与していない。また、信号PDRSOが“0”に設定されている場合には、信号PDRSOXが“1”に設定されるため、信号AN3O、VDLY2Oが“1”に設定される。これにより、信号AN5Oが“1”に設定され、信号AN5OXが“0”に設定されるため、NMOSトランジスタNM3およびPMOSトランジスタPM3がオン状態になる。従って、信号CMP2Oが信号DETSOOとして出力されている。なお、信号NR2Oが“0”に設定されるため、スイッチSW1、SW2がオフ状態になり、その結果、プルアップ抵抗R1およびプルダウン抵抗R2は信号線INOUTSOから切り離されている。このような状態で監視対象外部端子において出力短絡が発生すると、信号INOUTSOの電圧が接地線GNDの電圧から上昇して閾値電圧VTLより高くなった時点で信号CMP2Oが“0”から“1”に遷移し、その結果、信号DETSOOが“0”から“1”に遷移する。これにより、監視対象外部端子の出力短絡状態が検出される。   In the abnormality detection circuit PCDET configured as described above, the detection operation of the abnormality detection circuit PCDET is permitted, and the input / output circuit corresponding to the monitored external terminal functions as an output circuit (the signal PCDEO is “1”). When the signal DDRSO is set to “1”), the output short-circuit state of the monitored external terminal is detected as follows. When the signal PDRSO is set to “0”, since the signal AN2O is set to “0”, the signal AN4O is set to “0”, and the signal AN4OX is set to “1”. The NMOS transistor NM2 and the PMOS transistor PM2 are turned off. Therefore, the signal CMP1O is not involved in the signal DETSOO. When the signal PDRSO is set to “0”, the signal PDRSOX is set to “1”, so that the signals AN3O and VDLY2O are set to “1”. As a result, the signal AN5O is set to “1” and the signal AN5OX is set to “0”, so that the NMOS transistor NM3 and the PMOS transistor PM3 are turned on. Therefore, the signal CMP2O is output as the signal DETSOO. Since the signal NR2O is set to “0”, the switches SW1 and SW2 are turned off. As a result, the pull-up resistor R1 and the pull-down resistor R2 are disconnected from the signal line INOUTSO. When an output short circuit occurs in the monitored external terminal in such a state, the signal CMP2O changes from “0” to “1” when the voltage of the signal INOUTSO rises from the voltage of the ground line GND and becomes higher than the threshold voltage VTL. As a result, the signal DETSOO changes from “0” to “1”. Thereby, the output short circuit state of the monitoring object external terminal is detected.

信号PDRSOが“0”から“1”に遷移すると、信号PDRSOXが“1”から“0”に遷移するため、信号AN3Oが“1”から“0”に遷移し、その結果、信号AN5Oが“1”から“0”に遷移し、信号AN5OXが“0”から“1”に遷移する。これにより、NMOSトランジスタNM3およびPMOSトランジスタPM3がオフ状態になり、その結果、信号CMP2Oは信号DETSOOに関与しなくなる。また、信号PDRSOが“0”から“1”に遷移すると、信号AN2Oが“0”から“1”に遷移し、信号AN2Oが遷移してから可変遅延回路VDLY1の遅延時間が経過した後に信号VDLY1Oが“0”から“1”に遷移する。これにより、信号AN4Oが“0”から“1”に遷移し、信号AN4OXが“1”から“0”に遷移するため、NMOSトランジスタNM2およびPMOSトランジスタPM2がオン状態になり、その結果、信号CMP1Oが信号DETSOOとして出力されるようになる。即ち、信号PDRSOが遷移してから可変遅延回路VDLY1の遅延時間が経過するまでの期間においては、NMOSトランジスタNM2およびPMOSトランジスタPM2はオフ状態のままであり、信号CMP1Oは信号DETSOOに関与しない。信号PDRSOが“0”から“1”に遷移すると、信号INOUTSOが“0”から“1”に遷移する。信号INOUTSOが“0”から“1”に遷移する際には、監視対象外部端子で出力短絡が発生していない場合でも、信号INOUTSOの電圧が閾値電圧VTHより低い状態が存在する。しかしながら、可変遅延回路VDLY1の遅延時間が信号INOUTSOの遷移時間(監視対象外部端子の信号遷移時間)より大きく設定されることで、監視対象外部端子の信号遷移状態が監視対象外部端子の出力短絡状態として検出されることが回避される。   When the signal PDRSO transits from “0” to “1”, the signal PDRSOX transits from “1” to “0”, so that the signal AN3O transits from “1” to “0”. As a result, the signal AN5O transits to “0”. The signal transitions from “1” to “0”, and the signal AN5OX transitions from “0” to “1”. As a result, the NMOS transistor NM3 and the PMOS transistor PM3 are turned off, and as a result, the signal CMP2O does not participate in the signal DETSOO. Further, when the signal PDRSO transits from “0” to “1”, the signal AN2O transits from “0” to “1”, and after the delay time of the variable delay circuit VDLY1 elapses after the signal AN2O transits, the signal VDLY1O Transition from “0” to “1”. As a result, the signal AN4O changes from “0” to “1” and the signal AN4OX changes from “1” to “0”, so that the NMOS transistor NM2 and the PMOS transistor PM2 are turned on. As a result, the signal CMP1O Is output as the signal DETSOO. That is, in the period from when the signal PDRSO transitions until the delay time of the variable delay circuit VDLY1 elapses, the NMOS transistor NM2 and the PMOS transistor PM2 remain in the off state, and the signal CMP1O is not involved in the signal DETSOO. When the signal PDRSO transits from “0” to “1”, the signal INOUTSO transits from “0” to “1”. When the signal INOUTSO transits from “0” to “1”, there is a state in which the voltage of the signal INOUTSO is lower than the threshold voltage VTH even when an output short circuit does not occur at the monitored external terminal. However, since the delay time of the variable delay circuit VDLY1 is set to be longer than the transition time of the signal INOUTSO (signal transition time of the monitoring target external terminal), the signal transition state of the monitoring target external terminal is the output short-circuit state of the monitoring target external terminal. Detecting as is avoided.

一方、信号PDRSOが“1”に設定されている場合には、信号PDRSOXが“0”に設定されるため、信号AN3Oが“0”に設定される。これにより、信号AN5Oが“0”に設定され、信号AN5OXが“1”に設定されるため、NMOSトランジスタNM3およびPMOSトランジスタPM3がオフ状態になる。従って、信号CMP2Oは信号DETSOOに関与していない。また、信号PDRSOが“1”に設定されている場合には、信号AN2O、VDLY1Oが“1”に設定されるため、信号AN4Oが“1”に設定され、信号AN4OXが“0”に設定され、その結果、NMOSトランジスタNM2およびPMOSトランジスタPM2がオン状態になる。従って、信号CMP1Oが信号DETSOOとして出力されている。このような状態で監視対象外部端子において出力短絡が発生すると、信号INOUTSOの電圧が電源線VDDの電圧から下降して閾値電圧VTHより低くなった時点で信号CMP1Oが“0”から“1”に遷移し、その結果、信号DETSOOが“0”から“1”に遷移する。これにより、監視対象外部端子の出力短絡状態が検出される。   On the other hand, when the signal PDRSO is set to “1”, since the signal PDRSOX is set to “0”, the signal AN3O is set to “0”. As a result, the signal AN5O is set to “0” and the signal AN5OX is set to “1”, so that the NMOS transistor NM3 and the PMOS transistor PM3 are turned off. Therefore, the signal CMP2O is not involved in the signal DETSOO. When the signal PDRSO is set to “1”, the signals AN2O and VDLY1O are set to “1”, so that the signal AN4O is set to “1” and the signal AN4OX is set to “0”. As a result, the NMOS transistor NM2 and the PMOS transistor PM2 are turned on. Therefore, the signal CMP1O is output as the signal DETSOO. If an output short circuit occurs in the monitored external terminal in such a state, the signal CMP1O changes from “0” to “1” when the voltage of the signal INOUTSO decreases from the voltage of the power supply line VDD and becomes lower than the threshold voltage VTH. As a result, the signal DETSOO changes from “0” to “1”. Thereby, the output short circuit state of the monitoring object external terminal is detected.

信号PDRSOが“1”から“0”に遷移すると、信号AN2Oが“1”から“0”に遷移するため、信号AN4Oが“1”から“0”に遷移し、信号AN4OXが“0”から“1”に遷移する。これにより、NMOSトランジスタNM2およびPMOSトランジスタPM2がオフ状態になり、その結果、信号CMP1Oは信号DETSOOに関与しなくなる。また、信号PDRSOが“1”から“0”に遷移すると、信号PDRSOXが“0”から“1”に遷移するため、信号AN3Oが“0”から“1”に遷移し、信号AN3Oが遷移してから可変遅延回路VDLY2の遅延時間が経過した後に信号VDLY2Oが“0”から“1”に遷移する。これにより、信号AN5Oが“0”から“1”に遷移し、信号AN5OXが“1”から“0”に遷移するため、NMOSトランジスタNM3およびPMOSトランジスタPM3がオン状態になり、その結果、信号CMP2Oが信号DETSOOとして出力されるようになる。即ち、信号PDRSOが遷移してから遅延回路VDLY2の遅延時間が経過するまでの期間においては、NMOSトランジスタNM3およびPMOSトランジスタPM3はオフ状態のままであり、信号CMP2Oは信号DETSOOに関与しない。信号PDRSOが“1”から“0”に遷移すると、信号INOUTSOが“1”から“0”に遷移する。信号INOUTSOが“1”から“0”に遷移する際には、監視対象外部端子で出力短絡が発生していない場合でも、信号INOUTSOの電圧が閾値電圧VTLより高い状態が存在する。しかしながら、可変遅延回路VDLY2の遅延時間が信号INOUTSOの遷移時間より大きく設定されることで、監視対象外部端子の信号遷移状態が監視対象外部端子の出力短絡状態として検出されることが回避される。   When the signal PDRSO transits from “1” to “0”, the signal AN2O transits from “1” to “0”, so the signal AN4O transits from “1” to “0”, and the signal AN4OX transits from “0”. Transition to “1”. As a result, the NMOS transistor NM2 and the PMOS transistor PM2 are turned off, and as a result, the signal CMP1O does not participate in the signal DETSOO. Further, when the signal PDRSO transits from “1” to “0”, the signal PDRSOX transits from “0” to “1”, so that the signal AN3O transits from “0” to “1”, and the signal AN3O transits. Then, after the delay time of the variable delay circuit VDLY2 elapses, the signal VDLY2O changes from “0” to “1”. As a result, the signal AN5O changes from “0” to “1” and the signal AN5OX changes from “1” to “0”, so that the NMOS transistor NM3 and the PMOS transistor PM3 are turned on. As a result, the signal CMP2O Is output as the signal DETSOO. That is, in the period from when the signal PDRSO transitions until the delay time of the delay circuit VDLY2 elapses, the NMOS transistor NM3 and the PMOS transistor PM3 remain in the off state, and the signal CMP2O does not participate in the signal DETSOO. When the signal PDRSO transits from “1” to “0”, the signal INOUTSO transits from “1” to “0”. When the signal INOUTSO transitions from “1” to “0”, there is a state in which the voltage of the signal INOUTSO is higher than the threshold voltage VTL even when an output short circuit does not occur at the monitored external terminal. However, setting the delay time of the variable delay circuit VDLY2 to be longer than the transition time of the signal INOUTSO prevents the signal transition state of the monitoring target external terminal from being detected as the output short-circuit state of the monitoring target external terminal.

なお、入出力回路IO1〜IO4の電流駆動能力が異なる場合や外部端子P1〜P4の負荷容量が異なる場合には外部端子P1〜P4の信号遷移時間が異なる可能性があるが、遅延時間制御レジスタPCDDLYCRを利用して可変遅延回路VDLY1、VDLY2の遅延時間を変更できるため、監視対象外部端子として選択される外部端子の信号遷移時間に合わせて遅延時間制御レジスタPCDDLYCRを設定することで、そのような場合にも柔軟に対応できる。   Note that when the current drive capabilities of the input / output circuits IO1 to IO4 are different or the load capacitances of the external terminals P1 to P4 are different, the signal transition times of the external terminals P1 to P4 may be different. Since the delay times of the variable delay circuits VDLY1 and VDLY2 can be changed using PCDDLYCR, such a setting is made by setting the delay time control register PCDDLYCR in accordance with the signal transition time of the external terminal selected as the monitored external terminal. It can respond flexibly to cases.

また、異常検出回路PCDETの検出動作が禁止されている場合(信号PCDEOが“0”に設定されている場合)あるいは監視対象外部端子に対応する入出力回路が入力回路として機能している場合(信号DDRSOが“0”に設定されている場合)、信号AN2O、AN3Oが“0”に設定されるため、信号AN4O、AN5Oが“0”に設定され、信号AN4OX、AN5OXが“1”に設定される。これにより、NMOSトランジスタNM2、NM3およびPMOSトランジスタPM2、PM3がオフ状態になるため、信号CMP1O、CMP2Oに応じて信号DETSOOが“1”に設定されることはない。   When the detection operation of the abnormality detection circuit PCDET is prohibited (when the signal PCDEO is set to “0”), or when the input / output circuit corresponding to the monitoring target external terminal functions as an input circuit ( When the signal DDRSO is set to “0”), since the signals AN2O and AN3O are set to “0”, the signals AN4O and AN5O are set to “0”, and the signals AN4OX and AN5OX are set to “1”. Is done. As a result, the NMOS transistors NM2 and NM3 and the PMOS transistors PM2 and PM3 are turned off, so that the signal DETSOO is not set to “1” in response to the signals CMP1O and CMP2O.

更に、異常検出回路PCDETでは、異常検出回路PCDETの検出動作が許可されており、監視対象外部端子に対応する入出力回路が入力回路として機能している場合(信号PCDEOが“1”に設定されており、信号DDRSOが“0”に設定されている場合)、以下のように監視対象外部端子の入力開放状態が検出される。信号DDRSOが“0”に設定されている場合には、信号NR2Oが“1”に設定されるため、スイッチSW1、SW2がオン状態になり、その結果、信号線INOUTSO(監視対象外部端子)にプルアップ抵抗R1およびプルダウン抵抗R2が接続される。プルアップ抵抗R1およびプルダウン抵抗R2は大きい抵抗値(例えば、100kΩ)を有しており、監視対象外部端子に対して外部回路により“0”(“1”)に設定された信号が入力されていれば(監視対象外部端子が入力開放状態でなければ)、信号INOUTSOが“0”(“1”)に設定される。   Further, in the abnormality detection circuit PCDET, the detection operation of the abnormality detection circuit PCDET is permitted, and the input / output circuit corresponding to the monitored external terminal functions as an input circuit (the signal PCDEO is set to “1”). When the signal DDRSO is set to “0”), the input open state of the monitoring target external terminal is detected as follows. When the signal DDRSO is set to “0”, the signal NR2O is set to “1”, so that the switches SW1 and SW2 are turned on. As a result, the signal line INOUTSO (monitoring target external terminal) is connected. Pull-up resistor R1 and pull-down resistor R2 are connected. The pull-up resistor R1 and the pull-down resistor R2 have a large resistance value (for example, 100 kΩ), and a signal set to “0” (“1”) by an external circuit is input to the monitored external terminal. If the monitoring target external terminal is not in the input open state, the signal INOUTSO is set to “0” (“1”).

信号INOUTSOが“0”に設定されている場合、信号INOUTSOの電圧は閾値電圧VTH、VTLより低いため、信号CMP1Oが“1”に設定され、信号CMP2Oが“0”に設定される。従って、信号AN6Oが“0”に設定され、その結果、信号DETSIOが“0”に設定される。また、信号INOUTSOが“1”に設定されている場合、信号INOUTSOの電圧は閾値電圧VTH、VTLより高いため、信号CMP1Oが“0”に設定され、信号CMP2Oが“1”に設定される。従って、信号AN6Oが“0”に設定され、その結果、信号DETSIOが“0”に設定される。   When the signal INOUTSO is set to “0”, since the voltage of the signal INOUTSO is lower than the threshold voltages VTH and VTL, the signal CMP1O is set to “1” and the signal CMP2O is set to “0”. Therefore, the signal AN6O is set to “0”, and as a result, the signal DETSIO is set to “0”. When the signal INOUTSO is set to “1”, the voltage of the signal INOUTSO is higher than the threshold voltages VTH and VTL, so that the signal CMP1O is set to “0” and the signal CMP2O is set to “1”. Therefore, the signal AN6O is set to “0”, and as a result, the signal DETSIO is set to “0”.

一方、断線等に起因して監視対象外部端子に対して外部回路により信号が入力されておらず、監視対象外部端子が入力開放状態である場合、プルアップ抵抗R1およびプルダウン抵抗R2の作用により、信号INOUTSOの電圧は電源線VDDの電圧の1/2程度になる。このとき、信号INOUTSOの電圧は閾値電圧VTHより低く閾値電圧VTLより高いため、信号CMP1O、CMP2Oが“1”に設定される。従って、信号AN6Oが“1”に設定され、その結果、信号DETSIOが“1”に設定される。これにより、監視対象外部端子の入力開放状態が検出される。   On the other hand, when no signal is input to the monitored external terminal by an external circuit due to disconnection or the like, and the monitored external terminal is in an input open state, due to the action of the pull-up resistor R1 and the pull-down resistor R2, The voltage of the signal INOUTSO is about ½ of the voltage of the power supply line VDD. At this time, since the voltage of the signal INOUTSO is lower than the threshold voltage VTH and higher than the threshold voltage VTL, the signals CMP1O and CMP2O are set to “1”. Therefore, the signal AN6O is set to “1”, and as a result, the signal DETSIO is set to “1”. Thereby, the input open state of the monitoring target external terminal is detected.

また、異常検出回路PCDETの検出動作が禁止されている場合(信号PCDEOが“0”に設定されている場合)あるいは監視対象外部端子に対応する入出力回路が出力回路として機能している場合(信号DDRSOが“1”に設定されている場合)、信号NR2Oが“0”に設定されるため、信号CMP1O、CMP2Oに応じて信号DETSIOが“1”に設定されることはない。   Further, when the detection operation of the abnormality detection circuit PCDET is prohibited (when the signal PCDEO is set to “0”), or when the input / output circuit corresponding to the monitored external terminal functions as an output circuit ( When the signal DDRSO is set to “1”), since the signal NR2O is set to “0”, the signal DETSIO is not set to “1” according to the signals CMP1O and CMP2O.

なお、監視対象外部端子に対して外部回路により入力される信号が“0”固定の信号や“1”固定の信号ではなく遷移を伴う信号である場合には、監視対象外部端子の信号遷移状態が監視対象外部端子の入力開放状態として検出される可能性があるが、例えば、ソフトウェア処理により入力開放状態の検出の有無を複数回確認することで、監視対象外部端子の信号遷移状態と入力開放状態とを判別することができる。   If the signal input to the monitored external terminal by the external circuit is not a signal fixed to “0” or a signal fixed to “1” but a signal accompanied by a transition, the signal transition state of the monitored external terminal May be detected as the input open state of the monitored external terminal. For example, by confirming the presence or absence of the input open state by software processing multiple times, the signal transition state of the monitored external terminal and the input open state may be detected. The state can be discriminated.

以上のように、異常検出回路PCDETにおいては、閾値電圧生成回路PCDVTGおよびコンパレータCMP1、CMP2が出力短絡検出機能および入力開放検出機能で共用されるため、異常検出回路PCDETの回路面積を削減することができ、その結果、製造コストを抑えることができる。   As described above, in the abnormality detection circuit PCDET, since the threshold voltage generation circuit PCDVTG and the comparators CMP1 and CMP2 are shared by the output short circuit detection function and the input open detection function, the circuit area of the abnormality detection circuit PCDET can be reduced. As a result, the manufacturing cost can be reduced.

図4は、図3の閾値電圧生成回路を示している。閾値電圧生成回路PCDVTGは、閾値電圧制御レジスタPCDVTCR、デコーダDEC2、スイッチSW3、分圧抵抗RD1〜RD9およびセレクタSEL4、SEL5を備えて構成されている。   FIG. 4 shows the threshold voltage generation circuit of FIG. The threshold voltage generation circuit PCDVTG includes a threshold voltage control register PCDVTCR, a decoder DEC2, a switch SW3, voltage dividing resistors RD1 to RD9, and selectors SEL4 and SEL5.

閾値電圧制御レジスタPCDVTCRは、閾値電圧VTH、VTLの電圧値を可変指定するためのレジスタである。例えば、閾値電圧制御レジスタPCDVTCRは、閾値電圧VTHの電圧値として電圧値VTH1〜VTH4(VTH4<VTH3<VTH2<VTH1)のいずれかを示し、閾値電圧VTLの電圧値として電圧値VTL1〜VTL4(VTL4<VTL3<VTL2<VTL1)のいずれかを示すレジスタ値に設定される。信号VPCDVTCRは、閾値電圧制御レジスタPCDVTCRの設定値を示す信号である。デコーダDEC2は、信号VPCDVTCRをデコードして信号HSEL1〜HSEL4、LSEL1〜LSEL4を出力する。具体的には、デコーダDEC2は、信号VPCDVTCRが閾値電圧VTHの電圧値として電圧値VTH1(VTH2、VTH3、VTH4)を示す論理値に設定されている場合、信号HSEL1(HSEL2、HSEL3、HSEL4)を“1”に設定するとともに、信号HSEL1〜HSEL4におけるHSEL1(HSEL2、HSEL3、HSEL4)以外の信号を“0”に設定する。また、デコーダDEC2は、信号VPCDVTCRが閾値電圧VTLの電圧値として電圧値VTL1(VTL2、VTL3、VTL4)を示す論理値に設定されている場合、信号LSEL1(LSEL2、LSEL3、LSEL4)を“1”に設定するとともに、信号LSEL1〜LSEL4におけるLSEL1(LSEL2、LSEL3、LSEL4)以外の信号を“0”に設定する。   The threshold voltage control register PCDVTCR is a register for variably specifying the voltage values of the threshold voltages VTH and VTL. For example, the threshold voltage control register PCDVTCR indicates one of the voltage values VTH1 to VTH4 (VTH4 <VTH3 <VTH2 <VTH1) as the voltage value of the threshold voltage VTH, and the voltage values VTL1 to VTL4 (VTL4 (VTL4) as the voltage values of the threshold voltage VTL. <VTL3 <VTL2 <VTL1) is set to a register value indicating any one of them. The signal VPCDVTCR is a signal indicating the set value of the threshold voltage control register PCDVTCR. The decoder DEC2 decodes the signal VPCDVTCR and outputs signals HSEL1 to HSEL4 and LSEL1 to LSEL4. Specifically, when the signal VPCDVTCR is set to a logical value indicating the voltage value VTH1 (VTH2, VTH3, VTH4) as the voltage value of the threshold voltage VTH, the decoder DEC2 outputs the signal HSEL1 (HSEL2, HSEL3, HSEL4). While setting to “1”, signals other than HSEL1 (HSEL2, HSEL3, HSEL4) in the signals HSEL1 to HSEL4 are set to “0”. The decoder DEC2 sets the signal LSEL1 (LSEL2, LSEL3, LSEL4) to “1” when the signal VPCDVTCR is set to a logical value indicating the voltage value VTL1 (VTL2, VTL3, VTL4) as the voltage value of the threshold voltage VTL. And signals other than LSEL1 (LSEL2, LSEL3, LSEL4) in the signals LSEL1 to LSEL4 are set to “0”.

スイッチSW3および分圧抵抗RD1〜RD9は、電源線VDDと接地線GNDとの間に直列接続されている。スイッチSW3は、信号PCDEOが“0”に設定されている場合にオフ状態になり、信号PCDEOが“1”に設定されている場合にオン状態になる。セレクタSEL4は、スイッチSS41〜SS44を備えて構成されている。スイッチSS41(SS42、SS43、SS44)は、分圧抵抗RD1(RD2、RD3、RD4)および分圧抵抗RD2(RD3、RD4、RD5)の接続ノードと閾値電圧VTHの供給線との間に接続されている。スイッチSS41(SS42、SS43、SS44)は、信号HSEL1(HSEL2、HSEL3、HSEL4)が“0”に設定されている場合にオフ状態になり、信号HSEL1(HSEL2、HSEL3、HSEL4)が“1”に設定されている場合にオン状態になる。セレクタSEL5は、スイッチSS51〜SS54を備えて構成されている。スイッチSS51(SS52、SS53、SS54)は、分圧抵抗RD5(RD6、RD7、RD8)および分圧抵抗RD6(RD7、RD8、RD9)の接続ノードと閾値電圧VTLの供給線との間に接続されている。スイッチSS51(SS52、SS53、SS54)は、信号LSEL1(LSEL2、LSEL3、LSEL4)が“0”に設定されている場合にオフ状態になり、信号LSEL1(LSEL2、LSEL3、LSEL4)が“1”に設定されている場合にオン状態になる。   The switch SW3 and the voltage dividing resistors RD1 to RD9 are connected in series between the power supply line VDD and the ground line GND. The switch SW3 is turned off when the signal PCDEO is set to “0”, and is turned on when the signal PCDEO is set to “1”. The selector SEL4 includes switches SS41 to SS44. The switch SS41 (SS42, SS43, SS44) is connected between the connection node of the voltage dividing resistor RD1 (RD2, RD3, RD4) and the voltage dividing resistor RD2 (RD3, RD4, RD5) and the supply line of the threshold voltage VTH. ing. The switch SS41 (SS42, SS43, SS44) is turned off when the signal HSEL1 (HSEL2, HSEL3, HSEL4) is set to “0”, and the signal HSEL1 (HSEL2, HSEL3, HSEL4) is set to “1”. Turns on when set. The selector SEL5 includes switches SS51 to SS54. The switch SS51 (SS52, SS53, SS54) is connected between the connection node of the voltage dividing resistor RD5 (RD6, RD7, RD8) and the voltage dividing resistor RD6 (RD7, RD8, RD9) and the supply line of the threshold voltage VTL. ing. The switch SS51 (SS52, SS53, SS54) is turned off when the signal LSEL1 (LSEL2, LSEL3, LSEL4) is set to “0”, and the signal LSEL1 (LSEL2, LSEL3, LSEL4) is set to “1”. Turns on when set.

このような構成の閾値電圧生成回路PCDVTGでは、閾値電圧制御レジスタPCDVTCRが電圧値VTH1(VTH2、VTH3、VTH4)を示すレジスタ値に設定されると、デコーダDEC2において信号HSEL1(HSEL2、HSEL3、HSEL4)が“1”に設定され、その結果、セレクタSEL4においてスイッチSS41(SS42、SS43、SS44)がオン状態になって分圧電圧VD1(VD2、VD3、VD4)が閾値電圧VTHとして出力される。また、閾値電圧制御レジスタPCDVTCRが電圧値VTL1(VTL2、VTL3、VTL4)を示すレジスタ値に設定されると、デコーダDEC2において信号LSEL1(LSEL2、LSEL3、LSEL4)が“1”に設定され、その結果、セレクタSEL5においてスイッチSS51(SS52、SS53、SS54)がオン状態になって分圧電圧VD5(VD6、VD7、VD8)が閾値電圧VTLとして出力される。これにより、任意の電圧値の閾値電圧VTLH、VTLを供給することが可能になる。また、外部端子P1〜P4の入出力信号の“1”に相当する電圧値あるいは“0”に相当する電圧値が異なる可能性があるが、閾値電圧制御レジスタPCDVTCRを利用して閾値電圧VTH、VTLの電圧値を変更できるため、監視対象外部端子として選択される外部端子の入出力信号の“1”に相当する電圧値あるいは“0”に相当する電圧値に合わせて閾値電圧制御レジスタPCDVTCRを設定することで、そのような場合でも異常検出回路PCDETの安定した検出動作を実現できる。   In the threshold voltage generation circuit PCDVTG having such a configuration, when the threshold voltage control register PCDVTCR is set to a register value indicating the voltage value VTH1 (VTH2, VTH3, VTH4), the decoder DEC2 outputs the signal HSEL1 (HSEL2, HSEL3, HSEL4). As a result, the switch SS41 (SS42, SS43, SS44) is turned on in the selector SEL4, and the divided voltage VD1 (VD2, VD3, VD4) is output as the threshold voltage VTH. When the threshold voltage control register PCDVTCR is set to a register value indicating the voltage value VTL1 (VTL2, VTL3, VTL4), the signal LSEL1 (LSEL2, LSEL3, LSEL4) is set to “1” in the decoder DEC2, and as a result In the selector SEL5, the switch SS51 (SS52, SS53, SS54) is turned on, and the divided voltage VD5 (VD6, VD7, VD8) is output as the threshold voltage VTL. This makes it possible to supply threshold voltages VTLH and VTL having arbitrary voltage values. Further, there is a possibility that the voltage value corresponding to “1” or the voltage value corresponding to “0” of the input / output signals of the external terminals P1 to P4 may be different, but the threshold voltage VTH using the threshold voltage control register PCDVTCR, Since the voltage value of the VTL can be changed, the threshold voltage control register PCDVTCR is set in accordance with the voltage value corresponding to “1” or the voltage value corresponding to “0” of the input / output signal of the external terminal selected as the monitoring target external terminal. By setting, a stable detection operation of the abnormality detection circuit PCDET can be realized even in such a case.

図5は、図3の可変遅延回路を示している。可変遅延回路VDLY1、VDLY2は同様の内部構成を有しているため、ここでは、可変遅延回路VDLY1について説明する。可変遅延回路VDLY1は、デコーダDEC3、遅延回路DLY1〜DLY4、バッファBF1〜BF4、デコーダDEC2およびセレクタSEL6を備えて構成されている。   FIG. 5 shows the variable delay circuit of FIG. Since the variable delay circuits VDLY1 and VDLY2 have the same internal configuration, the variable delay circuit VDLY1 will be described here. The variable delay circuit VDLY1 includes a decoder DEC3, delay circuits DLY1 to DLY4, buffers BF1 to BF4, a decoder DEC2, and a selector SEL6.

遅延回路DLY1は、信号AN2Oを所定時間遅らせて信号DLY1Oとして出力する。バッファBF1は、信号DLY1Oを受けて信号BF1Oを出力する。遅延回路DLY2は、信号BF1Oを所定時間遅らせて信号DLY2Oとして出力する。バッファBF2は、信号DLY2Oを受けて信号BF2Oを生出力する。遅延回路DLY3は、信号BF2Oを所定時間遅らせて信号DLY3Oとして出力する。バッファBF3は、信号DLY3Oを受けて信号BF3Oを出力する。遅延回路DLY4は、信号BF3Oを所定時間遅らせて信号DLY4Oとして出力する。バッファBF4は、信号DLY4Oを受けて信号BF4Oを出力する。デコーダDEC3は、信号VPCDDLYCRをデコードして信号DSEL1〜DSEL4を出力する。具体的には、デコーダDEC3は、信号VPCDDLYCRが遅延時間TD1(TD2、TD3、TD4)を示す論理値に設定されている場合、信号DSEL1(DSEL2、DSEL3、DSEL4)を“1”に設定するとともに、信号DSEL1〜DSEL4における信号DSEL1(DSEL2、DSEL3、DSEL4)以外の信号を“0”に設定する。セレクタSEL6は、信号DSEL1(DSEL2、DSEL3、DSEL4)が“1”に設定されている場合、信号BF1O(BF2O、BF3O、BF4O)を信号VDLY1Oとして出力する。このような構成により、遅延時間制御レジスタPCDDLYCRの設定値(信号VPCDDLYCR)に応じて遅延時間が変更される可変遅延回路VDLY1を容易に実現できる。   The delay circuit DLY1 delays the signal AN2O for a predetermined time and outputs it as the signal DLY1O. The buffer BF1 receives the signal DLY1O and outputs a signal BF1O. The delay circuit DLY2 delays the signal BF1O for a predetermined time and outputs it as the signal DLY2O. The buffer BF2 receives the signal DLY2O and outputs the signal BF2O. The delay circuit DLY3 delays the signal BF2O for a predetermined time and outputs it as a signal DLY3O. Buffer BF3 receives signal DLY3O and outputs signal BF3O. The delay circuit DLY4 delays the signal BF3O for a predetermined time and outputs it as the signal DLY4O. Buffer BF4 receives signal DLY4O and outputs signal BF4O. The decoder DEC3 decodes the signal VPCDDLYCR and outputs signals DSEL1 to DSEL4. Specifically, the decoder DEC3 sets the signal DSEL1 (DSEL2, DSEL3, DSEL4) to “1” when the signal VPCDDLYCR is set to a logical value indicating the delay time TD1 (TD2, TD3, TD4). In the signals DSEL1 to DSEL4, signals other than the signal DSEL1 (DSEL2, DSEL3, DSEL4) are set to “0”. When the signal DSEL1 (DSEL2, DSEL3, DSEL4) is set to “1”, the selector SEL6 outputs the signal BF1O (BF2O, BF3O, BF4O) as the signal VDLY1O. With such a configuration, the variable delay circuit VDLY1 in which the delay time is changed according to the set value (signal VPCDDLYCR) of the delay time control register PCDDLYCR can be easily realized.

図6は、図1の異常検出制御回路を示している。異常検出制御回路PCDCTLは、D型フリップフロップDFFa、DFFbおよび割り込み信号生成回路IRQSGを備えて構成されている。D型フリップフロップDFF1は、クリア端子CLに入力される信号PCDEOが“0”に設定されている場合、出力端子Qから出力される信号DFF1Oを“0”に設定する。また、D型フリップフロップDFF1は、信号PCDEOが“1”に設定されている場合、クロック端子CKに入力される信号DETSOOが“0”から“1”に遷移するのに伴って、入力端子Dに入力される“1”固定の信号を取り込んで信号DFF1Oとして出力する。D型フリップフロップDFF2は、クリア端子CLに入力される信号PCDEOが“0”に設定されている場合、出力端子Qから出力される信号DFF2Oを“0”に設定する。また、D型フリップフロップDFF2は、信号PCDEOが“1”に設定されている場合、クロック端子CKに入力される信号DETSIOが“0”から“1”に遷移するのに伴って、入力端子Dに入力される“1”固定の信号を取り込んで信号DFF2Oとして出力する。   FIG. 6 shows the abnormality detection control circuit of FIG. The abnormality detection control circuit PCDCTL includes D-type flip-flops DFFa and DFFb and an interrupt signal generation circuit IRQSG. The D-type flip-flop DFF1 sets the signal DFF1O output from the output terminal Q to “0” when the signal PCDEO input to the clear terminal CL is set to “0”. In addition, when the signal PCDEO is set to “1”, the D-type flip-flop DFF1 has the input terminal D as the signal DETSOO input to the clock terminal CK transitions from “0” to “1”. The “1” fixed signal input to is input and output as a signal DFF1O. The D-type flip-flop DFF2 sets the signal DFF2O output from the output terminal Q to “0” when the signal PCDEO input to the clear terminal CL is set to “0”. In addition, when the signal PCDEO is set to “1”, the D-type flip-flop DFF2 has the input terminal D as the signal DETSIO input to the clock terminal CK transitions from “0” to “1”. The fixed signal “1” input to the signal DFF2O is taken in and output as a signal DFF2O.

割り込み信号生成回路IRQSGは、異常検出制御レジスタPCDCRを備えて構成されている。異常検出制御レジスタPCDCRは、異常検出許可ビットPCDE、出力短絡検出割り込み許可ビットPCDOIE、出力短絡検出割り込み要因フラグPCDOIF、リアルタイム出力短絡検出フラグDETSO、入力開放検出割り込み許可ビットPCDIIE、入力開放検出割り込み要因フラグPCDIIFおよびリアルタイム入力開放検出フラグDETSIを有している。異常検出許可ビットPCDEは、異常検出回路PCDETの検出動作を禁止する場合に“0”に設定され、異常検出回路PCDETの検出動作を許可する場合に“1”に設定される。信号PCDEOは、異常検出許可ビットPCDEの設定値を示す信号である。   The interrupt signal generation circuit IRQSG includes an abnormality detection control register PCDCR. The abnormality detection control register PCDCR includes an abnormality detection permission bit PCDE, an output short circuit detection interrupt permission bit PCDOIE, an output short circuit detection interrupt factor flag PCDOIF, a real-time output short circuit detection flag DETSO, an input release detection interrupt permission bit PCDIIE, and an input release detection interrupt factor flag. PCDIIF and real-time input release detection flag DETSI are provided. The abnormality detection permission bit PCDE is set to “0” when the detection operation of the abnormality detection circuit PCDET is prohibited, and is set to “1” when the detection operation of the abnormality detection circuit PCDET is permitted. The signal PCDEO is a signal indicating the set value of the abnormality detection permission bit PCDE.

出力短絡検出割り込み許可ビットPCDOIEは、異常検出回路PCDETによる監視対象外部端子の出力短絡状態の検出に伴うCPUに対する割り込み要求の発行を禁止する場合に“0”に設定され、異常検出回路PCDETによる監視対象外部端子の出力短絡状態の検出に伴うCPUに対する割り込み要求の発行を許可する場合に“1”に設定される。出力短絡検出割り込み要因フラグPCDOIFは、信号DDF1Oが“0”から“1”に遷移するのに伴って“1”に設定される。また、出力短絡検出割り込み要因フラグPCDOIFは、CPUのライトアクセスを介して“0”に初期化可能である。リアルタイム出力短絡検出フラグDSTSOは、信号DETSOOが“0”に設定されている場合に“0”に設定され、信号DETSOOが“1”に設定されている場合に“1”に設定される。   The output short-circuit detection interrupt enable bit PCDOIE is set to “0” when the abnormality detection circuit PCDET prohibits the issuance of an interrupt request to the CPU accompanying the detection of the output short-circuit state of the external terminal to be monitored, and is monitored by the abnormality detection circuit PCDET. This is set to “1” when permitting the issuance of an interrupt request to the CPU accompanying the detection of the output short-circuit state of the target external terminal. The output short-circuit detection interrupt factor flag PCDOIF is set to “1” as the signal DDF1O transitions from “0” to “1”. Further, the output short-circuit detection interrupt factor flag PCDOIF can be initialized to “0” via the CPU write access. The real-time output short-circuit detection flag DSTSO is set to “0” when the signal DETSOO is set to “0”, and is set to “1” when the signal DETSOO is set to “1”.

入力開放検出割り込み許可ビットPCDIIEは、異常検出回路PCDETによる監視対象外部端子の入力開放状態の検出に伴うCPUに対する割り込み要求の発行を禁止する場合に“0”に設定され、異常検出回路PCDETによる監視対象外部端子の入力開放状態の検出に伴うCPUに対する割り込み要求の発行を許可する場合に“1”に設定される。入力開放検出割り込み要因フラグPCDIIFは、信号DFF2Oが“0”から“1”に遷移するのに伴って“1”に設定される。また、入力開放検出割り込み要因フラグPCDIIFは、CPUのライトアクセスを介して“0”に初期化可能である。リアルタイム入力開放検出フラグDETSIは、信号DETSIOが“0”に設定されている場合に“0”に設定され、信号DETSIOが“1”に設定されている場合に“1”に設定される。   The input release detection interrupt permission bit PCDIIE is set to “0” when the issuance of an interrupt request to the CPU accompanying the detection of the input open state of the monitored external terminal by the abnormality detection circuit PCDET is set to “0”, and monitoring by the abnormality detection circuit PCDET Set to “1” when permitting the issuance of an interrupt request to the CPU accompanying detection of the input open state of the target external terminal. The input release detection interrupt factor flag PCDIIF is set to “1” as the signal DFF2O transitions from “0” to “1”. Further, the input release detection interrupt factor flag PCDIIF can be initialized to “0” through the CPU write access. The real-time input release detection flag DETSI is set to “0” when the signal DETSIO is set to “0”, and is set to “1” when the signal DETSIO is set to “1”.

割り込み発生回路IRQSGは、出力短絡検出割り込み許可ビットPCDOIEが“1”に設定されている状態で出力短絡検出割り込み要因フラグPCDOIFが“1”に設定された場合、信号IRQPCDを“1”に設定する(CPUに対して割り込み要求を発行する)。また、割り込み発生回路IRQSGは、入力開放検出割り込み許可ビットPCDIIEが“1”に設定されている状態で入力開放検出割り込み要因フラグPCDIIFが“1”に設定された場合にも、信号IRQPCDを“1”に設定する。   The interrupt generation circuit IRQSG sets the signal IRQPCD to “1” when the output short circuit detection interrupt factor flag PCDOIF is set to “1” while the output short circuit detection interrupt permission bit PCDOIE is set to “1”. (Issues an interrupt request to the CPU). The interrupt generation circuit IRQSG also sets the signal IRQPCD to “1” even when the input release detection interrupt factor flag PCDIIF is set to “1” while the input release detection interrupt permission bit PCDIIE is set to “1”. Set to "".

このような構成によれば、監視対象外部端子で出力短絡あるいは入力開放が発生した際にプログラムにより所望の処理を実行することが容易になる。また、監視対象外部端子における出力短絡あるいは入力開放の有無をリアルタイムに確認できるため、監視対象外部端子における出力短絡あるいは入力開放の発生タイミングを容易に特定することができる。   According to such a configuration, it is easy to execute a desired process by a program when an output short circuit or an input open occurs at the monitoring target external terminal. In addition, since it is possible to confirm in real time whether there is an output short circuit or an input opening at the monitoring target external terminal, it is possible to easily identify the occurrence timing of the output short circuit or the input opening at the monitoring target external terminal.

図7は、監視対象外部端子の切換制御を示している。例えば、外部端子P1〜P3の出力短絡の有無を時分割で検査する場合の監視対象外部端子の切換制御について説明する。例えば、外部端子P1の信号遷移時間が0.1usであり、外部端子P2の信号遷移時間が0.5usであり、外部端子P3の信号遷移時間が1.0usであるものする。   FIG. 7 shows switching control of the monitoring target external terminal. For example, the switching control of the monitoring target external terminal when the presence or absence of the output short circuit of the external terminals P1 to P3 is inspected in a time division manner will be described. For example, the signal transition time of the external terminal P1 is 0.1 us, the signal transition time of the external terminal P2 is 0.5 us, and the signal transition time of the external terminal P3 is 1.0 us.

まず、外部端子P1の出力短絡の有無を検査するために、端子選択制御レジスタDPSELCRが外部端子P1のレジスタ値に設定され、遅延時間制御レジスタPCDDLYCRが0.1us(遅延時間TD1に相当)のレジスタ値に設定される。これにより、外部端子P1が監視対象外部端子として選択され、外部端子P1に対して異常検出回路PCDETの検出動作が実施される。可変遅延回路VDLY1、VDLY2の遅延時間が0.1usに設定されることで、時刻t1から時刻t2までの期間(外部端子P1が信号遷移状態である期間)においては、異常検出回路PCDETの検出動作が停止された状態(disable)になる。   First, in order to check whether there is an output short circuit of the external terminal P1, the terminal selection control register DPSELCR is set to the register value of the external terminal P1, and the delay time control register PCDDLYCR is 0.1 us (corresponding to the delay time TD1). Set to a value. As a result, the external terminal P1 is selected as the monitoring target external terminal, and the detection operation of the abnormality detection circuit PCDET is performed on the external terminal P1. By setting the delay time of the variable delay circuits VDLY1 and VDLY2 to 0.1 us, the detection operation of the abnormality detection circuit PCDET is performed during the period from time t1 to time t2 (period in which the external terminal P1 is in the signal transition state). Is in a stopped state (disable).

次に、時刻t3において、外部端子P2の出力短絡の有無を検査するために、信号PCDEO(異常検出制御レジスタPCDCRの異常検出許可ビットPCDE)を“0”に設定して異常検出回路PCDETの検出動作を停止した後、端子選択制御レジスタDPSELCRに外部端子P2のレジスタ値を設定し、遅延時間制御レジスタPCDDLYCRに0.5us(遅延時間TD2に相当)のレジスタ値を設定する。レジスタ設定の変更後、信号PCDEOを“1”に設定し、可変遅延回路VDLY1、VDLY2の遅延時間(0.5us)の経過後に異常検出回路PCDETが検出動作を実施可能になる。これにより、外部端子P1から外部端子P2への監視対象外部端子の切り換え時に外部端子P2が信号遷移状態であった場合でも、異常検出回路PCDETでの誤検出を防止することができる。信号PCDEOが“1”に設定されてから可変遅延回路VDLY1、VDLY2の遅延時間が経過すると、外部端子P2に対して異常検出回路PCDETの検出動作が実施される。可変遅延回路VDLY1、VDLY2の遅延時間が0.5usに設定されることで、時刻t4から時刻t5までの期間(外部端子P2が信号遷移状態である期間)においては、異常検出回路PCDETの検出動作が停止された状態になる。   Next, at time t3, the signal PCDEO (abnormality detection permission bit PCDE of the abnormality detection control register PCDCR) is set to “0” to detect the abnormality detection circuit PCDET in order to check whether there is an output short circuit of the external terminal P2. After stopping the operation, the register value of the external terminal P2 is set in the terminal selection control register DPSELCR, and the register value of 0.5 us (corresponding to the delay time TD2) is set in the delay time control register PCDDLYCR. After the register setting is changed, the signal PCDEO is set to “1”, and the abnormality detection circuit PCDET can perform the detection operation after the delay time (0.5 us) of the variable delay circuits VDLY1 and VDLY2 elapses. Thereby, even when the external terminal P2 is in a signal transition state when the monitored external terminal is switched from the external terminal P1 to the external terminal P2, erroneous detection in the abnormality detection circuit PCDET can be prevented. When the delay time of the variable delay circuits VDLY1 and VDLY2 elapses after the signal PCDEO is set to “1”, the detection operation of the abnormality detection circuit PCDET is performed on the external terminal P2. By setting the delay time of the variable delay circuits VDLY1 and VDLY2 to 0.5 us, the detection operation of the abnormality detection circuit PCDET is performed in the period from time t4 to time t5 (period in which the external terminal P2 is in the signal transition state) Is stopped.

そして、時刻t6において、外部端子P3の出力短絡の有無を検査するために、信号PCDEOを“0”に設定して異常検出回路PCDETの検出動作を停止した後、端子選択制御レジスタDPSELCRに外部端子P3のレジスタ値を設定し、遅延時間制御レジスタPCDDLYCRに1.0us(遅延時間TD3に相当)のレジスタ値を設定する。レジスタ設定の変更後、信号PCDEOを“1”に設定し、可変遅延回路VDLY1、VDLY2の遅延時間(1.0us)の経過後に異常検出回路PCDETが検出動作を実施可能になる。但し、図7の例では、信号PCDEOが“1”に設定されてから可変遅延回路VDLY1、VDLY2の遅延時間が経過する前に外部端子P3が信号遷移状態になり、時刻t7から時刻t8までの期間(外部端子P3が信号遷移状態である期間)において信号遷移状態に対する誤検出防止機能が働くため、異常検出回路PCDETの検出動作の停止期間が延長され、外部端子P3に対して異常検出回路PCDETの検出動作が時刻t8から実施される。これにより、外部端子P2から外部端子P3への監視対象外部端子の切り換え時に外部端子P3が信号遷移状態であった場合でも、異常検出回路PCDETでの誤検出を防止することができる。   At time t6, in order to check whether or not the output of the external terminal P3 is short-circuited, the signal PCDEO is set to “0” to stop the detection operation of the abnormality detection circuit PCDET, and then the terminal selection control register DPSELCR is set to the external terminal. A register value of P3 is set, and a register value of 1.0 us (corresponding to the delay time TD3) is set in the delay time control register PCDDLYCR. After the register setting is changed, the signal PCDEO is set to “1”, and the abnormality detection circuit PCDET can perform the detection operation after the delay time (1.0 us) of the variable delay circuits VDLY1 and VDLY2 elapses. However, in the example of FIG. 7, the external terminal P3 enters the signal transition state before the delay time of the variable delay circuits VDLY1 and VDLY2 elapses after the signal PCDEO is set to “1”, and from time t7 to time t8. In the period (period in which the external terminal P3 is in the signal transition state), the false detection prevention function for the signal transition state works, so the stop period of the detection operation of the abnormality detection circuit PCDET is extended and The detection operation is performed from time t8. Thereby, even when the external terminal P3 is in a signal transition state when the monitored external terminal is switched from the external terminal P2 to the external terminal P3, erroneous detection in the abnormality detection circuit PCDET can be prevented.

ここで、マイクロコントローラMCUにおける端子選択回路DPSELおよび異常検出回路PCDETの組み合わせによる出力短絡検出機能の有用性について説明する。マイクロコントローラMCUには、プログラム格納用メモリとしてフラッシュメモリが搭載されている。プログラムを容易に書き換えられるというフラッシュメモリの特徴を利用することで、プログラムのデバッグやシステムの動作確認の際に、4個の評価システムで外部端子P1〜P4を別々に監視し、4個の評価システム全体で外部端子P1〜P4を同時に監視するような手法、あるいは、1個の評価システムで監視対象外部端子を変更しながら外部端子P1〜P4を時分割に監視するような手法を採用することができる。更に、マイクロコントローラMCUが製品として量産されている段階あるいはマイクロコントローラMCUがユーザにより使用されている段階であっても、フラッシュメモリのプログラムを書き換えることで、外部端子P1〜P4における所望の外部端子について出力短絡の有無を検査することができる。即ち、マイクロコントローラMCUの出力短絡検出機能をフィールドでのデバッグ手段として利用することもできる。また、マイクロコントローラの外部端子の中で出力短絡が発生する可能性がある外部端子の数やマイクロコントローラの外部端子において出力短絡が発生する可能性があるタイミングは限定されている場合が多い。このような場合、マイクロコントローラMCUでは、システム動作に合わせたソフトウェア制御により、監視対象外部端子を変更しながら外部端子P1〜P4を時分割に監視することで、外部端子P1〜P4の出力短絡状態を検出することができる。例えば、出力短絡検出機能をタイマ割り込み機能と組み合わせて使用することで、監視対象外部端子、閾値電圧VTH、VTLおよび可変遅延回路VDLY1、VDLY2の遅延時間を定期的に変更することが可能になる。このように、マイクロコントローラMCUにおける端子選択回路DPSELおよび異常検出回路PCDETの組み合わせによる出力短絡検出機能の有用性は十分である。   Here, the usefulness of the output short circuit detection function by the combination of the terminal selection circuit DPSEL and the abnormality detection circuit PCDET in the microcontroller MCU will be described. The microcontroller MCU is equipped with a flash memory as a program storage memory. By utilizing the feature of flash memory that programs can be easily rewritten, external terminals P1 to P4 are monitored separately by four evaluation systems when debugging a program or checking system operation, and four evaluations are performed. Adopting a method of monitoring the external terminals P1 to P4 simultaneously in the entire system or a method of monitoring the external terminals P1 to P4 in a time-division manner while changing the monitored external terminals with one evaluation system Can do. Further, even when the microcontroller MCU is mass-produced as a product or the microcontroller MCU is being used by the user, the desired external terminals of the external terminals P1 to P4 can be rewritten by rewriting the flash memory program. The presence or absence of an output short circuit can be inspected. In other words, the output short-circuit detection function of the microcontroller MCU can be used as a debugging means in the field. Further, the number of external terminals that may cause an output short circuit among the external terminals of the microcontroller and the timing at which an output short circuit may occur at the external terminal of the microcontroller are often limited. In such a case, the microcontroller MCU performs time-division monitoring of the external terminals P1 to P4 while changing the monitored external terminals by software control in accordance with the system operation, so that the output short-circuit state of the external terminals P1 to P4 Can be detected. For example, by using the output short-circuit detection function in combination with the timer interrupt function, it becomes possible to periodically change the delay time of the monitored external terminal, the threshold voltages VTH and VTL, and the variable delay circuits VDLY1 and VDLY2. Thus, the usefulness of the output short circuit detection function by the combination of the terminal selection circuit DPSEL and the abnormality detection circuit PCDET in the microcontroller MCU is sufficient.

次に、マイクロコントローラMCUにおける端子選択回路DPSELおよび異常検出回路PCDETの組み合わせによる入力開放検出機能の有用性について説明する。一般に、入力開放検出機能は、マイクロコントローラの動作中に機械的な振動等に起因して外部端子と外部回路との接続が遮断されることでマイクロコントローラが正常に動作できなくなるような状況を回避するために、システムの異常通知や自己診断等に使用される。例えば、システムの起動時にマイクロコントローラの外部端子における入力開放の有無を検査した後に後続の処理を実行するような場合を考えると、外部端子毎に入力開放検出回路を設ければ、自己診断に要する時間は短くて済むが、マイクロコントローラのチップ面積が非常に大きくなる。また、システムの起動時にマイクロコントローラの外部端子における入力開放の有無を検査するような場合には、複数の外部端子について入力開放の有無を同時に検査する必要性は低く、複数の外部端子について入力開放の有無を時分割に検査しても問題はない。従って、マイクロコントローラMCUにおける端子選択回路DPSELおよび異常検出回路PCDETの組み合わせによる入力開放検出機能の有用性も十分である。   Next, the usefulness of the input opening detection function by the combination of the terminal selection circuit DPSEL and the abnormality detection circuit PCDET in the microcontroller MCU will be described. In general, the open input detection function avoids a situation in which the microcontroller cannot operate normally when the connection between the external terminal and the external circuit is interrupted due to mechanical vibration or the like during the operation of the microcontroller. Therefore, it is used for system abnormality notification and self-diagnosis. For example, considering the case where the subsequent processing is executed after checking the presence or absence of input opening at the external terminal of the microcontroller at system startup, if an input opening detection circuit is provided for each external terminal, self-diagnosis is required. The time is short, but the microcontroller chip area is very large. In addition, when checking whether there is an open input at the external terminal of the microcontroller when starting up the system, it is not necessary to check whether there is an open input for multiple external terminals at the same time. There is no problem even if the presence or absence is checked in a time-sharing manner. Therefore, the usefulness of the input open detection function by the combination of the terminal selection circuit DPSEL and the abnormality detection circuit PCDET in the microcontroller MCU is also sufficient.

以上のような第1実施形態では、外部端子P1〜P4に共通して異常検出回路PCDETが設けられるため、マイクロコントローラMCUのチップ面積を削減でき、大幅なコストダウンを実現できる。また、異常検出回路PCDETにおいては、閾値電圧生成回路PCDVTGおよびコンパレータCMP1、CMP2が出力短絡検出機能および入力開放検出機能で共用されるため、異常検出回路PCDETの回路面積を削減することができ、その結果、製造コストを抑えることができる。   In the first embodiment as described above, since the abnormality detection circuit PCDET is provided in common with the external terminals P1 to P4, the chip area of the microcontroller MCU can be reduced, and a significant cost reduction can be realized. Further, in the abnormality detection circuit PCDET, the threshold voltage generation circuit PCDVTG and the comparators CMP1 and CMP2 are shared by the output short circuit detection function and the input open detection function, so that the circuit area of the abnormality detection circuit PCDET can be reduced. As a result, the manufacturing cost can be suppressed.

異常検出回路PCDETにより監視対象外部端子の出力短絡状態あるいは入力開放状態が検出された際、端子選択制御レジスタDPSELCRを参照することで、外部端子P1〜P4の中で監視対象外部端子として選択されている外部端子を判別できるため、例えば、割り込み処理を利用して適切な処理を実行することが可能になる。また、閾値電圧制御レジスタPCDVTCRを利用して閾値電圧VTH、VTLの電圧値を変更できるため、監視対象外部端子の入出力信号の“1”に相当する電圧値あるいは“0”に相当する電圧値に合わせて閾値電圧制御レジスタPCDVTCRを設定することで、外部端子P1〜P4の入出力信号の“1”に相当する電圧値あるいは“0”に相当する電圧値が異なる場合でも異常検出回路PCDETの安定した検出動作を実現できる。閾値電圧生成回路PCDVTGにおいては、異常検出回路PCDETの検出動作が禁止されている場合にスイッチSW3がオフ状態になるため、無駄な電流の消費を回避することができる。   When the abnormality detection circuit PCDET detects the output short circuit state or the input open state of the monitoring target external terminal, it is selected as the monitoring target external terminal among the external terminals P1 to P4 by referring to the terminal selection control register DPSELCR. Since it is possible to determine which external terminal is present, for example, it is possible to execute appropriate processing using interrupt processing. Further, the threshold voltage control register PCDVTCR can be used to change the voltage values of the threshold voltages VTH and VTL. Therefore, the voltage value corresponding to “1” or the voltage value corresponding to “0” of the input / output signal of the monitored external terminal. By setting the threshold voltage control register PCDVTCR according to the above, even when the voltage value corresponding to “1” or the voltage value corresponding to “0” of the input / output signals of the external terminals P1 to P4 is different, the abnormality detection circuit PCDET A stable detection operation can be realized. In the threshold voltage generation circuit PCDVTG, when the detection operation of the abnormality detection circuit PCDET is prohibited, the switch SW3 is turned off, so that wasteful current consumption can be avoided.

更に、異常検出回路PCDETにおいては、可変遅延回路VDLY1、VDLY2が設けられることで、監視対象外部端子が信号遷移状態である期間にて信号CMP1O、CMP2Oが信号DETSOOに関与しなくなるため、監視対象外部端子の信号遷移状態が監視対象外部端子の出力短絡状態として検出されることを防止できる。また、遅延時間制御レジスタPCDDLYCRを利用して可変遅延回路VDLY1、VDLY2の遅延時間を変更できるため、監視対象外部端子の信号遷移時間に合わせて遅延時間制御レジスタPCDDLYCRを設定することで、外部端子P1〜P4の信号遷移時間が異なる場合にも柔軟に対応できる。   Further, in the abnormality detection circuit PCDET, the variable delay circuits VDLY1 and VDLY2 are provided, so that the signals CMP1O and CMP2O are not involved in the signal DETSOO during the period in which the monitoring target external terminal is in the signal transition state. It is possible to prevent the signal transition state of the terminal from being detected as the output short-circuit state of the monitored external terminal. Since the delay times of the variable delay circuits VDLY1 and VDLY2 can be changed using the delay time control register PCDDLYCR, the external terminal P1 is set by setting the delay time control register PCDDLYCR in accordance with the signal transition time of the monitored external terminal. Even when the signal transition times of .about.P4 are different, it can be flexibly dealt with.

図8は、本発明の第2実施形態を示している。第2実施形態を説明するにあたって、第1実施形態で説明した要素と同一の要素については、第1実施形態で使用した符号と同一の符号を使用し、詳細な説明を省略する。第2実施形態のマイクロコントローラは、第1実施形態(図1)のマイクロコントローラMCUにおいて異常検出回路PCDETを異常検出回路PCDET’に置き換えて構成されている。   FIG. 8 shows a second embodiment of the present invention. In describing the second embodiment, the same reference numerals as those used in the first embodiment are used for the same elements as those described in the first embodiment, and a detailed description thereof is omitted. The microcontroller of the second embodiment is configured by replacing the abnormality detection circuit PCDET with the abnormality detection circuit PCDET 'in the microcontroller MCU of the first embodiment (FIG. 1).

異常検出回路PCDET’は、AND回路AN1〜AN3、AN6〜AN9、インバータIV3、IV8、閾値電圧発生回路PCDVTG、コンパレータCMP1、CMP2、OR回路OR1、NOR回路NR2、スイッチSW1、SW2、ブルアップ抵抗R1およびプルダウン抵抗R2を備えて構成されている。AND回路AN8は、信号AN2Oが“0”に設定されている場合に信号CMP1Oとは無関係に信号AN8Oを“0”に設定し、信号AN2Oが“1”に設定されている場合に信号CMP1Oを信号AN8Oとして出力する。AND回路AN9は、信号AN3Oが“0”に設定されている場合に信号CMP2Oとは無関係に信号AN9Oを“0”に設定し、信号AN3Oが“1”に設定されている場合に信号CMP2Oを信号AN9Oとして出力する。OR回路OR1は、信号AN8O、AN9Oの双方が“0”に設定されている場合に信号DETSOOを“0”に設定し、信号AN8O、AN9Oの少なくとも一方が“1”に設定されている場合に信号DETSOOを“1”に設定する。   The abnormality detection circuit PCDET ′ includes AND circuits AN1 to AN3, AN6 to AN9, inverters IV3 and IV8, threshold voltage generation circuit PCDVTG, comparators CMP1 and CMP2, OR circuit OR1, NOR circuit NR2, switches SW1 and SW2, and bullup resistor R1. And a pull-down resistor R2. The AND circuit AN8 sets the signal AN8O to “0” regardless of the signal CMP1O when the signal AN2O is set to “0”, and outputs the signal CMP1O when the signal AN2O is set to “1”. Output as signal AN8O. The AND circuit AN9 sets the signal AN9O to “0” regardless of the signal CMP2O when the signal AN3O is set to “0”, and outputs the signal CMP2O when the signal AN3O is set to “1”. Output as signal AN9O. The OR circuit OR1 sets the signal DETSOO to “0” when both the signals AN8O and AN9O are set to “0”, and sets at least one of the signals AN8O and AN9O to “1”. The signal DETSOO is set to “1”.

このような構成の異常検出回路PCDET’では、異常検出回路PCDET’の検出動作が許可されており、監視対象外部端子に対応する入出力回路が出力回路として機能している場合(信号PCDEOが“1”に設定されており、信号DDRSOが“1”に設定されている場合)、以下のように監視対象外部端子の出力短絡状態が検出される。信号PDRSOが“0”に設定されている場合には、信号AN2Oが“0”に設定されるため、信号CMP1Oとは無関係に信号AN8Oが“0”に設定されている。また、信号PDRSOが“0”に設定されている場合には、信号PDRSOXが“1”に設定されるため、信号AN3Oが“1”に設定され、その結果、信号CMP2Oが信号AN9Oとして出力されている。なお、信号NR2Oが“0”に設定されるため、スイッチSW1、SW2がオフ状態になり、その結果、プルアップ抵抗R1およびプルダウン抵抗R2は信号線INOUTSOから切り離されている。このような状態で監視対象外部端子において出力短絡が発生すると、信号INOUTSOの電圧が接地線GNDの電圧から上昇して閾値電圧VTLより高くなった時点で信号CMP2Oが“0”から“1”に遷移する。このため、信号AN9Oが“0”から“1”に遷移し、その結果、信号DETSOOが“0”から“1”に遷移する。これにより、監視対象外部端子の出力短絡状態が検出される。   In the abnormality detection circuit PCDET ′ having such a configuration, the detection operation of the abnormality detection circuit PCDET ′ is permitted, and the input / output circuit corresponding to the monitored external terminal functions as an output circuit (the signal PCDEO is “ When the signal DDRSO is set to “1”), the output short-circuit state of the monitoring target external terminal is detected as follows. When the signal PDRSO is set to “0”, since the signal AN2O is set to “0”, the signal AN8O is set to “0” regardless of the signal CMP1O. Further, when the signal PDRSO is set to “0”, the signal PDRSOX is set to “1”, so that the signal AN3O is set to “1”, and as a result, the signal CMP2O is output as the signal AN9O. ing. Since the signal NR2O is set to “0”, the switches SW1 and SW2 are turned off. As a result, the pull-up resistor R1 and the pull-down resistor R2 are disconnected from the signal line INOUTSO. When an output short circuit occurs in the monitored external terminal in such a state, the signal CMP2O changes from “0” to “1” when the voltage of the signal INOUTSO rises from the voltage of the ground line GND and becomes higher than the threshold voltage VTL. Transition. For this reason, the signal AN9O changes from “0” to “1”, and as a result, the signal DETSOO changes from “0” to “1”. Thereby, the output short circuit state of the monitoring object external terminal is detected.

一方、信号PDRSOが“1”に設定されている場合には、信号PDRSOXが“0”に設定されるため、信号AN3Oが“0”に設定され、その結果、信号CMP2Oとは無関係に信号AN9Oが“0”に設定されている。また、信号PDRSOが“1”に設定されている場合には、信号AN2Oが“1”に設定されため、信号CMP1Oが信号AN8Oとして出力されている。このような状態で監視対象外部端子において出力短絡が発生すると、信号INOUTSOの電圧が電源線VDDの電圧から下降して閾値電圧VTHより低くなった時点で信号CMP1Oが“0”から“1”に遷移する。このため、信号AN8Oが“0”から“1”に遷移し、その結果、信号DETSOOが“0”から“1”に遷移する。これにより、監視対象外部端子の出力短絡状態が検出される。   On the other hand, when the signal PDRSO is set to “1”, since the signal PDRSOX is set to “0”, the signal AN3O is set to “0”. As a result, the signal AN9O is independent of the signal CMP2O. Is set to “0”. When the signal PDRSO is set to “1”, the signal AN2O is set to “1”, so that the signal CMP1O is output as the signal AN8O. If an output short circuit occurs in the monitored external terminal in such a state, the signal CMP1O changes from “0” to “1” when the voltage of the signal INOUTSO decreases from the voltage of the power supply line VDD and becomes lower than the threshold voltage VTH. Transition. For this reason, the signal AN8O changes from “0” to “1”, and as a result, the signal DETSOO changes from “0” to “1”. Thereby, the output short circuit state of the monitoring object external terminal is detected.

また、異常検出回路PCDET’の検出動作が禁止されている場合(信号PCDEOが“0”に設定されている場合)あるいは監視対象外部端子に対応する入出力回路が入力回路として機能している場合(信号DDRSOが“0”に設定されている場合)、信号AN2O、AN3Oが“0”に設定されるため、信号CMP1Oとは無関係に信号AN8Oが“0”に設定され、信号CMP2Oとは無関係に信号AN9Oが“0”に設定される。従って、信号CMP1O、CMP2Oに応じて信号DETSOOが“1”に設定されることはない。   Also, when the detection operation of the abnormality detection circuit PCDET ′ is prohibited (when the signal PCDEO is set to “0”), or when the input / output circuit corresponding to the monitored external terminal functions as an input circuit (When the signal DDRSO is set to “0”), since the signals AN2O and AN3O are set to “0”, the signal AN8O is set to “0” regardless of the signal CMP1O and is not related to the signal CMP2O. The signal AN9O is set to “0”. Therefore, the signal DETSOO is not set to “1” in response to the signals CMP1O and CMP2O.

以上のような第2実施形態でも、第1実施形態と同様の効果が得られる。   Even in the second embodiment as described above, the same effect as in the first embodiment can be obtained.

図9は、本発明の第3実施形態を示している。第3実施形態を説明するにあたって、第1実施形態で説明した要素と同一の要素については、第1実施形態で使用した符号と同一の符号を使用し、詳細な説明を省略する。第3実施形態のマイクロコントローラは、第1実施形態(図1)のマイクロコントローラMCUにおいて入出力回路IO1を入出力回路IO1’に置き換えて構成されている。   FIG. 9 shows a third embodiment of the present invention. In the description of the third embodiment, the same reference numerals as those used in the first embodiment are used for the same elements as those described in the first embodiment, and detailed description thereof is omitted. The microcontroller of the third embodiment is configured by replacing the input / output circuit IO1 with the input / output circuit IO1 'in the microcontroller MCU of the first embodiment (FIG. 1).

入出力回路IO1’は、入出力回路IO1においてOR回路OR2およびセレクタSEL7を追加して構成されている。OR回路OR2は、信号UARTOEが“0”に設定されている場合に信号DDR1Oを信号OR2Oとして出力し、信号UARTOEが“1”に設定されている場合に信号DDR1Oとは無関係に信号OR2Oを“1”に設定する。NAND回路NA11およびインバータIV11には、信号DDR1Oに代えて信号OR2Oが入力されている。また、図示を省略しているが、端子選択回路DPSELにも、信号DDR1Oに代えて信号OR2Oが入力されている。セレクタSEL7は、信号UARTOEが“0”に設定されている場合に信号PDR1Oを信号SEL7Oとして出力し、信号UARTOEが“1”に設定されている場合に信号UARTOを信号SEL7Oとして出力する。NAND回路NA11およびNOR回路NR11には、信号PDR1Oに代えて信号SEL7Oが入力されている。なお、信号UARTOは、UARTの送信データ信号である。信号UARTOEは、UARTの出力イネーブル信号であり、UARTの送信データ信号の出力を禁止する場合に“0”に設定され、UARTの送信データ信号の出力を許可する場合に“1”に設定される。   The input / output circuit IO1 'is configured by adding an OR circuit OR2 and a selector SEL7 in the input / output circuit IO1. The OR circuit OR2 outputs the signal DDR1O as the signal OR2O when the signal UARTOE is set to “0”, and outputs the signal OR2O to “0” regardless of the signal DDR1O when the signal UARTOE is set to “1”. Set to 1 ”. Instead of the signal DDR1O, the signal OR2O is input to the NAND circuit NA11 and the inverter IV11. Although not shown, the signal OR2O is input to the terminal selection circuit DPSEL instead of the signal DDR1O. The selector SEL7 outputs the signal PDR1O as the signal SEL7O when the signal UARTOE is set to “0”, and outputs the signal UARTO as the signal SEL7O when the signal UARTOE is set to “1”. Instead of the signal PDR1O, the signal SEL7O is input to the NAND circuit NA11 and the NOR circuit NR11. The signal UARTO is a UART transmission data signal. The signal UARTTO is a UART output enable signal, and is set to “0” when the output of the UART transmission data signal is prohibited, and is set to “1” when the output of the UART transmission data signal is permitted. .

このような構成の入出力回路IO1’では、信号UARTOEが“0”に設定されている場合、信号DDR1Oが信号OR2Oとして出力されるとともに、信号PDR1Oが信号SEL71Oとして出力される。従って、入出力回路IO1’は、入出力回路IO1と同様に、汎用出力回路または汎用入力回路として機能する。一方、信号UARTOEが“1”に設定されている場合、信号OR2Oが“1”に設定されるとともに、信号UARTOが信号SEL71Oとして出力される。従って、入出力回路IO1’は、UART用出力回路として機能する。   In the input / output circuit IO1 'configured as described above, when the signal UARTOE is set to "0", the signal DDR1O is output as the signal OR2O, and the signal PDR1O is output as the signal SEL71O. Therefore, the input / output circuit IO1 'functions as a general-purpose output circuit or a general-purpose input circuit, like the input / output circuit IO1. On the other hand, when the signal UARTOE is set to “1”, the signal OR2O is set to “1” and the signal UARTO is output as the signal SEL71O. Accordingly, the input / output circuit IO1 'functions as a UART output circuit.

以上のような第3実施形態では、汎用入出力機能に加えてUART用出力機能を有する入出力回路IO1’が設けられているが、入出力回路IO1’がUART用出力回路として機能する場合でも、入出力回路IO1’が汎用出力回路として機能する場合と同様に外部端子P1の出力短絡状態を検出でき、第1実施形態と同様の効果が得られる。   In the third embodiment as described above, the input / output circuit IO1 ′ having the UART output function in addition to the general-purpose input / output function is provided. However, even when the input / output circuit IO1 ′ functions as the UART output circuit. As in the case where the input / output circuit IO1 ′ functions as a general-purpose output circuit, the output short-circuit state of the external terminal P1 can be detected, and the same effect as in the first embodiment can be obtained.

図10は、本発明の第4実施形態を示している。第4実施形態を説明するにあたって、第1実施形態で説明した要素と同一の要素については、第1実施形態で使用した符号と同一の符号を使用し、詳細な説明を省略する。第4実施形態のマイクロコントローラは、第1実施形態(図1)のマイクロコントローラMCUにおいて入出力回路IO1〜IO4を入出力回路IO1”〜IO4”に置き換えて構成されている。   FIG. 10 shows a fourth embodiment of the present invention. In describing the fourth embodiment, the same reference numerals as those used in the first embodiment are used for the same elements as those described in the first embodiment, and a detailed description thereof is omitted. The microcontroller of the fourth embodiment is configured by replacing the input / output circuits IO1 to IO4 with the input / output circuits IO1 ″ to IO4 ″ in the microcontroller MCU of the first embodiment (FIG. 1).

入出力回路IOi”(i=1,2,3,4)は、入出力回路IOiにおいてNAND回路NA2iおよびAND回路ANAiを追加して構成されている。NAND回路NA2iは、信号PSELiが“0”に設定されている場合に信号DETSOOとは無関係に信号NA2iOを“1”に設定し、信号PSELiが“1”に設定されている場合に信号DETSOOを反転させて信号NA2iOとして出力する。AND回路ANAiは、信号NA2iOが“0”に設定されている場合に信号DDRiOとは無関係に信号ANAiOを“0”に設定し、信号NA2iOが“1”に設定されている場合に信号DDRiOを信号ANAiOとして出力する。NAND回路NA1iおよびインバータINV1iには、信号DDRiOに代えて信号ANAiOが入力されている。   Input / output circuit IOi ”(i = 1, 2, 3, 4) is configured by adding NAND circuit NA2i and AND circuit ANAi in input / output circuit IOi. NAND circuit NA2i has signal PSELi of“ 0 ”. The signal NA2iO is set to “1” regardless of the signal DETSOO when it is set to “1”, and when the signal PSELi is set to “1”, the signal DETSOO is inverted and output as the signal NA2iO. ANAi sets the signal ANAiO to “0” regardless of the signal DDRiO when the signal NA2iO is set to “0”, and sets the signal DDRiO to the signal ANAiO when the signal NA2iO is set to “1”. The NAND circuit NA1i and the inverter INV1i receive the signal ANA instead of the signal DDRiO. O has been entered.

このような構成の入出力回路IOi”では、端子選択回路DPSELにおいて外部端子Piが監視対象外部端子として選択されていなければ、信号PSELiが“0”に設定されるため、信号NA2iOが“1”に設定され、その結果、信号DDRiOが信号ANAiOとして出力される。従って、入出力回路IOi”は入出力回路IOiと同様に動作する。一方、端子選択回路DPSELにおいて外部端子Piが監視対象外部端子として選択されていれば、信号PSELiが“1”に設定されるため、信号NA2iOが信号DETSOOとは反対の論理値に設定される。入出力回路IOi”が出力回路として機能している場合(信号DDRiOが“1”に設定されている場合)、外部端子Piで出力短絡が発生していなければ、信号DETSOOが“0”に設定されるため、信号NA2iOが“1”に設定され、その結果、信号DDRiOが信号ANAiOとして出力される。従って、入出力回路IOi”は入出力回路IOiと同様に動作する。また、外部端子Piで出力短絡が発生していれば、信号DETSOOが“1”に設定されるため、信号NA2iOが“0”に設定され、その結果、信号DDRiOとは無関係に信号ANAiOが“0”に設定される。これにより、信号NA1iOが“1”に設定されるとともに、信号NR1iOが“0”に設定されるため、PMOSトランジスタPM1iおよびNMOSトランジスタNM1iがオフ状態になり、入出力回路IOi”の信号出力動作が停止される。   In the input / output circuit IOi ”having such a configuration, if the external terminal Pi is not selected as the monitoring target external terminal in the terminal selection circuit DPSEL, the signal PSELi is set to“ 0 ”, so that the signal NA2iO is“ 1 ”. As a result, the signal DDRiO is output as the signal ANAiO. Therefore, the input / output circuit IOi ″ operates in the same manner as the input / output circuit IOi. On the other hand, if the external terminal Pi is selected as the monitoring target external terminal in the terminal selection circuit DPSEL, the signal PSELi is set to “1”, so that the signal NA2iO is set to a logical value opposite to that of the signal DETSOO. When the input / output circuit IOi ”functions as an output circuit (when the signal DDRiO is set to“ 1 ”), if the output short circuit does not occur at the external terminal Pi, the signal DETSOO is set to“ 0 ”. Therefore, the signal NA2iO is set to “1”, and as a result, the signal DDRiO is output as the signal ANAiO. Therefore, the input / output circuit IOi ″ operates in the same manner as the input / output circuit IOi. If an output short circuit has occurred at the external terminal Pi, the signal DETSOO is set to “1”, so that the signal NA2iO is set to “0”. As a result, the signal ANAiO is “ Set to 0 ". As a result, the signal NA1iO is set to “1” and the signal NR1iO is set to “0”, so that the PMOS transistor PM1i and the NMOS transistor NM1i are turned off, and the signal output operation of the input / output circuit IOi ”is performed. Stopped.

以上のような第4実施形態では、第1実施形態と同様の効果が得られるうえに、監視対象外部端子の出力短絡状態が検出された場合、監視対象外部端子に対応する入出力回路の信号出力動作を自動的に(ソフトウェアを介すことなく)停止させることができる。この結果、出力短絡状態が検出された外部端子に接続されるトランジスタに異常電流が流れる期間を短くすることができる。換言すれば、出力短絡状態が検出された外部端子に接続されるトランジスタがダメージを受ける期間を短くすることができる。   In the fourth embodiment as described above, the same effect as in the first embodiment can be obtained, and when the output short-circuit state of the monitored external terminal is detected, the signal of the input / output circuit corresponding to the monitored external terminal The output operation can be automatically stopped (without software). As a result, it is possible to shorten the period during which the abnormal current flows through the transistor connected to the external terminal in which the output short-circuit state is detected. In other words, the period during which the transistor connected to the external terminal where the output short-circuit state is detected is damaged can be shortened.

以上の実施形態において説明した発明を整理し、付記として以下に開示する。
(付記1)
複数の外部端子に対応して設けられる複数の入出力回路と、
前記複数の外部端子の中から監視対象外部端子を可変指定する監視対象指定回路と、
前記監視対象外部端子に対応する入出力回路が出力回路として機能している場合に前記監視対象外部端子の出力短絡状態を検出し、前記監視対象外部端子に対応する入出力回路が入力回路として機能している場合に前記監視対象外部端子の入力開放状態を検出する異常検出回路とを備えることを特徴とする半導体集積回路。
(付記2)
付記1に記載の半導体集積回路において、
前記異常検出回路は、
基準電圧を生成する基準電圧生成回路と、
前記監視対象外部端子の電圧を前記基準電圧と比較する電圧比較回路と、
前記監視対象外部端子に対応する入出力回路が入力回路として機能している場合に前記監視対象外部端子に接続されるプルアップ抵抗およびプルダウン抵抗と、
前記監視対象外部端子に対応する入出力回路が出力回路として機能している場合に前記電圧比較回路の比較結果に応じて出力短絡検出信号を出力し、前記監視対象外部端子に対応する入出力回路が入力回路として機能している場合に前記電圧比較回路の比較結果に応じて入力開放検出信号を出力する検出信号出力回路とを備えることを特徴とする半導体集積回路。
(付記3)
付記2に記載の半導体集積回路において、
前記基準電圧生成回路は、前記基準電圧の電圧値を可変指定する電圧値指定回路を備えることを特徴とする半導体集積回路。
(付記4)
付記2に記載の半導体集積回路において、
前記異常検出回路の検出動作を許可/禁止する異常検出制御回路を備え、
前記基準電圧生成回路は、前記異常検出制御回路により前記異常検出回路の検出動作が禁止されている場合に前記基準電圧生成回路の電圧生成動作を停止させる電圧生成停止回路を備えることを特徴とする半導体集積回路。
(付記5)
付記1に記載の半導体集積回路において、
前記異常検出回路は、
検出禁止時間を可変指定する時間指定回路と、
前記監視対象外部端子に対応する入出力回路が出力回路として機能している場合に前記監視対象外部端子の信号遷移に合わせて前記異常検出回路の検出動作を前記検出禁止時間停止させる検出停止回路とを備えることを特徴とする半導体集積回路。
(付記6)
付記1に記載の半導体集積回路において、
前記異常検出回路による前記監視対象外部端子の出力短絡状態または入力開放状態の検出に応答して中央処理回路に対する割り込み要求を発行する割り込み要求発行回路を備えることを特徴とする半導体集積回路。
(付記7)
付記1に記載の半導体集積回路において、
前記複数の入出力回路は、汎用入出力機能に加えて周辺回路用出力機能を有する入出力回路を含むことを特徴とする半導体集積回路。
(付記8)
付記1に記載の半導体集積回路において、
前記異常検出回路による前記監視対象外部端子の出力短絡状態の検出に応答して前記監視対象外部端子に対応する入出力回路の信号出力動作を停止させる出力停止回路を備えることを特徴とする半導体集積回路。
The invention described in the above embodiments is organized and disclosed as an additional note below.
(Appendix 1)
A plurality of input / output circuits provided corresponding to a plurality of external terminals;
A monitoring target designating circuit that variably designates a monitoring target external terminal from among the plurality of external terminals;
When the input / output circuit corresponding to the monitored external terminal functions as an output circuit, the output short-circuit state of the monitored external terminal is detected, and the input / output circuit corresponding to the monitored external terminal functions as an input circuit. A semiconductor integrated circuit comprising: an abnormality detection circuit that detects an input open state of the monitoring target external terminal when the monitoring target external terminal is open.
(Appendix 2)
In the semiconductor integrated circuit according to attachment 1,
The abnormality detection circuit is
A reference voltage generation circuit for generating a reference voltage;
A voltage comparison circuit that compares the voltage of the monitored external terminal with the reference voltage;
A pull-up resistor and a pull-down resistor connected to the monitoring target external terminal when an input / output circuit corresponding to the monitoring target external terminal functions as an input circuit;
When an input / output circuit corresponding to the monitoring target external terminal functions as an output circuit, an output short circuit detection signal is output according to the comparison result of the voltage comparison circuit, and the input / output circuit corresponding to the monitoring target external terminal A semiconductor integrated circuit comprising: a detection signal output circuit that outputs an input open detection signal in accordance with a comparison result of the voltage comparison circuit when is functioning as an input circuit.
(Appendix 3)
In the semiconductor integrated circuit according to attachment 2,
The semiconductor integrated circuit, wherein the reference voltage generation circuit includes a voltage value designation circuit that variably designates a voltage value of the reference voltage.
(Appendix 4)
In the semiconductor integrated circuit according to attachment 2,
An abnormality detection control circuit for permitting / prohibiting the detection operation of the abnormality detection circuit;
The reference voltage generation circuit includes a voltage generation stop circuit that stops the voltage generation operation of the reference voltage generation circuit when the detection operation of the abnormality detection circuit is prohibited by the abnormality detection control circuit. Semiconductor integrated circuit.
(Appendix 5)
In the semiconductor integrated circuit according to attachment 1,
The abnormality detection circuit is
A time specification circuit for variably specifying the detection prohibition time;
A detection stop circuit for stopping the detection operation of the abnormality detection circuit in accordance with the signal transition of the monitored external terminal when the input / output circuit corresponding to the monitored external terminal functions as an output circuit; A semiconductor integrated circuit comprising:
(Appendix 6)
In the semiconductor integrated circuit according to attachment 1,
A semiconductor integrated circuit, comprising: an interrupt request issuing circuit for issuing an interrupt request to a central processing circuit in response to detection of an output short-circuit state or an input open state of the monitored external terminal by the abnormality detection circuit.
(Appendix 7)
In the semiconductor integrated circuit according to attachment 1,
The plurality of input / output circuits include an input / output circuit having a peripheral circuit output function in addition to a general-purpose input / output function.
(Appendix 8)
In the semiconductor integrated circuit according to attachment 1,
A semiconductor integrated circuit comprising: an output stop circuit that stops a signal output operation of an input / output circuit corresponding to the monitored external terminal in response to detection of an output short-circuit state of the monitored external terminal by the abnormality detection circuit circuit.

以上、本発明について詳細に説明してきたが、前述の実施形態は発明の一例に過ぎず、本発明はこれらに限定されるものではない。本発明を逸脱しない範囲で変形可能であることは明らかである。   As mentioned above, although this invention was demonstrated in detail, above-mentioned embodiment is only an example of this invention and this invention is not limited to these. Obviously, modifications can be made without departing from the scope of the present invention.

本発明の第1実施形態を示す説明図である。It is explanatory drawing which shows 1st Embodiment of this invention. 図1の端子選択回路を示す説明図である。It is explanatory drawing which shows the terminal selection circuit of FIG. 図1の異常検出回路を示す説明図である。It is explanatory drawing which shows the abnormality detection circuit of FIG. 図3の閾値電圧生成回路を示す説明図である。It is explanatory drawing which shows the threshold voltage generation circuit of FIG. 図3の可変遅延回路を示す説明図である。It is explanatory drawing which shows the variable delay circuit of FIG. 図1の異常検出制御回路を示す説明図である。It is explanatory drawing which shows the abnormality detection control circuit of FIG. 監視対象外部端子の切換制御を示す説明図である。It is explanatory drawing which shows switching control of the monitoring object external terminal. 本発明の第2実施形態を示す説明図である。It is explanatory drawing which shows 2nd Embodiment of this invention. 本発明の第3実施形態を示す説明図である。It is explanatory drawing which shows 3rd Embodiment of this invention. 本発明の第4実施形態を示す説明図である。It is explanatory drawing which shows 4th Embodiment of this invention. LSIの入出力ポート回路の従来例(その1)を示す説明図である。It is explanatory drawing which shows the prior art example (the 1) of the input / output port circuit of LSI. LSIの入出力ポート回路の従来例(その2)を示す説明図である。It is explanatory drawing which shows the prior art example (the 2) of the input-output port circuit of LSI. LSIの入出力ポート回路の従来例(その3)を示す説明図である。It is explanatory drawing which shows the prior art example (the 3) of the input-output port circuit of LSI. LSIの入力ポート回路の従来例(その1)を示す説明図である。It is explanatory drawing which shows the prior art example (the 1) of the input port circuit of LSI. LSIの入力ポート回路の従来例(その2)を示す説明図である。It is explanatory drawing which shows the prior art example (the 2) of the input port circuit of LSI.

符号の説明Explanation of symbols

AN1〜AN9、ANA1〜ANA4‥AND回路;BF1〜BF4‥バッファ;CMP1、CPM2‥コンパレータ;DDR1〜DDR4‥方向レジスタ;DEC1〜DEC3‥デコーダ;DFF1、DFF2‥D型フリップフロップ;DLY1〜DLY4‥遅延回路;DPSEL‥端子選択回路;DPSELCR‥端子選択制御レジスタ;IO1〜IO4、IO1’、IO1”〜IO4”‥入出力回路;IRQSG‥割り込み信号生成回路;IV11〜IV14、IV21〜IV24、IV3〜IV8‥インバータ;MCU‥マイクロコントローラ;NA11〜NA14、NA21〜NA24‥NAND回路;NM11〜NM14、NM2、NM3‥NMOSトランジスタ;NR11〜NR14、NR2‥NOR回路;OR1、OR2‥OR回路;P1〜P4‥外部端子;PCDCR‥異常検出制御レジスタ;PCDCTL‥異常検出制御回路;PCDDLYCR‥遅延時間制御レジスタ;PCDET、PCDET’‥異常検出回路;PCDVTCR‥閾値電圧制御レジスタ;PCDVTG‥閾値電圧生成回路;PDR1〜PDR4‥データレジスタ;PM11〜PM14、PM2、PM3‥PMOSトランジスタ;R1‥プルアップ抵抗;R2‥プルダウン抵抗;RD1〜RD9‥分圧抵抗;SEL1〜SEL7‥セレクタ;SS11〜SS14、SS21〜SS24、SS31〜SS34、SS41〜SS44、SS51〜SS54、SW1〜SW3‥スイッチ;VDLY1、VDLY2‥可変遅延回路 AN1 to AN9, ANA1 to ANA4 ... AND circuit; BF1 to BF4 ... buffer; CMP1, CPM2 ... comparator; DDR1 to DDR4 ... direction register; DEC1 to DEC3 ... decoder; Circuit: DPSEL ... Terminal selection circuit; DPSELCR ... Terminal selection control register; IO1-IO4, IO1 ', IO1 "-IO4" ... I / O circuit; IRQSG ... Interrupt signal generation circuit; IV11-IV14, IV21-IV24, IV3-IV8 Inverter; MCU; Microcontroller; NA11 to NA14, NA21 to NA24 NAND circuit; NM11 to NM14, NM2, NM3 NMOS transistor; NR11 to NR14, NR2 NOR circuit; R circuit; P1 to P4, external terminal; PCDCR, abnormality detection control register, PCDCTL, abnormality detection control circuit, PCDDLYCR, delay time control register, PCDET, PCDET ', abnormality detection circuit, PCDVTCR, threshold voltage control register, PCDVTG, threshold PDR1 to PDR4... Data register; PM11 to PM14, PM2, PM3... PMOS transistor; R1... Pullup resistor; R2 .. pulldown resistor; RD1 to RD9. , SS21 to SS24, SS31 to SS34, SS41 to SS44, SS51 to SS54, SW1 to SW3, switch; VDLY1, VDLY2, variable delay circuit

Claims (5)

複数の外部端子に対応して設けられる複数の入出力回路と、
前記複数の外部端子の中から監視対象外部端子を可変指定する監視対象指定回路と、
前記監視対象外部端子に対応する入出力回路が出力回路として機能している場合に前記監視対象外部端子の出力短絡状態を検出し、前記監視対象外部端子に対応する入出力回路が入力回路として機能している場合に前記監視対象外部端子の入力開放状態を検出する異常検出回路とを備えることを特徴とする半導体集積回路。
A plurality of input / output circuits provided corresponding to a plurality of external terminals;
A monitoring target designating circuit that variably designates a monitoring target external terminal from among the plurality of external terminals;
When the input / output circuit corresponding to the monitored external terminal functions as an output circuit, the output short-circuit state of the monitored external terminal is detected, and the input / output circuit corresponding to the monitored external terminal functions as an input circuit. A semiconductor integrated circuit comprising: an abnormality detection circuit that detects an input open state of the monitoring target external terminal when the monitoring target external terminal is open.
請求項1に記載の半導体集積回路において、
前記異常検出回路は、
基準電圧を生成する基準電圧生成回路と、
前記監視対象外部端子の電圧を前記基準電圧と比較する電圧比較回路と、
前記監視対象外部端子に対応する入出力回路が入力回路として機能している場合に前記監視対象外部端子に接続されるプルアップ抵抗およびプルダウン抵抗と、
前記監視対象外部端子に対応する入出力回路が出力回路として機能している場合に前記電圧比較回路の比較結果に応じて出力短絡検出信号を出力し、前記監視対象外部端子に対応する入出力回路が入力回路として機能している場合に前記電圧比較回路の比較結果に応じて入力開放検出信号を出力する検出信号出力回路とを備えることを特徴とする半導体集積回路。
The semiconductor integrated circuit according to claim 1,
The abnormality detection circuit is
A reference voltage generation circuit for generating a reference voltage;
A voltage comparison circuit that compares the voltage of the monitored external terminal with the reference voltage;
A pull-up resistor and a pull-down resistor connected to the monitoring target external terminal when an input / output circuit corresponding to the monitoring target external terminal functions as an input circuit;
When the input / output circuit corresponding to the monitoring target external terminal functions as an output circuit, an output short circuit detection signal is output according to the comparison result of the voltage comparison circuit, and the input / output circuit corresponding to the monitoring target external terminal A semiconductor integrated circuit comprising: a detection signal output circuit that outputs an input open detection signal in accordance with a comparison result of the voltage comparison circuit when is functioning as an input circuit.
請求項2に記載の半導体集積回路において、
前記基準電圧生成回路は、前記基準電圧の電圧値を可変指定する電圧値指定回路を備えることを特徴とする半導体集積回路。
The semiconductor integrated circuit according to claim 2,
The semiconductor integrated circuit, wherein the reference voltage generation circuit includes a voltage value designation circuit that variably designates a voltage value of the reference voltage.
請求項2に記載の半導体集積回路において、
前記異常検出回路の検出動作を許可/禁止する異常検出制御回路を備え、
前記基準電圧生成回路は、前記異常検出制御回路により前記異常検出回路の検出動作が禁止されている場合に前記基準電圧生成回路の電圧生成動作を停止させる電圧生成停止回路を備えることを特徴とする半導体集積回路。
The semiconductor integrated circuit according to claim 2,
An abnormality detection control circuit for permitting / prohibiting the detection operation of the abnormality detection circuit;
The reference voltage generation circuit includes a voltage generation stop circuit that stops the voltage generation operation of the reference voltage generation circuit when the detection operation of the abnormality detection circuit is prohibited by the abnormality detection control circuit. Semiconductor integrated circuit.
請求項1に記載の半導体集積回路において、
前記異常検出回路は、
検出禁止時間を可変指定する時間指定回路と、
前記監視対象外部端子に対応する入出力回路が出力回路として機能している場合に前記監視対象外部端子の信号遷移に合わせて前記異常検出回路の検出動作を前記検出禁止時間停止させる検出停止回路とを備えることを特徴とする半導体集積回路。
The semiconductor integrated circuit according to claim 1,
The abnormality detection circuit is
A time specification circuit for variably specifying the detection prohibition time;
A detection stop circuit for stopping the detection operation of the abnormality detection circuit in accordance with the signal transition of the monitoring target external terminal when the input / output circuit corresponding to the monitoring target external terminal functions as an output circuit; A semiconductor integrated circuit comprising:
JP2008000991A 2008-01-08 2008-01-08 Semiconductor integrated circuit Expired - Fee Related JP5194804B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008000991A JP5194804B2 (en) 2008-01-08 2008-01-08 Semiconductor integrated circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008000991A JP5194804B2 (en) 2008-01-08 2008-01-08 Semiconductor integrated circuit

Publications (2)

Publication Number Publication Date
JP2009164933A true JP2009164933A (en) 2009-07-23
JP5194804B2 JP5194804B2 (en) 2013-05-08

Family

ID=40967007

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008000991A Expired - Fee Related JP5194804B2 (en) 2008-01-08 2008-01-08 Semiconductor integrated circuit

Country Status (1)

Country Link
JP (1) JP5194804B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160040085A (en) * 2014-10-02 2016-04-12 삼성전자주식회사 Scan flop flop and Scan test circuit including the scan flip flip
JP2018019589A (en) * 2016-07-01 2018-02-01 ローム株式会社 Isolation synchronous rectification type dc/dc converter, synchronous rectification controller, shunt regulator circuit, power supply adapter, and electronic device
WO2018198631A1 (en) * 2017-04-25 2018-11-01 日立オートモティブシステムズ株式会社 Electronic control device
US11287474B2 (en) 2014-10-02 2022-03-29 Samsung Electronics Co., Ltd Scan flip-flop and scan test circuit including the same

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS55160866A (en) * 1979-05-30 1980-12-15 Asahi Denki Seisakusho:Kk Device for deciding short-circuit and disconnection
JPS63273346A (en) * 1987-05-01 1988-11-10 Hitachi Ltd Semiconductor integrated logic circuit
JPH01253315A (en) * 1988-03-31 1989-10-09 Nec Ic Microcomput Syst Ltd Bidirectional buffer
JPH06350061A (en) * 1993-06-11 1994-12-22 Nec Corp Ecl gate array
JPH08274614A (en) * 1995-03-30 1996-10-18 Nec Corp Semiconductor integrated circuit and its test method
JP2004311608A (en) * 2003-04-04 2004-11-04 Renesas Technology Corp Semiconductor integrated circuit
WO2006087844A1 (en) * 2005-02-21 2006-08-24 Test Research Laboratories Inc. Wiring connected state inspecting instrument

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS55160866A (en) * 1979-05-30 1980-12-15 Asahi Denki Seisakusho:Kk Device for deciding short-circuit and disconnection
JPS63273346A (en) * 1987-05-01 1988-11-10 Hitachi Ltd Semiconductor integrated logic circuit
JPH01253315A (en) * 1988-03-31 1989-10-09 Nec Ic Microcomput Syst Ltd Bidirectional buffer
JPH06350061A (en) * 1993-06-11 1994-12-22 Nec Corp Ecl gate array
JPH08274614A (en) * 1995-03-30 1996-10-18 Nec Corp Semiconductor integrated circuit and its test method
JP2004311608A (en) * 2003-04-04 2004-11-04 Renesas Technology Corp Semiconductor integrated circuit
WO2006087844A1 (en) * 2005-02-21 2006-08-24 Test Research Laboratories Inc. Wiring connected state inspecting instrument

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160040085A (en) * 2014-10-02 2016-04-12 삼성전자주식회사 Scan flop flop and Scan test circuit including the scan flip flip
KR102368072B1 (en) * 2014-10-02 2022-02-28 삼성전자주식회사 Scan flop flop and Scan test circuit including the scan flip flip
US11287474B2 (en) 2014-10-02 2022-03-29 Samsung Electronics Co., Ltd Scan flip-flop and scan test circuit including the same
JP2018019589A (en) * 2016-07-01 2018-02-01 ローム株式会社 Isolation synchronous rectification type dc/dc converter, synchronous rectification controller, shunt regulator circuit, power supply adapter, and electronic device
WO2018198631A1 (en) * 2017-04-25 2018-11-01 日立オートモティブシステムズ株式会社 Electronic control device
CN110521120A (en) * 2017-04-25 2019-11-29 日立汽车系统株式会社 Electronic control unit
JPWO2018198631A1 (en) * 2017-04-25 2020-01-16 日立オートモティブシステムズ株式会社 Electronic control unit
US10910815B2 (en) 2017-04-25 2021-02-02 Hitachi Automotive Systems, Ltd. Electronic control unit
CN110521120B (en) * 2017-04-25 2023-03-10 日立安斯泰莫株式会社 Electronic control device

Also Published As

Publication number Publication date
JP5194804B2 (en) 2013-05-08

Similar Documents

Publication Publication Date Title
US8659962B2 (en) Semiconductor device, semiconductor system having the same and operating method thereof
EP3625800B1 (en) Systems and methods for frequency mode detection and implementation
US6753697B2 (en) Semiconductor device capable of maintaining output signal even if internal power supply potential is turned off
JP4190976B2 (en) Disconnection and short circuit detection circuit
JP5194804B2 (en) Semiconductor integrated circuit
KR20120003675A (en) Test mode control circuit in semiconductor memory device and test mode entering method thereof
US8489902B2 (en) Semiconductor integrated circuit
KR100851914B1 (en) Semiconductor device
JP2007052596A (en) Soft error detection circuit
US8779795B2 (en) Semiconductor chip
US20090086552A1 (en) Semiconductor memory device and its driving method
KR20160132721A (en) Semiconductor device and semiconductor system
KR100897273B1 (en) Apparatus and Method for Setting Test Mode in Semiconductor Integrated Circuit
KR100907011B1 (en) OutPUt Driver of Semiconductor Memory Apparatus
US6512706B1 (en) System and method for writing to a register file
KR100915824B1 (en) Input circuit of semiconductor memory apparatus and control method of the same
US8386858B2 (en) Semiconductor memory device
KR20130081864A (en) Inverter delay compensation circuit
KR100650816B1 (en) Internal circuit protection device
CN105374396B (en) Semiconductor device with a plurality of semiconductor chips
KR100618704B1 (en) Method of controlling setting Mode Register Set for memory device
JP2008152621A (en) Microcomputer
JP2006352304A (en) Semiconductor integrated circuit
KR100695485B1 (en) Test mode entry circuit
JP2006345577A (en) Semiconductor device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20101119

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120601

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120710

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120903

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130108

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130121

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160215

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5194804

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees