JP5761120B2 - Microcomputer and electronic control unit - Google Patents

Microcomputer and electronic control unit Download PDF

Info

Publication number
JP5761120B2
JP5761120B2 JP2012114467A JP2012114467A JP5761120B2 JP 5761120 B2 JP5761120 B2 JP 5761120B2 JP 2012114467 A JP2012114467 A JP 2012114467A JP 2012114467 A JP2012114467 A JP 2012114467A JP 5761120 B2 JP5761120 B2 JP 5761120B2
Authority
JP
Japan
Prior art keywords
input
analog
conversion
digital
block
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.)
Active
Application number
JP2012114467A
Other languages
Japanese (ja)
Other versions
JP2013243457A (en
Inventor
啓晴 竹内
啓晴 竹内
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.)
Denso Corp
Original Assignee
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Corp filed Critical Denso Corp
Priority to JP2012114467A priority Critical patent/JP5761120B2/en
Publication of JP2013243457A publication Critical patent/JP2013243457A/en
Application granted granted Critical
Publication of JP5761120B2 publication Critical patent/JP5761120B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、AD変換ブロック、デジタル処理ブロックの兼用入力端子を備えたマイクロコンピュータ、および、このマイクロコンピュータを搭載する電子制御装置に関する。   The present invention relates to a microcomputer provided with an AD conversion block, a digital processing block shared input terminal, and an electronic control device on which the microcomputer is mounted.

例えばエンジン制御用のマイクロコンピュータ(以下、マイコンと略す)を搭載する電子制御装置(エンジンECU)は、インジェクタ、イグナイタ等の各種アクチュエータを駆動するが、この駆動時の異常を検出し、当該検出異常に応じてフェールセーフ処理を行う。この種の異常検出技術が様々提供されている(例えば、特許文献1参照)。   For example, an electronic control unit (engine ECU) equipped with a microcomputer for engine control (hereinafter abbreviated as a microcomputer) drives various actuators such as an injector and an igniter. Fail-safe processing is performed according to Various types of abnormality detection techniques of this type are provided (see, for example, Patent Document 1).

特許文献1記載の技術は、複数のアナログ入力を備えたマルチプレクサと、バイナリーコード出力のADコンバータを備え、AD入力となるマルチプレクサの2つのアナログ入力をそれぞれ電源電圧Vccとグランドとに接続し、マルチプレクサを切換えてその出力をA−Dコンバータに入力させている。これによりビット「0」「1」の固着を検出できる。この特許文献1記載の技術ではAD変換器の出力異常を検出できる。   The technology described in Patent Document 1 includes a multiplexer having a plurality of analog inputs and an AD converter having a binary code output, and two multiplexer inputs serving as AD inputs are connected to a power supply voltage Vcc and a ground, respectively. And the output is input to the AD converter. As a result, the sticking of the bits “0” and “1” can be detected. With the technique described in Patent Document 1, an output abnormality of the AD converter can be detected.

しかしながら、この特許文献1記載の技術では、マルチプレクサは、センサ信号入力と電源電圧Vccとグランドとの間でコントロール信号に応じて信号を選択しているため、例えば電源電圧Vccを選択するスイッチは正常動作するのに対し、信号入力端子への切換異常が生じた場合などには、マルチプレクサのスイッチ不具合によるオープン(開放)異常を検出できない。電源電圧Vcc、グランドの入力端子が必要となるため、制御に使用可能な有効端子数も減少してしまう。   However, in the technique described in Patent Document 1, since the multiplexer selects a signal according to the control signal among the sensor signal input, the power supply voltage Vcc, and the ground, for example, the switch for selecting the power supply voltage Vcc is normal. In contrast to the operation, when an abnormality in switching to the signal input terminal occurs, an open (open) abnormality due to a switch failure of the multiplexer cannot be detected. Since the power supply voltage Vcc and the ground input terminal are required, the number of effective terminals usable for control is also reduced.

また、エンジンECUは、水温センサや電子スロットル開度センサなどのアナログ信号、イグニッションスイッチ信号やシフトレンジスイッチ信号(P,R,D,N,2,L等)などのオン/オフのデジタル信号を入力するが、アナログ信号とデジタル信号の入力数は例えば車種等で異なる。ここで、エンジンECUに搭載しているマイコンは、一般的にアナログ信号入力数とデジタル信号入力数がマイコン品種毎に決まっている。そのため、アナログまたはデジタルの入力数が不足する場合は、入力数の多い別のマイコンに変更しなければならず、マイコンおよびECUのコストアップにもつながる。   The engine ECU also outputs on / off digital signals such as analog signals such as a water temperature sensor and an electronic throttle opening sensor, an ignition switch signal, and a shift range switch signal (P, R, D, N, 2, L, etc.). Although it is input, the number of analog signals and digital signals input differs depending on, for example, the vehicle type. Here, as for the microcomputer mounted in the engine ECU, the number of analog signal inputs and the number of digital signal inputs are generally determined for each microcomputer type. Therefore, when the number of analog or digital inputs is insufficient, it is necessary to change to another microcomputer having a large number of inputs, which leads to an increase in the cost of the microcomputer and the ECU.

特開平8−330959号公報JP-A-8-330959

そこで、アナログ信号およびデジタル信号を入力する端子を一部兼用とし、車種が異なっても同じマイコンを使用できるように複数機能の兼用端子化を進めている。従来より、デジタル入力端子、アナログ入力端子を兼用するとアナログ信号の精度悪化の懸念を生じていたが、昨今のマイコンにおいては、半導体ウェハ内でのアイソレーション技術の進歩に応じて、デジアナ兼用の入力端子も搭載されるようになってきている。   In view of this, the terminals for inputting analog signals and digital signals are partly used, and a multi-function dual-purpose terminal is being developed so that the same microcomputer can be used even if the vehicle types are different. Conventionally, there was a concern about the deterioration of the accuracy of analog signals when using both digital input terminals and analog input terminals. However, in recent microcomputers, as analog technology advances in semiconductor wafers, digital-analog input can be used. Terminals are also being installed.

本発明の目的は、AD変換ブロック、および、デジタル信号処理ブロックのデジアナ兼用の入力端子を設けた場合に内部異常を検出できるようにしたマイクロコンピュータと、このマイクロコンピュータを搭載した電子制御装置を提供することにある。   An object of the present invention is to provide a microcomputer capable of detecting an internal abnormality when an AD conversion block and an input terminal serving as a digital signal processing block of a digital signal processing block are provided, and an electronic control device equipped with the microcomputer There is to do.

請求項1記載の発明によれば、アナデジ兼用入力端子は、アナログ信号入力又はデジタル信号入力の何れかであることが予め割当てられている。AD変換ブロックはアナデジ兼用入力端子を通じてアナログ信号を入力しデジタル変換する。デジタル信号処理ブロックは、アナデジ兼用入力端子を通じてデジタル信号を入力しH/L判別閾値と比較手段により比較し当該比較結果としてデジタル信号を取得する。   According to the first aspect of the present invention, it is pre-assigned that the analog / digital input terminal is either an analog signal input or a digital signal input. The AD conversion block inputs an analog signal through an analog / digital input terminal and performs digital conversion. The digital signal processing block inputs a digital signal through the analog / digital input terminal, compares the digital signal with the H / L discrimination threshold by the comparison means, and acquires the digital signal as the comparison result.

そして、推定手段は、所定の入力信号を、アナデジ兼用入力端子を通じてAD変換ブロックに入力させた状態で得られるAD変換ブロックの変換結果、および、所定の入力信号と同一の入力信号を、アナデジ兼用入力端子を通じてデジタル信号処理ブロックに入力させた状態で得られるデジタル信号処理ブロックの処理結果に基づいて、AD変換ブロック又はデジタル信号処理ブロックの異常を推定する。同一入力信号を用いて得られるAD変換ブロックの変換結果とデジタル信号処理ブロックの処理結果に相互の矛盾を生じるときには、AD変換ブロック又はデジタル信号処理ブロックの異常を推定できる。
The estimation means, a predetermined input signal, the conversion result of the AD conversion block obtained in a state of being input to the AD conversion block through the analog digital Alternate input terminals, and, the same input signal and a predetermined input signal, the analog digital combined An abnormality of the AD conversion block or the digital signal processing block is estimated based on the processing result of the digital signal processing block obtained in the state of being input to the digital signal processing block through the input terminal . When there is a contradiction between the conversion result of the AD conversion block obtained using the same input signal and the processing result of the digital signal processing block, an abnormality of the AD conversion block or the digital signal processing block can be estimated.

請求項2に係る発明によれば、AD変換ブロックの変換結果が正常出力範囲外で且つAD変換ブロックの非動作時側の値であるときには、アナログ信号入力がAD変換ブロックの非動作時の異常出力範囲に変換されていることを把握できる。また、推定手段は、AD変換ブロックの非動作時の値を仮定的に比較手段に入力しH/L判別閾値と比較した結果である論理レベルを取得し、この論理レベルがデジタル信号処理ブロックのデジタル信号の論理レベルと逆の関係であるか否かを推定している。   According to the invention of claim 2, when the conversion result of the AD conversion block is outside the normal output range and is a value on the non-operation side of the AD conversion block, the analog signal input is abnormal when the AD conversion block is not operating. You can see that it has been converted to the output range. Further, the estimation means hypothetically inputs the non-operating value of the AD conversion block to the comparison means and obtains a logical level that is a result of comparison with the H / L discrimination threshold, and this logical level is the digital signal processing block. It is estimated whether or not the relationship is inverse to the logic level of the digital signal.

一例として、アナデジ兼用入力端子にHレベルに近いアナログ信号が入力される場合について説明する。切換スイッチが正常動作しているときには、アナデジ兼用入力端子からアナログ信号がAD変換ブロック側に正常に通電される。したがって、AD変換ブロックはHレベルに近いアナログ信号に対応したデジタル値を出力する。しかし、切換スイッチが開放異常であるときには、アナデジ兼用入力端子からアナログ信号がAD変換ブロック側に通電しないので、非動作時の値(例えば入力初期値となる≒0)がAD変換ブロックに入力される。   As an example, a case where an analog signal close to H level is input to the analog / digital input terminal will be described. When the changeover switch is operating normally, an analog signal is normally supplied from the analog / digital input terminal to the AD conversion block side. Therefore, the AD conversion block outputs a digital value corresponding to an analog signal close to H level. However, when the change-over switch is abnormally open, the analog signal from the analog / digital input terminal is not energized to the AD conversion block, so that the non-operating value (for example, the input initial value ≈ 0) is input to the AD conversion block. The

他方、比較手段は、アナデジ兼用入力端子の入力信号を直接入力しているため、比較手段はH/L判別閾値と比較したHレベルをデジタル信号処理ブロックの出力デジタル信号の論理レベルとして出力する。推定手段は、AD変換ブロックの非動作時の値を仮定的に比較手段に入力した結果を得ることによってLレベルを取得する。したがって、推定手段は、出力デジタル信号の論理レベル(Hレベル)と仮定的に得られた論理レベル(Lレベル)とを比較しこれらが逆の関係であるため、切換スイッチの開放異常であると推定できる。論理レベルが逆の場合も同様であるが説明は省略する。   On the other hand, since the comparison means directly inputs the input signal of the analog / digital input terminal, the comparison means outputs the H level compared with the H / L discrimination threshold as the logic level of the output digital signal of the digital signal processing block. The estimation means obtains the L level by obtaining a result of a hypothetical input of the AD conversion block non-operating value to the comparison means. Therefore, the estimation means compares the logical level (H level) of the output digital signal with the logical level (L level) obtained hypothetically, and these are in an inverse relationship, so that it is an abnormal opening of the changeover switch. Can be estimated. The same applies when the logic level is reversed, but the description is omitted.

請求項3に係る発明によれば、デジアナ兼用入力端子の入力信号のAD変換結果がハイ(H)出力を保証する最低レベル(HH)以上であるにも関わらず、デジタル信号処理ブロックがロウ(L)であれば、デジタル信号処理ブロックが誤動作していると推定できる。逆もまた同様であり、デジアナ兼用入力端子の入力信号のAD変換結果がロウ(L)出力を保証する最高レベル(LL)以下であるにも関わらず、デジタル信号処理ブロックの出力がハイ(H)であれば、デジタル信号処理ブロックが誤動作していると推定できる。   According to the third aspect of the present invention, the digital signal processing block is low even though the AD conversion result of the input signal of the digital / analog input terminal is equal to or higher than the minimum level (HH) that guarantees the high (H) output. L), it can be estimated that the digital signal processing block is malfunctioning. The reverse is also true, and the output of the digital signal processing block is high (H) even though the AD conversion result of the input signal of the digital / analog input terminal is below the maximum level (LL) that guarantees the low (L) output. ), It can be estimated that the digital signal processing block is malfunctioning.

請求項4記載の発明によれば、AD変換ブロックが異常状態である場合、複数のチャンネルの切換スイッチが順次切換えられ複数のチャンネルの入力信号を順次入力したとしても、複数のチャンネル毎のAD変換結果がほぼ同様の値になるときにはAD変換ブロックの異常であると推定できる。   According to the fourth aspect of the present invention, when the AD conversion block is in an abnormal state, the AD conversion is performed for each of the plurality of channels even if the changeover switches of the plurality of channels are sequentially switched and the input signals of the plurality of channels are sequentially input. When the result becomes almost the same value, it can be estimated that the AD conversion block is abnormal.

請求項5記載の発明によれば、AD変換ブロックが正常動作しているにも関わらず、AD変換結果が正常出力範囲を逸脱している場合には入力回路又は入力信号源の異常であると推定できる。   According to the fifth aspect of the present invention, if the AD conversion result deviates from the normal output range even though the AD conversion block is operating normally, the input circuit or the input signal source is abnormal. Can be estimated.

請求項6記載の発明によれば、推定手段がデジタル信号処理ブロックに異常が生じていると推定したときに、AD変換ブロックのAD変換値を用いて論理レベルを取得するため、デジタル信号処理ブロックに異常を生じたとしてもAD変換ブロックを用いて処理を継続できる。   According to the sixth aspect of the present invention, when the estimation means estimates that an abnormality has occurred in the digital signal processing block, the logic level is obtained using the AD conversion value of the AD conversion block. Even if an abnormality occurs, the processing can be continued using the AD conversion block.

請求項7記載の発明のように、推定された異常原因を不揮発的に記憶する記憶手段を備えていれば、当該記憶手段の記憶内容を後に解析処理を行うときに役立てることができる。   If the storage means for storing the estimated cause of abnormality in a non-volatile manner is provided as in the seventh aspect of the invention, the storage contents of the storage means can be used later when performing analysis processing.

本発明の一実施形態に係る電気的構成を概略的に示すブロック図1 is a block diagram schematically showing an electrical configuration according to an embodiment of the present invention. マイコンの信号入力部分の電気的構成を示すブロック図(センサ信号の入力数が多数の場合)Block diagram showing the electrical configuration of the signal input part of the microcomputer (when the number of sensor signal inputs is large) マイコンの信号入力部分の電気的構成を示すブロック図(スイッチ信号の入力数が多数の場合)Block diagram showing the electrical configuration of the signal input part of the microcomputer (when the number of switch signal inputs is large) マイコンの信号入力部分の電気的構成を示すブロック図(センサ信号、スイッチ信号の入力数が同数の場合)Block diagram showing the electrical configuration of the signal input part of the microcomputer (when the number of sensor signals and switch signals input is the same) マイコンの信号入力部分の詳細回路の一例を示す図The figure which shows an example of the detailed circuit of the signal input part of the microcomputer 全体的な処理の流れを示すフローチャートFlow chart showing the overall processing flow AD変換ブロックの異常検出処理の流れを示すフローチャートFlowchart showing the flow of AD detection block abnormality detection processing AD変換ブロックの異常検出処理の説明図Explanatory drawing of abnormality detection processing of AD conversion block デジタル信号処理ブロックの異常検出処理の流れを示すフローチャートFlowchart showing the flow of abnormality detection processing of the digital signal processing block 異常判別処理の流れを示すフローチャートFlow chart showing the flow of abnormality determination processing 異常モードと異常検出内容を示す説明図(その1)Explanatory diagram showing abnormality mode and abnormality detection contents (1) 異常モードと異常検出内容を示す説明図(その2)Explanatory drawing which shows abnormal mode and abnormal detection contents (the 2) 異常モードと異常検出内容を示す説明図(その3)Explanatory diagram showing abnormality mode and abnormality detection (Part 3) 異常モードと異常検出内容を示す説明図(その4)Explanatory drawing which shows abnormality mode and abnormality detection contents (the 4)

以下、本発明の一実施形態について図面を参照しながら説明する。図1に示すように、エンジンECU1は、水温センサS1,電子スロットル開度センサS2、などの各種センサのセンサ信号Sをアナログ入力端子AIa,AIb…を通じて入力すると共に、イグニッションスイッチSW1、シフトポジションスイッチSW2、などの各種スイッチ信号SWをデジタル入力端子DIa,DIb…を通じて入力する。なお、センサ信号Sは、アクセルペダルセンサ、吸入空気量センサ、油温センサなどの各種センサの信号を用いても良い。また、スイッチ信号SWはスタータスイッチ、ブレーキスイッチ、エアコンスイッチ、などの各種スイッチの信号を用いても良い。   Hereinafter, an embodiment of the present invention will be described with reference to the drawings. As shown in FIG. 1, the engine ECU 1 inputs sensor signals S of various sensors such as a water temperature sensor S1 and an electronic throttle opening sensor S2 through analog input terminals AIa, AIb..., An ignition switch SW1, and a shift position switch. Various switch signals SW such as SW2 are input through digital input terminals DIa, DIb. As the sensor signal S, signals from various sensors such as an accelerator pedal sensor, an intake air amount sensor, and an oil temperature sensor may be used. Further, as the switch signal SW, signals of various switches such as a starter switch, a brake switch, and an air conditioner switch may be used.

イグニッションスイッチSW1は、OFF(エンジンオフ),ON(エンジンオン)等の切換えを示す。シフトポジションスイッチSW2は、P(パーキング),R(リバース),D(ドライブ),N(ニュートラル),2(セカンド),L(ロウ)等の切換え状態を示す。   The ignition switch SW1 indicates switching such as OFF (engine off) or ON (engine on). The shift position switch SW2 indicates a switching state of P (parking), R (reverse), D (drive), N (neutral), 2 (second), L (low), and the like.

エンジンECU1には、マイクロコンピュータ(以下、マイコン)2が搭載されると共に、マイコン2の周辺I/O回路が実装されている。マイコン2の周辺I/O回路は、センサ信号Sの入力回路CINa、スイッチ信号SWの入力回路CINb、バッファ回路B1,B2、出力ドライバDR1,DR2などである。   The engine ECU 1 includes a microcomputer (hereinafter referred to as a microcomputer) 2 and a peripheral I / O circuit of the microcomputer 2. The peripheral I / O circuit of the microcomputer 2 is an input circuit CINa for the sensor signal S, an input circuit CINb for the switch signal SW, buffer circuits B1 and B2, output drivers DR1 and DR2, and the like.

センサ信号Sは、入力回路CINaを通じてマイコン2に入力される。このマイコン2は、通常のCPU(推定手段)100と共に複数のAD変換器3とポート入力回路4などを内蔵し、AD変換器3のAD変換値と、ポート入力回路4のポート入力値とを用いてエンジン制御のための演算処理を行い、噴射、点火、電子スロットル開度制御、ダイアグノーシス処理などを実行し、これらの演算処理結果、制御処理結果に基づいてインジェクタO1、O2、などのアクチュエータを駆動する。   The sensor signal S is input to the microcomputer 2 through the input circuit CINa. This microcomputer 2 incorporates a plurality of AD converters 3 and a port input circuit 4 and the like together with a normal CPU (estimating means) 100, and converts the AD conversion value of the AD converter 3 and the port input value of the port input circuit 4. Are used to perform arithmetic processing for engine control, execute injection, ignition, electronic throttle opening control, diagnosis processing, etc., and actuators such as injectors O1, O2 based on these arithmetic processing results and control processing results Drive.

図2〜図4はマイコンの信号入力部の詳細構成例を示す。図2〜図4に示すように、マイコン2内にはバス5が構成されている。このバス5には、複数のAD変換器3、複数のポート入力回路4がそれぞれ接続されている。説明の便宜上、複数のAD変換器3にそれぞれ符号3a,3bを付し、複数のポート入力回路4にそれぞれ符号4a〜4d,4e〜4hを付して説明を行う。   2 to 4 show detailed configuration examples of the signal input unit of the microcomputer. As shown in FIGS. 2 to 4, a bus 5 is configured in the microcomputer 2. A plurality of AD converters 3 and a plurality of port input circuits 4 are connected to the bus 5. For convenience of explanation, the plurality of AD converters 3 are respectively denoted by reference numerals 3a and 3b, and the plurality of port input circuits 4 are respectively denoted by reference numerals 4a to 4d and 4e to 4h.

AD変換器3aのアナログ入力にはマルチプレクサ6aが接続されている。このマルチプレクサ6aは、センサS1〜S4のセンサ信号Saについて、アナログ入力端子AI0〜AI3および入力回路を通じて入力し、これらのセンサ信号Saのうち何れか1のセンサ信号を選択しAD変換器3aに出力する。AD変換器3aはこのセンサ信号をAD変換する。   A multiplexer 6a is connected to the analog input of the AD converter 3a. The multiplexer 6a inputs the sensor signals Sa of the sensors S1 to S4 through the analog input terminals AI0 to AI3 and the input circuit, selects any one of these sensor signals Sa, and outputs it to the AD converter 3a. To do. The AD converter 3a AD converts this sensor signal.

ポート入力回路4a〜4dは、それぞれポートレジスタ(図示せず)を内蔵し、スイッチSW1〜SW4のスイッチ信号SWについて、デジタル入力端子DI0〜DI3および入力回路を通じて入力し、これらのスイッチ信号SWをそれぞれ比較器(後述参照)と比較してデジタル信号とし、ポート入力値として保持する。   Each of the port input circuits 4a to 4d incorporates a port register (not shown), and inputs the switch signals SW of the switches SW1 to SW4 through the digital input terminals DI0 to DI3 and the input circuit, respectively. Compared with a comparator (described later), it is converted into a digital signal and held as a port input value.

AD変換器3bのアナログ入力にはマルチプレクサ(切換スイッチ相当)6bが接続されている。このマルチプレクサ6bは、ECUコネクタにおけるアナデジ兼用入力端子ADI0〜ADI3およびマイコン入力端子ADIN0〜ADIN3を通じてセンサS5〜S8のセンサ信号Sbが入力されると、これらのセンサ信号Sbのうち何れか1のセンサ信号を選択しAD変換器3bに出力する。   A multiplexer (equivalent to a changeover switch) 6b is connected to the analog input of the AD converter 3b. The multiplexer 6b receives any one of the sensor signals Sb when the sensor signals Sb of the sensors S5 to S8 are input through the analog input / output terminals ADI0 to ADI3 and the microcomputer input terminals ADIN0 to ADIN3 in the ECU connector. Is output to the AD converter 3b.

ポート入力回路4e〜4hは、それぞれポートレジスタ(図5のボートレジスタ150〜153参照)を内蔵し、それぞれアナデジ兼用入力端子ADI0〜ADI3への入力信号が入力される。マルチプレクサ6bおよびAD変換器3bがAD変換ブロックABを構成し、ポート入力回路4e〜4hがデジタル信号処理ブロックDBを構成する。   The port input circuits 4e to 4h each have a built-in port register (see the boat registers 150 to 153 in FIG. 5), and input signals are input to the analog-purpose input terminals ADI0 to ADI3, respectively. The multiplexer 6b and the AD converter 3b constitute an AD conversion block AB, and the port input circuits 4e to 4h constitute a digital signal processing block DB.

マイコン入力端子ADIN0〜ADIN3は、アナログ信号、デジタル信号の双方を入力可能なアナデジ兼用入力端子になっている。マイコン入力端子ADIN0〜ADIN3にはセンサ、スイッチの何れを接続しても良い。したがって、図3に示すように、マイコン入力端子ADIN0〜ADIN3に対し、センサS5〜S6に代えてスイッチSW5〜SW8を接続しても良い。これらのスイッチSW5〜SW8からスイッチ信号SWbが入力されると、ポート入力回路4e〜4hのポートレジスタ150〜153(図5参照)にスイッチ信号SWbの情報を記憶保持できる。   The microcomputer input terminals ADIN0 to ADIN3 are analog / digital input terminals capable of inputting both analog signals and digital signals. Either a sensor or a switch may be connected to the microcomputer input terminals ADIN0 to ADIN3. Therefore, as shown in FIG. 3, switches SW5 to SW8 may be connected to the microcomputer input terminals ADIN0 to ADIN3 instead of the sensors S5 to S6. When the switch signal SWb is input from these switches SW5 to SW8, the information of the switch signal SWb can be stored and held in the port registers 150 to 153 (see FIG. 5) of the port input circuits 4e to 4h.

また、図4に示すように、例えばセンサS5,S6、スイッチSW5,SW6を接続しても良い。すなわち、これらのマイコン入力端子ADIN0〜ADIN3の用途の割当を例えば車種毎、自動車のグレード毎に変更することで、該当種別間でマイコン2を共用しながら、センサS5〜S8又はスイッチSW5〜SW8を選択して接続できる。   Also, as shown in FIG. 4, for example, sensors S5 and S6 and switches SW5 and SW6 may be connected. That is, by changing the assignment of the use of these microcomputer input terminals ADIN0 to ADIN3 for each vehicle type and each vehicle grade, for example, the sensors S5 to S8 or the switches SW5 to SW8 are used while the microcomputer 2 is shared among the corresponding types. You can select and connect.

図5に詳細な回路構成例を示す。各マイコン入力端子ADIN0〜ADIN3には、それぞれ、ダイオードを組み合わせた入力保護回路70〜73が接続されている。この入力保護回路70〜73の後段にはアナログスイッチ80〜83がそれぞれ接続されている。   FIG. 5 shows a detailed circuit configuration example. The microcomputer input terminals ADIN0 to ADIN3 are connected to input protection circuits 70 to 73, respectively, in which diodes are combined. Analog switches 80 to 83 are connected to the subsequent stages of the input protection circuits 70 to 73, respectively.

図2〜図4に示すマルチプレクサ6bはこのアナログスイッチ80〜83を組み合わせて構成され、これらのアナログスイッチ80〜83の出力は互いに共通接続されている。この共通接続ノードは寄生容量9を通じてバッファ10に与えられている。寄生容量9はアナログスイッチ80〜83等に生じる寄生容量成分であり、図1に図示される入力回路CINaのコンデンサ容量よりもはるかに小さい。   The multiplexer 6b shown in FIGS. 2 to 4 is configured by combining the analog switches 80 to 83, and the outputs of these analog switches 80 to 83 are commonly connected to each other. This common connection node is given to the buffer 10 through the parasitic capacitance 9. The parasitic capacitance 9 is a parasitic capacitance component generated in the analog switches 80 to 83 and the like, and is much smaller than the capacitor capacitance of the input circuit CINa illustrated in FIG.

このバッファ10の出力は、スイッチ11を通じてサンプルホールド回路12に与えられ、このサンプルホールド回路12がホールドしたデータをADコンバータ13がAD変換処理する。寄生容量9の両端には当該蓄積電荷を放電するための初期化スイッチ14が設けられている。本実施形態において寄生容量9はこの初期化スイッチ14によって一般にグランド電位に初期化される。なお回路構成を変更することで電源VDD側の電位に初期化するように構成しても良い。   The output of the buffer 10 is given to the sample hold circuit 12 through the switch 11, and the AD converter 13 subjects the data held by the sample hold circuit 12 to AD conversion processing. An initialization switch 14 for discharging the accumulated charge is provided at both ends of the parasitic capacitor 9. In this embodiment, the parasitic capacitance 9 is generally initialized to the ground potential by the initialization switch 14. Note that the circuit configuration may be changed to be initialized to the potential on the power supply VDD side.

ポート入力回路4e〜4hは、それぞれ比較器(比較手段)140〜143を備え、入力端子ADIN0〜ADIN3に入力した信号を閾値電圧Vth(例えば電源電圧VDDの1/2=2.5V)と比較し、これらの比較データをそれぞれポートレジスタ150〜153に保持する。また、マイコン2には、AD異常カウンタ160〜163、ポート異常カウンタ170〜173が搭載されている。   Each of the port input circuits 4e to 4h includes comparators (comparison means) 140 to 143, and compares a signal input to the input terminals ADIN0 to ADIN3 with a threshold voltage Vth (for example, 1/2 of the power supply voltage VDD = 2.5V). These comparison data are held in the port registers 150 to 153, respectively. Further, the microcomputer 2 is equipped with AD abnormality counters 160 to 163 and port abnormality counters 170 to 173.

AD異常カウンタ160〜163は、センサ信号Sが正常範囲内に収まっていない状態をカウントするため、チャンネルch10〜ch13毎に予め設けられたカウンタである。また、ポート異常カウンタ170〜173は、スイッチ信号SWを正常に検出不能な状態をカウントするため、チャンネルch10〜ch13毎に予め設けられたカウンタである。ここでは、4チャンネルの例を示したが、16チャンネルなどでも同様に実行でき、チャンネル数は各実施形態の内容に限定されるものではない。   The AD abnormality counters 160 to 163 are counters provided in advance for each of the channels ch10 to ch13 in order to count the state where the sensor signal S is not within the normal range. The port abnormality counters 170 to 173 are counters provided in advance for each of the channels ch10 to ch13 in order to count a state in which the switch signal SW cannot be normally detected. Here, an example of four channels is shown, but the same can be executed with 16 channels, and the number of channels is not limited to the contents of each embodiment.

以下、動作説明を行う。CPU100は例えば4msのタイマ割込みを利用し、図6に示す信号入力処理を実行する。このとき、マイコン2内でCPU100は、まずポート入力回路4e〜4hのポートレジスタ150〜153の保持値をリードする(S1)。また、AD変換器3bを用いて、マルチプレクサ6bを通じて入力したアナログ信号のAD変換値を取得する(S2)。この際、マルチプレクサ6bの入力を切換え、全ての入力(AD10〜AD13)のAD変換処理が終了するまで繰り返す(S3)。   The operation will be described below. The CPU 100 executes a signal input process shown in FIG. 6 by using, for example, a 4 ms timer interrupt. At this time, in the microcomputer 2, the CPU 100 first reads values held in the port registers 150 to 153 of the port input circuits 4e to 4h (S1). Further, the AD converter 3b is used to acquire the AD conversion value of the analog signal input through the multiplexer 6b (S2). At this time, the input of the multiplexer 6b is switched, and the process is repeated until the AD conversion processing for all the inputs (AD10 to AD13) is completed (S3).

そして、CPU100は、この結果を用いて異常検出処理(その1:S4)、異常検出処理(その2:S5)、異常推定処理(S6)、入力ポート値、AD変換値を用いたアプリケーション制御を行う(S7)。このアプリケーション制御では、噴射、点火、電子スロットル開度制御などを行う。   Then, using this result, the CPU 100 performs application control using the abnormality detection process (part 1: S4), the abnormality detection process (part 2: S5), the abnormality estimation process (S6), the input port value, and the AD conversion value. Perform (S7). In this application control, injection, ignition, electronic throttle opening degree control, etc. are performed.

ステップS4の異常検出処理(その1)では図7に示す処理を実行する。この図7に示す処理は、チャンネル(ch10〜ch13)毎に実行される処理である。この処理では、各チャンネルに異常があるか否かを判定している。   In the abnormality detection process (No. 1) in step S4, the process shown in FIG. 7 is executed. The process shown in FIG. 7 is a process executed for each channel (ch10 to ch13). In this process, it is determined whether or not each channel has an abnormality.

まず、CPU100は、対象となるチャンネルch1* (*は0〜3の何れか)がアナログ信号入力又はデジタル信号入力の何れに割当てられているか確認する(T1)。なお、この割当状態は、前述したように車種、グレードなどのエンジンシステムに応じて変化するもので予め定められている。   First, the CPU 100 checks whether the target channel ch1 * (* is any of 0 to 3) is assigned to an analog signal input or a digital signal input (T1). Note that this allocation state is determined in advance so as to change according to the engine system such as the vehicle type and grade as described above.

マイコン2は、チャンネルch1*がアナログ信号入力に割当てられていると判定したときには(T1:YES)、このアナログ入力値のAD変換値が、所定の低閾値L以上で且つ高閾値H以下の正常入力範囲であるか否かを判定する(T2)。ここで、低閾値Lがアナログ入力値0.5Vに対応したデジタル値に設定され、高閾値Hがアナログ入力値4.5Vに対応したデジタル値に設定されていると、センサ信号Sが入力正常範囲0.5V〜4.5V内の信号となっているか否かを判定できる。   When the microcomputer 2 determines that the channel ch1 * is assigned to the analog signal input (T1: YES), the analog conversion value of the analog input value is not less than a predetermined low threshold L and not higher than the high threshold H. It is determined whether or not the input range (T2). Here, if the low threshold L is set to a digital value corresponding to the analog input value 0.5V and the high threshold H is set to a digital value corresponding to the analog input value 4.5V, the sensor signal S is input normally. It can be determined whether or not the signal is in the range of 0.5V to 4.5V.

センサ信号Sの正常入力範囲は、回路の動作電源電圧(VDD)付近の電圧範囲(例えば4.51V〜5V)、又は、グランド(GND)付近の電圧範囲(例えば0〜0.49V)を除いた範囲(例えば0.5〜4.5V)に設定されている。CPU100は、正常入力範囲内であると判定したときには(T2:YES)、チャンネルch1*のAD異常カウンタ16*をクリアし(T3)、異常検出処理(その1)を終了する。   The normal input range of the sensor signal S excludes a voltage range (for example, 4.51 V to 5 V) near the circuit operating power supply voltage (VDD) or a voltage range (for example, 0 to 0.49 V) near the ground (GND). Range (for example, 0.5 to 4.5 V). When the CPU 100 determines that it is within the normal input range (T2: YES), it clears the AD abnormality counter 16 * of the channel ch1 * (T3) and ends the abnormality detection process (part 1).

マイコン2は、センサ信号Sの値が正常入力範囲内ではないと判定したときには(T2:NO)、チャンネルch1*のAD異常カウンタ16*をカウントアップする(T4)。そして、AD異常カウンタ16*が異常判定値(例えば10)を上回ったときに(T5:YES)、何らかの異常を生じていると判定する。そしてCPU100は異常内容の判別処理を行う。まず、チャンネルch1*のAD変換値が低閾値Lを下回り、且つ、チャンネルch1*のポートレジスタ値がHレベルであるか否かを判定する(T6)。   When the microcomputer 2 determines that the value of the sensor signal S is not within the normal input range (T2: NO), the microcomputer 2 counts up the AD abnormality counter 16 * of the channel ch1 * (T4). Then, when the AD abnormality counter 16 * exceeds the abnormality determination value (for example, 10) (T5: YES), it is determined that some abnormality has occurred. Then, the CPU 100 performs an abnormality content determination process. First, it is determined whether or not the AD conversion value of the channel ch1 * is below the low threshold L and the port register value of the channel ch1 * is at the H level (T6).

すなわち、図5に示す回路で説明すると、比較器14*(*=0〜3)の比較対象の閾値電圧Vthが2.5Vに設定されているときには、正常時にAD変換値が0.5Vであるときには、ポートレジスタ15*(*=0〜3)には本来Lレベルに対応したデジタル値が保持される。しかし、AD変換値が0.5V未満に対応したデジタル値であるにも関わらず、チャンネルch1*のポートレジスタ値がHレベルに対応したデジタル値となる場合には、チャンネルch1*のアナログスイッチ8*(*=0〜3)がオープン異常を生じていると推定できる。したがって、CPU100はステップT6の条件を満たす(T6:YES)ときに、マルチプレクサ6b(特にチャンネルch1*のアナログスイッチ8*)にオープン異常を生じていると推定する(T7)。このとき、CPU100はアナログスイッチ異常フラグをオンする。   That is, in the circuit shown in FIG. 5, when the threshold voltage Vth to be compared by the comparator 14 * (* = 0 to 3) is set to 2.5V, the AD conversion value is 0.5V in the normal state. In some cases, the port register 15 * (* = 0 to 3) originally holds a digital value corresponding to the L level. However, if the AD register value is a digital value corresponding to less than 0.5 V, but the port register value of the channel ch1 * is a digital value corresponding to the H level, the analog switch 8 of the channel ch1 * It can be estimated that * (* = 0 to 3) has an open abnormality. Therefore, when the condition of step T6 is satisfied (T6: YES), the CPU 100 estimates that an open abnormality has occurred in the multiplexer 6b (particularly the analog switch 8 * of the channel ch1 *) (T7). At this time, the CPU 100 turns on the analog switch abnormality flag.

また、全てのチャンネルch10〜ch13のAD変換値の互いの最大値(MAX値)−最小値(MIN値)が閾値D(例えば0.5V)未満であるときには(T8:YES)、AD変換ブロックABのうちの出力側回路(アナログスイッチ8*の後段回路:AD変換器3b)に異常があると推定する(T9)。   Further, when the mutual maximum value (MAX value) −minimum value (MIN value) of the AD conversion values of all the channels ch10 to ch13 is less than a threshold D (for example, 0.5 V) (T8: YES), the AD conversion block It is estimated that there is an abnormality in the output side circuit (analog switch 8 * subsequent circuit: AD converter 3b) of AB (T9).

AD変換ブロックABの出力側回路に異常を生じるときには、例えば図5に示すバッファ10の内部異常、電源短絡異常、グランド短絡異常や、AD変換値格納レジスタのbit固着などが原因として考えられる。このような場合、図8に示すように、全てのチャンネルch10〜ch13でほぼ同じAD変換値が得られることが多い。したがって、これらの値のMAX値とMIN値の差分が、ある微小範囲(図8に示す例では0.5V未満)に収まっているか否かを判定し、AD変換器3b等に異常を生じているか否かを判断すると良い。   When an abnormality occurs in the output side circuit of the AD conversion block AB, it may be caused by, for example, an internal abnormality of the buffer 10 shown in FIG. 5, a power supply short circuit abnormality, a ground short circuit abnormality, or a fixed bit of the AD conversion value storage register. In such a case, almost the same AD conversion value is often obtained for all channels ch10 to ch13, as shown in FIG. Therefore, it is determined whether or not the difference between the MAX value and the MIN value of these values is within a certain minute range (less than 0.5 V in the example shown in FIG. 8), and an abnormality occurs in the AD converter 3b and the like. It is good to judge whether or not.

ここで、閾値Dを例えば0.5Vに設定している理由は、グランド短絡、電源短絡、など正常入力範囲外で一定となることが多いためであり、電源オフセット、リーク電流オフセットなどの判定マージンが0.5Vであることから、このマージン値に基づいて0.5Vに設定する。ステップT8において、当該条件を満たしているときには(T8:YES)、AD変換器の異常であると推定し(T9)、AD出力異常フラグをオンする。一方、当該条件を満たしていないと判定したときには(T8:NO)、チャンネルch1*の入力回路CIN*又は入力信号源の異常であると推定し(T10)、入力回路異常フラグをオンする。   Here, the reason why the threshold value D is set to 0.5 V, for example, is that the threshold value D is often constant outside the normal input range such as a ground short circuit and a power supply short circuit, and a determination margin such as a power supply offset and a leakage current offset. Is set to 0.5 V based on this margin value. In step T8, when the condition is satisfied (T8: YES), it is estimated that the AD converter is abnormal (T9), and the AD output abnormality flag is turned on. On the other hand, when it is determined that the condition is not satisfied (T8: NO), it is estimated that the input circuit CIN * or the input signal source of the channel ch1 * is abnormal (T10), and the input circuit abnormality flag is turned on.

マイコン2は、図7の異常検出処理(その1)を終了した後、異常検出処理(その2)を実行する(S5)。図9に示す異常検出処理(その2)では、ポート入力回路4e〜4hの異常検出処理を行っている。マイコン2は、チャンネルch1*がポート入力に割当てられているか否かを判定し(U1)、割当てられていないときには処理を抜ける。   The microcomputer 2 executes the abnormality detection process (part 2) after completing the abnormality detection process (part 1) in FIG. 7 (S5). In the abnormality detection process (part 2) shown in FIG. 9, the abnormality detection process of the port input circuits 4e to 4h is performed. The microcomputer 2 determines whether or not the channel ch1 * is assigned to the port input (U1), and when it is not assigned, the process exits.

マイコン2は、チャンネルch1*がポート入力に割当てられていると判断すると、チャンネルch1*のAD変換値が高閾値HHを上回っているか否か(U2)、低閾値LLを下回っているか否か(U3)を判定する。例えば、高閾値HHは3.5Vに対応するデジタル値、低閾値LLは1.5Vに対応するデジタル値に設定されている。これらの高閾値HH及び低閾値LLは、マイコン2のポート入力のDCスペックの電気的特性に基づいて設定されている。高閾値HHはポート入力(ポートレジスタ値)が必ずHレベルとなる入力電圧の最小値(MIN値)を示すものであり、低閾値LLはポート入力が必ずLレベルとなる入力電圧の最大値(MAX値)を示すものである。   If the microcomputer 2 determines that the channel ch1 * is assigned to the port input, whether the AD conversion value of the channel ch1 * is higher than the high threshold HH (U2) and whether it is lower than the low threshold LL ( U3) is determined. For example, the high threshold HH is set to a digital value corresponding to 3.5V, and the low threshold LL is set to a digital value corresponding to 1.5V. These high threshold HH and low threshold LL are set based on the electrical characteristics of the DC specifications of the port input of the microcomputer 2. The high threshold value HH indicates the minimum value (MIN value) of the input voltage at which the port input (port register value) is always at the H level, and the low threshold value LL is the maximum value of input voltage at which the port input is always at the L level ( MAX value).

マイコン2は、ステップU2,U3の何れの条件も満たしていないと判断すると(U2,U3でNO)処理を抜けるが、例えばチャンネルch1*のAD変換値が高閾値HHを上回っていると判断すると(U2:YES)、チャンネルch1*のポートレジスタ15*の保持レベルがHレベルであるか否かを判定する(U4)。そして、ポートレジスタ15*の保持レベルがHレベルである(U4:YES)ときには、ポート異常カウンタ17*をクリアして(U5)処理を抜ける。   If the microcomputer 2 determines that neither of the conditions of steps U2 and U3 is satisfied (NO in U2 and U3), the microcomputer 2 exits the process, but determines that the AD conversion value of the channel ch1 * exceeds the high threshold value HH, for example. (U2: YES), it is determined whether or not the holding level of the port register 15 * of the channel ch1 * is H level (U4). When the holding level of the port register 15 * is H level (U4: YES), the port abnormality counter 17 * is cleared (U5) and the process is exited.

しかし、ポートレジスタ15*の保持レベルがHレベルではないときには(U4:NO)、チャンネルch1*のポート異常カウンタ17*をカウントアップし(U6)、チャンネルch1*のポート異常カウンタ17*が異常判定値(例えば10)を超えたときに(U7:YES)、チャンネルch1*のポート入力回路を異常であると判断(推定)し(U8)、ポート入力回路異常フラグをオンする。   However, when the holding level of the port register 15 * is not H level (U4: NO), the port abnormality counter 17 * of the channel ch1 * is counted up (U6), and the port abnormality counter 17 * of the channel ch1 * is determined to be abnormal. When the value (for example, 10) is exceeded (U7: YES), it is determined (estimated) that the port input circuit of channel ch1 * is abnormal (U8), and the port input circuit abnormality flag is turned on.

すなわち、チャンネルch1*がポート入力に割当てられている条件下において、AD変換値が高閾値HHを超えるもののポートレジスタ15*の保持値がHレベルになっていないときに、ポート異常カウンタ17*がカウントアップされ、このポート異常カウンタ17*の保持値が異常判定値を超えると、チャンネルch1*のポート入力回路が異常と判断されるようになる。   That is, under the condition that the channel ch1 * is assigned to the port input, when the AD conversion value exceeds the high threshold value HH, but the retained value of the port register 15 * is not H level, the port abnormality counter 17 * is When the count is incremented and the held value of the port abnormality counter 17 * exceeds the abnormality determination value, the port input circuit of the channel ch1 * is determined to be abnormal.

他方、CPU100はステップU3においてチャンネルch1*のポートレジスタ15*の保持レベルがLレベルであるか否かを判定するが、ポートレジスタ15*の保持レベルがLレベルであるときには正常動作していると判断し、ポート異常カウンタ17*をクリアして(U10)処理を抜ける。しかし、ポートレジスタ15*の保持レベルがLレベルではないときには、前述のステップU6〜U8の処理を行う。   On the other hand, the CPU 100 determines in step U3 whether or not the holding level of the port register 15 * of the channel ch1 * is L level. If the holding level of the port register 15 * is L level, the CPU 100 is operating normally. Judgment is made, the port abnormality counter 17 * is cleared (U10), and the process is exited. However, when the holding level of the port register 15 * is not the L level, the above-described steps U6 to U8 are performed.

すなわち、チャンネルch1*がポート入力に割当てられている条件下で、AD変換値が低閾値LLを下回るもののポートレジスタ15*の保持値がLレベルになっていないときに、ポート異常カウンタ17*がカウントアップされ、このポート異常カウンタ17*の保持値が異常判定値を超えると、チャンネルch1*のポート入力回路が異常と判断されるようになる。   That is, when the channel ch1 * is assigned to the port input and the AD conversion value is lower than the low threshold LL, but the held value of the port register 15 * is not L level, the port abnormality counter 17 * is When the count is incremented and the held value of the port abnormality counter 17 * exceeds the abnormality determination value, the port input circuit of the channel ch1 * is determined to be abnormal.

CPU100は、図6に示すように、異常検出処理(その2)を終了した後、異常判別処理を実行する(S6)。図10に示す異常判別処理では異常原因の判別を行うと共に、この判別された異常原因に対応したダイアグノーシスによる異常信号の出力およびフェールセーフ処理(又はフェールソフト処理)を行う。   As shown in FIG. 6, after completing the abnormality detection process (part 2), the CPU 100 executes an abnormality determination process (S6). In the abnormality determination process shown in FIG. 10, the cause of the abnormality is determined, and an abnormality signal output and fail-safe process (or fail software process) corresponding to the determined abnormality cause is performed.

CPU100は、AD変換ブロックABの出力側回路すなわちAD変換器3bに異常があることでAD出力異常フラグがオンとなっているか(V1)、入力回路CIN*又は入力信号源に異常があることで入力回路異常フラグがオンとなっているか(V2)、マルチプレクサ6b(アナログスイッチ8*)に異常があることでアナログスイッチ異常フラグがオンとなっているか(V3)、ポート入力回路に異常があることでポート入力回路異常フラグがオンとなっているか(V4)の異常内容の判別を行う。   The CPU 100 determines that the AD output abnormality flag is on due to an abnormality in the output side circuit of the AD conversion block AB, that is, the AD converter 3b (V1), or that the input circuit CIN * or the input signal source is abnormal. Whether the input circuit abnormality flag is on (V2), the multiplexer 6b (analog switch 8 *) is abnormal, the analog switch abnormality flag is on (V3), or the port input circuit is abnormal To determine whether the port input circuit abnormality flag is on (V4).

マイコン2は、これらの異常内容に応じたダイアグノーシスによる異常信号(ダイアグ信号)を出力し(V5〜V8)、また、これらの異常内容に対応したフェールセーフ処理又はフェールソフト処理を行う(V9〜V12)。AD変換器3bに異常が存在することを判断したときには、センサ信号Sが入力不能になるため、ステップV9においてエンジンを安全に停止させるための処理を実行する。   The microcomputer 2 outputs an abnormality signal (diagnosis signal) due to diagnosis according to these abnormal contents (V5 to V8), and performs fail-safe processing or fail soft processing corresponding to these abnormal contents (V9 to V9). V12). When it is determined that there is an abnormality in the AD converter 3b, the sensor signal S cannot be input. Therefore, in step V9, a process for safely stopping the engine is executed.

また、入力回路CIN*又は入力信号源の異常、アナログスイッチ8*の異常の場合には、該当チャンネルch1*の異常状態(センサおよびアナログスイッチを含む入力回路の異常)をユーザに報知し、その他のセンサ信号Sおよびスイッチ信号SWを用いてエンジン制御を行うように処理を実行する。異常処理の該当チャンネルch1*が、電子スロットル開度センサS2などの重要なセンサに割当てられているときには、退避走行モードなどのモードに移行し、安全に走行を持続して安全停止するための処理を行う。   If the input circuit CIN * or input signal source is abnormal or the analog switch 8 * is abnormal, the channel CH1 * abnormal state (abnormality of the input circuit including the sensor and analog switch) is notified to the user. The processing is executed so as to perform engine control using the sensor signal S and the switch signal SW. When the corresponding channel ch1 * of the abnormal process is assigned to an important sensor such as the electronic throttle opening sensor S2, the process for shifting to a mode such as the evacuation travel mode and continuing the travel safely and stopping safely I do.

他方、チャンネルch1*のポート入力回路に異常が発生していることでポート入力回路異常フラグがオンとなっているとき(V4:YES)には、ダイアグ信号を出力した(V8)上で、ポート入力回路の異常時の代用処理を行う(V12)。すなわち、該当チャンネルch1*のAD変換値を電源電圧VDDの1/2に対応したデジタル値と比較し(V12a)、論理レベル(H/L)を判定しポート入力値として代用する(V12b,V12c)。   On the other hand, when the port input circuit error flag is on (V4: YES) because an error has occurred in the port input circuit of channel ch1 * (V8: YES), the port is set on the output of the diagnosis signal (V8). Substitute processing is performed when the input circuit is abnormal (V12). That is, the AD conversion value of the corresponding channel ch1 * is compared with a digital value corresponding to 1/2 of the power supply voltage VDD (V12a), the logic level (H / L) is determined, and the port input value is substituted (V12b, V12c). ).

つまり、ポート入力回路4e〜4hに異常を生じたとしてもAD変換値を利用してデジタル値を取得できる。この場合、エンジン制御は通常通り継続できるため退避走行モードなどのモードに移行することなく、フェールソフトすることで通常通りの走行制御を持続できる。   That is, even if an abnormality occurs in the port input circuits 4e to 4h, the digital value can be acquired using the AD conversion value. In this case, since engine control can be continued as usual, the normal running control can be maintained by fail-softing without shifting to a mode such as the evacuation running mode.

このような異常モードと異常検出内容をまとめると図11〜図14に示すようになる。図11はデジタル信号処理ブロックDB(ポート入力回路)の異常内容を示す。また図12および図13はAD変換ブロックABの異常内容を示し、特に図12はマルチプレクサ6b(アナログスイッチ8*)のグランド短絡、電源短絡、オペアンプ10の入力短絡、の各条件における異常出力値等を示す。図13はマルチプレクサ6b(アナログスイッチ8*)のオープン異常の内容を示す。図14はマイコン入力端子ADIN0〜ADIN3より前段における電源VDD短絡、グランドGND短絡の場合の検出状態を示している。このような条件に沿って異常を判別すれば、AD変換ブロックABのAD変換値およびポートレジスタ15*の保持値の双方を参照することで、どの部分に異常を生じているかを判別できる。   Such an abnormal mode and abnormality detection contents are summarized as shown in FIGS. FIG. 11 shows abnormal contents of the digital signal processing block DB (port input circuit). 12 and 13 show the abnormal contents of the AD conversion block AB. In particular, FIG. 12 shows abnormal output values under the conditions of the ground short of the multiplexer 6b (analog switch 8 *), the power supply short, and the input short of the operational amplifier 10. Indicates. FIG. 13 shows the details of the open abnormality of the multiplexer 6b (analog switch 8 *). FIG. 14 shows a detection state in the case of the power supply VDD short circuit and the ground GND short circuit before the microcomputer input terminals ADIN0 to ADIN3. If an abnormality is determined according to such a condition, it is possible to determine which part has an abnormality by referring to both the AD conversion value of the AD conversion block AB and the held value of the port register 15 *.

本実施形態によれば、同一入力信号を入力端子ADIN0〜ADIN3に入力させた状態で得られるAD変換ブロックABの変換結果、デジタル信号処理ブロックDBの処理結果に基づいて、AD変換ブロックAB又はデジタル信号処理ブロックDB内の異常を推定できる。   According to the present embodiment, based on the conversion result of the AD conversion block AB and the processing result of the digital signal processing block DB obtained in a state where the same input signal is input to the input terminals ADIN0 to ADIN3, the AD conversion block AB or digital Abnormalities in the signal processing block DB can be estimated.

特に、チャンネルch1*がアナログ信号入力に割当てられている場合、チャンネルch1*のAD変換値が低閾値Lを下回り且つチャンネルch1*のポートレジスタ値=Hであることを条件としてマルチプレクサ6bのオープン異常であると推定している。   In particular, when channel ch1 * is assigned to an analog signal input, the multiplexer 6b open error is provided on condition that the AD conversion value of channel ch1 * is below the low threshold L and the port register value of channel ch1 * is H. It is estimated that.

また、チャンネルch1*がアナログ信号入力に割当てられている場合、マルチプレクサ6b(アナログスイッチ8*)を切換え全てのチャンネルch1*のAD変換ブロックABの変換結果が誤差範囲内に収まっていることを条件としてAD変換ブロックABの異常であると推定している。   Further, when channel ch1 * is assigned to an analog signal input, the multiplexer 6b (analog switch 8 *) is switched, and the conversion results of the AD conversion blocks AB of all the channel ch1 * are within the error range. It is estimated that the AD conversion block AB is abnormal.

また、チャンネルch1*がアナログ信号入力に割当てられている場合、AD変換ブロックABが正常に動作していると判定でき、且つ、AD変換ブロックABの変換結果が正常出力範囲を逸脱しているときには、入力回路CIN*又は入力信号源の異常と推定している。   When channel ch1 * is assigned to an analog signal input, it can be determined that the AD conversion block AB is operating normally, and the conversion result of the AD conversion block AB deviates from the normal output range. The input circuit CIN * or the input signal source is estimated to be abnormal.

また、チャンネルch1*がデジタル信号入力に割当てられている場合、AD変換ブロックABの変換結果がデジタル信号処理ブロックDBのH出力を保証する高閾値HH以上であり、且つ、デジタル信号処理ブロックDBの出力がLレベルであることを条件としてデジタル信号処理ブロックDBの異常と推定している。   When channel ch1 * is assigned to the digital signal input, the conversion result of the AD conversion block AB is equal to or higher than the high threshold value HH that guarantees the H output of the digital signal processing block DB, and the digital signal processing block DB It is estimated that the digital signal processing block DB is abnormal on the condition that the output is L level.

また、チャンネルch1*がデジタル信号入力に割当てられている場合、AD変換ブロックABの変換結果がデジタル信号処理ブロックDBのL出力を保証する低閾値LL以下であり、且つ、デジタル信号処理ブロックDBの出力がHであることを条件としてデジタル信号処理ブロックDBの異常と推定している。これらの処理に応じて、異常原因が何れのブロックに存在するか詳細に判別できる。   When the channel ch1 * is assigned to the digital signal input, the conversion result of the AD conversion block AB is equal to or lower than the low threshold LL that guarantees the L output of the digital signal processing block DB, and the digital signal processing block DB It is estimated that the digital signal processing block DB is abnormal on the condition that the output is H. According to these processes, it can be determined in detail in which block the cause of the abnormality exists.

また、チャンネルch1*がデジタル信号入力に割当てられている場合、デジタル信号処理ブロックDBに異常が生じていると推定したときには、AD変換ブロックABのAD変換値を用いてポート入力値の論理レベルを取得することでフェールソフト処理している。このため処理を継続できる。   Further, when channel ch1 * is assigned to a digital signal input, when it is estimated that an abnormality has occurred in the digital signal processing block DB, the logic level of the port input value is set using the AD conversion value of the AD conversion block AB. Fail software is processed by acquiring. Therefore, the process can be continued.

なお、制御信頼性が必要な入力信号(センサ信号S、スイッチ信号SW)については、アナログ入力の専用端子AI0〜AI3、デジタル入力の専用端子DI0〜DI3に割当てることなく、アナデジ兼用入力端子ADIN0〜ADIN3に割当てると良い。   Input signals that require control reliability (sensor signal S, switch signal SW) are not assigned to analog input dedicated terminals AI0 to AI3 and digital input dedicated terminals DI0 to DI3. Assign to ADIN3.

エンジンECU1等が前述のように推定、断定された異常原因を不揮発的に記憶する不揮発性メモリ(記憶手段)を備えるように構成しても良い。すると例えばディーラーなどが異常原因を後に解析する際に容易に分析できる。
アナデジ兼用入力端子ADIN0〜ADIN3を車種毎に切替えることで複数車種においてマイクロコンピュータ2を共用できマイコン2の品種を削減できる。
The engine ECU 1 or the like may be configured to include a nonvolatile memory (storage means) that stores the abnormal cause estimated and determined as described above in a nonvolatile manner. Then, for example, a dealer can easily analyze the cause of the abnormality later.
By switching the analog-purpose input terminals ADIN0 to ADIN3 for each vehicle type, the microcomputer 2 can be shared among a plurality of vehicle types, and the types of microcomputers 2 can be reduced.

図面中、1はエンジンECU(電子制御装置)、2はマイクロコンピュータ、6bはマルチプレクサ(切換スイッチ)、8*(80〜83)はアナログスイッチ、100はCPU(推定手段)、14*(140〜143)は比較器(比較手段)、ABはAD変換ブロック、DBはデジタル信号処理ブロック、ADIN0〜ADIN3はアナデジ兼用入力端子を示す。   In the drawings, 1 is an engine ECU (electronic control unit), 2 is a microcomputer, 6b is a multiplexer (switch), 8 * (80 to 83) is an analog switch, 100 is a CPU (estimating means), 14 * (140 to 143) is a comparator (comparison means), AB is an AD conversion block, DB is a digital signal processing block, and ADIN0 to ADIN3 are analog / digital input terminals.

Claims (8)

アナログ信号入力又はデジタル信号入力の何れかであることが予め割当てられたアナデジ兼用入力端子と、
前記アナデジ兼用入力端子を通じてアナログ信号を入力しデジタル変換するAD変換ブロックと、
前記アナデジ兼用入力端子を通じてデジタル信号を入力しH/L判別閾値と比較する比較手段の比較結果として論理レベルを取得するデジタル信号処理ブロックと、
所定の入力信号を前記アナデジ兼用入力端子を通じて前記AD変換ブロックに入力させた状態で得られる前記AD変換ブロックの変換結果、および、前記所定の入力信号と同一の入力信号を、前記アナデジ兼用入力端子を通じて前記デジタル信号処理ブロックに入力させた状態で得られる前記デジタル信号処理ブロックの処理結果に基づいて、前記AD変換ブロック又は前記デジタル信号処理ブロックの異常を推定する推定手段と、を備えたことを特徴とするマイクロコンピュータ。
An analog / digital input terminal pre-assigned to be either an analog signal input or a digital signal input;
An AD conversion block for inputting and converting an analog signal through the analog-purpose input terminal;
A digital signal processing block for obtaining a logic level as a comparison result of a comparison means for inputting a digital signal through the analog-purpose input terminal and comparing it with an H / L discrimination threshold;
A predetermined input signal, the analog digital Alternate input the conversion result of the AD conversion block obtained in a state of being input to the AD conversion block through the terminal, and, the same input signal and said predetermined input signal, the analog digital Alternate input An estimation unit for estimating an abnormality of the AD conversion block or the digital signal processing block based on a processing result of the digital signal processing block obtained in a state of being input to the digital signal processing block through a terminal. A microcomputer characterized by.
前記アナデジ兼用入力端子がアナログ信号入力であることが予め割当てられている場合、
前記アナデジ兼用入力端子の入力信号を前記AD変換ブロック側に通電切換えする切換スイッチを備えると共に、前記比較手段は前記アナデジ兼用入力端子の入力信号を直接入力して構成され、
前記推定手段は、前記アナデジ兼用入力端子の入力信号について、
前記AD変換ブロックの変換結果が正常出力範囲外で且つ前記AD変換ブロックの非動作時側の値であり、且つ、前記AD変換ブロックの非動作時の値を仮定的に前記比較手段に入力しH/L判別閾値と比較した結果の論理レベルが、前記デジタル信号処理ブロックの出力論理レベルとは逆であることを条件として、
前記切換スイッチのオープン異常であると推定することを特徴とする請求項1記載のマイクロコンピュータ。
When the analog-purpose input terminal is pre-assigned to be an analog signal input,
A switch for switching the energization of the input signal of the analog / digital input terminal to the AD conversion block side is provided, and the comparing means is configured to directly input the input signal of the analog / digital input terminal,
For the input signal of the analog / digital input terminal, the estimating means
The conversion result of the AD conversion block is outside the normal output range and is a value on the non-operating side of the AD conversion block, and the non-operating value of the AD conversion block is assumed to be input to the comparing means. On the condition that the logical level as a result of comparison with the H / L discrimination threshold is opposite to the output logical level of the digital signal processing block,
2. The microcomputer according to claim 1, wherein the microcomputer is estimated to be an open abnormality of the changeover switch.
前記アナデジ兼用入力端子がデジタル信号入力であることが予め割当てられている場合、
前記推定手段は、前記アナデジ兼用入力端子の入力信号について、
前記AD変換ブロックの変換結果が、前記デジタル信号処理ブロックのハイ(H)出力を保証する最低レベル(HH)以上であり、且つ、前記デジタル信号処理ブロックの出力がロウ(L)であるか、又は、
前記AD変換ブロックの変換結果が、前記デジタル信号処理ブロックのロウ(L)出力を保証する最高レベル(LL)以下であり、且つ、前記デジタル信号処理ブロックの出力がハイ(H)である、ことを条件として、
前記デジタル信号処理ブロックの異常と推定することを特徴とする請求項1または2記載のマイクロコンピュータ。
When the analog-purpose input terminal is pre-assigned to be a digital signal input,
For the input signal of the analog / digital input terminal, the estimating means
Whether the conversion result of the AD conversion block is equal to or higher than the minimum level (HH) that guarantees the high (H) output of the digital signal processing block, and the output of the digital signal processing block is low (L); Or
The conversion result of the AD conversion block is equal to or lower than the highest level (LL) that guarantees the low (L) output of the digital signal processing block, and the output of the digital signal processing block is high (H). Subject to
3. The microcomputer according to claim 1, wherein the microcomputer is estimated to be abnormal in the digital signal processing block.
前記アナデジ兼用入力端子がアナログ信号入力であることが予め割当てられている場合、
前記AD変換ブロックが複数のチャンネルに1つ割り当てられているときに、前記アナデジ兼用入力端子の入力信号を前記AD変換ブロック側にオンオフ切換えするアナログスイッチを複数のチャンネル毎に備え、
前記推定手段は、前記複数のチャンネルのアナログスイッチを順次切換えて全ての入力信号について前記AD変換ブロックの変換結果が誤差範囲内に収まっていることを条件として、前記AD変換ブロックの異常であると推定することを特徴とする請求項1〜3の何れかに記載のマイクロコンピュータ。
When the analog-purpose input terminal is pre-assigned to be an analog signal input,
When the AD conversion block is assigned to a plurality of channels, an analog switch for switching on / off the input signal of the analog / digital input terminal to the AD conversion block side is provided for each of the plurality of channels.
The estimation means is that the AD conversion block is abnormal on the condition that the conversion results of the AD conversion block are within an error range for all input signals by sequentially switching the analog switches of the plurality of channels. The microcomputer according to claim 1, wherein the microcomputer is estimated.
前記アナデジ兼用入力端子がアナログ信号入力であることが予め割当てられている場合、
前記アナデジ兼用入力端子の入力信号を安定化して入力させる入力回路を備え、
前記推定手段は、前記AD変換ブロックが正常に動作していると推定し、且つ、前記AD変換ブロックの変換結果がアナログ信号の正常出力範囲を逸脱しているときには、前記入力回路又は入力信号源の異常と推定することを特徴とする請求項1〜4の何れかに記載のマイクロコンピュータ。
When the analog-purpose input terminal is pre-assigned to be an analog signal input,
An input circuit for stabilizing and inputting the input signal of the analog-purpose input terminal;
The estimation means estimates that the AD conversion block is operating normally, and when the conversion result of the AD conversion block deviates from the normal output range of the analog signal, the input circuit or the input signal source The microcomputer according to claim 1, wherein the microcomputer is estimated to be abnormal.
前記アナデジ兼用入力端子がデジタル信号入力であることが予め割当てられている場合、
前記推定手段が前記デジタル信号処理ブロックに異常が生じていると推定したときには、前記AD変換ブロックのAD変換値を用いて前記論理レベルを取得することを特徴とする請求項1〜5の何れかに記載のマイクロコンピュータ。
When the analog-purpose input terminal is pre-assigned to be a digital signal input,
The logic level is acquired using an AD conversion value of the AD conversion block when the estimation means estimates that an abnormality has occurred in the digital signal processing block. A microcomputer according to 1.
前記推定手段により推定された異常原因を不揮発的に記憶する記憶手段を備えたことを特徴とする請求項1〜6の何れかに記載のマイクロコンピュータ。   The microcomputer according to any one of claims 1 to 6, further comprising storage means for storing the cause of abnormality estimated by the estimation means in a nonvolatile manner. 請求項1〜7の何れかに記載のマイクロコンピュータを搭載したことを特徴とする電子制御装置。   An electronic control device comprising the microcomputer according to claim 1.
JP2012114467A 2012-05-18 2012-05-18 Microcomputer and electronic control unit Active JP5761120B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012114467A JP5761120B2 (en) 2012-05-18 2012-05-18 Microcomputer and electronic control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012114467A JP5761120B2 (en) 2012-05-18 2012-05-18 Microcomputer and electronic control unit

Publications (2)

Publication Number Publication Date
JP2013243457A JP2013243457A (en) 2013-12-05
JP5761120B2 true JP5761120B2 (en) 2015-08-12

Family

ID=49843971

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012114467A Active JP5761120B2 (en) 2012-05-18 2012-05-18 Microcomputer and electronic control unit

Country Status (1)

Country Link
JP (1) JP5761120B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106375761A (en) * 2016-08-31 2017-02-01 北京利亚德视频技术有限公司 Signal self-adaptive decoding method and device
JP7165080B2 (en) * 2019-03-18 2022-11-02 セイコーエプソン株式会社 Physical quantity detection circuit, physical quantity sensor, electronic device, moving object, and failure diagnosis method for physical quantity sensor

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000187063A (en) * 1998-11-17 2000-07-04 Matsushita Electric Ind Co Ltd Semiconductor integrated circuit
JP5468486B2 (en) * 2010-07-26 2014-04-09 ルネサスエレクトロニクス株式会社 Semiconductor integrated circuit

Also Published As

Publication number Publication date
JP2013243457A (en) 2013-12-05

Similar Documents

Publication Publication Date Title
JP5606997B2 (en) Battery cell monitoring circuit, battery cell module, automobile equipped with battery cell module
US7504743B2 (en) Power supply control device for on-vehicle electrical loads
JP6652960B2 (en) Battery management device, battery monitoring circuit, control system
US10502786B2 (en) Vehicle including multiple analog switch monitoring system with simultaneous switch-state detection
JP5761120B2 (en) Microcomputer and electronic control unit
GB2497636A (en) Vehicle fault diagnosis system
EP1883252B1 (en) Abnormality detecting apparatus
US10003351B2 (en) Semiconductor device including analog-to-digital conversion circuit
US8717037B2 (en) Electronic control device
US20070203624A1 (en) Electronic control unit
JP4947493B2 (en) Vehicle air conditioner control device with sensor identification function
US20070150135A1 (en) Device and method for central on-board diagnosis for motor vehicles
JP2015171853A (en) Vehicle electronic control unit
JP2012093261A (en) Semiconductor circuit, semiconductor device, failure diagnosis method, and failure diagnosis program
US10664373B2 (en) Self-diagnosing microcontroller for reading correct channels of an analog-to-digital converter
JP2016135657A (en) Vehicle data storage device
JP2009145181A (en) Detection device
JP2015162102A (en) Vehicle control apparatus
JP5840532B2 (en) Fuel injection control system
WO2022113155A1 (en) Vehicular onboard control system
JP6586240B2 (en) Electronic control device and method for diagnosing connection state of electronic control device
US20200220552A1 (en) Analog-digital conversion device
JP2018128424A (en) Measurement device and on-vehicle charger
JP6806636B2 (en) Electronic control device
CN107037867A (en) Semiconductor devices and system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140723

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150213

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150224

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150330

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: 20150512

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150525

R151 Written notification of patent or utility model registration

Ref document number: 5761120

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

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