JP2009187307A - Electronic device and program - Google Patents

Electronic device and program Download PDF

Info

Publication number
JP2009187307A
JP2009187307A JP2008026886A JP2008026886A JP2009187307A JP 2009187307 A JP2009187307 A JP 2009187307A JP 2008026886 A JP2008026886 A JP 2008026886A JP 2008026886 A JP2008026886 A JP 2008026886A JP 2009187307 A JP2009187307 A JP 2009187307A
Authority
JP
Japan
Prior art keywords
terminal
signal
short
circuit
electronic device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2008026886A
Other languages
Japanese (ja)
Inventor
Tsuneharu Imaeda
恒治 今枝
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 JP2008026886A priority Critical patent/JP2009187307A/en
Publication of JP2009187307A publication Critical patent/JP2009187307A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Testing And Monitoring For Control Systems (AREA)
  • Power Sources (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a technology for detecting short-circuit even in a state where an electronic device is really used without uselessly enlarging a device configuration as an electronic device. <P>SOLUTION: In a headlight control device, an ECU monitors signal level transition in a signal passing through an input terminal which is any one terminal among a plurality of signal terminals and a signal passing through an output terminal which is a terminal adjacent to the input terminal in a short-circuit determination process (S230), then a short-circuit is determined between the input terminal and the output terminal (S260) when a transition of each signal level to which monitoring is started is synchronized for more than a previously set determination time (S250:YES). This method is achieved simply by checking a signal level in the input terminal and a signal level in the output terminal. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、複数の信号端子のうちの隣接端子間に短絡が発生していることを検出できる電子機器に関する。   The present invention relates to an electronic apparatus capable of detecting that a short circuit has occurred between adjacent terminals among a plurality of signal terminals.

上記のように、複数の信号端子が備えられてなる電子機器における隣接端子間に短絡が発生していることを検出するための技術としては、例えば、次のようなものが提案されている。   As described above, for example, the following has been proposed as a technique for detecting the occurrence of a short circuit between adjacent terminals in an electronic apparatus provided with a plurality of signal terminals.

それは、電子機器(LSI)の内部回路とそこから外部へ至る出力端子との間にテスト用の信号を外部へと出力できるようにすべくスイッチ部(切換回路)と、隣接する端子それぞれにおける信号レベルの排他的論理和をとる排他的論理和回路と、を設け、テスト用の信号を出力させた場合における排他的論理和回路による排他的論理和の結果に基づいて隣接端子間の短絡を検出する、といった技術である(特許文献1参照)。
特開平5−346451号公報
It is a switch unit (switching circuit) and a signal at each adjacent terminal so that a test signal can be output to the outside between the internal circuit of the electronic device (LSI) and the output terminal from there to the outside. An exclusive OR circuit that takes the exclusive OR of levels is provided, and when a test signal is output, a short circuit between adjacent terminals is detected based on the result of the exclusive OR by the exclusive OR circuit (See Patent Document 1).
Japanese Patent Laid-Open No. 5-346451

しかし、この技術では、電子機器としての通常の機能を発揮する構成要素の他に、隣接端子間の短絡を検出するための物理的な構成要素(スイッチ部および排他的論理和回路)を別途設ける必要があるため、電子機器としての装置構成が無用に大きくなってしまうという問題があった。   However, in this technique, in addition to the components that exhibit normal functions as electronic devices, physical components (switch unit and exclusive OR circuit) for detecting a short circuit between adjacent terminals are separately provided. Since it is necessary, there has been a problem that the device configuration as an electronic device becomes unnecessarily large.

このように装置構成が大きくなってしまうことを防止するには、上記のように別途設けるべき構成要素を、製品出荷時などにおけるテスト用として一時的にのみ設けるものとすればよいが、この場合、そのテスト後,具体的にいえば実際に使用されている状況において短絡の発生を検出することができなくなってしまう。   In order to prevent the device configuration from becoming large in this way, the components that should be separately provided as described above may be provided only temporarily for testing at the time of product shipment, etc. After the test, specifically, it becomes impossible to detect the occurrence of a short circuit in a situation where it is actually used.

本発明は、このような課題を解決するためになされたものであり、その目的は、電子機器としての装置構成を無用に大きくすることなく、また、電子機器として実際に使用されている状況においても短絡の発生を検出することができるようにするための技術を提供することである。   The present invention has been made to solve such a problem, and the object thereof is not to unnecessarily increase the device configuration as an electronic device, and in a situation where it is actually used as an electronic device. It is also to provide a technique for enabling the occurrence of a short circuit to be detected.

かかる目的を達成するために成された請求項1に記載の電子機器において、推移監視手段は、複数の信号端子のうちのいずれかの端子(以降「対象端子」という)を流通する信号と該対象端子に隣接する端子(以降「隣接端子」という)を流通する信号とにおける各信号レベルの推移を監視し、短絡判定手段は、推移監視手段により監視が開始された各信号レベルの推移が、予め設定された判定時間以上同期している場合に、対象端子および隣接端子の間に短絡が発生していると判定する。   The electronic device according to claim 1, wherein the transition monitoring unit is configured to achieve the above-described object, wherein the transition monitoring unit includes a signal flowing through one of a plurality of signal terminals (hereinafter referred to as “target terminal”) and the signal. The transition of each signal level in a signal that circulates through a terminal adjacent to the target terminal (hereinafter referred to as “adjacent terminal”) is monitored, and the short-circuit determination unit is configured to monitor the transition of each signal level that has been monitored by the transition monitoring unit. When synchronizing for a predetermined determination time or more, it is determined that a short circuit has occurred between the target terminal and the adjacent terminal.

このように短絡を判定する手法は、対象端子における信号レベルおよび隣接端子における信号レベルをチェックするといった単純な処理で実現できることから、スイッチ部および排他的論理和回路などといった物理的な構成要素を別途設けなくても、電子機器の処理の一部として実装することができる。そのため、このような電子機器によれば、端子間における短絡の発生を検出するために電子機器としての装置構成が無用に大きくなってしまうことを防止することができる。   Since the method of determining a short circuit in this way can be realized by a simple process such as checking the signal level at the target terminal and the signal level at the adjacent terminal, physical components such as a switch unit and an exclusive OR circuit are separately provided. Even if it is not provided, it can be implemented as part of the processing of the electronic device. Therefore, according to such an electronic device, it is possible to prevent the device configuration as the electronic device from becoming unnecessarily large in order to detect the occurrence of a short circuit between the terminals.

そして、上記各手段を電子機器の処理の一部として実装することによって、製品出荷時などのテスト用に限らず、そのテスト後、具体的にいえば実際に使用されている状況においても短絡の発生を検出することができるようになる。   And by implementing each of the above means as a part of the processing of the electronic device, not only for testing at the time of product shipment, but after the test, specifically, even in a situation where it is actually used, there is no short circuit. Occurrence can be detected.

ところで、請求項1に記載の電子機器において、短絡判定手段は、請求項2に記載のように、推移監視手段によって監視された各信号レベルを繰り返し取得し、取得した各信号レベルが一致している度にカウンタをインクリメントし、取得した各信号レベルが一致していなければカウンタをクリアし、カウンタが判定時間に対応して設定された閾値以上である場合に、対象端子および隣接端子の間に短絡が発生していると判定するようにしてもよい。   By the way, in the electronic device according to claim 1, the short circuit determination unit repeatedly acquires each signal level monitored by the transition monitoring unit as described in claim 2, and the acquired signal levels coincide with each other. The counter is incremented every time the acquired signal levels do not match, and the counter is cleared, and when the counter is equal to or greater than the threshold set corresponding to the determination time, it is between the target terminal and the adjacent terminal. It may be determined that a short circuit has occurred.

このような電子機器によれば、短絡検出対象となる各端子間の電位が連続して所定回数(閾値の回数)だけ一致するか否かという簡素な処理で短絡判定を実施することができる。   According to such an electronic device, the short circuit determination can be performed by a simple process of determining whether or not the potential between the terminals that are the targets of the short circuit detection continuously matches the predetermined number of times (threshold number).

さらに、請求項1または請求項2に記載の電子機器においては、請求項3に記載のように、短絡判定手段により短絡が発生していると判定された場合に、対象端子および隣接端子のうちの少なくともいずれか一方を介して流通する信号を利用した信号利用処理を実施する外部機器に対し、信号利用処理の実施を禁止すべき旨を指令する禁止指令手段を備えていてもよい。   Furthermore, in the electronic device according to claim 1 or 2, when it is determined by the short-circuit determining means that a short-circuit has occurred as described in claim 3, of the target terminal and the adjacent terminal There may be provided prohibition instruction means for instructing an external device that performs signal use processing using a signal distributed via at least one of the above to prohibit execution of the signal use processing.

このような電子機器によれば、端子間における短絡の発生によって外部機器に意図しない信号の入力があったとしても、この外部機器における処理の実施が禁止される結果、その信号を受けた処理が実施されてしまうことはない。そのため、その外部機器が意図しない信号を受けて処理を実施することによってこの外部機器(または、これを含むシステム全体)が誤作動するといったことを未然に防止することができる。   According to such an electronic device, even if an unintended signal is input to the external device due to the occurrence of a short circuit between the terminals, the execution of the processing in the external device is prohibited, and as a result, the processing that receives the signal is performed. It will never be implemented. For this reason, it is possible to prevent the external device (or the entire system including the same) from malfunctioning when the external device receives an unintended signal and performs processing.

また、請求項3に記載の電子機器において、禁止指令手段は、請求項4に記載のように、短絡判定手段により短絡が発生していると判定された場合に、信号利用処理に換えて、予め設定されたフェールセーフ処理を実施すべき旨を外部機器に対して指令するようにしてもよい。   Further, in the electronic device according to claim 3, when the prohibition instruction unit determines that the short-circuit has occurred by the short-circuit determination unit as described in claim 4, the prohibition instruction unit is replaced with a signal use process. You may make it instruct | indicate with respect to an external apparatus that the fail safe process set beforehand should be implemented.

このような電子機器によれば、短絡が発生した場合であっても、信号利用処理に換えてフェールセーフ処理を実施させるので、完全に処理が中止されることを防止することができる。   According to such an electronic device, even if a short circuit occurs, the fail-safe process is performed instead of the signal use process, so that it is possible to prevent the process from being completely stopped.

さらに、請求項1〜請求項4のいずれかに記載の電子機器においては、請求項5に記載のように、判定時間を対象端子として設定する端子毎に設定するための設定手段を備えていてもよい。   Furthermore, in the electronic device according to any one of claims 1 to 4, the electronic device according to any one of claims 1 to 4, further comprising setting means for setting the determination time for each terminal that is set as a target terminal. Also good.

このような電子機器によれば、端子の信号レベルが変化する頻度(周期)に応じて、端子の短絡を検出するまでの時間を個別に設定することができる。よって、短絡判定の精度を向上させることができる。   According to such an electronic device, it is possible to individually set the time until the short circuit of the terminal is detected according to the frequency (cycle) at which the signal level of the terminal changes. Therefore, the accuracy of short circuit determination can be improved.

また、上記課題を解決するための構成としては、請求項6に記載のように、上記請求項1〜請求項5のいずれかに記載の全ての手段として機能させるための各種処理手順をコンピュータシステムに実行させるためのプログラムとしてもよい。   Further, as a configuration for solving the above-described problem, as described in claim 6, various processing procedures for causing all of the means according to any one of claims 1 to 5 to function as a computer system. It is good also as a program for making it run.

この構成であれば、上記請求項1〜請求項5のいずれかの構成と同様の作用・効果を得ることができる。なお、上述したプログラムは、コンピュータシステムによる処理に適した命令の順番付けられた列からなるものであって、各種記録媒体や通信回線を介して各電子機器や、これを利用するユーザに提供されるものである。   If it is this structure, the effect | action and effect similar to the structure in any one of the said Claims 1-5 can be acquired. Note that the above-described program is composed of an ordered sequence of instructions suitable for processing by a computer system, and is provided to each electronic device and a user using the same via various recording media and communication lines. Is.

以下に本発明の実施形態を図面と共に説明する。
(1)全体構成
図1(a)は本発明が適用された前照灯制御装置1の概略構成を示すブロック図、図1(b)は入出力インタフェースの構成を示すブロック図である。
Embodiments of the present invention will be described below with reference to the drawings.
(1) Overall Configuration FIG. 1A is a block diagram showing a schematic configuration of a headlamp control device 1 to which the present invention is applied, and FIG. 1B is a block diagram showing a configuration of an input / output interface.

前照灯制御装置1は、図1(a)に示すように、ECU(Electronic Control Unit :電子機器)10と、例えば車高センサや舵角センサ、或いは車速センサ等の各種センサとして構成された外部機器100(図1(b)参照)と、前照灯60と、前照灯60の駆動機構55と、を備えている。   As shown in FIG. 1A, the headlight control device 1 is configured as an ECU (Electronic Control Unit: electronic device) 10 and various sensors such as a vehicle height sensor, a steering angle sensor, or a vehicle speed sensor. The external device 100 (refer FIG.1 (b)), the headlamp 60, and the drive mechanism 55 of the headlamp 60 are provided.

ECU10は、図1(a)に示すように、CPU21,ROM23,RAM25,割込コントローラ(C)27、入出力インタフェース(I/O)40、通信インタフェース(I/F)50などを備えている。このECU10においては、CPU21が、ROM23に記憶されたプログラムに従って、入出力インタフェース40や通信インタフェース50を介して、外部機器100、駆動機構55、のそれぞれと通信しつつ、各種処理を実行する。またプログラムは、端子の短絡を判定する際の判定時間を設定する設定手段を備えており、入出力インタフェース40はECU10における各種設定を入力するためのユーザインタフェース(例えばタッチパネルやキーボード等)としても利用される。   As shown in FIG. 1A, the ECU 10 includes a CPU 21, a ROM 23, a RAM 25, an interrupt controller (C) 27, an input / output interface (I / O) 40, a communication interface (I / F) 50, and the like. . In the ECU 10, the CPU 21 executes various processes in accordance with programs stored in the ROM 23 while communicating with the external device 100 and the drive mechanism 55 via the input / output interface 40 and the communication interface 50. The program also includes setting means for setting a determination time for determining a short circuit of the terminal, and the input / output interface 40 is also used as a user interface (for example, a touch panel, a keyboard, etc.) for inputting various settings in the ECU 10. Is done.

なお、CPU21が実施する処理の具体例としては、各種センサによる検出結果に基づいて鉛直方向における前照灯60の光軸の向きを制御するレベリング制御処理、各種センサによる検出結果に基づいて水平方向における前照灯60の光軸の向きを制御するスイブル制御処理、後述する短絡判定処理等が挙げられる。   As specific examples of the processing performed by the CPU 21, leveling control processing for controlling the direction of the optical axis of the headlamp 60 in the vertical direction based on detection results by various sensors, and horizontal direction based on detection results by various sensors. Swivel control processing for controlling the direction of the optical axis of the headlamp 60, short circuit determination processing described later, and the like.

入出力インタフェース40は、図1(b)に示すように、出力端子(OUT1)41と、入力端子(IN1)43と、入力端子(IN2)45と、を備えている。
出力端子41は、外部機器100に対してデータを示す信号を出力するための端子である。なお、入出力インタフェース40には、各種センサ等の数に応じて多数の外部機器が接続されているが、本実施形態ではこのうちの1つのみを図示する。
As shown in FIG. 1B, the input / output interface 40 includes an output terminal (OUT1) 41, an input terminal (IN1) 43, and an input terminal (IN2) 45.
The output terminal 41 is a terminal for outputting a signal indicating data to the external device 100. Although many external devices are connected to the input / output interface 40 in accordance with the number of various sensors and the like, only one of them is shown in the present embodiment.

入力端子43,45は、外部機器100からデータを示す信号を入力するための端子である。
割込コントローラ27は、入出力インタフェース40における入力端子43の信号レベル(HIレベルであるかLOレベルであるか)を監視し、この信号レベルが変化すると、CPU21に対して割込処理を実施するように指令を送る機能を有する。
The input terminals 43 and 45 are terminals for inputting a signal indicating data from the external device 100.
The interrupt controller 27 monitors the signal level (whether it is the HI level or the LO level) of the input terminal 43 in the input / output interface 40, and executes an interrupt process for the CPU 21 when the signal level changes. It has a function to send commands.

通信インタフェース50は、例えば通信プロトコルLIN(Local Interconnect Network)によって双方向通信を実施可能に構成されており、本実施形態においては、CPU21による演算に基づく前照灯60の光軸の向きの制御指令を前照灯60の駆動機構55に送信する処理を実施する。   The communication interface 50 is configured to be able to perform bidirectional communication, for example, by a communication protocol LIN (Local Interconnect Network). In the present embodiment, the control command for the direction of the optical axis of the headlamp 60 based on the calculation by the CPU 21. Is transmitted to the drive mechanism 55 of the headlamp 60.

前照灯60の駆動機構55は、光軸の向きの制御指令を受けて、この制御指令通りに前照灯60の光軸の向きを変更する処理を実施する。なお、CPU21が前照灯60の光軸の向きを設定する処理(レベリング制御処理、スイブル制御処理)、および駆動機構55が実際に光軸の向きを変更する処理については、周知技術であるため本実施形態における記載を省略する。   The drive mechanism 55 of the headlamp 60 receives the control command for the direction of the optical axis, and performs a process of changing the direction of the optical axis of the headlamp 60 according to the control command. Note that the processing for setting the direction of the optical axis of the headlamp 60 (leveling control processing and swivel control processing) by the CPU 21 and the processing for actually changing the direction of the optical axis by the drive mechanism 55 are known techniques. Description in this embodiment is omitted.

(2)CPU21による処理
以下に、CPU21がROM23に記憶されたプログラムに従って実行する各種処理の手順を順に説明する。
(2) Processing by CPU 21 Hereinafter, various processing procedures executed by the CPU 21 according to a program stored in the ROM 23 will be described in order.

(2−1)初期化処理
本実施形態のCPU21においては、入出力インタフェース40における特定の隣接する端子同士が短絡しているか否かを検出する短絡判定処理を実施するのであるが、この短絡判定処理に先立って初期化処理が実施される。図2(a)は初期化処理を示すフローチャートである。
(2-1) Initialization Processing In the CPU 21 of the present embodiment, short-circuit determination processing for detecting whether or not specific adjacent terminals in the input / output interface 40 are short-circuited is performed. Prior to processing, initialization processing is performed. FIG. 2A is a flowchart showing the initialization process.

初期化処理は、前照灯制御装置1が起動したとき(例えば図示しないイグニッションがON状態にされたとき)に1度だけ実施される処理であって、この初期化処理が開始されると図2(a)に示すように、エラー状態(短絡した状態であれば「NG」)を示すエラー変数にエラーではない旨の値(OK)をセットする(S110)。そして、比較対象となる2つの端子の信号レベルが一致した回数を表す一致カウンタに初期値である0をセットし(S120)、初期化処理を終了する。   The initialization process is a process that is performed only once when the headlamp control device 1 is activated (for example, when an ignition (not shown) is turned on). As shown in FIG. 2A, a value (OK) indicating that there is no error is set in an error variable indicating an error state (“NG” if short-circuited) (S110). Then, the initial value 0 is set in the coincidence counter indicating the number of times that the signal levels of the two terminals to be compared coincide with each other (S120), and the initialization process is terminated.

(2−2)短絡判定処理
上記初期化処理が終了すると短絡判定処理が実施される。この短絡判定処理について図2(b)のフローチャートを用いて説明する。短絡判定処理は、入出力インタフェース40のうちの任意の端子(対象端子:例えば入力端子43)と、その端子に隣接する端子(隣接端子:例えば出力端子41)とが短絡しているか否かを判定する処理である。
(2-2) Short-circuit determination process When the initialization process is completed, a short-circuit determination process is performed. This short-circuit determination process will be described with reference to the flowchart of FIG. In the short-circuit determination process, it is determined whether an arbitrary terminal (target terminal: for example, the input terminal 43) of the input / output interface 40 and a terminal adjacent to the terminal (adjacent terminal: for example, the output terminal 41) are short-circuited. This is a process for determining.

また、短絡判定処理は、初期化処理が終了したときに加えて、入力端子43の信号レベルが変化し、割込コントローラ27から割込処理を実施するよう指令を受けたときにも開始される処理である。   Further, the short circuit determination process is started when the signal level of the input terminal 43 is changed and an instruction to execute the interrupt process is received from the interrupt controller 27 in addition to the completion of the initialization process. It is processing.

具体的な短絡判定処理は、図2(b)に示すように、まず、エラー変数にエラーではない旨の値(OK)がセットされているか否かを判定する(S210)。エラー変数にエラーである旨の値(NG)がセットされていれば(S210:NO)、直ちに短絡判定処理を終了する。   In the specific short-circuit determination process, as shown in FIG. 2B, first, it is determined whether or not a value (OK) indicating that there is no error is set in the error variable (S210). If a value (NG) indicating an error is set in the error variable (S210: NO), the short circuit determination process is immediately terminated.

また、エラー変数にエラーではない旨の値(OK)がセットされていれば(S210:YES)、他の処理による割込を禁止し(S220)、短絡判定対象となる入力端子43(対象端子)の信号レベルと出力端子41(隣接端子)の信号レベルとが同レベルであるか否かを判定する(S230:推移監視手段)。   If a value (OK) indicating that there is no error is set in the error variable (S210: YES), interruption by other processing is prohibited (S220), and the input terminal 43 (target terminal) that is a short-circuit determination target ) And the signal level of the output terminal 41 (adjacent terminal) are determined to be the same level (S230: transition monitoring means).

ここでは、各端子の信号レベルに応じた値がセットされるポートレジスタの値に基づいて、その信号レベルが比較される。なお、「信号レベル」は、HIレベル(正論理)かLOレベル(負論理)のいずれかで表される。   Here, the signal level is compared based on the value of the port register in which a value corresponding to the signal level of each terminal is set. The “signal level” is represented by either an HI level (positive logic) or an LO level (negative logic).

入力端子43の信号レベルと出力端子41の信号レベルとが同レベルであれば(S230:YES)、一致カウンタをインクリメントし(S240:短絡判定手段)、一致カウンタが、各端子の特性に応じて予め設定手段70を介して設定された所定値(例えば3)以上であるか否かを判定する(S250:短絡判定手段)。なお、一致カウンタが所定値以上であれば、判定対象となる各端子間(ここでは、入力端子43、出力端子41間)での短絡が発生しているものと判定する。   If the signal level of the input terminal 43 and the signal level of the output terminal 41 are the same level (S230: YES), the coincidence counter is incremented (S240: short circuit determination means), and the coincidence counter is in accordance with the characteristics of each terminal. It is determined whether or not a predetermined value (for example, 3) or more set in advance via the setting means 70 (S250: short circuit determination means). If the coincidence counter is equal to or greater than a predetermined value, it is determined that a short circuit has occurred between the terminals to be determined (here, between the input terminal 43 and the output terminal 41).

即ち、一致カウンタが所定値以上であれば(S250:YES)、エラー変数にエラーである旨の値(NG)をセットし(S260:短絡判定手段)、一致カウンタに初期値である0をセットする(S270)。   That is, if the coincidence counter is equal to or greater than the predetermined value (S250: YES), a value (NG) indicating an error is set in the error variable (S260: short circuit determination means), and the initial value 0 is set in the coincidence counter. (S270).

続いて、他の処理による割込を許可し(S280)、短絡判定処理を終了する。また、一致カウンタが所定値未満であれば(S250:NO)、エラー変数にエラーではない旨の値(OK)をセットし(S290)、短絡判定処理を終了する。   Subsequently, interruption by other processing is permitted (S280), and the short-circuit determination processing ends. If the coincidence counter is less than the predetermined value (S250: NO), the error variable is set to a value (OK) indicating that there is no error (S290), and the short circuit determination process is terminated.

一方、入力端子43の信号レベルと出力端子41の信号レベルとが同レベルでなければ(S230:NO)、判定対象となる各端子間(ここでは、入力端子43、出力端子41間)での短絡は発生していないことを意味する。この場合には、一致カウンタに初期値である0をセットし(S300)、フェールセーフ処理が実施されている場合には、この端子に関するフェールセーフ処理を解除する(S310)。   On the other hand, if the signal level of the input terminal 43 and the signal level of the output terminal 41 are not the same level (S230: NO), between the terminals to be determined (here, between the input terminal 43 and the output terminal 41). This means that no short circuit has occurred. In this case, an initial value of 0 is set in the coincidence counter (S300), and when the fail-safe process is performed, the fail-safe process related to this terminal is canceled (S310).

つまり、S310の処理では、端子間の短絡状態が解消した場合に、フェールセーフ処理を終了し、通常の処理(信号利用処理)に復帰できるようにしている。この処理が終了すると、短絡判定処理を終了する。   In other words, in the process of S310, when the short-circuit state between the terminals is resolved, the fail-safe process is terminated and it is possible to return to the normal process (signal use process). When this process ends, the short-circuit determination process ends.

なお、短絡判定処理は、判定対象となる各端子が、入力端子同士であっても出力端子同士であっても実施することができる。特に、判定対象となる各端子が出力端子同士である場合には、予め設定された周期毎に起動される周期処理とすればよい。ただし、判定対象となる各端子が入力端子同士である場合や、本実施形態のように入力端子43および出力端子41である場合においても周期処理とすることができる。   Note that the short-circuit determination process can be performed regardless of whether the terminals to be determined are input terminals or output terminals. In particular, when each terminal to be determined is an output terminal, it may be a periodic process that is activated every predetermined period. However, even when the terminals to be determined are input terminals or when the terminals are the input terminal 43 and the output terminal 41 as in the present embodiment, the periodic processing can be performed.

また、本実施形態においては、1組の端子である入力端子43と出力端子41についての短絡を判定するケースについて説明したが、この処理とともに、他の各端子(例えば、入力端子43および入力端子45)についての短絡を判定する処理を実施することもできる。このように他の各端子についての短絡を判定する場合には、上記の短絡判定処理を短絡判定しようとする他の各端子に対しても実施すればよい。   Moreover, in this embodiment, although the case where the short circuit about the input terminal 43 and the output terminal 41 which are 1 set of terminals was determined was demonstrated, with this process, each other terminal (for example, the input terminal 43 and the input terminal) The process of determining a short circuit for 45) can also be performed. Thus, when determining the short circuit about each other terminal, what is necessary is just to implement said short circuit determination process also about each other terminal which is going to determine a short circuit.

なお、この場合には、エラー変数を、短絡を判定する端子の組毎に別途設けておき、初期化処理のS110の処理では全てのエラー変数に対してエラーではない旨の値(OK)をセットすればよい。また、短絡判定処理にてエラー変数を書き換える際には、短絡を判定する端子の組毎に予め設定されたエラー変数のみに対して書き換えを行うようにすればよい。   In this case, an error variable is separately provided for each set of terminals for determining a short circuit, and a value (OK) indicating that there is no error for all error variables in the process of S110 of the initialization process. Just set. Further, when rewriting the error variable in the short-circuit determination process, it is only necessary to rewrite only the error variable set in advance for each set of terminals for determining a short circuit.

また、複数の短絡判定処理を実施する場合には、各処理を並列に実施することもできるし、直列に実施することもできる。
(2−3)短絡対応処理
続いて、上記短絡判定処理による判定結果に基づいて、フェールセーフ処理を実施させる処理について図3を用いて説明する。図3(a)は短絡対応処理を示すフローチャート、図3(b)は短絡対応処理のうちのフェールセーフ処理の一例を示すフローチャートである。
Moreover, when implementing several short circuit determination processing, each processing can also be implemented in parallel and can also be implemented in series.
(2-3) Short-circuit handling process Next, a process for performing the fail-safe process based on the determination result of the short-circuit determination process will be described with reference to FIG. FIG. 3A is a flowchart showing a short-circuit handling process, and FIG. 3B is a flowchart showing an example of a fail-safe process in the short-circuit handling process.

短絡対応処理においては、一定時間周期で繰り返し実行される周期処理であって、まず、上述したエラー変数にエラーである旨の値(NG)がセットされているか否かを判定する(S410)。エラー変数にエラーである旨の値(NG)がセットされていれば(S410:YES)、フェールセーフ処理を実施する(S420:禁止指令手段)。   The short-circuit handling process is a cyclic process that is repeatedly executed at a constant time period. First, it is determined whether or not a value (NG) indicating an error is set in the error variable described above (S410). If a value (NG) indicating an error is set in the error variable (S410: YES), fail-safe processing is performed (S420: prohibition command means).

そして、エラー変数にエラーではない旨の値(OK)をセットし(S430)、短絡対応処理を終了する。
(2−4)フェールセーフ処理
このフェールセーフ処理では、いずれの端子間に短絡が発生しているかによって異なる内容の処理が行われるが、いずれの処理であっても、短絡が発生した端子を流通する信号を利用した信号利用処理を禁止し、この信号を利用せずに最低限の処理を継続するための処理を実施する。
Then, a value (OK) indicating that there is no error is set in the error variable (S430), and the short-circuit handling process is terminated.
(2-4) Fail-safe processing In this fail-safe processing, processing with different contents is performed depending on which terminal is short-circuited. The signal use processing using the signal to be performed is prohibited, and the processing for continuing the minimum processing without using this signal is performed.

本実施形態の場合、外部機器100としては、車高センサや舵角センサ等の各種センサが接続されており、これら各種センサによる検出結果を利用して前照灯60の光軸の向きを設定する処理(信号利用処理)が実施されるので、入力端子43および出力端子41間に短絡が発生した場合には、各種センサによる検出結果を利用しないようにする。   In the case of the present embodiment, various sensors such as a vehicle height sensor and a rudder angle sensor are connected as the external device 100, and the direction of the optical axis of the headlamp 60 is set using the detection results of these various sensors. Therefore, when a short circuit occurs between the input terminal 43 and the output terminal 41, the detection results from the various sensors are not used.

具体的なフェールセーフ処理としては、図3(b)に示すように、まず、鉛直方向の光軸の向きを調節するレベリング用モータ(図示省略)を、対向車両を眩惑することのない基準位置(0ステップ位置)に移動させる(S460)。そして、水平方向の光軸の向きを調節するスイブル用モータ(図示省略)を車両の正面である基準位置(0ステップ位置)に移動させ(S470)、フェールセーフ処理を終了する。   As a specific fail-safe process, as shown in FIG. 3B, first, a leveling motor (not shown) that adjusts the direction of the optical axis in the vertical direction is used as a reference position that does not dazzle oncoming vehicles. Move to (0 step position) (S460). Then, a swivel motor (not shown) that adjusts the direction of the optical axis in the horizontal direction is moved to a reference position (0 step position) that is the front of the vehicle (S470), and the fail-safe process ends.

以後、フェールセーフ処理が解除されるまでは、光軸の向きは基準位置に固定された状態とされる。
(3)本実施形態による作用、および効果
上記の前照灯制御装置1においてECU10は、短絡判定処理にて、複数の信号端子のうちのいずれかの端子である入力端子43を流通する信号と該入力端子43に隣接する端子である出力端子41を流通する信号とにおける各信号レベルの推移を監視し、監視が開始された各信号レベルの推移が、予め設定された判定時間以上同期している場合に、入力端子43および出力端子41の間に短絡が発生していると判定する。
Thereafter, the direction of the optical axis is fixed at the reference position until the fail-safe process is canceled.
(3) Actions and Effects According to the Present Embodiment In the headlamp control device 1 described above, the ECU 10 is configured to receive a signal that circulates through the input terminal 43 that is one of a plurality of signal terminals in the short-circuit determination process. The transition of each signal level in the signal that flows through the output terminal 41 that is a terminal adjacent to the input terminal 43 is monitored, and the transition of each signal level that has been monitored is synchronized for a predetermined determination time or more. If it is, it is determined that a short circuit has occurred between the input terminal 43 and the output terminal 41.

このように短絡を判定する手法は、入力端子43における信号レベルおよび出力端子41における信号レベルをチェックするといった単純な処理で実現できることから、スイッチ部および排他的論理和回路などといった物理的な構成要素を別途設けなくても、ECU10の処理の一部として実装することができる。そのため、このようなECU10によれば、端子間における短絡の発生を検出するためにECU10としての装置構成が無用に大きくなってしまうことを防止することができる。   Since the method for determining a short circuit in this way can be realized by a simple process of checking the signal level at the input terminal 43 and the signal level at the output terminal 41, physical components such as a switch unit and an exclusive OR circuit are used. Even if it is not provided separately, it can be implemented as part of the processing of the ECU 10. Therefore, according to such ECU10, in order to detect generation | occurrence | production of the short circuit between terminals, it can prevent that the apparatus structure as ECU10 will become unnecessarily large.

そして、上記短絡判定処理および短絡対応処理をECU10の処理の一部として実装することによって、製品出荷時などのテスト用に限らず、そのテスト後、具体的にいえば実際に使用されている状況においても短絡の発生を検出することができるようになる。   Then, by implementing the short-circuit determination process and the short-circuit handling process as a part of the process of the ECU 10, not only for testing at the time of product shipment, but specifically, after the test, it is actually used. It is possible to detect the occurrence of a short circuit.

また、このような前照灯制御装置1によれば、テスト用の出力を行うことなく入力端子43および出力端子41の間に短絡を検出することができるので、ECU10による通常の処理を休止する必要がないという特有の効果が得られる。   Further, according to the headlamp control device 1 as described above, since a short circuit can be detected between the input terminal 43 and the output terminal 41 without performing a test output, normal processing by the ECU 10 is suspended. A unique effect is obtained that is not necessary.

特にECU10は、短絡判定処理にて、監視された各信号レベルを繰り返し取得し、取得した各信号レベルが一致している度にカウンタをインクリメントし、取得した各信号レベルが一致していなければ前記カウンタをクリアし、カウンタが判定時間に対応して設定された閾値以上である場合に、入力端子43および出力端子41の間に短絡が発生していると判定する。   In particular, the ECU 10 repeatedly acquires each monitored signal level in the short-circuit determination process, increments the counter every time the acquired signal levels match, and if the acquired signal levels do not match, the ECU 10 The counter is cleared, and it is determined that a short circuit has occurred between the input terminal 43 and the output terminal 41 when the counter is equal to or greater than a threshold set corresponding to the determination time.

従って、このような前照灯制御装置1によれば、短絡検出対象となる各端子間の電位が連続して所定回数(閾値の回数)だけ一致するか否かという簡素な処理で短絡判定を実施することができる。   Therefore, according to such a headlamp control device 1, the short circuit determination is performed by a simple process of determining whether or not the potential between each terminal that is a short circuit detection target continuously matches the predetermined number of times (threshold number). Can be implemented.

さらに、ECU10は、短絡判定処理にて短絡が発生していると判定された場合に、入力端子43および出力端子41のうちの少なくともいずれか一方を介して流通する信号を利用した信号利用処理を実施する外部機器に対し、信号利用処理の実施を禁止すべき旨を指令するフェールセーフ処理を実施する。   Further, the ECU 10 performs a signal use process using a signal distributed via at least one of the input terminal 43 and the output terminal 41 when it is determined that a short circuit has occurred in the short circuit determination process. A fail-safe process is executed to instruct the external device to be implemented that the execution of the signal use process should be prohibited.

従って、このような前照灯制御装置1によれば、端子間における短絡の発生によって外部機器に意図しない信号の入力があったとしても、この外部機器における処理の実施が禁止される結果、その信号を受けた処理が実施されてしまうことはない。そのため、その外部機器が意図しない信号を受けて処理を実施することによってこの外部機器(または、これを含むシステム全体)が誤作動するといったことを未然に防止することができる。   Therefore, according to such a headlamp control device 1, even if an unintended signal is input to the external device due to the occurrence of a short circuit between the terminals, the execution of the process in the external device is prohibited. The processing that receives the signal is never performed. For this reason, it is possible to prevent the external device (or the entire system including the same) from malfunctioning when the external device receives an unintended signal and performs processing.

また、フェールセーフ処理では、信号利用処理に換えて、予め設定された処理を実施すべき旨を外部機器に対して指令する。
従って、このような前照灯制御装置1によれば、端子間に短絡が発生した場合であっても、信号利用処理に換えてフェールセーフ処理を実施させるので、完全に処理が中止されることを防止することができる。
In the fail-safe process, an instruction is given to the external device that a preset process should be performed instead of the signal use process.
Therefore, according to such a headlamp control device 1, even if a short circuit occurs between the terminals, the fail-safe process is performed instead of the signal use process, and thus the process is completely stopped. Can be prevented.

さらに、ECU10においては、判定時間を入力端子43として設定する端子毎に設定することができるよう構成されている。
従って、このような前照灯制御装置1によれば、端子の信号レベルが変化する頻度(周期)に応じて、端子の短絡を検出するまでの時間を個別に設定することができる。よって、短絡判定の精度を向上させることができる。
Further, the ECU 10 is configured so that the determination time can be set for each terminal set as the input terminal 43.
Therefore, according to such a headlamp control device 1, it is possible to individually set the time until a terminal short circuit is detected according to the frequency (cycle) at which the signal level of the terminal changes. Therefore, the accuracy of short circuit determination can be improved.

(4)その他の実施形態
以上、本発明の実施の形態について説明したが、本発明は、上記実施形態に何ら限定されることはなく、本発明の技術的範囲に属する限り種々の形態をとり得ることはいうまでもない。
(4) Other Embodiments Although the embodiment of the present invention has been described above, the present invention is not limited to the above-described embodiment, and can take various forms as long as it belongs to the technical scope of the present invention. Needless to say, you get.

例えば、上記実施形態においては、エラー変数を利用した処理として説明したが、エラー変数を用いずに上記処理を実現することもできる。この場合には、例えば、上述の短絡判定処理(図2(b)参照)に換えて、図4に示す短絡判定処理を実施すればよい。なお、図4は変形例の短絡判定処理を示すフローチャートである。   For example, although the above embodiment has been described as processing using an error variable, the above processing can also be realized without using an error variable. In this case, for example, the short circuit determination process shown in FIG. 4 may be performed instead of the above-described short circuit determination process (see FIG. 2B). FIG. 4 is a flowchart showing a short-circuit determination process according to a modification.

具体的な変形例の短絡判定処理では、図4に示すように、図2(b)の短絡判定処理におけるS210、S260、S290の処理が省略される。そして、一致カウンタが所定値以上であれば(S250:YES)、S420と同様のフェールセーフ処理が実施される(S350:禁止指令手段)。なおこの場合、短絡対応処理全般、および初期化処理のS110の処理は不要となる。   In the short circuit determination process of a specific modification, as shown in FIG. 4, the processes of S210, S260, and S290 in the short circuit determination process of FIG. If the coincidence counter is equal to or greater than the predetermined value (S250: YES), the same fail-safe process as S420 is performed (S350: prohibition command means). In this case, the entire short-circuit handling process and the initialization process S110 are not required.

上記実施形態における所定値、即ち端子の短絡を判定する際の判定時間については、通信I/Fを介してROM23(書き換え可能なROMの場合)またはRAM25に記録された所定値を書き換えることができるように実現することもできる。   As for the predetermined value in the above-described embodiment, that is, the determination time when determining the short circuit of the terminal, the predetermined value recorded in the ROM 23 (in the case of a rewritable ROM) or the RAM 25 can be rewritten via the communication I / F. It can also be realized.

また、上記実施形態にて短絡判定処理が周期処理として実施される場合において、この短絡判定処理の実施周期よりも短絡対応処理の実施周期が短い場合には、例えばS210の処理等を省略することもできる。   Further, in the case where the short-circuit determination process is performed as a periodic process in the above-described embodiment, when the execution cycle of the short-circuit handling process is shorter than the execution period of the short-circuit determination process, for example, the process of S210 is omitted. You can also.

さらに、上記実施形態においては、ECU10の入出力端子において、短絡を検出する処理を例示したが、上記の各処理は、ECU10に限らず、一般的な集積回路やプリント基板等、複数の端子を有する電子機器における特定の端子間の短絡検出の際にも利用することができる。   Furthermore, in the said embodiment, although the process which detects a short circuit in the input / output terminal of ECU10 was illustrated, each said process is not limited to ECU10, but several terminals, such as a general integrated circuit and a printed circuit board, are provided. The present invention can also be used for detecting a short circuit between specific terminals in an electronic device.

電子機器の全体構成および入出力インタフェースの構成を示すブロック図である。It is a block diagram which shows the whole structure of an electronic device, and the structure of an input / output interface. 初期化処理および短絡判定処理を示すフローチャートである。It is a flowchart which shows an initialization process and a short circuit determination process. 短絡対応処理およびフェールセーフ処理を示すフローチャートである。It is a flowchart which shows a short circuit corresponding | compatible process and a fail safe process. 変形例の短絡判定処理を示すフローチャートである。It is a flowchart which shows the short circuit determination process of a modification.

符号の説明Explanation of symbols

1…前照灯制御装置、10…ECU、21…CPU、23…ROM、25…RAM、27…割込コントローラ、40…入出力インタフェース、41…出力端子、43,45…入力端子、50…通信インタフェース、55…駆動機構、60…前照灯、100…外部機器。   DESCRIPTION OF SYMBOLS 1 ... Headlamp control apparatus, 10 ... ECU, 21 ... CPU, 23 ... ROM, 25 ... RAM, 27 ... Interrupt controller, 40 ... Input / output interface, 41 ... Output terminal, 43, 45 ... Input terminal, 50 ... Communication interface 55... Drive mechanism 60. Headlight 100.

Claims (6)

複数の信号端子が備えられてなる電子機器であって、
前記複数の信号端子のうちのいずれかの端子(以降「対象端子」という)を流通する信号と該対象端子に隣接する端子(以降「隣接端子」という)を流通する信号とにおける各信号レベルの推移を監視する推移監視手段と、
該推移監視手段により監視が開始された各信号レベルの推移が、予め設定された判定時間以上同期している場合に、前記対象端子および前記隣接端子の間に短絡が発生していると判定する短絡判定手段と、
を備えていることを特徴とする電子機器。
An electronic device provided with a plurality of signal terminals,
Each signal level in a signal flowing through any one of the plurality of signal terminals (hereinafter referred to as “target terminal”) and a signal flowing through a terminal adjacent to the target terminal (hereinafter referred to as “adjacent terminal”) Transition monitoring means for monitoring transitions;
It is determined that a short circuit has occurred between the target terminal and the adjacent terminal when the transition of each signal level monitored by the transition monitoring means is synchronized for a predetermined determination time or more. Short-circuit determination means;
An electronic device comprising:
前記短絡判定手段は、前記推移監視手段によって監視された各信号レベルを繰り返し取得し、取得した各信号レベルが一致している度にカウンタをインクリメントし、取得した各信号レベルが一致していなければ前記カウンタをクリアし、前記カウンタが前記判定時間に対応して設定された閾値以上である場合に、前記対象端子および前記隣接端子の間に短絡が発生していると判定すること
を特徴とする請求項1に記載の電子機器。
The short-circuit determination unit repeatedly acquires each signal level monitored by the transition monitoring unit, increments a counter each time the acquired signal levels match, and if the acquired signal levels do not match The counter is cleared, and it is determined that a short circuit has occurred between the target terminal and the adjacent terminal when the counter is equal to or greater than a threshold value set corresponding to the determination time. The electronic device according to claim 1.
前記短絡判定手段により短絡が発生していると判定された場合に、前記対象端子および前記隣接端子のうちの少なくともいずれか一方を介して流通する信号を利用した信号利用処理を実施する外部機器に対し、前記信号利用処理の実施を禁止すべき旨を指令する禁止指令手段、
を備えていることを特徴とする請求項1または請求項2に記載の電子機器。
When it is determined by the short circuit determination means that a short circuit has occurred, to an external device that performs signal utilization processing using a signal that circulates through at least one of the target terminal and the adjacent terminal On the other hand, a prohibition instruction means for instructing that the execution of the signal use process should be prohibited,
The electronic apparatus according to claim 1, further comprising:
前記禁止指令手段は、前記短絡判定手段により短絡が発生していると判定された場合に、前記信号利用処理に換えて、予め設定されたフェールセーフ処理を実施すべき旨を前記外部機器に対して指令すること
を特徴とする請求項3に記載の電子機器。
The prohibition instruction means informs the external device that a preset fail-safe process should be performed instead of the signal use process when the short-circuit determination means determines that a short-circuit has occurred. The electronic device according to claim 3, wherein the electronic device is commanded.
前記判定時間を前記対象端子として設定する端子毎に設定するための設定手段
を備えていることを特徴とする請求項1〜請求項4のいずれかに記載の電子機器。
The electronic device according to claim 1, further comprising setting means for setting the determination time for each terminal set as the target terminal.
請求項1〜請求項5のいずれかに記載の全ての手段として機能させるための各種処理手順をコンピュータシステムに実行させるためのプログラム。   A program for causing a computer system to execute various processing procedures for causing all of the means according to any one of claims 1 to 5 to function.
JP2008026886A 2008-02-06 2008-02-06 Electronic device and program Pending JP2009187307A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008026886A JP2009187307A (en) 2008-02-06 2008-02-06 Electronic device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008026886A JP2009187307A (en) 2008-02-06 2008-02-06 Electronic device and program

Publications (1)

Publication Number Publication Date
JP2009187307A true JP2009187307A (en) 2009-08-20

Family

ID=41070476

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008026886A Pending JP2009187307A (en) 2008-02-06 2008-02-06 Electronic device and program

Country Status (1)

Country Link
JP (1) JP2009187307A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018029451A (en) * 2016-08-18 2018-02-22 富士通株式会社 Short circuit determination method and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1021111A (en) * 1996-06-27 1998-01-23 Nec Home Electron Ltd Microcomputer system
JP2004225684A (en) * 2002-11-27 2004-08-12 Toyota Motor Corp Oxygen sensor abnormality detecting device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1021111A (en) * 1996-06-27 1998-01-23 Nec Home Electron Ltd Microcomputer system
JP2004225684A (en) * 2002-11-27 2004-08-12 Toyota Motor Corp Oxygen sensor abnormality detecting device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018029451A (en) * 2016-08-18 2018-02-22 富士通株式会社 Short circuit determination method and electronic equipment

Similar Documents

Publication Publication Date Title
JP6140448B2 (en) Monitoring concept in control equipment
WO2018134939A1 (en) Attack detection device, attack detection method, and attack detection program
WO2017038290A1 (en) Verification system, verification device, and vehicle control device
JP2013514497A5 (en)
JP6551319B2 (en) Control system
JP2009187307A (en) Electronic device and program
JP6516933B2 (en) Display control apparatus and display control method
JP5034972B2 (en) Electronic equipment and programs
WO2019044174A1 (en) Monitoring device, monitoring system, and computer program
JP7143797B2 (en) Power control device for in-vehicle camera module
JP5226653B2 (en) In-vehicle control device
JP4793589B2 (en) Safety remote I / O terminal
JP6187508B2 (en) Control device, bus circuit, method, and program
JP2012174198A (en) Abnormality detection device and abnormality detection program
JP6090094B2 (en) Information processing device
JP5268791B2 (en) Control system
JP6268071B2 (en) Electronic control unit
WO2022113155A1 (en) Vehicular onboard control system
JP6282166B2 (en) Side stand retracted state detection device
JP2014238661A (en) Controller
JP2014056396A (en) Electronic controller
JP7200883B2 (en) electronic controller
JP5756413B2 (en) Control device
JP2018133665A (en) Input signal erroneous determination prevention circuit
KR102176760B1 (en) High Efficiency Memory Operating Method For Vehicle Engine Controller, And Engine Controller Operated by The Same

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100305

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110524

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110607

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110805

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20120110