JP6384332B2 - Electronic control unit - Google Patents

Electronic control unit Download PDF

Info

Publication number
JP6384332B2
JP6384332B2 JP2015002443A JP2015002443A JP6384332B2 JP 6384332 B2 JP6384332 B2 JP 6384332B2 JP 2015002443 A JP2015002443 A JP 2015002443A JP 2015002443 A JP2015002443 A JP 2015002443A JP 6384332 B2 JP6384332 B2 JP 6384332B2
Authority
JP
Japan
Prior art keywords
microcomputer
communication bus
bus
communication
abnormality
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2015002443A
Other languages
Japanese (ja)
Other versions
JP2016126716A (en
Inventor
理沙 白鳥
理沙 白鳥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Original Assignee
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Corp filed Critical Denso Corp
Priority to JP2015002443A priority Critical patent/JP6384332B2/en
Publication of JP2016126716A publication Critical patent/JP2016126716A/en
Application granted granted Critical
Publication of JP6384332B2 publication Critical patent/JP6384332B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、通信バスを介して外部装置との間で通信可能な電子制御装置に関する。   The present invention relates to an electronic control device capable of communicating with an external device via a communication bus.

従来、通信バスを介して外部装置との間で通信可能な電子制御装置の一例として、特許文献1に記載された電子制御装置がある。この電子制御装置は、通信バスを介した通信を行う機能を有する複数のマイコンと、外部の通信バスに接続され、通信バスに流れる伝送信号を取り込むとともに、各マイコンにて生成された送信信号を通信バスに出力する通信トランシーバとを備えている。   Conventionally, there is an electronic control device described in Patent Document 1 as an example of an electronic control device that can communicate with an external device via a communication bus. This electronic control device is connected to an external communication bus with a plurality of microcomputers having a function of performing communication via a communication bus, captures transmission signals flowing through the communication bus, and transmits transmission signals generated by each microcomputer. And a communication transceiver for outputting to the communication bus.

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

ところで、電子制御装置は、通信バスに異常が発生することで、通信バスに送信信号を送信できない状態が起こることもありうる。そして、電子制御装置は、自身のマイコンが通信バスに送信信号を送信し、通信バスに接続された他の電子制御装置から受信完了を示す応答信号を受信したか否かによって、通信バスに異常が発生しているか否かを検出することが考えられる。   By the way, there is a possibility that the electronic control device may not be able to transmit a transmission signal to the communication bus due to an abnormality occurring in the communication bus. Then, the electronic control device sends an error signal to the communication bus depending on whether its microcomputer transmits a transmission signal to the communication bus and receives a response signal indicating completion of reception from another electronic control device connected to the communication bus. It is conceivable to detect whether or not this occurs.

しかしながら、電子制御装置は、各マイコンが通信バスに送信信号を送信する際のラインと、各マイコンが通信バスから伝送信号を受信する際のラインとが接続されている。つまり、各マイコンは、電子制御装置内で通信可能に接続されている。このため、電子制御装置は、通信バスに異常が発生している場合であっても、あるマイコンが送信信号を送信すると、他のマイコンが応答信号を返信してしまい、正常に送信が行われたと判断することになる。従って、電子制御装置は、通信バスの異常を検出できないという問題がある。   However, in the electronic control device, a line when each microcomputer transmits a transmission signal to the communication bus and a line when each microcomputer receives a transmission signal from the communication bus are connected. That is, each microcomputer is connected to be communicable within the electronic control unit. For this reason, even if an abnormality occurs in the communication bus, the electronic control unit sends a response signal from one microcomputer, and another microcomputer returns a response signal, so that transmission is performed normally. It will be judged. Therefore, there is a problem that the electronic control unit cannot detect an abnormality in the communication bus.

本発明は、上記問題点に鑑みなされたものであり、複数のマイコンを備えつつ、通信バスの異常を検出できる電子制御装置を提供することを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to provide an electronic control device that can detect a communication bus abnormality while including a plurality of microcomputers.

上記目的を達成するために本発明は、
通信バスに接続された複数のノードの一つであり、通信バスに流れている伝送信号を受信するとともに、通信バスに送信信号を送信する複数のマイコン(10,20)を備え、通信バスに送信する送信信号が通信バスを介することなく各マイコンに送信され、各マイコンが送信信号を受信するように構成された電子制御装置であって、
複数のマイコンの夫々は、通信バスに送信信号を送信し、通信バスに接続された他のノードから受信完了を示す応答信号を受信したか否かによって、通信バスに異常が発生しているか否かを検出するものであり、
他のノードの少なくとも一つから予め設定された送信周期で送信される伝送信号を受信できない未受信時間が送信周期を超えた場合、通信バスに異常が生じていると推定する推定手段(S11)と、
推定手段で通信バスに異常が生じていると推定した場合、複数のマイコンにおける一つである主マイコン(10)のみを送受信可能状態とし、主マイコンを除く他マイコン(20)を送信不可状態とする送信不可手段(S14)と、
を備えていることを特徴とする。
In order to achieve the above object, the present invention provides:
One of a plurality of nodes connected to the communication bus, and includes a plurality of microcomputers (10, 20) for receiving transmission signals flowing in the communication bus and transmitting transmission signals to the communication bus. An electronic control device configured to transmit a transmission signal to be transmitted to each microcomputer without going through a communication bus, and each microcomputer receives a transmission signal,
Each of the microcomputers transmits a transmission signal to the communication bus, and whether or not an abnormality has occurred in the communication bus depending on whether or not a response signal indicating completion of reception has been received from another node connected to the communication bus. Is to detect,
Estimating means for estimating that an abnormality has occurred in the communication bus when a non-reception time during which a transmission signal transmitted in a preset transmission cycle cannot be received from at least one of the other nodes exceeds the transmission cycle (S11) When,
When it is estimated by the estimating means that an abnormality has occurred in the communication bus, only the main microcomputer (10), which is one of the plurality of microcomputers, is set in the transmit / receive enabled state, and the other microcomputers (20) excluding the main microcomputer are set in the transmit disabled state. Transmission disable means (S14) to perform,
It is characterized by having.

このように、本発明は、他のノードの少なくとも一つから予め設定された送信周期で送信される伝送信号を受信することになる。そして、本発明は、送信周期で送信される伝送信号を受信できない未受信時間が送信周期を超えた場合、通信バスに異常が生じていると推定する。よって、本発明は、他のノードとの通信ができない異常が実際に生じている場合に、通信バスに異常が生じていると推定することができる。   Thus, the present invention receives a transmission signal transmitted from at least one of the other nodes at a preset transmission cycle. And this invention presumes that abnormality has arisen in the communication bus, when the non-reception time which cannot receive the transmission signal transmitted with a transmission period exceeds a transmission period. Therefore, the present invention can estimate that an abnormality has occurred in the communication bus when an abnormality that cannot communicate with other nodes actually occurs.

ところで、本発明は、通信バスに送信する送信信号が通信バスを介することなく各マイコンに送信され、各マイコンが送信信号を受信するように構成されている。しかしながら、本発明は、通信バスに異常が生じていると推定した場合、主マイコンのみを送受信可能状態とし、他マイコンを送信不可状態とする。よって、他マイコンは、通信バスに異常が生じていると推定されている場合、主マイコンが送信した送信信号を受信したとしても、自身は送信信号を送信できない。また、主マイコンは、通信バスに異常が生じていると推定されている場合、送信信号を送信でき、且つ、通信バスに流れている伝送信号のみを受信することになる。従って、主マイコンは、通信バスの異常が実際に生じていた場合であっても、通信バスに送信信号を送信し、通信バスに接続された他のノードから受信完了を示す応答信号を受信したか否かによって、通信バスに異常が発生しているか否かを検出できる。   By the way, this invention is comprised so that the transmission signal transmitted to a communication bus may be transmitted to each microcomputer, without passing through a communication bus, and each microcomputer may receive a transmission signal. However, according to the present invention, when it is estimated that an abnormality has occurred in the communication bus, only the main microcomputer is set in a transmission / reception enabled state, and other microcomputers are set in a transmission disabled state. Therefore, when it is estimated that the other microcomputer has an abnormality in the communication bus, even if the other microcomputer receives the transmission signal transmitted by the main microcomputer, it cannot transmit the transmission signal. Further, when it is estimated that an abnormality has occurred in the communication bus, the main microcomputer can transmit a transmission signal and only receive a transmission signal flowing in the communication bus. Therefore, the main microcomputer transmits a transmission signal to the communication bus and receives a response signal indicating completion of reception from another node connected to the communication bus even when a communication bus abnormality actually occurs. Whether or not an abnormality has occurred in the communication bus can be detected.

なお、特許請求の範囲、及びこの項に記載した括弧内の符号は、ひとつの態様として後述する実施形態に記載の具体的手段との対応関係を示すものであって、発明の技術的範囲を限定するものではない。   The reference numerals in parentheses described in the claims and in this section indicate the correspondence with the specific means described in the embodiments described later as one aspect, and the technical scope of the invention is as follows. It is not limited.

実施形態における電子制御装置の概略構成を示すブロック図である。It is a block diagram showing a schematic structure of an electronic control unit in an embodiment. 実施形態における第1マイコンの処理動作を示すフローチャートである。It is a flowchart which shows the processing operation of the 1st microcomputer in embodiment. 実施形態における第2マイコンの処理動作を示すフローチャートである。It is a flowchart which shows the processing operation of the 2nd microcomputer in embodiment. 実施形態における第1マイコンのバスオフ推定処理を示すフローチャートである。It is a flowchart which shows the bus-off estimation process of the 1st microcomputer in embodiment. 実施形態における第1マイコンのバスオフ異常判定処理を示すフローチャートである。It is a flowchart which shows the bus | bowl off abnormality determination process of the 1st microcomputer in embodiment. 実施形態における第1マイコンの制御処理を示すフローチャートである。It is a flowchart which shows the control processing of the 1st microcomputer in embodiment. 変形例における電子制御装置を含む通信ネットワークの概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the communication network containing the electronic controller in a modification.

以下において、図面を参照しながら、発明を実施するための複数の形態を説明する。各形態において、先行する形態で説明した事項に対応する部分には同一の参照符号を付して重複する説明を省略する場合がある。各形態において、構成の一部のみを説明している場合は、構成の他の部分については先行して説明した他の形態を参照し適用することができる。   Hereinafter, a plurality of embodiments for carrying out the invention will be described with reference to the drawings. In each embodiment, portions corresponding to the matters described in the preceding embodiment may be denoted by the same reference numerals and redundant description may be omitted. In each embodiment, when only a part of the configuration is described, the other configurations described above can be applied to other portions of the configuration.

本実施形態では、本発明を電子制御装置100に適用した例を採用する。電子制御装置100は、例えば車両に搭載された車載制御装置などを採用できる。電子制御装置100は、図1に示すように、第1マイコン10、第2マイコン20、アンド回路30、通信インタフェース40などを備えて構成されている。また、電子制御装置100は、通信バス200に接続されている。なお、以下においては、第1マイコン10と第2マイコン20とを区別する必要がない場合、単に各マイコン10,20と記載することもある。   In this embodiment, an example in which the present invention is applied to the electronic control device 100 is employed. As the electronic control device 100, for example, an in-vehicle control device mounted on a vehicle can be adopted. As shown in FIG. 1, the electronic control device 100 includes a first microcomputer 10, a second microcomputer 20, an AND circuit 30, a communication interface 40, and the like. The electronic control device 100 is connected to the communication bus 200. In the following description, when there is no need to distinguish between the first microcomputer 10 and the second microcomputer 20, they may be simply referred to as the microcomputers 10 and 20, respectively.

この通信バス200は、高電位側ライン210と低電位側ライン220とを含む二線式の通信線である。なお、高電位側ライン210及び低電位側ライン220における高電位と低電位とは、各ライン間における相対的な電位を示すものである。通信バス200を介した通信は、高電位側ライン210と低電位側ライン220との間に発生する差動電圧(電位差)によって通信を成立させる通信方式である。電子制御装置100は、この通信方式によって、通信バス200に接続された他の装置と通信可能に構成されている。つまり、電子制御装置100は、通信バス200に接続された複数のノードの一つである。なお、各ノードは、自身に固有の識別情報(以下、ID)を含む送信信号を送信する。   The communication bus 200 is a two-wire communication line including a high potential side line 210 and a low potential side line 220. Note that the high potential and the low potential in the high potential side line 210 and the low potential side line 220 indicate relative potentials between the lines. Communication via the communication bus 200 is a communication method in which communication is established by a differential voltage (potential difference) generated between the high potential side line 210 and the low potential side line 220. The electronic control device 100 is configured to be able to communicate with other devices connected to the communication bus 200 by this communication method. That is, the electronic control device 100 is one of a plurality of nodes connected to the communication bus 200. Each node transmits a transmission signal including identification information (hereinafter referred to as ID) unique to itself.

このような通信方式は、一例としてCAN通信がある。CANは、Controller Area Networkの略称である。また、CANは、登録商標である。よって、通信バス200としては、例えばCANバスを採用できる。本実施形態では、通信バス200を介して行われる通信の一例として、CAN通信を採用する。   An example of such a communication method is CAN communication. CAN is an abbreviation for Controller Area Network. CAN is a registered trademark. Therefore, for example, a CAN bus can be adopted as the communication bus 200. In the present embodiment, CAN communication is employed as an example of communication performed via the communication bus 200.

第1マイコン10は、特許請求の範囲における主マイコンに相当する。一方、第2マイコン20は、特許請求の範囲における他マイコンに相当する。各マイコン10,20は、CPU、ROM、RAM、レジスタなどを備えた所謂マイクロコンピュータである。また、各マイコン10,20は、通信バス200に流れている伝送信号を受信するとともに、通信バス200に送信信号を送信するものである。よって、各マイコン10,20は、通信バス200を介した通信を行うための通信コントローラを備えている。通信コントローラは、特許請求の範囲における通信部に相当する。各マイコン10,20は、例えば、受信した伝送信号に含まれる情報を制御値として各種制御を実行する。なお、伝送信号に含まれる情報は、受信値と言うこともできる。   The first microcomputer 10 corresponds to the main microcomputer in the claims. On the other hand, the second microcomputer 20 corresponds to another microcomputer in the claims. Each of the microcomputers 10 and 20 is a so-called microcomputer having a CPU, a ROM, a RAM, a register, and the like. Each of the microcomputers 10 and 20 receives a transmission signal flowing through the communication bus 200 and transmits a transmission signal to the communication bus 200. Accordingly, each of the microcomputers 10 and 20 includes a communication controller for performing communication via the communication bus 200. The communication controller corresponds to the communication unit in the claims. For example, each of the microcomputers 10 and 20 executes various controls using information included in the received transmission signal as a control value. Note that information included in a transmission signal can also be referred to as a received value.

なお、CPUは、Central Processing Unitの略称である。ROMは、Read Only Memoryの略称である。RAMは、Random Access Memoryの略称である。   CPU is an abbreviation for Central Processing Unit. ROM is an abbreviation for Read Only Memory. RAM is an abbreviation for Random Access Memory.

更に、第1マイコン10は、第1入出力ポート11、第1送信ポートTx1、第1受信ポートRx1を備えている。一方、第2マイコン20は、第2入出力ポート21、第2送信ポートTx2、第2受信ポートRx2を備えている。   Further, the first microcomputer 10 includes a first input / output port 11, a first transmission port Tx1, and a first reception port Rx1. On the other hand, the second microcomputer 20 includes a second input / output port 21, a second transmission port Tx2, and a second reception port Rx2.

第1入出力ポート11及び第2入出力ポート21は、周知のI/Oポートであり、特許請求の範囲におけるポートに相当する。第1入出力ポート11及び第2入出力ポート21は、互いに電気的に接続されている。よって、第1マイコン10と第2マイコン20は、第1入出力ポート11と第2入出力ポート21を介して電気的に接続されている。例えば、第1マイコン10は、第1入出力ポート11をオン及びオフすることで、第2入出力ポート21を介して第2マイコン20に指示を行うことができる。   The first input / output port 11 and the second input / output port 21 are well-known I / O ports and correspond to ports in the claims. The first input / output port 11 and the second input / output port 21 are electrically connected to each other. Therefore, the first microcomputer 10 and the second microcomputer 20 are electrically connected via the first input / output port 11 and the second input / output port 21. For example, the first microcomputer 10 can instruct the second microcomputer 20 via the second input / output port 21 by turning the first input / output port 11 on and off.

第1送信ポートTx1及び第2送信ポートTx2は、通信バス200で送信する送信信号を出力するためのポートである。第1送信ポートTx1は、アンド回路30の一方の入力端に接続されている。一方、第2送信ポートTx2は、アンド回路30の他方の入力端に接続されている。よって、第1マイコン10の送信信号と第2マイコン20の送信信号は、アンド回路30で合成される。   The first transmission port Tx1 and the second transmission port Tx2 are ports for outputting a transmission signal transmitted through the communication bus 200. The first transmission port Tx1 is connected to one input terminal of the AND circuit 30. On the other hand, the second transmission port Tx <b> 2 is connected to the other input terminal of the AND circuit 30. Therefore, the transmission signal of the first microcomputer 10 and the transmission signal of the second microcomputer 20 are synthesized by the AND circuit 30.

なお、アンド回路30は、出力端が通信インタフェース40に接続されている。アンド回路30は、各マイコン10,20からの送信信号のいずれかがローレベルである場合にはローレベルと出力し、各マイコン10,20からの送信信号が共にハイレベルである場合にはハイレベルを出力する。   The AND circuit 30 has an output terminal connected to the communication interface 40. The AND circuit 30 outputs a low level when any of the transmission signals from the microcomputers 10 and 20 is at a low level, and outputs a high level when both of the transmission signals from the microcomputers 10 and 20 are at a high level. Output level.

第1受信ポートRx1及び第2受信ポートRx2は、通信バス200に流れている伝送信号が入力されるポートである。第1受信ポートRx1及び第2受信ポートRx2は、通信インタフェース40に接続されている。よって、各マイコン10,20は、通信インタフェース40を介して伝送信号が入力される。   The first reception port Rx1 and the second reception port Rx2 are ports to which transmission signals flowing through the communication bus 200 are input. The first reception port Rx1 and the second reception port Rx2 are connected to the communication interface 40. Therefore, each microcomputer 10, 20 receives a transmission signal via the communication interface 40.

通信インタフェース40は、アンド回路30の出力レベル(論理レベル)に応じて、高電位側ライン210と低電位側ライン220に電位差を生じさせることで、通信バス200での通信を成立させる。つまり、通信インタフェース40は、アンド回路30の出力レベルに応じて、通信バス200をドミナントあるいはリセッシブのいずれかの電位とする。また、通信インタフェース40は、高電位側ライン210と低電位側ライン220との電位差を各マイコン10,20における論理レベルに変換し、第1受信ポートRx1及び第2受信ポートRx2に出力する。なお、通信インタフェース40は、CAN−ICと称することもできる。   The communication interface 40 establishes communication on the communication bus 200 by causing a potential difference between the high potential side line 210 and the low potential side line 220 in accordance with the output level (logic level) of the AND circuit 30. That is, the communication interface 40 sets the communication bus 200 to a dominant or recessive potential according to the output level of the AND circuit 30. Further, the communication interface 40 converts the potential difference between the high potential side line 210 and the low potential side line 220 into a logic level in each of the microcomputers 10 and 20, and outputs the logical level to the first reception port Rx1 and the second reception port Rx2. Note that the communication interface 40 can also be referred to as a CAN-IC.

通信インタフェース40とアンド回路30とを接続している送信ラインは、通信インタフェース40を介して通信バス200と接続されている。また、通信インタフェース40と第1受信ポートRx1及び第2受信ポートRx2とを接続している受信ラインは、通信インタフェース40を介して通信バス200と接続されている。更に、送信ラインと受信ラインとは、通信インタフェース40内で接続されている。   A transmission line connecting the communication interface 40 and the AND circuit 30 is connected to the communication bus 200 via the communication interface 40. The reception line connecting the communication interface 40 to the first reception port Rx1 and the second reception port Rx2 is connected to the communication bus 200 via the communication interface 40. Further, the transmission line and the reception line are connected within the communication interface 40.

このため、電子制御装置100は、通信バス200に送信する送信信号が通信バス200を介することなく各マイコン10,20に送信され、各マイコン10,20が送信信号を受信するように構成されている。例えば、第1マイコン10が送信する送信信号は、通信バス200に出力されるとともに、通信バス200を介することなく第2マイコン20に送信される。なお、第1マイコン10と第2マイコン20は、通信バス200を介して通信することもできる。   For this reason, the electronic control unit 100 is configured such that a transmission signal to be transmitted to the communication bus 200 is transmitted to each of the microcomputers 10 and 20 without passing through the communication bus 200, and each of the microcomputers 10 and 20 receives the transmission signal. Yes. For example, a transmission signal transmitted by the first microcomputer 10 is output to the communication bus 200 and transmitted to the second microcomputer 20 without passing through the communication bus 200. Note that the first microcomputer 10 and the second microcomputer 20 can also communicate via the communication bus 200.

なお、本実施形態では、二つのマイコン10,20を備えた電子制御装置100を採用した。しかしながら、本発明はこれに限定されない。電子制御装置100は、三つ以上のマイコンを備えていてもよい。   In the present embodiment, the electronic control device 100 including the two microcomputers 10 and 20 is employed. However, the present invention is not limited to this. The electronic control device 100 may include three or more microcomputers.

ここで、電子制御装置100の処理動作に関して説明する。まず、各マイコン10,20における異常検出処理に関して説明する。各マイコン10,20は、通信バス200に送信信号を送信し、通信バス200に接続された他のノードから受信完了を示す応答信号を受信したか否かによって、通信バス200に異常が発生しているか否かを検出する。言い換えると、各マイコン10,20は、応答信号を受信したか否かによって、バスオフを検出する。例えば、各マイコン10,20は、応答信号を受信できなかった回数が所定回数に達した場合に通信バスに異常が発生していると判定する。詳述すると、各マイコン10,20は、応答信号を受信できなかった場合、送信エラーカウントレジストの値がインクリメントされる。そして、各マイコン10,20は、送信ユニットが異常を検出すると、送信エラーカウンタのカウント値がインクリメントされる。そして、各マイコン10,20は、カウント値>255になると、一時的にバスオフフラグレジスタがバスオフ状態となる。このバスオフフラグレジスタは、特許請求の範囲におけるレジスタに相当する。また、バスオフ状態とは、特許請求の範囲における異常状態に相当する。   Here, the processing operation of the electronic control apparatus 100 will be described. First, the abnormality detection process in each of the microcomputers 10 and 20 will be described. Each of the microcomputers 10 and 20 transmits a transmission signal to the communication bus 200, and an abnormality occurs in the communication bus 200 depending on whether or not a response signal indicating reception completion is received from another node connected to the communication bus 200. Detect whether or not. In other words, each of the microcomputers 10 and 20 detects the bus off depending on whether or not a response signal is received. For example, each of the microcomputers 10 and 20 determines that an abnormality has occurred in the communication bus when the number of times the response signal cannot be received reaches a predetermined number. More specifically, when the microcomputers 10 and 20 cannot receive the response signal, the value of the transmission error count register is incremented. Then, when each of the microcomputers 10 and 20 detects an abnormality in the transmission unit, the count value of the transmission error counter is incremented. When each of the microcomputers 10 and 20 has a count value> 255, the bus-off flag register is temporarily in a bus-off state. This bus off flag register corresponds to the register in the claims. The bus off state corresponds to an abnormal state in the claims.

なお、バスオフとは、通信バス200上の通信に参加できない状態を示す。つまり、各マイコン10,20は、上記のように通信バス200に異常が発生していると判定した場合、通信バス200における通信に参加できない状態とする。よって、バスオフは、高電位側ライン210が低電位に固着したり、低電位側ライン220が高電位に固着したり、高電位側ライン210と低電位側ライン220とが短絡した場合などに起こる。   Bus off indicates a state in which communication on the communication bus 200 cannot be participated. That is, when it is determined that an abnormality has occurred in the communication bus 200 as described above, each of the microcomputers 10 and 20 enters a state where it cannot participate in communication on the communication bus 200. Therefore, the bus-off occurs when the high potential side line 210 is fixed at a low potential, the low potential side line 220 is fixed at a high potential, or the high potential side line 210 and the low potential side line 220 are short-circuited. .

次に、図2を用いて、第1マイコン10の処理動作に関して説明する。第1マイコン10は、所定時間毎に、図2のフローチャートで示す処理を実行する。   Next, the processing operation of the first microcomputer 10 will be described with reference to FIG. The first microcomputer 10 executes the process shown in the flowchart of FIG. 2 every predetermined time.

ステップS10では、バスオフ推定フラグがオンであるか否かを判定する。第1マイコン10は、バスオフ推定フラグがオンと判定した場合はステップS15へ進み、バスオフ推定フラグがオフと判定した場合はステップS11へ進む。バスオフ推定フラグに関しては、後程説明する。   In step S10, it is determined whether or not the bus-off estimation flag is on. The first microcomputer 10 proceeds to step S15 when it is determined that the bus-off estimation flag is on, and proceeds to step S11 when it is determined that the bus-off estimation flag is off. The bus off estimation flag will be described later.

ステップS11では、バスオフ推定処理を行う(推定手段)。バスオフ推定処理は、第1マイコン10がバスオフになるか否かを推定する処理であり、言い換えると、通信バス200に異常が生じているか否かを推定する処理である。   In step S11, a bus-off estimation process is performed (estimating means). The bus-off estimation process is a process for estimating whether or not the first microcomputer 10 is turned off, in other words, a process for estimating whether or not an abnormality has occurred in the communication bus 200.

このバスオフ推定処理に関しては、図4を用いて説明する。なお、第1マイコン10は、他のノードの少なくとも一つから予め設定された送信周期、すなわち規定の送信周期で伝送信号が送信されるように設定されている。また、第1マイコン10は、受信周期を計測しており、且つ、予め設定された送信周期を把握している。ここでは、第1マイコン10は、第1IDのノードから予め設定された送信周期で伝送信号が送信されるとともに、第2IDのノードから予め設定された送信周期で伝送信号が送信されるように設定されている。   This bus-off estimation process will be described with reference to FIG. The first microcomputer 10 is set so that the transmission signal is transmitted from a predetermined transmission cycle, that is, a predetermined transmission cycle, from at least one of the other nodes. The first microcomputer 10 measures the reception cycle and grasps the preset transmission cycle. Here, the first microcomputer 10 is set so that the transmission signal is transmitted from the first ID node at a preset transmission cycle, and the transmission signal is transmitted from the second ID node at a preset transmission cycle. Has been.

ステップS40では、第1IDの未受信時間が送信周期の2倍以上であるか否かを判定する。第1マイコン10は、2倍以上であると判定した場合はステップS41へ進み、2倍以上でないと判定した場合はステップS43へ進む。   In step S40, it is determined whether or not the non-reception time of the first ID is twice or more the transmission cycle. The first microcomputer 10 proceeds to step S41 when it is determined that it is twice or more, and proceeds to step S43 when it is determined that it is not twice or more.

ステップS41では、第2IDの未受信時間が送信周期の2倍以上であるか否かを判定する。第1マイコン10は、2倍以上であると判定した場合はステップS42へ進む。しかしながら、第1マイコン10は、2倍以上でないと判定した場合はステップS43へ進む。   In step S41, it is determined whether or not the non-reception time of the second ID is twice or more the transmission cycle. If the first microcomputer 10 determines that the number is twice or more, the process proceeds to step S42. However, if the first microcomputer 10 determines that it is not twice or more, it proceeds to step S43.

ステップS42では、バスオフ推定異常と判定する。第1マイコン10は、例えば、バスオフ推定異常であることをRAMなどに記憶する。一方、ステップS43では、バスオフ推定正常と判定する。第1マイコン10は、例えば、バスオフ推定正常であることをRAMなどに記憶する。そして、第1マイコン10は、ステップS42やステップS43での処理の後、図4の処理を終了して図2のステップS12に戻る。   In step S42, it is determined that the bus-off estimation is abnormal. For example, the first microcomputer 10 stores in the RAM or the like that there is a bus-off estimation abnormality. On the other hand, in step S43, it is determined that the bus-off estimation is normal. For example, the first microcomputer 10 stores in the RAM or the like that the bus-off estimation is normal. Then, after the processing in step S42 or step S43, the first microcomputer 10 ends the processing in FIG. 4 and returns to step S12 in FIG.

なお、ここでの2倍というのは、一例である。また、第1マイコン10は、ステップS40とステップS41の一方のみを実行するものであってもよい。つまり、第1マイコン10は、他のノードの少なくとも一つから予め設定された送信周期で送信される伝送信号を受信できない未受信時間が送信周期を超えた場合、通信バス200に異常が生じていると推定するものであればよい。なお、この時点では、通信バス200に異常が生じていると決定するのではなく推定するだけである。これは、未受信時間が送信周期を超えた原因が通信バス200の異常ではなく、伝送信号を送信するノード側の故障という可能性もあるからである。   Note that the double here is an example. The first microcomputer 10 may execute only one of step S40 and step S41. That is, the first microcomputer 10 causes an abnormality in the communication bus 200 when the unreceived time during which a transmission signal transmitted from at least one of the other nodes cannot be received in a preset transmission cycle exceeds the transmission cycle. Anything that can be estimated to be present. At this point, it is not determined that an abnormality has occurred in the communication bus 200, but only an estimation. This is because the cause of the non-reception time exceeding the transmission cycle is not the abnormality of the communication bus 200 but the failure of the node side that transmits the transmission signal.

ステップS12では、バスオフ推定異常であるか否かを判定する。第1マイコン10は、バスオフ推定異常であると判定した場合はステップS13へ進み、バスオフ推定異常でないと判定した場合は図2の処理を終了する。つまり、第1マイコン10は、ステップS11での処理でバスオフ推定異常と判定した場合にステップS13へ進むことになる。また、第1マイコン10は、ステップS11での処理でバスオフ推定正常と判定した場合に図2の処理を終了することになる。なお、第1マイコン10は、ステップS13で、バスオフ推定フラグにオンをセットする。   In step S12, it is determined whether or not there is a bus-off estimation abnormality. If the first microcomputer 10 determines that the bus-off estimation abnormality has occurred, the process proceeds to step S13. If the first microcomputer 10 determines that the bus-off estimation abnormality has not occurred, the first microcomputer 10 ends the processing of FIG. That is, the first microcomputer 10 proceeds to step S13 when it is determined that the bus-off estimation abnormality is detected in the process in step S11. Moreover, the 1st microcomputer 10 will complete | finish the process of FIG. 2, when it determines with bus-off estimation normal by the process in step S11. The first microcomputer 10 sets the bus off estimation flag to ON in step S13.

ステップS14では、第2マイコン20へのバス離脱要求処理を行う(送信不可手段)。第1マイコン10は、第2マイコン20に対して、送信不可状態となるように要求する。送信不可状態とは、送信信号が出力できない状態であり、言い換える送信信号の出力が禁止された状態である。また、送信不可状態とは、伝送信号の受信のみ可能な状態、リセット状態と言うこともできる。更に、第1マイコン10は、第2送信ポートTx2からの出力ができない状態となるように、第2マイコン20に対して要求すると言える。つまり、第1マイコン10は、第2マイコン20に対して、通信バス200から離脱するように要求する。このように、電子制御装置100は、第1マイコン10のみを送受信可能状態とし、第2マイコン20を送信不可状態とする。なお、送受信可能状態とは、送信信号の送信及び伝送信号の受信が可能な状態である。よって、第1マイコン10は、送受信可能状態の場合、第1送信ポートTx1からの出力、及び第1受信ポートRx1への入力が可能である。   In step S14, a bus disconnection request process to the second microcomputer 20 is performed (transmission disabled means). The first microcomputer 10 requests the second microcomputer 20 to be in a transmission disabled state. The transmission disabled state is a state where a transmission signal cannot be output, in other words, a state where output of a transmission signal is prohibited. The transmission disabled state can also be referred to as a state in which only transmission signals can be received or a reset state. Furthermore, it can be said that the first microcomputer 10 requests the second microcomputer 20 so that the output from the second transmission port Tx2 is not possible. That is, the first microcomputer 10 requests the second microcomputer 20 to leave the communication bus 200. As described above, the electronic control unit 100 sets only the first microcomputer 10 in a transmittable / receivable state and sets the second microcomputer 20 in a transmit disabled state. The transmission / reception enabled state is a state in which a transmission signal can be transmitted and a transmission signal can be received. Therefore, the first microcomputer 10 can output from the first transmission port Tx1 and input to the first reception port Rx1 when transmission / reception is possible.

第1マイコン10は、第2マイコン20に対してバス離脱を要求する場合、第1入出力ポート11を介して行うことができる。つまり、第1マイコン10は、第1入出力ポート11をオフ及びオンすることで、第2マイコン20にバス離脱を要求する。よって、電子制御装置100は、簡易なロジックでの実装が可能である。言い換えると、電子制御装置100は、簡易なロジックで、第1マイコン10から第2マイコン20に対してバス離脱を要求できる。   When the first microcomputer 10 requests the second microcomputer 20 to leave the bus, the first microcomputer 10 can perform the request via the first input / output port 11. That is, the first microcomputer 10 requests the second microcomputer 20 to leave the bus by turning the first input / output port 11 off and on. Therefore, the electronic control device 100 can be mounted with simple logic. In other words, the electronic control unit 100 can request the bus removal from the first microcomputer 10 to the second microcomputer 20 with simple logic.

なお、電子制御装置100が第1マイコン10と第2マイコン20の他にも通信バス200を介して通信可能なマイコンを備えていた場合、第1マイコン10は、そのマイコンに対してもバス離脱要求を行う。つまり、電子制御装置100は、第1マイコン10のみを送受信可能状態とし、第1マイコン10を除く他マイコンを送信不可状態とする。   In addition, when the electronic control unit 100 includes a microcomputer capable of communicating via the communication bus 200 in addition to the first microcomputer 10 and the second microcomputer 20, the first microcomputer 10 is also disconnected from the microcomputer. Make a request. That is, the electronic control unit 100 sets only the first microcomputer 10 in a transmittable / receiveable state, and sets other microcomputers other than the first microcomputer 10 in a transmission disabled state.

また、本発明は、バスオフ推定処理と、バス離脱要求処理とを行う専用の装置を備えた電子制御装置であっても採用できる。しかしながら、電子制御装置100は、第1マイコン10がバスオフ推定処理とバス離脱要求を行うため専用の装置を備える必要がなく好ましい。   Further, the present invention can be adopted even in an electronic control device including a dedicated device that performs a bus-off estimation process and a bus leave request process. However, the electronic control device 100 is preferable because the first microcomputer 10 does not have to include a dedicated device because the bus microcomputer performs the bus-off estimation process and the bus disconnection request.

ステップS15では、バスオフ異常判定処理を行う。このバスオフ異常判定処理に関しては、図5を用いて説明する。   In step S15, a bus off abnormality determination process is performed. The bus off abnormality determination process will be described with reference to FIG.

ステップS50では、診断条件が成立しているか否かを判定する。第1マイコン10は、診断条件が成立していると判定した場合はステップS51へ進み、診断条件が成立していないと判定した場合は図5の処理を終了する。なお、診断条件とは、バスオフの検出を実施する条件である。第1マイコン10は、診断条件が成立しているか否かによって、バスオフの検出を実施しているか否かを判定する。診断条件の一例としては、イグニッションスイッチがオンや、バッテリ電圧が所定値以上などである。   In step S50, it is determined whether a diagnosis condition is satisfied. If the first microcomputer 10 determines that the diagnosis condition is satisfied, the process proceeds to step S51. If the first microcomputer 10 determines that the diagnosis condition is not satisfied, the process of FIG. The diagnosis condition is a condition for detecting the bus off. The first microcomputer 10 determines whether or not the bus-off is being detected depending on whether or not the diagnosis condition is satisfied. As an example of the diagnosis condition, the ignition switch is turned on, the battery voltage is a predetermined value or more, and the like.

ステップS51では、バスオフ状態であるか否かを判定する。第1マイコン10は、バスオフフラグレジスタがバスオフ状態であるか否かを判定し、バスオフ状態であると判定した場合はステップS52へ進み、バスオフ状態でないと判定した場合はステップS54へ進む。つまり、第1マイコン10は、バスオフフラグレジスタがバスオフ状態の場合に、応答信号を受信できなかった回数が所定回数に達したとみなし、通信バス200に異常が発生していると判定する。よって、第1マイコン10は、バスオフフラグレジスタを確認することで、簡単にバスオフ異常を検出できる。   In step S51, it is determined whether or not the bus is off. The first microcomputer 10 determines whether or not the bus off flag register is in the bus off state. If it is determined that the bus is off, the process proceeds to step S52. If it is determined that the bus is not off, the process proceeds to step S54. That is, when the bus off flag register is in the bus off state, the first microcomputer 10 determines that the number of times the response signal cannot be received has reached a predetermined number and determines that an abnormality has occurred in the communication bus 200. Therefore, the first microcomputer 10 can easily detect the bus off abnormality by checking the bus off flag register.

ステップS52では、バスオフ異常と判定する。第1マイコン10は、例えば、バスオフ異常であることをRAMなどに記憶する。   In step S52, it is determined that the bus is off abnormally. For example, the first microcomputer 10 stores in the RAM or the like that the bus is off abnormally.

ステップS53では、通信コントローラをリセットする。バスオフフラグレジスタがバスオフ状態となった原因は、第1マイコン10の通信コントローラの異常であることもありうる。よって、第1マイコン10は、通信コントローラの異常が発生した場合であっても、自身の通信コントローラをリセットすることで、その異常を解消できる可能性がある。そして、第1マイコン10は、ステップS53での処理の後、図5の処理を終了して図2のステップS16に戻る。なお、第2マイコン20は、バスオフフラグレジスタをバスオフ状態にした場合、自身の通信コントローラをリセットしてもよい。   In step S53, the communication controller is reset. The cause of the bus off flag register being in the bus off state may be an abnormality in the communication controller of the first microcomputer 10. Therefore, the first microcomputer 10 may be able to eliminate the abnormality by resetting its own communication controller even if the abnormality of the communication controller occurs. Then, after the processing in step S53, the first microcomputer 10 ends the processing in FIG. 5 and returns to step S16 in FIG. The second microcomputer 20 may reset its own communication controller when the bus off flag register is set to the bus off state.

ステップS54では、非バスオフ状態が所定時間以上継続か否かを判定する。第1マイコン10は、バスオフフラグレジスタが所定時間以上、バスオフ状態にならなかった場合、非バスオフ状態が所定時間以上継続とみなしてステップS55へ進む。つまり、第1マイコン10は、通信バス200に異常が発生していると推定している状態で、所定時間以上、バスオフフラグレジスタがバスオフ状態にならない場合、通信バス200に異常が発生していないと判定する。   In step S54, it is determined whether or not the non-bus off state continues for a predetermined time or more. If the bus off flag register has not been in the bus off state for a predetermined time or longer, the first microcomputer 10 regards the non-bus off state as continuing for the predetermined time or longer and proceeds to step S55. That is, when the first microcomputer 10 estimates that an abnormality has occurred in the communication bus 200 and the bus off flag register does not enter the bus off state for a predetermined time or more, an abnormality has occurred in the communication bus 200. Judge that there is no.

また、第1マイコン10は、バスオフフラグレジスタが所定時間経過することなくバスオフ状態になった場合、非バスオフ状態が所定時間以上継続していないとみなして図5の処理を終了する。なお、第1マイコン10は、ステップS54でNO判定して図5の処理を終了すると、図2のステップS16に戻る。   In addition, when the bus off flag register enters the bus off state without the lapse of the predetermined time, the first microcomputer 10 regards the non-bus off state as not continuing for the predetermined time or more and ends the process of FIG. When the first microcomputer 10 makes a NO determination in step S54 and ends the process of FIG. 5, the process returns to step S16 of FIG.

ステップS55では、バスオフ正常と判定する。第1マイコン10は、例えば、バスオフ正常であることをRAMなどに記憶する。そして、第1マイコン10は、ステップS55での処理の後、図5の処理を終了して図2のステップS16に戻る。   In step S55, it is determined that the bus is off normally. For example, the first microcomputer 10 stores in the RAM or the like that the bus is off normally. Then, after the processing in step S55, the first microcomputer 10 ends the processing in FIG. 5 and returns to step S16 in FIG.

ステップS16では、バスオフ異常であるか否かを判定する。第1マイコン10は、バスオフ異常であると判定した場合はステップS17へ進み、バスオフ異常でないと判定した場合はステップS18へ進む。つまり、第1マイコン10は、ステップS15での処理でバスオフ異常と判定した場合にステップS17へ進むことになる。なお、第1マイコン10は、ステップS17でバスオフ異常フラグにオンをセットする。   In step S16, it is determined whether or not the bus is abnormal. The first microcomputer 10 proceeds to step S17 if it is determined that there is a bus off abnormality, and proceeds to step S18 if it is determined that there is no bus off abnormality. That is, the first microcomputer 10 proceeds to step S17 when it is determined in step S15 that the bus is off abnormally. The first microcomputer 10 sets the bus off abnormality flag to ON in step S17.

ステップS18では、バスオフ正常であるか否かを判定する。第1マイコン10は、バスオフ正常であると判定した場合はステップS19へ進み、バスオフ正常でないと判定した場合は図2の処理を終了する。つまり、第1マイコン10は、ステップS15での処理でバスオフ正常と判定した場合にステップS19へ進むことになる。また、第1マイコン10は、ステップS15での処理でバスオフ異常ともバスオフ正常とも判定しなかった場合に図2の処理を終了する。   In step S18, it is determined whether the bus is off normally. If it is determined that the bus off is normal, the first microcomputer 10 proceeds to step S19. If it is determined that the bus off is not normal, the process of FIG. That is, if the first microcomputer 10 determines that the bus is off normally in the process at step S15, the process proceeds to step S19. Further, the first microcomputer 10 ends the process of FIG. 2 when it is not determined that the bus off is abnormal or the bus off is normal in the process at step S15.

第1マイコン10は、ステップS19でバスオフ異常フラグにオフをセットし、ステップS20でバスオフ推定フラグにオフをセットする。   The first microcomputer 10 sets the bus off abnormality flag to OFF in step S19, and sets the bus off estimation flag to OFF in step S20.

ステップS21では、第2マイコン20へのバス復帰要求処理を行う(復帰要求手段)。第1マイコン10は、第2マイコン20に対して、送受信可能状態となるように要求する。つまり、第1マイコン10は、ステップS14で通信バス200から離脱するように要求した第2マイコン20に対して、通信バス200に復帰するように要求する。このように、第1マイコン10は、第2マイコン20が送信不可状態の場合に、通信バス200に異常が発生していないと検出すると、第2マイコン20に対して送受信可能な状態となるように要求する。よって、電子制御装置100は、第2マイコン20を送信不可状態にしたとしても、通信バス200に異常がない場合は、第2マイコン20を送受信可能な状態に復帰させることができる。   In step S21, a bus return request process to the second microcomputer 20 is performed (return request means). The first microcomputer 10 requests the second microcomputer 20 to be ready for transmission / reception. That is, the first microcomputer 10 requests the second microcomputer 20 that has requested to leave the communication bus 200 in step S14 to return to the communication bus 200. As described above, when the first microcomputer 10 detects that no abnormality has occurred in the communication bus 200 when the second microcomputer 20 is in a transmission disabled state, the first microcomputer 10 is in a state in which transmission and reception with respect to the second microcomputer 20 are possible. To request. Therefore, even when the second microcomputer 20 is in a transmission disabled state, the electronic control device 100 can return the second microcomputer 20 to a state in which transmission and reception are possible when there is no abnormality in the communication bus 200.

第1マイコン10は、第2マイコン20に対してバス復帰を要求する場合、第1入出力ポート11を介して行うことができる。つまり、第1マイコン10は、第1入出力ポート11をオン及びオフすることで、第2マイコン20にバス復帰を要求する。よって、電子制御装置100は、簡易なロジックでの実装が可能である。言い換えると、電子制御装置100は、簡易なロジックで、第1マイコン10から第2マイコン20に対してバス復帰を要求できる。   When the first microcomputer 10 requests the second microcomputer 20 to return to the bus, the first microcomputer 10 can perform the request via the first input / output port 11. That is, the first microcomputer 10 requests the second microcomputer 20 to return to the bus by turning on and off the first input / output port 11. Therefore, the electronic control device 100 can be mounted with simple logic. In other words, the electronic control unit 100 can request the bus recovery from the first microcomputer 10 to the second microcomputer 20 with simple logic.

なお、電子制御装置100が第1マイコン10と第2マイコン20の他にも通信バス200を介して通信可能なマイコンを備えていた場合、第1マイコン10は、そのマイコンに対してもバス復帰要求を行う。   In addition, when the electronic control unit 100 includes a microcomputer capable of communicating via the communication bus 200 in addition to the first microcomputer 10 and the second microcomputer 20, the first microcomputer 10 returns the bus to the microcomputer. Make a request.

次に、図3を用いて、第2マイコン20の処理動作に関して説明する。第2マイコン20は、所定時間毎に、図3のフローチャートで示す処理を実行する。   Next, the processing operation of the second microcomputer 20 will be described with reference to FIG. The second microcomputer 20 executes the process shown in the flowchart of FIG. 3 every predetermined time.

ステップS30では、バス離脱要求ありか否かを判定する。第2マイコン20は、第2入出力ポート21の状態に基づいて、第1マイコン10からバス離脱要求があるのか否かを判定する。つまり、第2マイコン20は、第2入出力ポート21のオン及びオフによって、第1マイコン10からバス離脱要求があるのか否かを判定する。第2マイコン20は、バス離脱要求ありと判定した場合はステップS31へ進み、バス離脱要求なしと判定した場合はステップS32へ進む。   In step S30, it is determined whether there is a bus leave request. The second microcomputer 20 determines whether there is a bus withdrawal request from the first microcomputer 10 based on the state of the second input / output port 21. That is, the second microcomputer 20 determines whether there is a bus disconnection request from the first microcomputer 10 by turning on and off the second input / output port 21. The second microcomputer 20 proceeds to step S31 when determining that there is a bus leaving request, and proceeds to step S32 when determining that there is no bus leaving request.

ステップS31では、バス離脱処理を行う。第2マイコン20は、自身で送信不可状態となるように設定する。なお、バス離脱処理の方法は、特に限定されない。   In step S31, a bus leaving process is performed. The 2nd microcomputer 20 sets so that it may become a transmission impossible state by itself. Note that the method of bus departure processing is not particularly limited.

ステップS32では、バス復帰要求ありか否かを判定する。第2マイコン20は、第2入出力ポート21の状態に基づいて、第1マイコン10からバス復帰要求があるのか否かを判定する。つまり、第2マイコン20は、第2入出力ポート21のオン及びオフによって、第1マイコン10からバス復帰要求があるのか否かを判定する。第2マイコン20は、バス復帰要求ありと判定した場合はステップS33へ進み、バス復帰要求なしと判定した場合は図3の処理を終了する。   In step S32, it is determined whether there is a bus return request. The second microcomputer 20 determines whether there is a bus return request from the first microcomputer 10 based on the state of the second input / output port 21. That is, the second microcomputer 20 determines whether there is a bus return request from the first microcomputer 10 by turning on and off the second input / output port 21. If it is determined that there is a bus return request, the second microcomputer 20 proceeds to step S33, and if it is determined that there is no bus return request, the process of FIG.

ステップS33では、バス復帰処理を行う。第2マイコン20は、自身で送受信可能状態となるように設定する。なお、バス復帰処理の方法は、特に限定されない。   In step S33, a bus return process is performed. The second microcomputer 20 is set so that it can transmit and receive itself. Note that the bus recovery processing method is not particularly limited.

なお、第1マイコン10は、通信バス200を介して受信した伝送信号を用いて、各種制御を行うものである。例えば、第1マイコン10は、車両に搭載されたエンジンやモータなどの車載機器の制御を行う。つまり、第1マイコン10は、図6に示す制御処理を実行する。この制御処理は、バスオフ検出とは独立で行われる。   The first microcomputer 10 performs various controls using a transmission signal received via the communication bus 200. For example, the first microcomputer 10 controls in-vehicle devices such as an engine and a motor mounted on the vehicle. That is, the first microcomputer 10 executes the control process shown in FIG. This control process is performed independently of the bus off detection.

ステップS60では、正常受信できたか否かを判定する。第1マイコン10は、通信バス200を介して送信された伝送信号を正常に受信できたか否かを判定する。そして、第1マイコン10は、正常に受信できたと判定した場合はステップS61及びステップS62へ進み、正常に受信できなかったと判定した場合はステップS63及びステップS64へ進む。   In step S60, it is determined whether or not normal reception is possible. The first microcomputer 10 determines whether or not the transmission signal transmitted via the communication bus 200 has been normally received. The first microcomputer 10 proceeds to step S61 and step S62 when it is determined that the signal has been normally received, and proceeds to step S63 and step S64 when it is determined that the signal has not been normally received.

ステップS61では、第1制御値を受信値で更新する。同様に、ステップS62では、第2制御値を受信値で更新する。第1マイコン10は、第1制御値や第2制御値を用いて各種制御を実行する場合、第1制御値や第2制御値を受信した伝送信号に含まれている受信値で更新する。そして、第1マイコン10は、更新した第1制御値や第2制御値を用いて各種制御を実行する。つまり、第1マイコン10は、第1制御値や第2制御値を更新するための受信値を受信した場合、第1制御値や第2制御値を受信値で更新する。   In step S61, the first control value is updated with the received value. Similarly, in step S62, the second control value is updated with the received value. When executing various controls using the first control value and the second control value, the first microcomputer 10 updates the received value included in the transmission signal that has received the first control value and the second control value. Then, the first microcomputer 10 executes various controls using the updated first control value and second control value. That is, when the first microcomputer 10 receives a reception value for updating the first control value or the second control value, the first microcomputer 10 updates the first control value or the second control value with the reception value.

しかしながら、バスオフ異常時は、伝送信号を正常に受信できない。このような場合、第1マイコン10は、ステップS63及びステップS64を実行することになる。つまり、第1マイコン10は、第1制御値を前回値に保持したり、第2制御値を無効値で更新したりする。   However, when the bus is abnormal, the transmission signal cannot be received normally. In such a case, the first microcomputer 10 executes Step S63 and Step S64. That is, the first microcomputer 10 holds the first control value at the previous value, or updates the second control value with an invalid value.

以上のように、電子制御装置100は、他のノードの少なくとも一つから予め設定された送信周期で送信される伝送信号を受信することになる。そして、電子制御装置100は、送信周期で送信される伝送信号を受信できない未受信時間が送信周期を超えた場合、通信バス200に異常が生じていると推定する。よって、電子制御装置100は、他のノードとの通信ができない異常が実際に生じている場合に、通信バス200に異常が生じていると推定することができる。   As described above, the electronic control apparatus 100 receives a transmission signal transmitted from at least one of the other nodes at a preset transmission cycle. The electronic control device 100 estimates that an abnormality has occurred in the communication bus 200 when the non-reception time during which the transmission signal transmitted in the transmission cycle cannot be received exceeds the transmission cycle. Therefore, the electronic control unit 100 can estimate that an abnormality has occurred in the communication bus 200 when an abnormality that cannot communicate with other nodes actually occurs.

ところで、電子制御装置100は、通信バス200に送信する送信信号が通信バス200を介することなく各マイコン10,20に送信され、各マイコン10,20が送信信号を受信するように構成されている。しかしながら、電子制御装置100は、通信バス200に異常が生じていると推定した場合、第1マイコン10のみを送受信可能状態とし、第2マイコン20を送信不可状態とする。よって、第2マイコン20は、通信バス200に異常が生じていると推定されている場合、第1マイコン10が送信した送信信号を受信したとしても、自身は送信信号を送信できない。また、第1マイコン10は、通信バス200に異常が生じていると推定されている場合、送信信号を送信でき、且つ、通信バス200に流れている伝送信号のみを受信することになる。従って、第1マイコン10は、通信バス200の異常が実際に生じていた場合であっても、通信バス200に送信信号を送信できる。そして、第1マイコン10は、通信バス200に接続された他のノードから受信完了を示す応答信号を受信したか否かによって、通信バス200に異常が発生しているか否かを検出できる。このように、電子制御装置100は、複数のマイコン10,20を備えつつ、通信バス200の異常を検出できる。   By the way, the electronic control unit 100 is configured such that a transmission signal to be transmitted to the communication bus 200 is transmitted to each of the microcomputers 10 and 20 without passing through the communication bus 200, and each of the microcomputers 10 and 20 receives the transmission signal. . However, when it is estimated that an abnormality has occurred in the communication bus 200, the electronic control unit 100 sets only the first microcomputer 10 in a transmittable / receiveable state and sets the second microcomputer 20 in a transmission disabled state. Therefore, when it is estimated that an abnormality has occurred in the communication bus 200, the second microcomputer 20 cannot transmit a transmission signal even if it receives the transmission signal transmitted by the first microcomputer 10. Further, when it is estimated that an abnormality has occurred in the communication bus 200, the first microcomputer 10 can transmit a transmission signal and receive only the transmission signal flowing in the communication bus 200. Accordingly, the first microcomputer 10 can transmit a transmission signal to the communication bus 200 even when the abnormality of the communication bus 200 has actually occurred. The first microcomputer 10 can detect whether or not an abnormality has occurred in the communication bus 200 based on whether or not a response signal indicating completion of reception has been received from another node connected to the communication bus 200. As described above, the electronic control device 100 can detect an abnormality in the communication bus 200 while including the plurality of microcomputers 10 and 20.

また、第1マイコン10は、通信バス200の異常が実際に生じていた場合、応答信号を受信できないので、送信エラーカウンタのカウント値がインクリメントされ続けて、
バスオフフラグレジスタをバスオフ状態とすることができる。よって、電子制御装置100は、通信バス200における通信に参加できない状態とすることができる。
Further, the first microcomputer 10 cannot receive the response signal when the abnormality of the communication bus 200 has actually occurred, so the count value of the transmission error counter is continuously incremented,
The bus off flag register can be in a bus off state. Therefore, the electronic control apparatus 100 can be in a state where it cannot participate in communication on the communication bus 200.

また、電子制御装置100は、周期的に送信される伝送信号を監視することによって、通信バス200に異常が生じているか否かを推定するものである。つまり、電子制御装置100は、通信バス200に流れている既存の伝送信号だけを使用して通信バス200に異常が生じているか否かを推定できる。   Further, the electronic control unit 100 estimates whether or not an abnormality has occurred in the communication bus 200 by monitoring transmission signals that are periodically transmitted. That is, the electronic control unit 100 can estimate whether or not an abnormality has occurred in the communication bus 200 using only the existing transmission signal flowing in the communication bus 200.

以上、本発明の好ましい実施形態について説明した。しかしながら、本発明は、上記した実施形態に何ら制限されることはなく、本発明の趣旨を逸脱しない範囲において、種々の変形が可能である。   The preferred embodiments of the present invention have been described above. However, the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the spirit of the present invention.

第1マイコン10から第2マイコン20への要求は、第1入出力ポート11のオン及びオフに限定されない。   The request from the first microcomputer 10 to the second microcomputer 20 is not limited to turning the first input / output port 11 on and off.

例えば、電子制御装置100は、第1マイコン10と第2マイコン20とがシリアル通信可能に構成されているものとする。つまり、第1マイコン10は、バス離脱の要求やバス復帰の要求とは異なる目的で、第2マイコン20とシリアル通信を行っている。この場合、第1マイコン10は、シリアル通信によって第2マイコン20への要求を行ってもよい。例えば、第1マイコン10は、バス離脱の要求やバス復帰の要求とは異なる目的のシリアル通信データに、バス離脱の要求やバス復帰の要求を示す情報を含ませることで、第2マイコン20にバス離脱の要求やバス復帰の要求を行うことができる。このようにすることで、電子制御装置100は、余分なポートを準備せずに、第1マイコン10から第2マイコン20に対して、バス離脱の要求やバス復帰の要求を行うことができる。つまり、電子制御装置100は、第1入出力ポート11や第2入出力ポート21を用いることなく、第1マイコン10から第2マイコン20に対して、バス離脱の要求やバス復帰の要求を行うことができる。なお、シリアル通信としては、例えばSPI通信などを採用できる。   For example, the electronic control device 100 is configured such that the first microcomputer 10 and the second microcomputer 20 are capable of serial communication. In other words, the first microcomputer 10 performs serial communication with the second microcomputer 20 for the purpose different from the bus disconnection request and the bus return request. In this case, the first microcomputer 10 may make a request to the second microcomputer 20 by serial communication. For example, the first microcomputer 10 causes the second microcomputer 20 to include information indicating a request for bus disconnection or a request for bus recovery in serial communication data having a purpose different from a request for bus disconnection or a request for bus recovery. A request to leave the bus or a request to return to the bus can be made. By doing in this way, the electronic control unit 100 can make a request for bus disconnection or a bus return request from the first microcomputer 10 to the second microcomputer 20 without preparing an extra port. In other words, the electronic control device 100 issues a bus disconnection request or a bus recovery request from the first microcomputer 10 to the second microcomputer 20 without using the first input / output port 11 or the second input / output port 21. be able to. In addition, as serial communication, SPI communication etc. are employable, for example.

また、電子制御装置100は、図7に示すように、通信バス200に加えて、第2通信バス300にも接続されているものとする。つまり、電子制御装置100は、通信バス200に接続されているノードである外部制御装置110,120に加えて、第2通信バス300に接続されているノードである外部制御装置130,140と通信可能に構成されている。第2通信バス300は、通信バス200と同様にCANバスであり、高電位側ライン310と低電位側ライン320とを備えている。   Further, it is assumed that the electronic control device 100 is connected to the second communication bus 300 in addition to the communication bus 200, as shown in FIG. That is, the electronic control device 100 communicates with the external control devices 130 and 140 that are nodes connected to the second communication bus 300 in addition to the external control devices 110 and 120 that are nodes connected to the communication bus 200. It is configured to be possible. The second communication bus 300 is a CAN bus like the communication bus 200 and includes a high potential side line 310 and a low potential side line 320.

この場合、第1マイコン10は、第2通信バス300を介した通信によって第2マイコン20への要求を行ってもよい。つまり、第1マイコン10は、第2通信バス300に出力する送信信号に、バス離脱の要求やバス復帰の要求を示す情報を含ませることで、第2マイコン20にバス離脱の要求やバス復帰の要求を行うことができる。   In this case, the first microcomputer 10 may make a request to the second microcomputer 20 by communication via the second communication bus 300. That is, the first microcomputer 10 includes the information indicating the request for leaving the bus or the request for returning from the bus in the transmission signal output to the second communication bus 300, thereby requesting the second microcomputer 20 to request the bus leaving or return from the bus. Can make requests.

このようにしても、電子制御装置100は、第1入出力ポート11や第2入出力ポート21を用いることなく、第1マイコン10から第2マイコン20に対して、バス離脱の要求やバス復帰の要求を行うことができる。また、上記シリアル通信の場合、第1マイコン10は、所定時間毎に第2マイコン20と通信を行う。これに対して、第2通信バス300を介した通信の場合、第1マイコン10は、速やかにバス離脱の要求やバス復帰の要求を行うことができる。   Even in this case, the electronic control unit 100 does not use the first input / output port 11 and the second input / output port 21, and requests the bus from the first microcomputer 10 to the second microcomputer 20 to release the bus or return the bus. Can make requests. In the case of the serial communication, the first microcomputer 10 communicates with the second microcomputer 20 every predetermined time. On the other hand, in the case of communication via the second communication bus 300, the first microcomputer 10 can promptly request for bus disconnection or bus recovery.

10 第1マイコン、11 第1入出力ポート、Tx1 第1送信ポート、Rx1 第1受信ポート、20 第2マイコン、21 第2入出力ポート、Tx2 第2送信ポート、Rx2 第2受信ポート、30 アンド回路、40 通信インタフェース、100 電子制御装置、110〜140 外部制御装置、200 通信バス、210 高電位側ライン、220 低電位側ライン、300 第2通信バス、310 高電位側ライン、320 低電位側ライン   10 first microcomputer, 11 first input / output port, Tx1 first transmission port, Rx1 first reception port, 20 second microcomputer, 21 second input / output port, Tx2 second transmission port, Rx2 second reception port, 30 AND Circuit, 40 Communication interface, 100 Electronic control device, 110-140 External control device, 200 Communication bus, 210 High potential side line, 220 Low potential side line, 300 Second communication bus, 310 High potential side line, 320 Low potential side line

Claims (10)

通信バスに接続された複数のノードの一つであり、前記通信バスに流れている伝送信号を受信するとともに、前記通信バスに送信信号を送信する複数のマイコン(10,20)を備え、前記通信バスに送信する送信信号が前記通信バスを介することなく各マイコンに送信され、各マイコンが送信信号を受信するように構成された電子制御装置であって、
複数の前記マイコンの夫々は、前記通信バスに送信信号を送信し、前記通信バスに接続された他の前記ノードから受信完了を示す応答信号を受信したか否かによって、前記通信バスに異常が発生しているか否かを検出するものであり、
他の前記ノードの少なくとも一つから予め設定された送信周期で送信される伝送信号を受信できない未受信時間が前記送信周期を超えた場合、前記通信バスに異常が生じていると推定する推定手段(S11)と、
前記推定手段で前記通信バスに異常が生じていると推定した場合、複数の前記マイコンにおける一つである主マイコン(10)のみを送受信可能状態とし、前記主マイコンを除く他マイコン(20)を送信不可状態とする送信不可手段(S14)と、
を備えていることを特徴とする電子制御装置。
One of a plurality of nodes connected to a communication bus, comprising a plurality of microcomputers (10, 20) for receiving a transmission signal flowing in the communication bus and transmitting a transmission signal to the communication bus, A transmission signal to be transmitted to a communication bus is transmitted to each microcomputer without going through the communication bus, and each microcomputer is configured to receive a transmission signal,
Each of the plurality of microcomputers transmits a transmission signal to the communication bus, and an abnormality is detected in the communication bus depending on whether a response signal indicating reception completion is received from another node connected to the communication bus. It detects whether or not it has occurred,
Estimating means for estimating that an abnormality has occurred in the communication bus when a non-reception time in which a transmission signal transmitted in a preset transmission cycle cannot be received from at least one of the other nodes exceeds the transmission cycle (S11),
When it is estimated by the estimating means that an abnormality has occurred in the communication bus, only the main microcomputer (10), which is one of the plurality of microcomputers, is set in a transmittable / receivable state, and the other microcomputers (20) excluding the main microcomputer are set. A transmission disabled means (S14) for setting a transmission disabled state;
An electronic control device comprising:
前記主マイコンは、前記推定手段と前記送信不可手段とを備えており、
前記送信不可手段は、前記推定手段で前記通信バスに異常が生じていると推定した場合、前記他マイコンに対して送信不可状態となるように要求することを特徴とする請求項1に記載の電子制御装置。
The main microcomputer includes the estimation unit and the transmission impossibility unit,
The said transmission impossible means requests | requires that it will be in a transmission impossible state with respect to the said other microcomputer, when it is estimated that the said communication means has abnormality in the said estimation means. Electronic control device.
前記主マイコンは、前記他マイコンが送信不可状態の場合に、前記通信バスに異常が発生していないと検出すると、前記他マイコンに対して送受信可能な状態となるように要求する復帰要求手段(S21)を備えていることを特徴とする請求項2に記載の電子制御装置。   When the main microcomputer detects that no abnormality has occurred in the communication bus when the other microcomputer is in a transmission disabled state, the main microcomputer requests the other microcomputer to be in a state where transmission / reception is possible. The electronic control device according to claim 2, further comprising S21). 前記主マイコンと前記他マイコンは、互いに電気的に接続されたポートを備えており、
前記主マイコンは、前記ポートのオン及びオフすることで前記他マイコンへの要求を行うことを特徴とする請求項2又は3に記載の電子制御装置。
The main microcomputer and the other microcomputer have ports that are electrically connected to each other,
The electronic control device according to claim 2, wherein the main microcomputer makes a request to the other microcomputer by turning on and off the port.
前記主マイコンと前記他マイコンは、シリアル通信を行うものであり、
前記主マイコンは、前記シリアル通信によって前記他マイコンへの要求を行うことを特徴とする請求項2又は3に記載の電子制御装置。
The main microcomputer and the other microcomputer perform serial communication,
4. The electronic control device according to claim 2, wherein the main microcomputer makes a request to the other microcomputer through the serial communication.
前記通信バスに加えて、第2通信バスにも接続されており、
前記主マイコンは、前記第2通信バスを介した通信によって前記他マイコンへの要求を行うことを特徴とする請求項2又は3に記載の電子制御装置。
In addition to the communication bus, it is also connected to a second communication bus,
The electronic control device according to claim 2, wherein the main microcomputer makes a request to the other microcomputer by communication via the second communication bus.
複数の前記マイコンの夫々は、前記応答信号を受信できなかった回数が所定回数に達した場合に前記通信バスに異常が発生していると判定することを特徴とする請求項1乃至6のいずれか一項に記載の電子制御装置。   7. Each of the plurality of microcomputers determines that an abnormality has occurred in the communication bus when the number of times the response signal cannot be received reaches a predetermined number. An electronic control device according to claim 1. 複数の前記マイコンの夫々は、伝送信号が入力されるとともに送信信号を出力する通信部を備えており、前記通信バスに異常が発生していると判定した場合、自身の前記通信部をリセットすることを特徴とする請求項7に記載の電子制御装置。   Each of the plurality of microcomputers includes a communication unit that receives a transmission signal and outputs a transmission signal, and resets the communication unit when it determines that an abnormality has occurred in the communication bus. The electronic control device according to claim 7. 前記応答信号を受信できなかった回数が所定回数に達した場合に、一時的に異常状態がセットされるレジスタを備えており、
複数の前記マイコンの夫々は、前記レジスタに異常状態がセットされていると、前記応答信号を受信できなかった回数が所定回数に達したとみなして前記通信バスに異常が発生していると判定し、前記通信バスに異常が発生していると推定している状態で、所定時間以上、前記レジスタに異常状態がセットされない場合、前記通信バスに異常が発生していないと判定することを特徴とする請求項7又は8に記載の電子制御装置。
When the number of times that the response signal could not be received has reached a predetermined number of times, a register that temporarily sets an abnormal state is provided,
Each of the plurality of microcomputers, when an abnormal state is set in the register, determines that the number of times the response signal could not be received has reached a predetermined number and determines that an abnormality has occurred in the communication bus. In the state where it is estimated that an abnormality has occurred in the communication bus, if no abnormality state is set in the register for a predetermined time or more, it is determined that no abnormality has occurred in the communication bus. The electronic control device according to claim 7 or 8.
複数の前記マイコンの夫々は、前記通信バスに異常が発生していると判定した場合、前記通信バスにおける通信に参加できない状態とすることを特徴とする請求項7乃至9のいずれか一項に記載の電子制御装置。   10. Each of the plurality of microcomputers is in a state where it cannot enter communication on the communication bus when it is determined that an abnormality has occurred in the communication bus. The electronic control device described.
JP2015002443A 2015-01-08 2015-01-08 Electronic control unit Active JP6384332B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015002443A JP6384332B2 (en) 2015-01-08 2015-01-08 Electronic control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015002443A JP6384332B2 (en) 2015-01-08 2015-01-08 Electronic control unit

Publications (2)

Publication Number Publication Date
JP2016126716A JP2016126716A (en) 2016-07-11
JP6384332B2 true JP6384332B2 (en) 2018-09-05

Family

ID=56358033

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015002443A Active JP6384332B2 (en) 2015-01-08 2015-01-08 Electronic control unit

Country Status (1)

Country Link
JP (1) JP6384332B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6717104B2 (en) * 2016-08-04 2020-07-01 株式会社デンソー Electronic control unit
JP6617091B2 (en) * 2016-09-30 2019-12-04 日立オートモティブシステムズ株式会社 Electronic control unit for automobile
KR102546404B1 (en) * 2017-12-05 2023-06-23 현대자동차주식회사 Vehicle and method for controlling thereof
JP2023143241A (en) * 2022-03-25 2023-10-06 住友電装株式会社 On-vehicle device, program and information processing method
JP2023170679A (en) * 2022-05-19 2023-12-01 住友電装株式会社 On-vehicle device, program and information processing method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3770053B2 (en) * 2000-05-26 2006-04-26 三菱ふそうトラック・バス株式会社 Method for determining communication return in vehicle network
JP4465905B2 (en) * 2001-04-16 2010-05-26 株式会社デンソー Electronic control unit
JP3637029B2 (en) * 2002-03-28 2005-04-06 三菱電機株式会社 In-vehicle electronic control unit
JP5223512B2 (en) * 2008-07-10 2013-06-26 トヨタ自動車株式会社 Vehicle abnormality analysis system, vehicle abnormality analysis method, and vehicle failure analysis device
JP5071340B2 (en) * 2008-10-10 2012-11-14 トヨタ自動車株式会社 Gateway device, vehicle network, one-side disconnection detection method
JP6068931B2 (en) * 2012-10-31 2017-01-25 日立オートモティブシステムズ株式会社 Automotive control device

Also Published As

Publication number Publication date
JP2016126716A (en) 2016-07-11

Similar Documents

Publication Publication Date Title
KR101575547B1 (en) The error variance detection method of can communication system and the can communication system
JP6384332B2 (en) Electronic control unit
JP4407752B2 (en) FAILURE LOCATION DETECTION DEVICE, COMMUNICATION DEVICE, AND FAILURE LOCATION DETECTION METHOD
JP5071151B2 (en) COMMUNICATION SYSTEM, ABNORMALITY ESTIMATION METHOD, AND INFORMATION READING DEVICE
JP2006191338A (en) Gateway apparatus for diagnosing fault of device in bus
KR101526413B1 (en) Transceiver ic and operationg mwethod thereof
JP6176199B2 (en) Transmission line abnormality detection device
JP5578207B2 (en) Communication load judgment device
US10986556B2 (en) Circuit for monitoring a data processing system
US10055322B2 (en) Interpreting signals received from redundant buses
US10635518B2 (en) Detecting bus faults
US20100145478A1 (en) Field device
JP2009302783A (en) Failure detecting method and failure detection system of communication network
JP2005277978A (en) Method and device for automatically setting identification number
JP2009111911A (en) Communication apparatus, communication system, and communication method
JP5018396B2 (en) Communication apparatus and communication system
JP2007195040A (en) Node abnormality determination method
CN113726402B (en) Satellite-borne RS 485-based dual-bus self-adaptive control method
KR20160074199A (en) Electronic control apparatus for supporting emergency mode and operating method thereof
JP2009267853A (en) Communication system and communication method
US11095475B2 (en) Communication failure detection device
JP6413979B2 (en) Master node
JP7103197B2 (en) Communications system
JP6183281B2 (en) Communication system and electronic control device
JP2018086950A (en) Communication system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170525

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180723

R151 Written notification of patent or utility model registration

Ref document number: 6384332

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