JP6384332B2 - Electronic control unit - Google Patents
Electronic control unit Download PDFInfo
- 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
Links
- 238000004891 communication Methods 0.000 claims description 186
- 230000005540 biological transmission Effects 0.000 claims description 132
- 230000005856 abnormality Effects 0.000 claims description 69
- 230000004044 response Effects 0.000 claims description 16
- 230000002159 abnormal effect Effects 0.000 claims description 7
- 238000000034 method Methods 0.000 description 43
- 238000012545 processing Methods 0.000 description 15
- 238000003745 diagnosis Methods 0.000 description 6
- 238000011084 recovery Methods 0.000 description 6
- 238000001514 detection method Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
Images
Landscapes
- Debugging And Monitoring (AREA)
- Bus Control (AREA)
- Small-Scale Networks (AREA)
- Maintenance And Management Of Digital Transmission (AREA)
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
ところで、電子制御装置は、通信バスに異常が発生することで、通信バスに送信信号を送信できない状態が起こることもありうる。そして、電子制御装置は、自身のマイコンが通信バスに送信信号を送信し、通信バスに接続された他の電子制御装置から受信完了を示す応答信号を受信したか否かによって、通信バスに異常が発生しているか否かを検出することが考えられる。 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.
以下において、図面を参照しながら、発明を実施するための複数の形態を説明する。各形態において、先行する形態で説明した事項に対応する部分には同一の参照符号を付して重複する説明を省略する場合がある。各形態において、構成の一部のみを説明している場合は、構成の他の部分については先行して説明した他の形態を参照し適用することができる。 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
この通信バス200は、高電位側ライン210と低電位側ライン220とを含む二線式の通信線である。なお、高電位側ライン210及び低電位側ライン220における高電位と低電位とは、各ライン間における相対的な電位を示すものである。通信バス200を介した通信は、高電位側ライン210と低電位側ライン220との間に発生する差動電圧(電位差)によって通信を成立させる通信方式である。電子制御装置100は、この通信方式によって、通信バス200に接続された他の装置と通信可能に構成されている。つまり、電子制御装置100は、通信バス200に接続された複数のノードの一つである。なお、各ノードは、自身に固有の識別情報(以下、ID)を含む送信信号を送信する。
The
このような通信方式は、一例として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
第1マイコン10は、特許請求の範囲における主マイコンに相当する。一方、第2マイコン20は、特許請求の範囲における他マイコンに相当する。各マイコン10,20は、CPU、ROM、RAM、レジスタなどを備えた所謂マイクロコンピュータである。また、各マイコン10,20は、通信バス200に流れている伝送信号を受信するとともに、通信バス200に送信信号を送信するものである。よって、各マイコン10,20は、通信バス200を介した通信を行うための通信コントローラを備えている。通信コントローラは、特許請求の範囲における通信部に相当する。各マイコン10,20は、例えば、受信した伝送信号に含まれる情報を制御値として各種制御を実行する。なお、伝送信号に含まれる情報は、受信値と言うこともできる。
The
なお、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
第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 /
第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
なお、アンド回路30は、出力端が通信インタフェース40に接続されている。アンド回路30は、各マイコン10,20からの送信信号のいずれかがローレベルである場合にはローレベルと出力し、各マイコン10,20からの送信信号が共にハイレベルである場合にはハイレベルを出力する。
The AND
第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
通信インタフェース40は、アンド回路30の出力レベル(論理レベル)に応じて、高電位側ライン210と低電位側ライン220に電位差を生じさせることで、通信バス200での通信を成立させる。つまり、通信インタフェース40は、アンド回路30の出力レベルに応じて、通信バス200をドミナントあるいはリセッシブのいずれかの電位とする。また、通信インタフェース40は、高電位側ライン210と低電位側ライン220との電位差を各マイコン10,20における論理レベルに変換し、第1受信ポートRx1及び第2受信ポートRx2に出力する。なお、通信インタフェース40は、CAN−ICと称することもできる。
The
通信インタフェース40とアンド回路30とを接続している送信ラインは、通信インタフェース40を介して通信バス200と接続されている。また、通信インタフェース40と第1受信ポートRx1及び第2受信ポートRx2とを接続している受信ラインは、通信インタフェース40を介して通信バス200と接続されている。更に、送信ラインと受信ラインとは、通信インタフェース40内で接続されている。
A transmission line connecting the
このため、電子制御装置100は、通信バス200に送信する送信信号が通信バス200を介することなく各マイコン10,20に送信され、各マイコン10,20が送信信号を受信するように構成されている。例えば、第1マイコン10が送信する送信信号は、通信バス200に出力されるとともに、通信バス200を介することなく第2マイコン20に送信される。なお、第1マイコン10と第2マイコン20は、通信バス200を介して通信することもできる。
For this reason, the
なお、本実施形態では、二つのマイコン10,20を備えた電子制御装置100を採用した。しかしながら、本発明はこれに限定されない。電子制御装置100は、三つ以上のマイコンを備えていてもよい。
In the present embodiment, the
ここで、電子制御装置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
なお、バスオフとは、通信バス200上の通信に参加できない状態を示す。つまり、各マイコン10,20は、上記のように通信バス200に異常が発生していると判定した場合、通信バス200における通信に参加できない状態とする。よって、バスオフは、高電位側ライン210が低電位に固着したり、低電位側ライン220が高電位に固着したり、高電位側ライン210と低電位側ライン220とが短絡した場合などに起こる。
Bus off indicates a state in which communication on the
次に、図2を用いて、第1マイコン10の処理動作に関して説明する。第1マイコン10は、所定時間毎に、図2のフローチャートで示す処理を実行する。
Next, the processing operation of the
ステップS10では、バスオフ推定フラグがオンであるか否かを判定する。第1マイコン10は、バスオフ推定フラグがオンと判定した場合はステップS15へ進み、バスオフ推定フラグがオフと判定した場合はステップS11へ進む。バスオフ推定フラグに関しては、後程説明する。
In step S10, it is determined whether or not the bus-off estimation flag is on. The
ステップ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
このバスオフ推定処理に関しては、図4を用いて説明する。なお、第1マイコン10は、他のノードの少なくとも一つから予め設定された送信周期、すなわち規定の送信周期で伝送信号が送信されるように設定されている。また、第1マイコン10は、受信周期を計測しており、且つ、予め設定された送信周期を把握している。ここでは、第1マイコン10は、第1IDのノードから予め設定された送信周期で伝送信号が送信されるとともに、第2IDのノードから予め設定された送信周期で伝送信号が送信されるように設定されている。
This bus-off estimation process will be described with reference to FIG. The
ステップ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
ステップ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
ステップ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
なお、ここでの2倍というのは、一例である。また、第1マイコン10は、ステップS40とステップS41の一方のみを実行するものであってもよい。つまり、第1マイコン10は、他のノードの少なくとも一つから予め設定された送信周期で送信される伝送信号を受信できない未受信時間が送信周期を超えた場合、通信バス200に異常が生じていると推定するものであればよい。なお、この時点では、通信バス200に異常が生じていると決定するのではなく推定するだけである。これは、未受信時間が送信周期を超えた原因が通信バス200の異常ではなく、伝送信号を送信するノード側の故障という可能性もあるからである。
Note that the double here is an example. The
ステップ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
ステップ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
第1マイコン10は、第2マイコン20に対してバス離脱を要求する場合、第1入出力ポート11を介して行うことができる。つまり、第1マイコン10は、第1入出力ポート11をオフ及びオンすることで、第2マイコン20にバス離脱を要求する。よって、電子制御装置100は、簡易なロジックでの実装が可能である。言い換えると、電子制御装置100は、簡易なロジックで、第1マイコン10から第2マイコン20に対してバス離脱を要求できる。
When the
なお、電子制御装置100が第1マイコン10と第2マイコン20の他にも通信バス200を介して通信可能なマイコンを備えていた場合、第1マイコン10は、そのマイコンに対してもバス離脱要求を行う。つまり、電子制御装置100は、第1マイコン10のみを送受信可能状態とし、第1マイコン10を除く他マイコンを送信不可状態とする。
In addition, when the
また、本発明は、バスオフ推定処理と、バス離脱要求処理とを行う専用の装置を備えた電子制御装置であっても採用できる。しかしながら、電子制御装置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
ステップ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
ステップS51では、バスオフ状態であるか否かを判定する。第1マイコン10は、バスオフフラグレジスタがバスオフ状態であるか否かを判定し、バスオフ状態であると判定した場合はステップS52へ進み、バスオフ状態でないと判定した場合はステップS54へ進む。つまり、第1マイコン10は、バスオフフラグレジスタがバスオフ状態の場合に、応答信号を受信できなかった回数が所定回数に達したとみなし、通信バス200に異常が発生していると判定する。よって、第1マイコン10は、バスオフフラグレジスタを確認することで、簡単にバスオフ異常を検出できる。
In step S51, it is determined whether or not the bus is off. The
ステップS52では、バスオフ異常と判定する。第1マイコン10は、例えば、バスオフ異常であることをRAMなどに記憶する。
In step S52, it is determined that the bus is off abnormally. For example, the
ステップ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
ステップ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
また、第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
ステップ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
ステップ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
ステップ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
第1マイコン10は、ステップS19でバスオフ異常フラグにオフをセットし、ステップS20でバスオフ推定フラグにオフをセットする。
The
ステップ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
第1マイコン10は、第2マイコン20に対してバス復帰を要求する場合、第1入出力ポート11を介して行うことができる。つまり、第1マイコン10は、第1入出力ポート11をオン及びオフすることで、第2マイコン20にバス復帰を要求する。よって、電子制御装置100は、簡易なロジックでの実装が可能である。言い換えると、電子制御装置100は、簡易なロジックで、第1マイコン10から第2マイコン20に対してバス復帰を要求できる。
When the
なお、電子制御装置100が第1マイコン10と第2マイコン20の他にも通信バス200を介して通信可能なマイコンを備えていた場合、第1マイコン10は、そのマイコンに対してもバス復帰要求を行う。
In addition, when the
次に、図3を用いて、第2マイコン20の処理動作に関して説明する。第2マイコン20は、所定時間毎に、図3のフローチャートで示す処理を実行する。
Next, the processing operation of the
ステップ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
ステップS31では、バス離脱処理を行う。第2マイコン20は、自身で送信不可状態となるように設定する。なお、バス離脱処理の方法は、特に限定されない。
In step S31, a bus leaving process is performed. The
ステップ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
ステップS33では、バス復帰処理を行う。第2マイコン20は、自身で送受信可能状態となるように設定する。なお、バス復帰処理の方法は、特に限定されない。
In step S33, a bus return process is performed. The
なお、第1マイコン10は、通信バス200を介して受信した伝送信号を用いて、各種制御を行うものである。例えば、第1マイコン10は、車両に搭載されたエンジンやモータなどの車載機器の制御を行う。つまり、第1マイコン10は、図6に示す制御処理を実行する。この制御処理は、バスオフ検出とは独立で行われる。
The
ステップS60では、正常受信できたか否かを判定する。第1マイコン10は、通信バス200を介して送信された伝送信号を正常に受信できたか否かを判定する。そして、第1マイコン10は、正常に受信できたと判定した場合はステップS61及びステップS62へ進み、正常に受信できなかったと判定した場合はステップS63及びステップS64へ進む。
In step S60, it is determined whether or not normal reception is possible. The
ステップ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
しかしながら、バスオフ異常時は、伝送信号を正常に受信できない。このような場合、第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
以上のように、電子制御装置100は、他のノードの少なくとも一つから予め設定された送信周期で送信される伝送信号を受信することになる。そして、電子制御装置100は、送信周期で送信される伝送信号を受信できない未受信時間が送信周期を超えた場合、通信バス200に異常が生じていると推定する。よって、電子制御装置100は、他のノードとの通信ができない異常が実際に生じている場合に、通信バス200に異常が生じていると推定することができる。
As described above, the
ところで、電子制御装置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
また、第1マイコン10は、通信バス200の異常が実際に生じていた場合、応答信号を受信できないので、送信エラーカウンタのカウント値がインクリメントされ続けて、
バスオフフラグレジスタをバスオフ状態とすることができる。よって、電子制御装置100は、通信バス200における通信に参加できない状態とすることができる。
Further, the
The bus off flag register can be in a bus off state. Therefore, the
また、電子制御装置100は、周期的に送信される伝送信号を監視することによって、通信バス200に異常が生じているか否かを推定するものである。つまり、電子制御装置100は、通信バス200に流れている既存の伝送信号だけを使用して通信バス200に異常が生じているか否かを推定できる。
Further, the
以上、本発明の好ましい実施形態について説明した。しかしながら、本発明は、上記した実施形態に何ら制限されることはなく、本発明の趣旨を逸脱しない範囲において、種々の変形が可能である。 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
例えば、電子制御装置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
また、電子制御装置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
この場合、第1マイコン10は、第2通信バス300を介した通信によって第2マイコン20への要求を行ってもよい。つまり、第1マイコン10は、第2通信バス300に出力する送信信号に、バス離脱の要求やバス復帰の要求を示す情報を含ませることで、第2マイコン20にバス離脱の要求やバス復帰の要求を行うことができる。
In this case, the
このようにしても、電子制御装置100は、第1入出力ポート11や第2入出力ポート21を用いることなく、第1マイコン10から第2マイコン20に対して、バス離脱の要求やバス復帰の要求を行うことができる。また、上記シリアル通信の場合、第1マイコン10は、所定時間毎に第2マイコン20と通信を行う。これに対して、第2通信バス300を介した通信の場合、第1マイコン10は、速やかにバス離脱の要求やバス復帰の要求を行うことができる。
Even in this case, the
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)
複数の前記マイコンの夫々は、前記通信バスに送信信号を送信し、前記通信バスに接続された他の前記ノードから受信完了を示す応答信号を受信したか否かによって、前記通信バスに異常が発生しているか否かを検出するものであり、
他の前記ノードの少なくとも一つから予め設定された送信周期で送信される伝送信号を受信できない未受信時間が前記送信周期を超えた場合、前記通信バスに異常が生じていると推定する推定手段(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.
前記主マイコンは、前記ポートのオン及びオフすることで前記他マイコンへの要求を行うことを特徴とする請求項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又は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.
複数の前記マイコンの夫々は、前記レジスタに異常状態がセットされていると、前記応答信号を受信できなかった回数が所定回数に達したとみなして前記通信バスに異常が発生していると判定し、前記通信バスに異常が発生していると推定している状態で、所定時間以上、前記レジスタに異常状態がセットされない場合、前記通信バスに異常が発生していないと判定することを特徴とする請求項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.
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 (6)
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 |
JP7537310B2 (en) | 2021-02-26 | 2024-08-21 | トヨタ自動車株式会社 | Vehicle control device, vehicle control method, and vehicle control program |
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)
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 |
-
2015
- 2015-01-08 JP JP2015002443A patent/JP6384332B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2016126716A (en) | 2016-07-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6384332B2 (en) | Electronic control unit | |
KR101575547B1 (en) | The error variance detection method of can communication system and the can communication system | |
CN101483544B (en) | Fault location device, communication device, and fault location method | |
JP5071151B2 (en) | COMMUNICATION SYSTEM, ABNORMALITY ESTIMATION METHOD, AND INFORMATION READING DEVICE | |
US10635518B2 (en) | Detecting bus faults | |
KR101526413B1 (en) | Transceiver ic and operationg mwethod thereof | |
JP2006191338A (en) | Gateway apparatus for diagnosing fault of device in bus | |
JP7159921B2 (en) | Communication failure detector | |
JP6176199B2 (en) | Transmission line abnormality detection device | |
JP5578207B2 (en) | Communication load judgment device | |
US10055322B2 (en) | Interpreting signals received from redundant buses | |
JP2005277978A (en) | Method and device for automatically setting identification number | |
US20100145478A1 (en) | Field device | |
JP2009302783A (en) | Failure detecting method and failure detection system of communication network | |
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 | |
WO2022092263A1 (en) | Ground short failure detection device and node device | |
KR20160074199A (en) | Electronic control apparatus for supporting emergency mode and operating method thereof | |
JP6413979B2 (en) | Master node | |
JP7103197B2 (en) | Communications system | |
WO2020012822A1 (en) | Computation system and computation device | |
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 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |