JP2016020185A - Transmission line abnormality detector - Google Patents

Transmission line abnormality detector Download PDF

Info

Publication number
JP2016020185A
JP2016020185A JP2014145320A JP2014145320A JP2016020185A JP 2016020185 A JP2016020185 A JP 2016020185A JP 2014145320 A JP2014145320 A JP 2014145320A JP 2014145320 A JP2014145320 A JP 2014145320A JP 2016020185 A JP2016020185 A JP 2016020185A
Authority
JP
Japan
Prior art keywords
transmission
transmission line
abnormality
error
bus
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2014145320A
Other languages
Japanese (ja)
Other versions
JP6176199B2 (en
Inventor
岸上 友久
Tomohisa Kishigami
友久 岸上
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 JP2014145320A priority Critical patent/JP6176199B2/en
Publication of JP2016020185A publication Critical patent/JP2016020185A/en
Application granted granted Critical
Publication of JP6176199B2 publication Critical patent/JP6176199B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a technique for locating a cause of a transmission line abnormality without providing a special added circuit.SOLUTION: Transmission-message-residence determination means (34: S110 to S170) determines whether transmission is completed within preset specified time since a transmission request is generated. Transmission-error count means (35) increases or decreases a count value in response to the occurrence of an error related to a success or a failure in transmission and to transmission, and reception-error count means (35) increases or decreases a count value in response to an error related to a success or a failure in reception and to reception. Bus-off determination means (35) determines whether a state is a bus-off state in which participation in communication is prohibited in accordance with the count value of the transmission-error count means (35). Abnormality determination means (34: S210 to S300) determines whether a transmission line abnormality occurs and determines a cause of the abnormality in accordance with determination results of the transmission-message-residence determination means and the bus-off determination means and the count values of the transmission-error count means and the reception-error count means.SELECTED DRAWING: Figure 5

Description

本発明は、伝送路異常を検出すると共に異常の原因を識別する技術に関する。   The present invention relates to a technique for detecting a transmission line abnormality and identifying the cause of the abnormality.

車載ネットワークの代表的なものとしてCAN(Controller Area Network )が知られている。CAN通信において、伝送路のショートや断線が発生した場合、通信自体ができなくなるため、伝送路の故障か機器の故障か等を判断することができない。これに対して、伝送路の信号レベルを監視する検査用の電子回路を別途付加し、その電子回路での検査結果を利用することによって、原因の識別も含めて伝送路の異常を検出する技術が提案されている(例えば、特許文献1参照)。   CAN (Controller Area Network) is known as a typical in-vehicle network. In CAN communication, when a transmission line short-circuit or disconnection occurs, communication itself cannot be performed, so it is impossible to determine whether a transmission line failure or a device failure occurs. On the other hand, a technology for detecting abnormalities in the transmission path, including identification of the cause, by adding a separate electronic circuit for inspection that monitors the signal level of the transmission line and using the inspection result in the electronic circuit Has been proposed (see, for example, Patent Document 1).

特開2010−111295号公報JP 2010-111295 A

従来装置では、CANにおける標準的な通信回路以外に特別な付加回路を必要とするため、製造の手間や装置規模が増大するという問題があった。
本発明は、こうした問題に鑑みてなされたものであり、特別な付加回路を設けることなく伝送路異常の原因を識別する技術を提供することを目的とする。
The conventional apparatus requires a special additional circuit in addition to the standard communication circuit in CAN, and thus has a problem that the manufacturing effort and the apparatus scale increase.
The present invention has been made in view of these problems, and an object thereof is to provide a technique for identifying the cause of a transmission line abnormality without providing a special additional circuit.

本発明の伝送路異常検出送致は、CAN(Controller Area Network )プロトコルに従った通信を実行するノードに搭載され、通信フレームを送受信する伝送路の異常を検出するものであって、送信メッセージ滞留判定手段と、送信エラーカウント手段と、受信エラーカウント手段と、バスオフ状態判定手段と、異常判定手段とを備える。   The transmission path abnormality detection and sending of the present invention is mounted on a node that performs communication according to the CAN (Controller Area Network) protocol, and detects an abnormality of a transmission path that transmits and receives communication frames. Means, a transmission error count means, a reception error count means, a bus off state determination means, and an abnormality determination means.

送信メッセージ滞留判定手段は、送信要求が発生してから予め設定された規定時間以内に送信完了したか否かを判断する。送信エラーカウント手段は、送信の成否および送信に関わるエラーの発生に応じてカウント値が増減する。受信エラーカウント手段は、受信の成否および受信に関わるエラーの発生に応じてカウント値が増減する。バスオフ判定手段は、送信エラーカウント手段でのカウント値に従って、通信への参加が禁止されるバスオフの状態にあるか否かを判断する。これら各手段によって実現される機能は、CAN通信(ISO−11989)で規定された標準的なエラー管理機能であり、一般的なCANコントローラにおいて必須の機能である。   The transmission message retention determination unit determines whether or not transmission has been completed within a predetermined time set after the transmission request is generated. The transmission error count means increases or decreases the count value according to the success or failure of transmission and the occurrence of an error related to transmission. The reception error count means increases or decreases the count value according to the success or failure of reception and the occurrence of errors related to reception. The bus-off determining means determines whether or not the bus-off state in which participation in communication is prohibited is determined according to the count value in the transmission error counting means. The functions realized by these means are standard error management functions defined by CAN communication (ISO-11989), and are essential functions in a general CAN controller.

そして、異常判定手段が、送信メッセージ滞留判定手段およびバスオフ判定手段での判定結果、送信エラーカウント手段および受信エラーカウント手段でのカウント値に従って、伝送路異常の有無および該異常の原因を判断する。なお、伝送路異常の原因としては、伝送路の断線、伝送路のショート(レセッシブ固着/ドミナント固着)、ノイズによる通信不能状態が考えられる。   Then, the abnormality determination means determines the presence / absence of a transmission line abnormality and the cause of the abnormality according to the determination results of the transmission message stay determination means and the bus off determination means and the count values of the transmission error count means and the reception error count means. As a cause of the transmission line abnormality, it is conceivable that the transmission line is disconnected, the transmission line is short-circuited (recessive sticking / dominant sticking), and communication is impossible due to noise.

このような構成によれば、伝送路を介した正常な通信が不能となった時に、CAN通信で規定された標準的なエラー管理機能とフレームの送信可否の情報だけに基づき、特別な付加回路を必要とすることなく、伝送路異常の原因を識別することができる。なお、このような識別が可能となるのは、これらの伝送路異常の原因間で、上記二つの判定結果およ
び二つのカウント値のすべての状態が一致することがないことによる。
According to such a configuration, when normal communication via the transmission line becomes impossible, a special additional circuit is based only on the standard error management function defined in CAN communication and information on whether or not to transmit a frame. Therefore, the cause of the transmission line abnormality can be identified. Such identification is possible because all the states of the two determination results and the two count values do not match between the causes of the transmission line abnormality.

なお、特許請求の範囲に記載した括弧内の符号は、一つの態様として後述する実施形態に記載の具体的手段との対応関係を示すものであって、本発明の技術的範囲を限定するものではない。   In addition, the code | symbol in the parenthesis described in the claim shows the correspondence with the specific means as described in embodiment mentioned later as one aspect, Comprising: The technical scope of this invention is limited is not.

車載通信システムの全体構成を示すブロック図である。It is a block diagram which shows the whole structure of a vehicle-mounted communication system. ゲートウェイ装置の構成概略構成図である。It is a block schematic block diagram of a gateway apparatus. 伝送路異常とエラー検出機能との関係を示す対応表である。6 is a correspondence table showing a relationship between a transmission line abnormality and an error detection function. 滞留監視処理のフローチャートである。It is a flowchart of a stay monitoring process. 異常検出処理のフローチャートである。It is a flowchart of an abnormality detection process. 伝送路異常の一態様である伝送路断線の状況を示す説明図である。It is explanatory drawing which shows the condition of the transmission line disconnection which is one aspect | mode of a transmission line abnormality. 伝送路異常の一態様である伝送路ショート:レセッシブ固着の状況を示す説明図である。It is explanatory drawing which shows the condition of the transmission line short which is one aspect | mode of transmission line abnormality: recessive sticking. 伝送路異常の一態様である伝送路ショート:ドミナント固着の状況を示す説明図である。It is explanatory drawing which shows the condition of the transmission line short which is one aspect | mode of a transmission line abnormality: dominant adherence.

以下に本発明が適用された実施形態について、図面を用いて説明する。
[全体構成]
本発明が適用された車載通信システム1は、図1に示すように、複数の電子制御装置(ECU:Electronic Control Unit )2と、ゲートウェイ装置3と、複数のバス4と、コネクタ5とを備える。
Embodiments to which the present invention is applied will be described below with reference to the drawings.
[overall structure]
As shown in FIG. 1, an in-vehicle communication system 1 to which the present invention is applied includes a plurality of electronic control units (ECUs) 2, a gateway device 3, a plurality of buses 4, and a connector 5. .

バス4は、差動信号を伝送する一対の信号線によって構成され、いずれもゲートウェイ装置3を介して相互に通信可能に接続されている。そして、一つのバス4にはコネクタ5が接続され、それ以外のバス4には、それぞれ複数のECUが接続されている。コネクタ5には、ECU2やゲートウェイ装置3との通信により取得した情報によって車両の状態を診断する診断装置6等の外部ツールが接続される。   The bus 4 is composed of a pair of signal lines that transmit differential signals, and both are connected via the gateway device 3 so that they can communicate with each other. A connector 5 is connected to one bus 4, and a plurality of ECUs are connected to the other buses 4. The connector 5 is connected to an external tool such as a diagnostic device 6 that diagnoses the state of the vehicle based on information acquired through communication with the ECU 2 and the gateway device 3.

車載通信システム1では、バス4を介して、ECU2,ゲートウェイ装置3,コネクタ5に接続される外部ツールとの間で、CANプロトコル(ISO11898)に従った通信を実行する。   In the in-vehicle communication system 1, communication according to the CAN protocol (ISO11898) is executed with the external tool connected to the ECU 2, the gateway device 3, and the connector 5 via the bus 4.

ECU2は、車両の各部に設置され、通信によって取得される各種情報に基づいて、予め割り当てられた機能を実現する。なお、ECU2の構成については、後述する。
[ゲートウェイ装置]
ゲートウェイ装置3は、各バス4においてCAN通信を実現するだけでなく、異なるバス4に接続されたECU2間の通信を実現するための周知のゲートウェイ機能を少なくとも有する。
The ECU 2 is installed in each part of the vehicle and realizes a function assigned in advance based on various information acquired by communication. The configuration of the ECU 2 will be described later.
[Gateway device]
The gateway device 3 has at least a known gateway function for realizing communication between the ECUs 2 connected to different buses 4 as well as realizing CAN communication in each bus 4.

ゲートウェイ装置3は、図2に示すように、終端回路31と、CANトランシーバ32と、マイクロコンピュータ(マイコン)33とを備える。終端回路31およびCANトランシーバ32は、ゲートウェイ装置3に接続されるバス4毎に設けられている。なお、図では、見やすくするために接続されるバス4が二つである場合を示す。また、ECU2は、接続されるバス4が一つである以外はゲートウェイ装置3と同様であり、終端回路21、CANトランシーバ22、マイコン23を備えた構成を有している(図6〜図8参照)。   As shown in FIG. 2, the gateway device 3 includes a termination circuit 31, a CAN transceiver 32, and a microcomputer (microcomputer) 33. The termination circuit 31 and the CAN transceiver 32 are provided for each bus 4 connected to the gateway device 3. In the figure, a case is shown in which there are two buses 4 connected for easy viewing. The ECU 2 is the same as the gateway device 3 except that only one bus 4 is connected, and has a configuration including a termination circuit 21, a CAN transceiver 22, and a microcomputer 23 (FIGS. 6 to 8). reference).

終端回路31は、バス4を構成する一対の通信線CAN−H,CANーL間に接続され、バス4を所定の抵抗値で終端する。CANトランシーバ32は、CANで規定された電気信号を送受信する。この電気信号では、両通信線CAN−H,CANーLの電位差が閾値以下である場合がレセッシブ、閾値より大きい場合がドミナントである。これら終端回路31およびCANトランシーバ32は周知のものであるため、その詳細についての説明は省略する。   The termination circuit 31 is connected between a pair of communication lines CAN-H and CAN-L constituting the bus 4 and terminates the bus 4 with a predetermined resistance value. The CAN transceiver 32 transmits and receives electrical signals defined by CAN. In this electrical signal, the case where the potential difference between the two communication lines CAN-H and CAN-L is less than or equal to the threshold is recessive, and the case where the potential difference is greater than the threshold is dominant. Since the termination circuit 31 and the CAN transceiver 32 are well known, detailed description thereof will be omitted.

マイコン33は、CPU341,ROM342,RAM343からなるコア部34以外に、CANコントローラ35を内蔵している。なお、CANコントローラ35は、CANトランシーバ32毎に設けられている。   The microcomputer 33 includes a CAN controller 35 in addition to the core unit 34 including the CPU 341, the ROM 342, and the RAM 343. The CAN controller 35 is provided for each CAN transceiver 32.

CPU341は、ROM342に格納されたプログラムに従って、ゲートウェイ処理、滞留監視処理、異常検出処理、情報提供処理を少なくとも実行する。ゲートウェイ処理は、CANコントローラ35を介して受信した通信フレームのIDを識別し、必要に応じて、他のバス4に転送する、いわゆるゲートウェイ機能を実現するための処理である。滞留監視処理は、送信メッセージが滞留しているか否かを判断するための処理である。異常検出処理は、CANコントローラ35が有するエラー検出機能および滞留監視処理での監視結果を利用してバス4の異常(伝送路異常)を検出し、その異常の状態を識別するための処理である。情報提供処理は、コネクタ5に接続される診断装置6からの要求に従って、異常検出処理での検出結果を出力するための処理である。これらのうち、滞留監視処理および異常検出処理については後で詳述する。なお、RAM343の一部は、給電が途絶えても記憶内容を保持する不揮発性メモリからなり、この不揮発性メモリの部分に、異常検出処理での検出結果を保存する領域が確保されている。   The CPU 341 executes at least gateway processing, stay monitoring processing, abnormality detection processing, and information provision processing in accordance with a program stored in the ROM 342. The gateway process is a process for realizing a so-called gateway function in which the ID of a communication frame received via the CAN controller 35 is identified and transferred to another bus 4 as necessary. The stay monitoring process is a process for determining whether or not the transmission message is staying. The abnormality detection process is a process for detecting an abnormality in the bus 4 (transmission path abnormality) using the error detection function of the CAN controller 35 and the monitoring result in the stay monitoring process, and identifying the state of the abnormality. . The information providing process is a process for outputting a detection result in the abnormality detection process in accordance with a request from the diagnostic device 6 connected to the connector 5. Among these, the stay monitoring process and the abnormality detection process will be described in detail later. Note that a part of the RAM 343 includes a nonvolatile memory that retains stored contents even when power supply is interrupted, and an area for storing a detection result in the abnormality detection process is secured in the nonvolatile memory portion.

CANコントローラ35は、通信実行部351、制御レジスタ352、送信バッファ353、受信バッファ354を備える。通信実行部351は、CANプロトコルに従った通信フレームの送受信を実行する。具体的には、コア部34により送信バッファ353に送信メッセージが書き込まれると、この送信メッセージを所定の通信フレームに加工してCANトランシーバ32に出力する。また、CANトランシーバ32にて通信フレームが受信されると、その通信フレームから抽出したデータを受信メッセージとして受信バッファ354に書き込む。この受信メッセージは、コア部34によって読み出され利用される。制御レジスタ352は、通信実行部351に対する各種指令を入力すると共に、通信実行部351の状態を表す各種情報を読み出すためのものである。   The CAN controller 35 includes a communication execution unit 351, a control register 352, a transmission buffer 353, and a reception buffer 354. The communication execution unit 351 executes transmission / reception of communication frames according to the CAN protocol. Specifically, when a transmission message is written in the transmission buffer 353 by the core unit 34, the transmission message is processed into a predetermined communication frame and output to the CAN transceiver 32. When the CAN transceiver 32 receives a communication frame, the data extracted from the communication frame is written in the reception buffer 354 as a reception message. This received message is read and used by the core unit 34. The control register 352 is used to input various commands to the communication execution unit 351 and to read various information indicating the state of the communication execution unit 351.

なお、制御レジスタ352から読み出すことが可能な情報には、少なくとも、送信エラーカウンタのカウント値、受信エラーカウンタのカウント値、エラー状態が含まれている。これらは、CAN(ISO−11898−1)の仕様に従った周知のものであるが、その概要を以下で説明する。   The information that can be read from the control register 352 includes at least the count value of the transmission error counter, the count value of the reception error counter, and the error status. These are well known in accordance with the specifications of CAN (ISO-11898-1), and the outline thereof will be described below.

送信エラーカウンタは、送信時に発生したエラーによりカウント値を増減させ、その値を保持する機能である。そのカウント値TxECNTは、エラー時(例えば、SOFやデータ領域でのビットエラー)の発生時に8が加算され、送信の成功時に1が減算される。   The transmission error counter is a function that increases or decreases the count value due to an error that occurs during transmission and holds the value. The count value TxECNT is incremented by 8 when an error occurs (for example, a bit error in the SOF or data area), and 1 is subtracted when transmission is successful.

受信エラーカウンタは、受信時に発生したエラーによりカウン値を増減させ、その値を保持する機能である。そのカウント値RxECNTは、エラーの発生時にその内容によって8または1が加算され、受信の成功時に1が減算される。なお、TxECNT,RxECNTの下限値はいずれも0であり、RxECNTの上限値は255である。   The reception error counter is a function that increases or decreases the count value due to an error that occurs during reception, and holds the value. The count value RxECNT is incremented by 8 or 1 when an error occurs, and is subtracted by 1 when reception is successful. The lower limit values of TxECNT and RxECNT are both 0, and the upper limit value of RxECNT is 255.

エラー状態とは、CANコントローラが取り得る三つの状態のことであり、エラーアクティブ、エラーパッシブ、バスオフからなる。エラーアクティブは、バス上の通信に正常
に参加することができる状態のことをいう。エラーパッシブは、エラーを起こしやすい状態のことであり、バス上の通信に参加することはできるが、他ノード(ECU2)の通信を妨害しないために、受信時にエラーを検出しても、その旨を表すエラー通知を行うことができない状態のことをいう。バスオフは、バス上の通信に参加できない状態であり、送受信のすべての動作が禁止された状態をいう。
The error state is three states that the CAN controller can take, and consists of error active, error passive, and bus off. Error active means a state in which communication on the bus can be normally joined. Error passive is a state in which an error is likely to occur, and can participate in communication on the bus. However, even if an error is detected at the time of reception in order to prevent communication with other nodes (ECU2), that fact is indicated. This means a state in which error notification indicating cannot be performed. The bus off is a state in which communication on the bus cannot be participated and all operations of transmission and reception are prohibited.

そして、TxECNTおよびRxECNTがいずれも0〜127である場合がエラーアクティブであり、TxECNTおよびRxECNTのうち少なくとも一方が128を超えるとエラーパッシブに遷移する。そして、TxECNTおよびRxECNTのうち少なくとも一方が128〜255である間エラーパッシブが保持される。TxECNTが256を超えるとバスオフに遷移する。また、バスオフにおいて、連続した所定ビットのレセッシブが所定回検出されると、バスオフからエラーアクティブに遷移し、TxECNTおよびRxECNTはいずれも0クリアされる。   The case where both TxECNT and RxECNT are 0 to 127 is error active, and when at least one of TxECNT and RxECNT exceeds 128, the state transits to error passive. Then, error passive is maintained while at least one of TxECNT and RxECNT is 128 to 255. When TxECNT exceeds 256, transition to bus-off occurs. In addition, when a recessive operation of a predetermined predetermined bit is detected a predetermined number of times when the bus is off, a transition is made from the bus off to an error active, and both TxECNT and RxECNT are cleared to zero.

[伝送路異常の原因]
ここで異常検出処理によって識別する伝送路異常の原因(故障事象)について説明する。伝送路異常の原因としては、「伝送路断線」「伝送路ショート:レセッシブ固着」「伝送路ショート:ドミナント固着」「ノイズによる通信不能状態」がある。伝送路断線は、図6に示すように、CAN−H,CAN−Lがいずれも断線している状態のことをいう。伝送路ショート:レセッシブ固着は、図7に示すように、CAN−H,CAN−Lが短絡している状態をいう。伝送路ショート:ドミナント固着は、図8に示すように、CAN−Hが電源ラインに短絡し、CAN−Lがグランドラインに短絡している状態をいう。ノイズによる通信不能状態は、CAN−H,CAN−Lには異常がなく、ノイズによって通信が困難になる程多くのエラーが発生している状態をいう。
[Cause of transmission line abnormality]
Here, the cause (failure event) of the transmission line abnormality identified by the abnormality detection process will be described. Causes of transmission line anomalies include "transmission line disconnection", "transmission line short: recessive sticking", "transmission line short: dominant sticking", and "no communication due to noise". As shown in FIG. 6, the transmission line disconnection means a state in which both CAN-H and CAN-L are disconnected. Transmission path short: Recessive sticking means a state in which CAN-H and CAN-L are short-circuited, as shown in FIG. Transmission path short: Dominant fixation refers to a state where CAN-H is short-circuited to the power supply line and CAN-L is short-circuited to the ground line, as shown in FIG. The communication disabled state due to noise refers to a state in which there are no errors in CAN-H and CAN-L, and so many errors have occurred that communication becomes difficult due to noise.

[伝送路異常とエラー検出機能との対応]
伝送路異常の原因と、エラー検出機能の状態との対応関係について図3を参照して説明する。なお、図3の表では、CANコントローラの初期化直後の状態において、各種異常が発生した場合の状況について示す。
[Correspondence between transmission line abnormality and error detection function]
A correspondence relationship between the cause of the transmission line abnormality and the state of the error detection function will be described with reference to FIG. The table in FIG. 3 shows the situation when various abnormalities occur in the state immediately after the initialization of the CAN controller.

伝送路断線の場合、自ノードは送信可能であるが、他ノードからのACK(正常応答)が得られる送信を完了することができない状態となる。その結果、送信が完了しないことによって、送信メッセージの滞留が発生する。また、ACKが得られないことにより、TxECNTが増加する。ACKが得られないことを原因とするカウント動作では255が上限値とされており、バスオフに至ることはない。このような上限値が設けられている理由は、送信エラーカウンタは基本的に自身の故障を検出するためのものであり、他ノードの異常(ACKがない)によってバスオフに遷移することを防ぐためである。更に、伝送路断線時には、他ノードからの通信フレームを受信しないため、RxECNTは0のままとなる。   In the case of a transmission line disconnection, the own node can transmit, but the transmission in which an ACK (normal response) from another node is obtained cannot be completed. As a result, the transmission message stays due to the transmission not being completed. In addition, TxECNT increases due to failure to obtain ACK. In the counting operation caused by the fact that ACK cannot be obtained, 255 is set as the upper limit value, and the bus is not turned off. The reason why such an upper limit is provided is that the transmission error counter is basically for detecting its own failure, and for preventing a transition to the bus off due to an abnormality (no ACK) of another node. It is. Furthermore, when the transmission line is disconnected, RxECNT remains 0 because no communication frame is received from another node.

伝送路ショート:レセッシブ固着の場合、各ノードは送信を開始することはできるが、バス4上にSOF信号が発生しないため、各ノードはエラー再送を繰り返すことになる。その結果、TxECNTは増加し続け、256に達するとバスオフに遷移する。バスオフになると送信バッファがリセットされるため、送信メッセージの滞留は発生しない。また、伝送路ショート時には、他ノードからの通信フレームを受信しないため、RxECNTは0のままとなる。   Transmission path short: In the case of recessive sticking, each node can start transmission, but since no SOF signal is generated on the bus 4, each node repeats error retransmission. As a result, TxECNT continues to increase, and when it reaches 256, it transitions to bus-off. Since the transmission buffer is reset when the bus is turned off, the transmission message does not stay. In addition, when the transmission path is short, a communication frame from another node is not received, so that RxECNT remains 0.

伝送路ショート:ドミナント固着の場合、CANではドミナント状態が継続すると、送信も受信も開始しないため、一切のエラーは発生しない。その結果、TxECNTおよびRxECNTはいずれも0のままであり、当然、バスオフも発生しない。但し、通信フレ
ームの送信が行われないことにより、送信メッセージの滞留が発生する。
Transmission line short: In the case of dominant fixing, if the dominant state continues in CAN, neither transmission nor reception starts, so no error occurs. As a result, both TxECNT and RxECNT remain 0, and naturally no bus-off occurs. However, the transmission message stays due to the transmission of the communication frame not being performed.

ノイズによる通信不能状態の場合、基本的に送信/受信共にエラーが多発する。その結果、TxECNTおよびRxECNTはいずれも増加し1以上の値となる。この状態が継続すると、送信メッセージの滞留またはバスオフが発生する。   When communication is impossible due to noise, errors frequently occur in both transmission and reception. As a result, TxECNT and RxECNT both increase to a value of 1 or more. If this state continues, a stay of transmission messages or bus off occurs.

[滞留監視処理]
次に、CPU341が実行する滞留監視処理について、図4のフローチャートを用いて説明する。本処理は、ゲートウェイ装置3が起動すると、繰り返し実行される。
[Residence monitoring processing]
Next, the stay monitoring process executed by the CPU 341 will be described with reference to the flowchart of FIG. This process is repeatedly executed when the gateway device 3 is activated.

本処理では、CPU341は、まず、S110にて送信要求が発生しているか否かを判断する。送信要求が発生していない場合(S110:NO)は、本処理を一旦終了する。送信要求が発生している場合(S110:YES)は、S120にて、タイマをスタートさせる。   In this process, the CPU 341 first determines whether or not a transmission request has occurred in S110. If no transmission request has occurred (S110: NO), this process is temporarily terminated. If a transmission request has occurred (S110: YES), a timer is started in S120.

続くS130では、送信バッファ353に空きがあるか否かを判断する。送信バッファ353は、予め設定された有限個の送信メッセージを記憶することができるように構成されている。   In subsequent S130, it is determined whether or not there is a vacancy in the transmission buffer 353. The transmission buffer 353 is configured to store a preset limited number of transmission messages.

送信バッファ353に空きがないと判断した場合(S130:NO)、S140にて、タイマをスタートさせてから予め設定された規定時間が経過しているか否かを判断する。規定時間を経過していない場合(S140:NO)、S130に戻る。一方、規定時間を経過している場合(S140:YES)、S150にて、送信メッセージの滞留が発生していると判断して、本処理を終了する。   If it is determined that there is no free space in the transmission buffer 353 (S130: NO), in S140, it is determined whether a predetermined time set in advance has elapsed since the timer was started. If the specified time has not elapsed (S140: NO), the process returns to S130. On the other hand, when the specified time has elapsed (S140: YES), it is determined in S150 that the stay of the transmission message has occurred, and this process is terminated.

先のS130にて、送信バッファ353に空きがあると判断した場合(S130:YES)、S160にて、送信バッファ353への送信メッセージの書き込みを許可する。
続くS170では、タイマを停止すると共に、送信メッセージの滞留は発生していないと判断して、本処理を終了する。
If it is determined in S130 that the transmission buffer 353 is empty (S130: YES), writing of a transmission message to the transmission buffer 353 is permitted in S160.
In subsequent S170, the timer is stopped, and it is determined that the stay of the transmission message has not occurred, and this processing is terminated.

つまり、送信要求が発生してから規定時間以内に送信バッファ353への書き込みを行うことができない場合に、送信メッセージの滞留が発生していると判断する。
[異常検出処理]
CPU341が実行する異常検出処理について、図5のフローチャートを用いて説明する。なお、本処理は、図3に示した伝送路異常の原因とエラー検出機能との関係に基づいて伝送路異常の原因を識別するものであり、ゲートウェイ装置3の起動後、一定時間毎に周期的に実行される。
In other words, it is determined that the stay of the transmission message has occurred when writing to the transmission buffer 353 cannot be performed within a specified time after the transmission request is generated.
[Abnormality detection processing]
The abnormality detection process executed by the CPU 341 will be described with reference to the flowchart of FIG. This process is to identify the cause of the transmission line abnormality based on the relationship between the cause of the transmission line abnormality and the error detection function shown in FIG. Is executed automatically.

本処理では、CPU341は、まずS210にて、制御レジスタ352からエラー状態を読み込んで、バスオフが発生しているか否かを判断する。バスオフが発生していない場合(S210:NO)、S220にて、滞留監視処理での判定結果から送信メッセージの滞留が発生しているか否かを判断する。滞留が発生していないと判断した場合(S220:NO)は本処理を終了し、滞留が発生していると判断した場合はS230に進む。   In this process, the CPU 341 first reads an error state from the control register 352 in S210, and determines whether a bus off has occurred. When the bus-off has not occurred (S210: NO), it is determined in S220 whether or not the transmission message is retained from the determination result in the retention monitoring process. If it is determined that no stagnation has occurred (S220: NO), this process ends. If it is determined that stagnation has occurred, the process proceeds to S230.

S230では、TxECNTが0であるか否かを判断し、TxECNTが0でなければS240にて、TxECNTが256より小さく、かつRxECNTが0であるか否かを判断する。   In S230, it is determined whether TxECNT is 0. If TxECNT is not 0, it is determined in S240 whether TxECNT is smaller than 256 and RxECNT is 0.

TxECNT≧256またはRx>0(S240:NO)である場合、S250にて「ノイズによる通信不能状態」であると判断してS310に進む。0<TxECNT<25
6かつRxECNT=0(S240:YES)である場合、S260にて「伝送路断線」であると判断してS310に進む。TxECNT=0(S230:YES)である場合、S270にて「伝送路ショート:ドミナント固着」であると判断してS310に進む。
If TxECNT ≧ 256 or Rx> 0 (S240: NO), it is determined in S250 that the communication is impossible due to noise, and the process proceeds to S310. 0 <TxECNT <25
6 and RxECNT = 0 (S240: YES), it is determined that the transmission line is disconnected in S260, and the process proceeds to S310. If TxECNT = 0 (S230: YES), it is determined in S270 that “transmission path short-circuit is dominant” and the process proceeds to S310.

先のS210にて、バスオフが発生していると判断した場合(S210:YES)、S280にて、RxECNTが0より大きいか否かを判断する。
RxECNT>0(S280:YES)である場合、S290にて「ノイズによる通信不能状態」であると判断してS310に進む。RxECNT=0(S280:NO)である場合、S300にて「伝送路ショート:レセッシブ固着」であると判断してS310に進む。
If it is determined in S210 that a bus-off has occurred (S210: YES), it is determined in S280 whether RxECNT is greater than zero.
If RxECNT> 0 (S280: YES), it is determined in S290 that the communication is impossible due to noise, and the process proceeds to S310. If RxECNT = 0 (S280: NO), it is determined in S300 that “transmission path short: recessive sticking” and the process proceeds to S310.

S310では、S250〜S270,S290,S300での判定結果を、RAM343の不揮発性メモリで構成された所定領域に記憶して本処理を終了する。
なお、RAM34に記憶された判定結果は、情報提供処理により、コネクタ5に接続された診断装置6からの要求に従って読み出され診断装置6に提供される。
In S310, the determination results in S250 to S270, S290, and S300 are stored in a predetermined area configured by the non-volatile memory of the RAM 343, and this process ends.
The determination result stored in the RAM 34 is read out according to a request from the diagnostic device 6 connected to the connector 5 and provided to the diagnostic device 6 by the information providing process.

[効果]
以上詳述したように、車載通信システム1を構成するゲートウェイ装置3によれば、バス4を介した正常な通信ができない場合に、CANで規定された標準的なエラー管理機能(送信エラーカウンタ、受信エラーカウンタ、エラー状態)とフレームの送信可否の情報(ひいては送信メッセージの滞留状態)に基づき、特別な付加回路を必要とすることなく、伝送路異常の状態(伝送路断線/伝送路ショート:レセッシブ固着/伝送路ショート:ドミナント固着/ノイズによる通信不能状態)を識別することができる。
[effect]
As described above in detail, according to the gateway device 3 constituting the in-vehicle communication system 1, when normal communication via the bus 4 cannot be performed, the standard error management function (transmission error counter, Based on the reception error counter and error status) and information on whether or not to transmit a frame (and thus the staying status of the transmission message), a transmission line abnormality state (transmission line disconnection / transmission line short: Recessive sticking / transmission path short: dominant sticking / no communication due to noise) can be identified.

[他の実施形態]
以上、本発明の実施形態について説明したが、本発明は上記実施形態に限定されることなく、種々の形態を採り得る。
[Other Embodiments]
As mentioned above, although embodiment of this invention was described, this invention can take a various form, without being limited to the said embodiment.

(1)上記実施形態では、S310において、伝送路状態の判定結果を単純に記憶しているが、例えば、2回以上連続して同じ判定結果が得られた場合に、これを記憶するようにしてもよい。   (1) In the above embodiment, the determination result of the transmission path state is simply stored in S310. For example, when the same determination result is obtained twice or more, this is stored. May be.

(2)上記実施形態では、伝送路異常を判定する手順は、図5のフローチャートに示した内容に限定されるものではなく、図3に示した表に基づき、伝送路異常の状態を識別可能な範囲で、エラー検出機能を任意に組み合わせて手順を構成すればよい。   (2) In the above embodiment, the procedure for determining a transmission line abnormality is not limited to the content shown in the flowchart of FIG. 5, and the state of the transmission line abnormality can be identified based on the table shown in FIG. In such a range, the procedure may be configured by arbitrarily combining error detection functions.

(3)上記実施形態における一つの構成要素が有する機能を複数の構成要素として分散させたり、複数の構成要素が有する機能を一つの構成要素に統合させたりしてもよい。また、上記実施形態の構成の少なくとも一部を、同様の機能を有する公知の構成に置き換えてもよい。また、上記実施形態の構成の一部を省略してもよい。また、上記実施形態の構成の少なくとも一部を、他の上記実施形態の構成に対して付加または置換してもよい。なお、特許請求の範囲に記載した文言のみによって特定される技術思想に含まれるあらゆる態様が本発明の実施形態である。   (3) The functions of one component in the above embodiment may be distributed as a plurality of components, or the functions of a plurality of components may be integrated into one component. Further, at least a part of the configuration of the above embodiment may be replaced with a known configuration having the same function. Moreover, you may abbreviate | omit a part of structure of the said embodiment. Further, at least a part of the configuration of the above embodiment may be added to or replaced with the configuration of the other embodiment. In addition, all the aspects included in the technical idea specified only by the wording described in the claim are embodiment of this invention.

(4)本発明の伝送路異常検出装置は、上述のゲートウェイ装置に適用する以外に、当該ゲートウェイ装置を構成要素とするシステム、伝送路異常検出装置としてコンピュータを機能させるためのプログラム、このプログラムを記録した媒体、伝送路異常検出方法など、種々の形態で実現することもできる。   (4) The transmission line abnormality detection device of the present invention is applied to the gateway device described above, a system including the gateway device as a constituent element, a program for causing a computer to function as the transmission line abnormality detection device, and this program It can also be realized in various forms such as a recorded medium and a transmission path abnormality detection method.

1…車載通信システム 3…ゲートウェイ装置 4…バス 5…コネクタ 6…診断装置 21,31…終端回路 22,32…CANトランシーバ 23,33…マイクロコンピュータ(マイコン) 34…コア部 35…CANコントローラ 351…通信実行部 352…制御レジスタ 353…送信バッファ 354…受信バッファ   DESCRIPTION OF SYMBOLS 1 ... In-vehicle communication system 3 ... Gateway apparatus 4 ... Bus 5 ... Connector 6 ... Diagnostic apparatus 21, 31 ... Termination circuit 22, 32 ... CAN transceiver 23, 33 ... Microcomputer (microcomputer) 34 ... Core part 35 ... CAN controller 351 ... Communication execution unit 352 ... control register 353 ... transmission buffer 354 ... reception buffer

Claims (6)

CAN(Controller Area Network )プロトコルに従った通信を実行するノードに搭載され、通信フレームを送受信する伝送路の異常を検出する伝送路異常検出装置であって、
送信要求が発生してから予め設定された規定時間以内に送信完了したか否かを判断する送信メッセージ滞留判定手段(34:S110〜S170)と、
送信の成否および送信に関わるエラーの発生に応じてカウント値が増減する送信エラーカウント手段(35)と、
受信の成否および受信に関わるエラーの発生に応じてカウント値が増減する受信エラーカウント手段(35)と、
前記送信エラーカウント手段でのカウント値に従って、通信への参加が禁止されるバスオフの状態にあるか否かを判断するバスオフ判定手段(35)と、
前記送信メッセージ滞留判定手段および前記バスオフ判定手段での判定結果、前記送信エラーカウント手段および前記受信エラーカウント手段でのカウント値に従って、前記伝送路の異常の有無および該異常の状態を判断する異常判定手段(34:S210〜S300)と、
を備えることを特徴とする伝送路異常検出装置。
A transmission path abnormality detection device that is mounted on a node that performs communication according to a CAN (Controller Area Network) protocol and detects an abnormality in a transmission path that transmits and receives communication frames.
A transmission message retention determination means (34: S110 to S170) for determining whether or not the transmission is completed within a predetermined time set in advance after the transmission request is generated;
A transmission error counting means (35) for increasing or decreasing the count value in accordance with the success or failure of transmission and the occurrence of an error related to transmission;
A reception error counting means (35) in which the count value increases or decreases in accordance with the success or failure of reception and the occurrence of an error related to reception;
A bus-off determining means (35) for determining whether or not a bus-off state in which participation in communication is prohibited according to a count value in the transmission error counting means;
Abnormality determination for determining the presence / absence of the abnormality in the transmission path and the state of the abnormality according to the determination results in the transmission message retention determination means and the bus-off determination means, and the count values in the transmission error count means and the reception error count means Means (34: S210 to S300);
A transmission line abnormality detection device comprising:
前記異常識別手段は、前記伝送路の断線、および前記伝送路上の電気信号がレセッシブに固着する前記伝送路のショート、前記伝送路上の電気信号がドミナントに固着する前記伝送路のシート、ノイズによる通信不能状態を、判断対象とすることを特徴とする請求項1に記載の伝送路異常検出装置。   The abnormality identification means includes: a disconnection of the transmission line; a short circuit of the transmission line in which the electrical signal on the transmission line is firmly fixed; a sheet of the transmission line to which the electrical signal on the transmission line is firmly fixed; 2. The transmission line abnormality detection device according to claim 1, wherein an impossible state is a determination target. 前記異常識別手段での判定結果を記憶する記憶手段(34:S310)を備えることを特徴とする請求項1または請求項2に記載の伝送路異常検出装置。   The transmission line abnormality detection device according to claim 1 or 2, further comprising storage means (34: S310) for storing a determination result by the abnormality identification means. 前記記憶手段は、前記異常識別手段にて2回以上連続して同じ判断がされた場合に、該判定結果を記憶することを特徴とする請求項3に記載の伝送路異常検出装置。   4. The transmission line abnormality detection device according to claim 3, wherein the storage means stores the determination result when the abnormality determination means makes the same determination twice or more consecutively. 前記伝送路に着脱可能な診断装置からの要求に応じて、前記記憶手段による記憶内容を前記診断装置に提供する情報読出手段(34)を備えることを特徴とする請求項3または請求項4に記載の伝送路異常検出装置。   5. The information reading means (34) for providing the contents stored in the storage means to the diagnostic apparatus in response to a request from the diagnostic apparatus that can be attached to and detached from the transmission path. The transmission line abnormality detection device described. 複数のネットワークを相互に接続するゲートウェイ機能を備えたノードに搭載されていることを特徴とする請求項1ないし請求項5のいずれか1項に記載の伝送路異常検出装置。   6. The transmission line abnormality detection device according to claim 1, wherein the transmission line abnormality detection device is mounted on a node having a gateway function for connecting a plurality of networks to each other.
JP2014145320A 2014-07-15 2014-07-15 Transmission line abnormality detection device Active JP6176199B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014145320A JP6176199B2 (en) 2014-07-15 2014-07-15 Transmission line abnormality detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014145320A JP6176199B2 (en) 2014-07-15 2014-07-15 Transmission line abnormality detection device

Publications (2)

Publication Number Publication Date
JP2016020185A true JP2016020185A (en) 2016-02-04
JP6176199B2 JP6176199B2 (en) 2017-08-09

Family

ID=55265337

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014145320A Active JP6176199B2 (en) 2014-07-15 2014-07-15 Transmission line abnormality detection device

Country Status (1)

Country Link
JP (1) JP6176199B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018052378A (en) * 2016-09-30 2018-04-05 日立オートモティブシステムズ株式会社 Electronic control device for automobile
WO2018070601A1 (en) * 2016-10-10 2018-04-19 주식회사 페스카로 Can controller safe against can-communication-based hacking attack
JP2020195060A (en) * 2019-05-28 2020-12-03 株式会社ミツバ Communication abnormality detection device
US11095475B2 (en) 2019-03-06 2021-08-17 Toyota Jidosha Kabushiki Kaisha Communication failure detection device
CN114281744A (en) * 2021-12-23 2022-04-05 北京天融信网络安全技术有限公司 CAN bus relay circuit, control method, device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004348274A (en) * 2003-05-20 2004-12-09 Fuji Heavy Ind Ltd Diagnostic device for communication failure
JP2008236408A (en) * 2007-03-20 2008-10-02 Auto Network Gijutsu Kenkyusho:Kk Multiplex communication apparatus for vehicle
US20090183033A1 (en) * 2008-01-10 2009-07-16 Toyota Jidosha Kabushiki Kaisha Fault location device, communication device, and fault location method
JP2010093676A (en) * 2008-10-10 2010-04-22 Toyota Motor Corp Gateway device, vehicle network, and one-side breaking detection method
JP2013258689A (en) * 2012-05-14 2013-12-26 Denso Corp Fail-safe controller
JP2014113860A (en) * 2012-12-06 2014-06-26 Toyota Motor Corp Relay device, and on-vehicle system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004348274A (en) * 2003-05-20 2004-12-09 Fuji Heavy Ind Ltd Diagnostic device for communication failure
JP2008236408A (en) * 2007-03-20 2008-10-02 Auto Network Gijutsu Kenkyusho:Kk Multiplex communication apparatus for vehicle
US20090183033A1 (en) * 2008-01-10 2009-07-16 Toyota Jidosha Kabushiki Kaisha Fault location device, communication device, and fault location method
JP2009161148A (en) * 2008-01-10 2009-07-23 Toyota Motor Corp Fault location detecting device, communication device, and fault location detecting method
JP2010093676A (en) * 2008-10-10 2010-04-22 Toyota Motor Corp Gateway device, vehicle network, and one-side breaking detection method
JP2013258689A (en) * 2012-05-14 2013-12-26 Denso Corp Fail-safe controller
JP2014113860A (en) * 2012-12-06 2014-06-26 Toyota Motor Corp Relay device, and on-vehicle system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018052378A (en) * 2016-09-30 2018-04-05 日立オートモティブシステムズ株式会社 Electronic control device for automobile
WO2018070601A1 (en) * 2016-10-10 2018-04-19 주식회사 페스카로 Can controller safe against can-communication-based hacking attack
US10764326B2 (en) 2016-10-10 2020-09-01 Fescaro Co., Ltd. Can controller safe against can-communication-based hacking attack
US11095475B2 (en) 2019-03-06 2021-08-17 Toyota Jidosha Kabushiki Kaisha Communication failure detection device
JP2020195060A (en) * 2019-05-28 2020-12-03 株式会社ミツバ Communication abnormality detection device
JP7190964B2 (en) 2019-05-28 2022-12-16 株式会社ミツバ Communication error detector
CN114281744A (en) * 2021-12-23 2022-04-05 北京天融信网络安全技术有限公司 CAN bus relay circuit, control method, device and electronic equipment

Also Published As

Publication number Publication date
JP6176199B2 (en) 2017-08-09

Similar Documents

Publication Publication Date Title
JP4407752B2 (en) FAILURE LOCATION DETECTION DEVICE, COMMUNICATION DEVICE, AND FAILURE LOCATION DETECTION METHOD
JP6176199B2 (en) Transmission line abnormality detection device
US20180144119A1 (en) Misuse detection method, misuse detection electronic control unit, and misuse detection system
JP5071151B2 (en) COMMUNICATION SYSTEM, ABNORMALITY ESTIMATION METHOD, AND INFORMATION READING DEVICE
JP6369341B2 (en) In-vehicle communication system
US10462161B2 (en) Vehicle network operating protocol and method
JP2017034590A (en) Communication network and relay device
CN112347021B (en) Security module for serial communication device
EP2573982A1 (en) System and method for testing a communications network having a central bus guardian (cbg) to detect a faulty condition associated with the cbg
JP6384332B2 (en) Electronic control unit
JP6332060B2 (en) In-vehicle network
JP5696685B2 (en) In-vehicle communication system, communication abnormality monitoring method for in-vehicle communication system, and communication abnormality monitoring program for in-vehicle communication system
JP4968169B2 (en) Communication system and communication method
JP6743724B2 (en) Communication network and communication terminal
CN116266803A (en) Device for a controller area network
JP7103197B2 (en) Communications system
JP2014027510A (en) Communication controller
JP6365876B2 (en) node
JP2007221550A (en) Failure diagnostic device and program
JP4959484B2 (en) Relay connection unit
JP2018086950A (en) Communication system
JP7205439B2 (en) electronic controller
JP2011229079A (en) Electronic control unit
JP7056205B2 (en) Microcomputer, electronic control device
JP2024033325A (en) Apparatus and method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160909

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170531

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170626

R151 Written notification of patent or utility model registration

Ref document number: 6176199

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