JP2014086812A - Can system and node - Google Patents
Can system and node Download PDFInfo
- Publication number
- JP2014086812A JP2014086812A JP2012233118A JP2012233118A JP2014086812A JP 2014086812 A JP2014086812 A JP 2014086812A JP 2012233118 A JP2012233118 A JP 2012233118A JP 2012233118 A JP2012233118 A JP 2012233118A JP 2014086812 A JP2014086812 A JP 2014086812A
- Authority
- JP
- Japan
- Prior art keywords
- frame
- node
- transmission
- retransmission
- retransmission request
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Small-Scale Networks (AREA)
Abstract
Description
本発明は、CANシステム及びノードに関し、例えば複数のノード間でCAN(Controller Area Network)バスを介してフレームを相互に送受信する技術に好適に利用できるものである。 The present invention relates to a CAN system and a node, and can be suitably used for a technique for mutually transmitting and receiving frames between a plurality of nodes via a CAN (Controller Area Network) bus, for example.
近年、機能安全が注目を浴びており、フォルトトレラントな機能が主に車載用途で要求されている。車載系の主要ネットワークであるCANでは、エラーによる自動再送送信仕様を有する。しかしながら、CANによる通信主体となるノードの状態として、受信エラー通知不可の状態(エラーパッシブ状態)が存在する。そのため、ノードがエラーパッシブ状態のときに、そのノードにおいて通信障害によってメッセージの受信エラーが発生してしまった場合、メッセージを取りこぼしたままとなってしまう。 In recent years, functional safety has attracted attention, and fault tolerant functions are mainly required for in-vehicle applications. CAN, which is a main in-vehicle network, has an automatic retransmission transmission specification due to an error. However, there is a state in which a reception error notification is impossible (error passive state) as a state of a node that is a communication subject by CAN. For this reason, when a node has an error passive state and a message reception error occurs due to a communication failure in the node, the message remains missed.
このような問題に対して、特許文献1には、CANシステムにおいて、受信メッセージの取りこぼしを軽減するための技術が開示されている。特許文献1に開示のCANシステムでは、再送対象に設定されたメッセージが必ず再送されるようにしている。これによって、エラーパッシブ状態のノードに送信したメッセージが正常に受信されていない場合も、取りこぼしを軽減することができるようにしている。 With respect to such a problem, Patent Document 1 discloses a technique for reducing a missed received message in a CAN system. In the CAN system disclosed in Patent Document 1, a message set as a retransmission target is always retransmitted. As a result, even when a message transmitted to the node in the error passive state is not normally received, it is possible to reduce the missed message.
しかしながら、特許文献1に開示の技術では、メッセージを常に再送するようにしているため、バスの使用効率が低下してしまうという問題が生じる。その他の課題と新規な特徴は、本明細書の記述および添付図面から明らかになるであろう。 However, in the technique disclosed in Patent Document 1, since the message is always retransmitted, there arises a problem that the use efficiency of the bus is lowered. Other problems and novel features will become apparent from the description of the specification and the accompanying drawings.
一実施の形態によれば、CANシステムは、第1のノードと第2のノードを備える。第1のノードは、CANバスを介したフレームの受信に失敗したときに自ノードがエラーパッシブ状態となっている場合、フレームの再送を要求する再送要求フレームを送信する。第2のノードは、CANバスに対して送信されたフレームを記憶部に格納し、第1のノードから送信された再送要求フレームで再送が要求されたフレームを記憶部から取得し、第1のノードに再送する。 According to one embodiment, the CAN system comprises a first node and a second node. If the first node is in an error passive state when reception of a frame via the CAN bus fails, the first node transmits a retransmission request frame requesting retransmission of the frame. The second node stores the frame transmitted to the CAN bus in the storage unit, acquires the frame requested to be retransmitted from the retransmission request frame transmitted from the first node, from the storage unit, Resend to node.
前記一実施の形態によれば、バスの使用効率の低下を抑制しつつ、耐障害性を向上することができる。 According to the one embodiment, it is possible to improve fault tolerance while suppressing a decrease in bus use efficiency.
説明の明確化のため、以下の記載及び図面は、適宜、省略、及び簡略化がなされている。また、様々な処理を行う機能ブロックとして図面に記載される各要素は、ハードウェア的には、CPU、メモリ、その他の回路で構成することができ、ソフトウェア的には、メモリにロードされたプログラムなどによって実現される。したがって、これらの機能ブロックがハードウェアのみ、ソフトウェアのみ、またはそれらの組合せによっていろいろな形で実現できることは当業者には理解されるところであり、いずれかに限定されるものではない。なお、各図面において、同一の要素には同一の符号が付されており、必要に応じて重複説明は省略されている。 For clarity of explanation, the following description and drawings are omitted and simplified as appropriate. Each element described in the drawings as a functional block for performing various processes can be configured by a CPU, a memory, and other circuits in terms of hardware, and a program loaded in the memory in terms of software. Etc. Therefore, it is understood by those skilled in the art that these functional blocks can be realized in various forms by hardware only, software only, or a combination thereof, and is not limited to any one. Note that, in each drawing, the same element is denoted by the same reference numeral, and redundant description is omitted as necessary.
<実施の形態1>
実施の形態1について説明する。まず、図1を参照して、実施の形態1に係るCANシステム1000の構成について説明する。図1は、実施の形態1に係るCANシステム1000の構成図である。
<Embodiment 1>
Embodiment 1 will be described. First, the configuration of a
CANシステム1000は、例えば、ボディ系ノード101、安全系ノード102、情報系ノード103、エンジン系ノード104、及びシャーシ系ノード105等を有する。ノード101〜105のそれぞれは、CANバス90によって相互に接続されており、CANバス90によって任意のフレームを相互に送受信することができる。CANシステム1000は、自動車内に構築される。
The
ボディ系ノード101は、他のノードから受信したフレームに基づいて、ヘッドランプ、ミラー、エアコン、及びドア等のボディ系の装置の制御を行う。安全系ノード102は、他のノードから受信したフレームに基づいて、センサ及びエアバック等の安全系の装置の制御を行う。情報系ノード103は、他のノードから受信したフレームに基づいて、カーオーディオ、カーラジオ及びカーテレビ等の情報系の装置の制御を行う。エンジン系ノード104は、他のノードから受信したフレームに基づいて、エンジン及びAT(Automatic Transmission)等のエンジン系の装置の制御を行う。シャーシ系ノード105は、他のノードから受信したフレームに基づいて、ステアリング及びブレーキ等のシャーシ系の装置の制御を行う。また、ノード101〜105のそれぞれは、必要に応じて、任意のフレームを他のノードに送信する。以下、ノード101〜105のそれぞれを、総じて「ノード100」とも呼ぶ。また、CANシステム1000におけるノードの種類は、上述したボディ系、安全系、情報系、エンジン系、及びシャーシ系に限られず、異なる種類のノードを有していてもよい。
The
また、ノード101〜105のうち、少なくともいずれか1つのノードは、複数の同一種類のノードと、CANバス90とを接続するゲートウェイ(バスブリッジ)ノードであってもよい。例えば、ボディ系のゲートウェイノードは、それぞれがボディ系の装置の制御を行う複数のボディ系ノードとLIN(Local Interconnect Network)バスによって接続される。すなわち、ゲートウェイノードは、同一種類のノードと、CANバス90上の他のノードとの間で、フレームを送受信する。
In addition, at least one of the
続いて、図2を参照して、実施の形態1に係るCANシステム1000の動作概要について説明する。図2は、実施の形態1に係るCANシステム1000の動作概要を説明するための構成図である。
Subsequently, an outline of operation of the
ノード100のそれぞれは、フレームカウンタ110及び送信記録FIFO120を有している。フレームカウンタ110は、CANバス90上に現れたフレームを数えるフリーランニングカウンタである。送信記録FIFO120は、自ノードの送信済みフレームを保管するためのストレージである。
Each of the
ノード100のそれぞれは、自ノード/他ノードのどちらが送信したかに関わらず、CANバス90上に現れたフレームの送信又は受信が完了したときに、フレームカウンタ110をカウントアップする。ノード100のそれぞれは、自ノードがフレームを送信し終わり、それによるフレームカウンタ110のカウントアップを終えたタイミングで、フレームカウンタ110のフレームカウンタ値とともに、送信したフレームを送信記録FIFO120に格納する。
Each of the
ノード100のそれぞれは、自ノードがエラーパッシブ状態のときにフレームの受信エラーが発生した場合、そのフレームの再送を要求する再送要求フレームを送信する。この再送要求フレームは、その時点のフレームカウンタ110のフレームカウンタ値に基づいて、再送を要求するフレームの送信時のフレームカウンタ110のフレームカウンタ値を特定可能とする情報が含められる。
Each
ノード100のそれぞれは、再送要求フレームを受信した場合、その再送要求フレームの情報によって特定されるフレームカウンタ値に基づいて、送信記録FIFO120に格納されるフレームの中から、再送が要求されたフレームを特定する。ノード100のそれぞれは、再送要求フレームで再送が要求されたフレームが送信記録FIFO120に存在する場合、そのフレーム(再送フレーム)を再送する。また、ノード100のそれぞれは、再送要求フレームで再送が要求されたフレームが送信記録FIFO120に存在しない場合には、所定の時間の間、自フレームからのフレームの送信を抑止して、再送フレームを再送するノードにバス使用権を譲る。
When each of the
続いて、図3を参照して、実施の形態1に係るノード100の構成について説明する。図3は、実施の形態1に係るノード100の構成図である。
Next, the configuration of the
ノード100は、CANコントローラLSI(Large Scale Integration)10及びバストランシーバ20を有する。CANコントローラLSI10は、CANコントローラモジュール1、CPU(Central Processing Unit)21、及び他周辺モジュール22、及びを有する。CANコントローラモジュール1、CPU21、及び他周辺モジュール22のそれぞれは、ローカルバス23を介して相互に接続されている。
The
CANコントローラモジュール1は、ビットストリーム制御部2、メッセージハンドラ3、メッセージバッファメモリ4、フレームカウンタ5、送信記録制御部6、及び送信記録FIFO(First In First Out)7、エラー管理部8、及び再送要求送信制御部9を有する。
The CAN controller module 1 includes a bit
CANコントローラモジュール1は、ローカルバス23を介して、CPU21からアクセスされる。CANコントローラモジュール1は、バストランシーバ20を介して、CANバス90に接続されている。CANコントローラモジュール1は、他のノード100との間でフレームを送受信する。
The CAN controller module 1 is accessed from the
ビットストリーム制御部2は、メッセージハンドラ3から出力された送信フレーム40を受け取る。ビットストリーム制御部2は、受け取った送信フレーム40に基づいて、CRC(Cyclic Redundancy Check)を算出する。ビットストリーム制御部2は、CANプロトコルのフレームフォーマットに従って、算出したCRCを送信フレーム40に付加する。ビットストリーム制御部2は、CRCが付加された送信フレームに、CANプロトコルで定められたビットスタッフィングに基づいてスタッフビットを挿入する。つまり、同一論理値が連続した5ビットの次に、その論理値とは反転した論理値をとるスタッフビットが挿入される。ビットストリーム制御部2は、スタッフビットを挿入した送信フレームをビットストリーム形式で、送信信号線(TxD)30を介してバストランシーバ20に出力する。
The bit
また、ビットストリーム制御部2は、バストランシーバ20から受信信号線(RxD)31を介して出力された受信フレームをビットストリーム形式で受け取る。ビットストリーム制御部2は、受け取った受信フレームからCANプロトコルで定義されたスタッフビットを除去する。ビットストリーム制御部2は、スタッフビットを除去した受信フレームに基づいてCRCチェックを行う。ビットストリーム制御部2は、CRCチェック後、受信フレームからCRCを除去する。ビットストリーム制御部2は、CRCを除去した受信フレーム41をメッセージハンドラ3に出力する。
The bit
また、ビットストリーム制御部2は、受信フレームの受信エラー(受信失敗)を検出した場合、エラー発生信号45をエラー管理部8に出力する。エラー発生信号45は、受信エラーの発生を通知する信号である。受信エラーは、例えば、前述のCRCチェックにおいて検出されるCRCエラー、スタッフエラー、及びフォームエラー等が該当する。
Further, when the bit
また、ビットストリーム制御部2は、送信フレームの出力(送信フレームの送信)が完了したとき、又は、受信フレームの受け取り(受信フレームの受信)が完了したときに、エンドオブフレーム信号42をフレームカウンタ5に出力する。エンドオブフレーム信号42は、フレームの送信完了又は受信完了を通知する信号となる。具体的には、ビットストリーム制御部2は、受信フレームがデータフレーム又はリモートフレームである場合、受信フレームのEOF(エンドオブフレーム)を観測し、その最終ビットを観測し終えた際にエンドオブフレーム信号をフレームカウンタ5に出力する。ビットストリーム制御部2は、受信フレームがアクティブエラーフレームである場合、受信フレームのエラーデミリタを観測し、その最終ビットを観測し終えた際にエンドオブフレーム信号42をフレームカウンタ5に出力する。このように、ビットストリーム制御部2は、自ノードによってCANバス90上に送信されたフレームか、他ノードによってCANバス90上に送信されたフレームかに関わらず、CANバス90上へのフレームの送信完了に応じて、エンドオブフレーム信号42をフレームカウンタ5に出力する。
Also, the bit
また、ビットストリーム制御部2は、送信フレームの送信を完了した際には、エンドオブフレーム信号42を出力した直後に、送信フレームの送信完了を通知する送信完了信号44を送信記録制御部6に出力する。
Further, when the transmission of the transmission frame is completed, the bit
メッセージハンドラ3は、メッセージバッファメモリ4の送信バッファに格納された送信フレーム40を取得してビットストリーム制御部2に出力する。この際、メッセージハンドラ3は、その送信フレーム40を送信記録制御部6にも出力する。また、メッセージハンドラ3は、ビットストリーム制御部2から出力された受信フレーム41をメッセージバッファメモリ4の受信バッファに格納する。
The
メッセージバッファメモリ4は、受信バッファ及び送信バッファを有する。送信バッファは、他のノード100に送信する送信フレームが格納される。受信バッファは、他のノード100から受信した受信フレームが格納される。メッセージバッファメモリ4は、受信バッファ及び送信バッファを構成するための任意の記憶装置を含む。記憶装置は、例えば、レジスタ及びメモリ等である。送信フレーム及び受信フレームのそれぞれは、CAN仕様に基づき、IDが含まれるアービトレーションフィールド、データ長コード(DLC)が含まれるコントロールフィールド、任意のデータが含まれるデータフィールド等を有する。
The
フレームカウンタ5は、CANバス90に対して送信されたフレーム数をカウントする。フレームカウンタ5は、フレームカウンタ110に相当する。フレームカウンタ5は、ビットストリーム制御部2からのエンドオブフレーム信号42の出力に応じて、その内部に保持するフレームカウンタ値43をインクリメントする。フレームカウンタ5は、フレームカウンタ値43を保持するための任意の記憶装置を含む。フレームカウンタ5は、フレームカウンタ値43を送信記録制御部6及び再送要求送信制御部9に出力する。
The
送信記録制御部6は、ビットストリーム制御部2からの送信完了信号44の出力に応じて、フレームカウンタ5から出力されたフレームカウンタ値43と、メッセージハンドラ3から出力された送信フレーム40と、送信イネーブルビットのそれぞれを関連付けて、送信記録FIFO7に格納する。これによって、CANバス90上に送信された送信フレームは、その送信に応じてインクリメントされた後のフレームカウンタ値43と一意に紐付けられることになる。また、このように、送信フレーム40を送信記録FIFO7に保持しておくことで、後述するように、再送が要求された送信フレーム40を特定して再送することが可能となる。
In response to the
また、この際には、送信イネーブルビットの値は、「1」が設定される。送信イネーブルビットは、再送の有効/無効を示す情報となる。送信イネーブルビットが「1」である場合、それと関連付けられた送信フレームは再送され、送信イネーブルビットが「0」である場合は、それと関連付けられた送信フレームは再送が抑止される。送信フレームを再送した場合に、それに関連付けられた送信イネーブルビットの値が「0」に更新される。また、送信フレームがアクティブエラーフレームである場合、受け側のノードでフレーム受信に応じた装置制御が不要であるため、必ずしも再送する必要はない。そのため、送信フレームがアクティブエラーフレームである場合、それと関連付けて格納する送信イネーブルビットの値には、最初から「0」が設定される。 At this time, the value of the transmission enable bit is set to “1”. The transmission enable bit is information indicating validity / invalidity of retransmission. When the transmission enable bit is “1”, the transmission frame associated therewith is retransmitted, and when the transmission enable bit is “0”, retransmission of the transmission frame associated therewith is suppressed. When a transmission frame is retransmitted, the value of the transmission enable bit associated therewith is updated to “0”. Also, when the transmission frame is an active error frame, it is not always necessary to retransmit, since device control according to frame reception is unnecessary at the receiving node. Therefore, when the transmission frame is an active error frame, “0” is set from the beginning as the value of the transmission enable bit stored in association with it.
送信記録FIFO7は、上述の通り、フレームカウンタ値、送信イネーブルビット、及び送信フレームが送信記録制御部6によって格納される。送信記録FIFO7は、送信記録FIFO120に相当する。送信記録FIFO7は、フレームカウンタ値、送信イネーブルビット、及び送信フレームを、それぞれが関連付けられた単位毎にFIFO形式で格納する。送信記録FIFO7は、フレームカウンタ値、送信イネーブルビット、及び送信フレームを保持するための任意の記憶装置を含む。
As described above, the
エラー管理部8は、自ノードの、CANバス90に対するフレーム送受信のエラー回数をカウントするエラーカウンタ11を内蔵しており、自ノード100の状態を管理する。エラー管理部8は、CAN仕様に従って、自ノード100においてエラーが発生した場合に、エラーカウンタ11のカウンタ値をカウントアップする。そして、エラーカウンタ11のカウンタ値が所定の閾値を超えた場合、エラー管理部8は、自ノード100の状態を「エラーパッシブ状態」に遷移させる。エラーパッシブ状態では、前述の通り、CAN仕様上では、他のノード100からの再送要求に応じたフレームの再送が抑止される。
The
また、エラー管理部8は、ビットストリーム制御部2からのエラー発生信号45の出力に応じて、自ノード100の状態が「エラーパッシブ状態」となっているか否かを判断する。具体的には、エラー管理部8は、エラーカウンタ11のカウンタ値が所定の閾値を超えている場合、自ノード100の状態が「エラーパッシブ状態」であると判断する。エラー管理部8は、自ノード100の状態が「エラーパッシブ状態」であると判断した場合、受信フレームの再送要求を指示する再送要求トリガ信号46を再送要求送信制御部9に出力する。
Further, the
具体的には、エラー管理部8は、エラーカウンタ11として、送信エラーと受信エラーをそれぞれカウントする送信エラーカウンタと受信エラーカウンタを備える。すなわち、図3では、1つのエラーカウンタ11のみを図示しているが、厳密には、エラー管理部8は、送信エラーカウンタと受信エラーカウンタの2つのエラーカウンタ11を有する。送信エラーカウンタと受信エラーカウンタのカウントアップおよびカウントダウンのタイミングおよびカウント数は、CANプロトコルの規格を参照されたいが、概して、送信エラーカウンタは、送信エラーを検出したときにはカウントアップし、正常送信できたときにはカウントダウンする。同様に、受信エラーカウンタは、受信エラーを検出したときにはカウントアップし、正常受信できたときにはカウントダウンする。
Specifically, the
エラー管理部8は、その受信エラーカウンタのカウント値(REC)と、送信エラーカウンタのカウント値(TEC)に応じて、自ノード100の状態を、エラーアクティブ状態、エラーパッシブ状態、バスオフ状態の3つのエラー状態間で遷移する。エラーアクティブ状態は、バス上の通信に正常に参加できる状態であり、エラーパッシブ状態は、エラーアクティブ状態よりエラーを起こしやすい状態である。エラーパッシブ状態にあるノード100は、エラーアクティブ状態のノード100と比べ、連続送信時の制限と、エラー通知の制限が設けられている。また、バスオフ状態は、エラーパッシブ状態よりさらにエラーを起こしやすい状態であり、この状態にあるノード100は、送受信すべての動作が禁止され、CANバス90上の通信に参加できない。
The
上述した3つのエラー状態の遷移は、送信エラーカウンタと受信エラーカウンタのカウント値に基づいてなされる。送信エラーカウンタのカウント値TECと受信エラーカウンタのカウント値RECが共に0〜127であるときには、該ノード100はエラーアクティブ状態にあり、TECとRECのいずれか一方が128〜255であるときには、該ノード100はエラーパッシブ状態になる。また、RECに関わらず、TECが256以上になったときには、該ノード100はバスオフ状態になり、CANバス90上の通信から切り離される。
The above three error state transitions are made based on the count values of the transmission error counter and the reception error counter. When the count value TEC of the transmission error counter and the count value REC of the reception error counter are both 0 to 127, the
CANでは、このようにして、エラーを起しやすい程度に応じたエラー状態を規定し、エラー状態に応じた制限を当該ノード90の送受信動作に加えることにより、エラーを起こしやすいノード90による通信の妨害を回避する。
In this way, the CAN specifies the error state according to the degree to which an error is likely to occur, and adds a restriction according to the error state to the transmission / reception operation of the
再送要求送信制御部9は、エラー管理部8からの再送要求トリガ信号46の出力に応じて、再送要求フレームのデータとなる再送要求フレーム送信データ47をビットストリーム制御部2に送信する。これによって、後述するように、ビットストリーム制御部2によって再送要求フレームが他のノード100に送信される。
The retransmission request
CPU21は、ローカルバス23を介して、他周辺モジュール22に対して、ノード100に含まれる装置の制御を指示する制御指示データを出力することによって、ノード100に含まれる装置を制御する。具体的には、CPU21は、ローカルバス23を介して、他のノード100から受信した受信フレームをメッセージバッファメモリ4の受信バッファから取得する。CPU21は、他のノード100から受信した受信フレームの内容に基づいて、ノード100に含まれる装置を制御する。また、CPU21は、他のノード100に送信する送信フレームを生成し、ローカルバス23を介してメッセージバッファメモリ4の送信バッファに格納する。
The
他周辺モジュール22は、CPU11から出力された制御指示データに基づいて、ノード100に含まれる装置を制御する。例えば、ノード100が装置としてミラーを制御するボディ系ノード101である場合、他周辺モジュール22は、ミラーを駆動するアクチュエータ等が該当する。
The other
バストランシーバ20は、ビットストリーム制御部2から送信信号線30を介して出力された送信フレームを、CANバス90を介して他のノード100に送信する。バストランシーバ20は、CANバス90を介して他のノード100から受信した受信フレームを、受信信号線31を介してビットストリーム制御部2に出力する。
The
続いて、図4を参照して、実施の形態1に係るノード100の受信エラー検出時の動作について説明する。図4は、実施の形態1に係るノード100の受信エラー検出時の動作を示すフローチャートである。
Next, with reference to FIG. 4, an operation at the time of reception error detection of the
ビットストリーム制御部2は、バストランシーバ20を介して受信フレームを受信したときに(S1)、その受信フレームの受信に失敗したか否かを判断する(S2)。すなわち、ビットストリーム制御部2は、前述の通り、受信フレームに基づいて、CRCエラー、スタッフエラー、及びフォームエラー等の受信エラーが発生しているか否かを判断する。
When receiving the received frame via the bus transceiver 20 (S1), the bit
受信フレームの受信に失敗したと判断した場合(S2:Yes)、ビットストリーム制御部2は、エラー発生信号45をエラー管理部8に出力する。エラー管理部8は、ビットストリーム制御部2からのエラー発生信号45の出力に応じて、自ノード100の状態が「エラーパッシブ状態」であるか否かを判断する(S3)。自ノード100の状態が「エラーパッシブ状態」であると判断した場合(S3:Yes)、エラー管理部8は、再送要求トリガ信号46を再送要求送信制御部9に出力する。
If it is determined that reception of the received frame has failed (S2: Yes), the bit
再送要求送信制御部9は、エラー管理部8からの再送要求トリガ信号46の出力に応じて、フレームカウンタ5から出力されたフレームカウンタ値43をキャプチャし(S4)、再送要求フレーム送信データ47をビットストリーム制御部2に送信する。この再送要求フレーム送信データ47は、再送要求フレームのIDが含まれている。なお、フレームカウンタ値43をキャプチャは、受信に失敗した受信フレームの受信によるフレームカウンタ110のカウントアップを終えたタイミングで行う。例えば、ビットストリーム制御部2が、エンドオブフレーム信号42を出力した後に、エラー発生信号45を出力するようにすればよい。
The retransmission request
ビットストリーム制御部2は、再送要求送信制御部9からの再送要求フレーム送信データ47の出力に応じて、再送要求フレームを生成する。この再送要求フレームのIDには、再送要求フレーム送信データ47に含まれる再送要求のIDが設定される。ビットストリーム制御部2は、生成した再送要求フレームを送信フレームとして、バストランシーバ20を介して送信開始する(S5)。
The bit
再送要求フレームが競合負けせずに、そのID部分を送出できた場合(S6:Yes)、ビットストリーム制御部2は、再送要求フレーム送信開始信号48を再送要求送信制御部9に出力する。この場合、いわゆるCANプロトコルにおける「アービトレーション負け」が発生せずに、再送要求フレームのIDが設定されたアービトレーションフィールドの送信が完了し、再送要求フレームの送信が継続されていることになる。なお、再送要求フレーム送信開始信号48は、競合負けせずに再送要求フレームの送信が開始されていることを通知する信号となる。
If the retransmission request frame can be transmitted without losing the contention (S6: Yes), the bit
なお、再送要求フレームが競合負けして、そのID部分を送出でなかった場合(S6:No)には、その競合で勝った他のノード100からの受信フレームの受信完了後に、再度、再送要求フレームの送信を開始することになる(S5)。
If the retransmission request frame loses the contention and the ID portion is not transmitted (S6: No), the retransmission request is again made after the reception of the received frame from the
再送要求送信制御部9は、ビットストリーム制御部2からの再送要求フレーム送信開始信号48の出力に応じて、現在のフレームカウンタ値18と、ステップS4でキャップチャしたフレームカウンタ値18との差分値を算出する。この差分値は、現在のフレームカウンタ値18から、キャプチャしたフレームカウンタ値18を減算した値となる。再送要求送信制御部9は、算出した差分値を、追加的に、再送要求フレーム送信データ47としてビットストリーム制御部2に出力する。ビットストリーム制御部2は、再送要求送信制御部9から出力された再送要求フレーム送信データ47の差分値を、再送要求フレームのデータとして、バストランシーバ20を介して送信する(S7)。すなわち、差分値は、例えば、再送要求フレームのデータフィールドに設定される。このように、ビットストリーム制御部2は、再送要求送信制御部9から順次送信されるIDと差分値から再送要求フレームのビットストリームを生成しつつ送信する。
In response to the output of the retransmission request frame
続いて、図5を参照して、実施の形態1に係るノード100の再送要求フレーム受信時の動作について説明する。図5は、実施の形態1に係るノード100の再送要求フレーム受信時の動作を示すフローチャートである。
Next, with reference to FIG. 5, the operation of
ビットストリーム制御部2は、バストランシーバ20を介して受信フレームを受信した場合(S11)、その受信フレーム41をメッセージハンドラ3に出力する。メッセージハンドラ3は、ビットストリーム制御部2から出力された受信フレーム41が再送要求フレームであるか否かを判定する(S12)。具体的には、メッセージハンドラ3は、受信フレーム41のIDが再送要求フレームのIDである場合に、受信フレーム41が再送要求フレームであると判断する。
When the bit
受信フレーム41が再送要求フレームである場合(S12:Yes)、再送要求受信信号49及び再送要求フレーム差分値50を送信記録制御部6に出力する。再送要求受信信号49は、再送要求フレームを受信したことを通知する信号である。再送要求フレーム差分値50は、その再送要求フレームに含まれている差分値である。
When the
送信記録制御部6は、メッセージハンドラ3からの再送要求受信信号49の出力に応じて、再送要求フレームの受信によるカウントアップ前のフレームカウンタ値43から、メッセージハンドラ3から出力された再送要求フレーム差分値50を減算した値を算出する(S13)。送信記録制御部6は、フレームカウンタ値43から再送要求フレーム差分値50を減算した値を、送信記録FIFO7に格納されているフレームカウンタ値から検索する(S14)。
In response to the output of the retransmission
検索した値が送信記録FIFO7にフレームカウンタ値として格納されている場合(S14:Yes)、送信記録制御部6は、そのフレームカウンタ値と関連付けられた送信イネーブルビットが「1」であるか否かを判断する(S15)。送信イネーブルビットが「1」である場合(S15:Yes)、送信記録制御部6は、それらのフレームカウンタ値及び送信イネーブルビットと関連付けられた送信フレームを送信記録FIFO7から読み出す(S16)。送信記録制御部6は、読み出した送信フレームを再送フレーム51としてメッセージハンドラ3に出力する。それと共に、送信記録制御部6は、再送フレーム検索結果信号52として、「再送フレーム送信」を意味するコマンドをメッセージハンドラ3に出力する。
When the retrieved value is stored as a frame counter value in the transmission record FIFO 7 (S14: Yes), the transmission
メッセージハンドラ3は、送信記録制御部6からのそれらのデータの出力に応じて、送信記録制御部6から出力された再送フレーム51を、送信フレーム40としてビットストリーム制御部2に出力する。この場合、メッセージハンドラ3は、メッセージバッファメモリ4の送信バッファに格納される送信データの送信は後回しにする。そして、ビットストリーム制御部2は、メッセージハンドラ3から送信フレーム40として出力された再送フレームを、バストランシーバ20を介して送信する(S17)。
The
一方、ステップS14において検索した値が送信記録FIFO7にフレームカウンタ値として格納されていない場合(S14:No)、又は、送信イネーブルビットが「0」である場合(S15:No)、送信記録制御部6は、再送フレーム検索結果信号52として、「再送フレーム送信不要」を意味するコマンドをメッセージハンドラ3に出力する。
On the other hand, when the value searched in step S14 is not stored as the frame counter value in the transmission record FIFO 7 (S14: No), or when the transmission enable bit is “0” (S15: No), the transmission
メッセージハンドラ3は、送信記録制御部6からの「再送フレーム送信不要」の再送フレーム検索結果信号52の出力に応じて、所定の一定期間(一定時間)の間、アイドル状態を保ち、送信フレームの送信を抑止する(S18)。これによって、他のノード100が再送フレームを送信できるようにする。また、メッセージハンドラ3は、この一定期間の間に受信フレームを受信した場合には、その受信フレームは、自ノード100には不要な再送フレームであるため、メッセージバッファメモリ4への格納対象から除外し、重複受信を回避する。すなわち、この一定時間として、例えば、再送フレームの送信が完了するまでの時間を定めるようにすればよい。
In response to the output of the retransmission frame
なお、再送要求フレームが再送を要求するフレームが、アクティブエラーフレームである場合、及び、他のノード100のアクティブエラーフラグ等をトリガとして既に再送されたフレームである場合には、送信記録FIFO7に格納された該当フレームの送信イネーブルビットは「0」とされているため、再送は行われない。
If the retransmission request frame is a frame requesting retransmission, it is an active error frame, and if it is a frame that has already been retransmitted triggered by an active error flag or the like of another
続いて、図6〜図8を参照して、実施の形態1に係るCANシステム1000の再送要求フレーム競合時の動作について説明する。図6は、実施の形態1に係るCANシステム1000の再送要求フレーム競合時の動作を示す概念図である。図7は、実施の形態1に係るCANシステム1000の再送要求フレーム競合時の動作を示すタイムチャートである。図8は、実施の形態1に係るCANシステム1000の再送フレームと他の送信フレームの同時送信時の動作を示すタイムチャートである。
Next, with reference to FIGS. 6 to 8, an operation at the time of a retransmission request frame contention in the
以下、CANシステム1000において、前述のノード100として動作するノードA、B、Zが存在する場合について説明する。また、ノードAが送信フレームを送信したが、エラーパッシブ状態のノードZが、その送信フレームの受信フレームとしての受信に失敗した場合について説明する。
Hereinafter, a case where nodes A, B, and Z that operate as the
この場合、ノードZは、その送信フレームの再送を要求する再送要求フレームの送信を開始する。ここで、他のノードBから、再送要求フレームと同じタイミングで、その再送要求フレームよりも重要度の高い送信フレームの送信が開始されたものとする(図7のT0)。ここで、重要度の高い送信フレームとは、例えば、シャーシ系ノード105に対してブレーキの制御を指示するフレームや、安全系ノード102に対してエアバックの作動を指示するフレームのように即時性が要求されるフレームが該当する。重要度の高いフレームには、他の重要度の低いフレームのID(低優先ID)よりも、優先度が高いID(高優先ID)が割り当てられる。例えば、重要度の高いフレームには、再送要求フレームのIDよりも、優先度が高いIDが割り当てられる。
In this case, the node Z starts transmission of a retransmission request frame that requests retransmission of the transmission frame. Here, it is assumed that transmission of a transmission frame having higher importance than the retransmission request frame is started from another Node B at the same timing as the retransmission request frame (T0 in FIG. 7). Here, the transmission frame having a high importance is, for example, an immediacy such as a frame that instructs the
これによれば、図6及び図7に示すように、再送要求フレームと、それよりも優先度の高い送信フレームが競合した場合には、CAN仕様に基づいて再送要求フレームがアービトレーションロスト(アービトレーション負け)となり、ノードZによる再送要求フレームの送信は中断され、ノードBによる高優先IDの送信フレームの送信が行われる。このように、再送要求フレームに低優先IDを割り当てておけば、高優先IDを割り当てた重要度の高い送信フレームの送信が阻害されることはない。なお、ノードZによる再送要求フレームの送信開始タイミングよりも、ノードBによる送信フレームの送信開始タイミングの方が早い場合には、当然に、CAN仕様に基づいて、ノードBによる送信フレームの送信が行われる。 According to this, as shown in FIG. 6 and FIG. 7, when a retransmission request frame and a transmission frame having a higher priority compete with each other, the retransmission request frame is arbitrated lost (arbitration loss) based on the CAN specification. Thus, the transmission of the retransmission request frame by the node Z is interrupted, and the transmission frame of the high priority ID is transmitted by the node B. Thus, if a low priority ID is assigned to a retransmission request frame, transmission of a highly important transmission frame assigned a high priority ID is not hindered. Note that if the transmission start timing of the transmission frame by the node B is earlier than the transmission start timing of the retransmission request frame by the node Z, naturally, the transmission of the transmission frame by the node B is performed based on the CAN specification. Is called.
そして、ノードBによる送信フレームの送信終了後、他に優先度の高い送信フレームとの競合が無ければ、ノードZによる再送要求フレームの送信が行われる(図7のT1)。このとき、2つ前のフレームの再送を要求することになるため、再送要求フレームに設定される差分値には、「1」が設定される(前述の通り、送信記録FIFOに記録されるフレームは、そのフレームの送信によるカウントアップ後のフレームカウンタ値と関連付けられることになるため、N個前に送信されたフレームの再送を要求する場合、差分値は、(N−1)となる)。ノードAは、この再送要求フレームの受信に応じて、ノードZが受信に失敗した送信フレームを再送する(図7のT2)。 Then, after the transmission of the transmission frame by the node B, if there is no other contention with a transmission frame having a higher priority, the retransmission request frame is transmitted by the node Z (T1 in FIG. 7). At this time, since the second previous frame is requested to be retransmitted, “1” is set as the difference value set in the retransmission request frame (as described above, the frame recorded in the transmission record FIFO). Is associated with the frame counter value after the count-up by the transmission of the frame, and therefore when the retransmission of the frame transmitted N times before is requested, the difference value is (N−1)). In response to receiving this retransmission request frame, node A retransmits the transmission frame that node Z has failed to receive (T2 in FIG. 7).
ここで、ノードZによる再送要求フレームの送信中に、ノードBにおいて、さらに高優先IDの送信フレームがキューイングされたものとする(図8のT1')。ここで、図7の「T1」は、図8の「T1」と同一の時間を示しており、図7の「T2」は、図8の「T2」と同一の時間を示している。しかしながら、この場合、ノードBも、再送要求フレームを受信しており、ノードBの送信記録FIFOに再送要求フレームで要求されるフレームは無いため、ノードBは自ノードがその再送要求フレームに応じた再送フレームの送信主体ではないと判断している。この場合には、前述の通り、ノードBは、一定期間の間、送信フレームの送信を抑制する。これにより、ノードZによる再送要求フレームの送信が終了したときに、ノードBにおいて優先度の高い送信フレームが保持されていても、ノードBとノードAのうち、ノードAのみから再送フレームの送信が開始されるため、ノードAによる再送フレームの送信が行われる(図8のT2)。そして、ノードAによる再送フレームの送信終了後、ノードBによる送信フレームの送信が行われる(図8のT3)。 Here, it is assumed that a transmission frame having a higher priority ID is queued in the node B during transmission of the retransmission request frame by the node Z (T1 ′ in FIG. 8). Here, “T1” in FIG. 7 indicates the same time as “T1” in FIG. 8, and “T2” in FIG. 7 indicates the same time as “T2” in FIG. However, in this case, since the node B also receives the retransmission request frame and there is no frame requested by the retransmission request frame in the transmission record FIFO of the node B, the node B responds to the retransmission request frame. It is determined that the retransmission frame is not the subject of transmission. In this case, as described above, the Node B suppresses transmission of a transmission frame for a certain period. Thereby, when the transmission of the retransmission request frame by the node Z is completed, even if the transmission frame having a high priority is held in the node B, the retransmission frame is transmitted from only the node A among the node B and the node A. Therefore, the retransmission of the retransmission frame is performed by the node A (T2 in FIG. 8). Then, after transmission of the retransmission frame by node A is completed, transmission of the transmission frame by node B is performed (T3 in FIG. 8).
このように、本実施の形態1によれば、どのような競合状態であるかに関わらず、再送要求フレームの次に必ず再送フレームが送信される。すなわち、これによれば、ノードZは、受信に失敗してしまい、再送を要求したフレームが、いつ送信されるのかを把握することができる。そのため、ノードZは、フレームの受信エラーが発生した場合であっても、フレームの本来の送信順序に通りに、フレームの内容に従った装置の制御を行うことが可能である。 As described above, according to the first embodiment, a retransmission frame is always transmitted after a retransmission request frame regardless of the contention state. That is, according to this, the node Z has failed to receive, and can grasp when the frame requested to be retransmitted is transmitted. Therefore, even when a frame reception error occurs, the node Z can control the apparatus according to the contents of the frame in the original transmission order of the frame.
次に、図9を参照して、その動作について説明する。図9は、実施の形態1に係るCANシステム1000の再送要求発生時のフレーム処理動作を示すタイムチャートである。ここで、図9において、ノードZは、ボディ系ノード101であり、ノードA、Bは、ボディ系ノード101であるノードZに、ボディ系の制御を指示する送信フレームを送信するノードであるものとして説明する。
Next, the operation will be described with reference to FIG. FIG. 9 is a time chart showing a frame processing operation when a retransmission request occurs in the
ノードAが、ボディ系の装置の制御を指示する送信フレームAを送信したが(T10)、エラーパッシブ状態のノードZが、その送信フレームの受信フレームとしての受信に失敗したものとする。この場合、ノードZは、その送信フレームの再送を要求する再送要求フレームの送信を開始する(T11)。ここで、他のノードBから、再送要求フレームと同じタイミングで、ボディ系の装置の制御を指示する送信フレームBの送信が開始されたものとする。ここで、このノードBから送信が開始された送信フレームのIDは、ノードZから送信が開始された再送要求フレームのIDよりも優先度が高いものとする。 It is assumed that the node A has transmitted the transmission frame A instructing control of the body device (T10), but the error passive node Z has failed to receive the transmission frame as a reception frame. In this case, the node Z starts transmission of a retransmission request frame requesting retransmission of the transmission frame (T11). Here, it is assumed that transmission of a transmission frame B instructing control of the body apparatus is started from another Node B at the same timing as the retransmission request frame. Here, it is assumed that the ID of the transmission frame whose transmission is started from the node B has a higher priority than the ID of the retransmission request frame whose transmission is started from the node Z.
この場合、再送要求フレームがアービトレーション負けとなるため、ノードZは、再送要求フレームの送信を中断する。そして、ノードBによって送信フレームBが送信される。ノードZは、ノードBから送信された送信フレームBを受信し、受信フレームBとしてメッセージバッファメモリ4の受信バッファに格納する。このとき、ノードAからの送信フレームAを追い越して、ノードBからの送信フレームBがノードZによって受信されたことになる。そのため、ノードAからの送信フレームAよりも先にノードBからの送信フレームBを処理してしまうと、装置制御に不整合が生じてしまうおそれがある。そのため、ノードZのCPU21は、メッセージバッファメモリ4の受信バッファに格納された受信フレームBの処理を抑止する。
In this case, since the retransmission request frame loses arbitration, the node Z interrupts transmission of the retransmission request frame. Then, the transmission frame B is transmitted by the node B. The node Z receives the transmission frame B transmitted from the node B, and stores it in the reception buffer of the
ノードZは、ノードBによる送信フレームBの送信終了後、再度、再送要求フレームの送信を開始する(T12)。他に優先度の高い送信フレームとの競合が無ければ、再送要求フレームが送信される。ノードAは、この再送要求フレームの受信に応じて、ノードZが受信に失敗した送信フレームAを、再送フレームとして再送する(T13)。ノードZは、ノードAから送信された送信フレームAを受信し、受信フレームAとしてメッセージバッファメモリ4の受信バッファに格納する。このとき、ノードBにおいて、そのノードAから送信される送信フレームAよりも優先度の高い送信フレームCがメッセージバッファメモリ4の送信バッファに格納されていたとしても、その送信フレームCの送信は抑止される。そのため、ノードZは、再送要求フレームの送信後にノードAから受信した再送フレームが、T10〜T11で受信に失敗した送信フレームAであると判断することができる。すなわち、ノードZは、ノードAから受信した再送フレームが、ノードBから送信された送信フレームBの1つ前に送信された送信フレームAであると判断することができる。
The node Z starts transmission of the retransmission request frame again after the transmission of the transmission frame B by the node B is completed (T12). If there is no other contention with a transmission frame having a higher priority, a retransmission request frame is transmitted. In response to the reception of this retransmission request frame, the node A retransmits the transmission frame A that has failed to be received by the node Z as a retransmission frame (T13). The node Z receives the transmission frame A transmitted from the node A, and stores it in the reception buffer of the
そのため、ノードZのCPU21は、メッセージバッファメモリ4に格納された受信フレームのうち、ノードAから受信した受信フレームAを先に処理し(T14)、その後、ノードBから受信した受信フレームBを処理することで(T15)、装置制御の整合性を保つことが可能となる。例えば、ノードZのCPU21は、受信フレームAに基づいて装置を制御した後に、受信フレームBに基づいて装置を制御する。また、ノードZがゲートウェイノードである場合には、ノードZは、受信フレームAを対象となるノードに転送した後に、受信フレームBを対象となるノードに転送する。
Therefore, the
以上に説明したように、本実施の形態1では、ノード100は、フレームの受信に失敗したときに、エラーカウンタ11が所定の閾値を超えており、自ノード100がエラーパッシブ状態であると判断した場合には、そのフレームの再送を要求する再送要求フレームを送信するようにしている。また、ノード100は、CANバス90に対して送信されたフレームを送信記録FIFO7に格納するとともに、再送要求フレームで再送が要求されたフレームを送信記録FIFO7から取得し、再送するようにしている。
As described above, in the first embodiment, when the
これによれば、ノード100がフレームの受信に失敗した場合のみに、そのフレームの再送が要求されるため、バスの使用効率の低下を抑制することができる。また、CANの使用上、受信エラー通知不可となるエラーパッシブ状態となっている場合にも、フレームの受信に失敗した場合にフレームの再送を要求されるようになるため、耐障害性を向上することができる。
According to this, since the
また、本実施の形態1では、再送要求フレームを受信に失敗したフレームの直後に送信できない場合を考慮して、再送要求フレーム内には、何フレーム前のフレームの再送を要求しているかを示す情報(差分値)が埋め込まれている。そして、再送要求フレームを受けたノード100は、この「何フレーム前か」を示す情報に基づいて、受信に失敗したフレームを特定可能としている。これによって、再送要求フレームを受信に失敗したフレームの直後に送信できない場合でも、受信に失敗したフレームを特定して再送することを可能としている。
Further, in the first embodiment, in consideration of a case where a retransmission request frame cannot be transmitted immediately after a frame that has failed to be received, the number of frames before the retransmission request frame is indicated in the retransmission request frame. Information (difference value) is embedded. The
<実施の形態2>
続いて、実施の形態2について説明する。まず、図10を参照して、実施の形態2に係るCANシステム1000の構成について説明する。図10は、実施の形態2に係るCANシステム1000の構成図である。以下、実施の形態1と同様の内容については、適宜、その説明を省略する。
<
Next, the second embodiment will be described. First, the configuration of the
CANシステム1000は、実施の形態1と比較して、さらに、過去フレームサーバノード109を有している。過去フレームサーバノード109は、CANバス90上に現れたフレームを保管するとともに、ノード101〜105のそれぞれからの再送要求に応じて保管したフレームのうち、再送要求されたフレームを再送する。また、ノード101〜105のそれぞれは、実施の形態1とは異なり、エラーパッシブ状態のノードからの再送要求に応じてフレームを再送する機能は有していない。以下、このようなノード101〜105を、「一般ノード108」とも呼ぶ。すなわち、実施の形態2では、エラーパッシブ状態でフレームの受信に失敗したノードからの再送要求に応じたフレームの再送機能が過去フレームサーバノード109に集約されている。ただし、一般ノード101〜105は、CAN仕様による通常のフレーム再送機能(エラーパッシブ状態でないノードからの再送要求)は、当然に有するようにしてもよい。
The
続いて、図11を参照して、実施の形態2に係るCANシステム1000の動作概要について説明する。図11は、実施の形態2に係るCANシステム1000の動作概要を説明するための構成図である。
Next, an outline of operation of the
一般ノード108のそれぞれは、フレームカウンタ110を有している。それに対して、過去フレームサーバノード109は、フレームカウンタ110及び過去フレーム記録FIFO130を有している。実施の形態2では、過去フレーム記録FIFO130は、過去フレームサーバノード109において、自ノード109/他ノード108のどちらが送信したフレームに関わらず、CANバス90上に現れたフレームを保管するためのストレージとして機能する。
Each
一般ノード108及び過去フレームサーバノード109は、自ノード/他ノードのどちらが送信したかに関わらず、CANバス90上に現れたフレームの送信又は受信が完了したときに、フレームカウンタ110をカウントアップする。過去フレームサーバノード109は、一般ノード108のフレームが送信し終わり、それによるフレームカウンタ110のカウントアップを終えたタイミングで、フレームカウンタ110のフレームカウンタ値とともに、送信又は受信したフレームを過去フレーム記録FIFO130に格納する。
The
一般ノード108のそれぞれは、自ノードがエラーパッシブ状態のときにフレームの受信エラーが発生した場合、そのフレームの再送を要求する再送要求フレームを送信する。この再送要求フレームは、その時点のフレームカウンタ110のフレームカウンタ値に基づいて、その再送要求対象のフレームの送信時のフレームカウンタ110のフレームカウンタ値を特定可能とする情報が含められる。
Each of the
過去フレームサーバノード109は、再送要求フレームを受信した場合、その再送要求フレームの情報によって特定されるフレームカウンタ値に基づいて、過去フレーム記録FIFO130に格納されるフレームの中から、再送が要求されたフレームを特定し、そのフレームを再送する。また、一般ノード108のそれぞれは、他のノード108から再送要求フレームを受信した場合には、所定の時間の間、自フレームからのフレームの送信を抑止して、フレームを再送する過去フレームサーバノード109にバス使用権を譲る。
When the past
続いて、図12を参照して、実施の形態2に係る一般ノード108の構成について説明する。図12は、実施の形態2に係る一般ノード108の構成図である。
Next, the configuration of the
本実施の形態2に係る一般ノード108は、実施の形態1に係るノード100と比較して、送信記録制御部6及び送信記録FIFO7を有していない。
The
本実施の形態2では、送信記録制御部6及び送信記録FIFO7を有していないため、実施の形態1において、メッセージハンドラ3が、一定期間の間、送信フレームの送信を抑止するか否かを判断していた再送フレーム検索結果信号52が存在しない。そのため、本実施の形態2では、メッセージハンドラ3は、再送要求フレームを受信したことによる、ビットストリーム制御部2からの再送要求フレームの出力に応じて、一定期間の間、アイドル状態を保ち、送信フレーム40の送信を抑止するようにする。
Since the second embodiment does not include the transmission
なお、受信エラー検出時の動作については、図4を参照して説明した実施の形態1に係る受信エラー検出時の動作と同様であるため、その説明を省略する。 The operation at the time of detection of a reception error is the same as the operation at the time of detection of a reception error according to Embodiment 1 described with reference to FIG.
続いて、図13を参照して、実施の形態2に係る過去フレームサーバノード109の構成について説明する。図13は、実施の形態2に係る過去フレームサーバノード109の構成図である。
Next, the configuration of the past
過去フレームサーバノード109は、実施の形態1に係るノード100と比較して、送信記録制御部6に代えて過去フレーム記録制御部12を有し、送信記録FIFO7に代えて過去フレーム記録FIFO13を有する。また、過去フレームサーバノード109は、実施の形態1に係るノード100と比較して、送信記録制御部6の動作トリガとなっていた送信完了信号44が廃止され、その代わりにエンドオブフレーム信号42が過去フレーム記録制御部12にも動作トリガとして出力されるようになっている。また、ビットストリーム制御部2は、バストランシーバ20を介して受信した受信フレーム41を過去フレーム記録制御部12にも出力する。
The past
そして、過去フレーム記録制御部12は、送信記録制御部6が送信完了信号44の出力に応じて実行していた動作を、エンドオブフレーム信号42の出力に応じて実行する。ただし、過去フレーム記録制御部12が過去フレーム記録FIFOへの格納対象とするフレームは、送信フレーム40のみならず、受信フレーム41も対象となる。これによって、自ノード109が送信した送信フレーム40のみならず、他ノード108から受信した受信フレーム41も過去フレーム記録FIFO13に記録されることになる。
Then, the past frame
ここで、フレームの送信又は受信に応じてインクリメントされた後のフレームカウンタ値43と、そのフレームとが関連付けられて過去フレーム記録FIFO13に格納されるようにするために、過去フレーム記録制御部12に出力されるエンドオブフレーム信号42は、フレームカウンタ5に出力されるに出力されるエンドオブフレーム信号42よりも一次遅れとなるようにする。また、送信フレーム40及び受信フレーム41のうち、最後に過去フレーム記録制御部12に出力されたフレームが過去フレーム記録FIFO13に格納されるようにすることで、そのときに送信又は受信したフレームが格納されるようにする。
Here, in order to store the
このように、過去フレーム記録FIFO13は、実施の形態1に係る送信記録FIFO7と比較して、自ノード109が送信した送信フレーム40のみならず、他ノード108が送信した受信フレーム41も格納される。過去フレーム記録FIFO13は、過去フレーム記録FIFO130に相当する。
As described above, the past
なお、実施の形態2に係る過去フレームサーバノード109の再送要求フレーム受信時の動作については、原則、図5を参照して説明した実施の形態1に係るノード100の再送要求フレーム受信時の動作と同様であるため、その説明を省略する。ただし、本実施の形態2では、再送要求フレームに応じて、再送フレームを再送するノードは、過去フレームサーバノード109のみである。そのため、実施の形態1において再送フレーム送信時の競合を防止するために、ステップS18で行っていた一定時間の送信フレームの抑止は、過去フレームサーバノード109において実行する必要はない。
Note that the operation when the retransmission request frame is received by the past
以上に説明したように、本実施の形態2では、一般ノード108は、フレームの受信に失敗したときに、エラーカウンタ11が所定の閾値を超えており、自ノード108がエラーパッシブ状態であると判断した場合には、そのフレームの再送を要求する再送要求フレームを送信するようにしている。また、過去フレームサーバノード109は、CANバス90に対して送信されたフレームを過去フレーム記録FIFO13に格納するとともに、再送要求フレームで再送が要求されたフレームを過去フレーム記録FIFO13から取得し、再送するようにしている。
As described above, in the second embodiment, when the
これによれば、一般ノード108がフレームの受信に失敗した場合のみに、そのフレームの再送が要求されるため、バスの使用効率の低下を抑制することができる。また、CANの使用上、受信エラー通知不可となるエラーパッシブ状態となっている場合にも、フレームの受信に失敗した場合にフレームの再送を要求されるようになるため、耐障害性を向上することができる。
According to this, since the retransmission of the frame is requested only when the
また、本実施の形態2では、一般ノード108が送信記録FIFO7を備える必要がないため、その分のコストを削減することができる。
In the second embodiment, since the
<実施の形態3>
続いて、実施の形態3について説明する。まず、図8を参照して、実施の形態3で解決しようとする内容について説明する。
<
Subsequently,
上述した実施の形態1では、図8で説明したように、ノード100のそれぞれは、再送要求フレームを受信したときに、自ノード100が再送フレームの送信主体でない場合は、一定時間の間、送信フレームの送信を抑制している。また、これによって、再送要求フレームを送信したノード100は、再送要求フレームの次に送信されるフレームを、再送フレームとして特定することができ、送信順序に従ったフレームの処理が可能となる。
In Embodiment 1 described above, as described with reference to FIG. 8, when each of the
しかしながら、このようにした場合には、図8に示すように、再送フレームと他の送信フレームが同時に送信開始されたときには、他の送信フレームのIDが高優先IDであっても、その送信が抑止されることになる。そのため、即時性が要求される送信フレームの処理が遅延してしまうという問題がある。 However, in this case, as shown in FIG. 8, when transmission of a retransmission frame and another transmission frame is started at the same time, even if the ID of the other transmission frame is a high priority ID, the transmission is not performed. Will be deterred. Therefore, there is a problem that processing of a transmission frame that requires immediacy is delayed.
以下、実施の形態3では、このような問題を解決するために、高優先度のフレームの処理の即時性を保証しつつ、再送フレームの特定も可能とする技術について説明する。 In the following, the third embodiment describes a technique that can specify a retransmission frame while guaranteeing immediacy of processing of a high priority frame in order to solve such a problem.
実施の形態3に係るCANシステム1000の構成については、図1を参照して説明した実施の形態1に係るCANシステム1000の構成と同様であるため、その説明を省略する。また、実施の形態3に係るCANシステム1000の動作概要についても、図11を参照して説明した実施の形態1に係るCANシステム1000の動作概要と同様であるため、その説明を省略する。
The configuration of
ここで、実施の形態3に係るノード100の構成は、図3を参照して説明した、実施の形態1に係るノード100の構成と同様であるが、以下の点で、その動作が異なる。その他、実施の形態1と同様の内容については、適宜、その説明を省略する。
Here, the configuration of the
本実施の形態3では、メッセージハンドラ3は、自ノードが再送フレームの再送するノードでない場合であっても、一定時間の間の送信フレームの送信抑制を行わないようにする。すなわち、メッセージハンドラ3は、送信記録制御部6から「再送フレーム送信不要」の再送フレーム検索結果信号52が出力された場合、再送フレームの送信は行わないが、一定期間の送信抑止も実施しない。
In the third embodiment, the
また、本実施の形態3では、ビットストリーム制御部2は、送信フレーム40が再送フレームである場合、1ビット分の時間を遅らせて、送信フレーム(再送フレーム)の送信を開始する。これによれば、再送フレームと他の送信フレームの送信が開始される場合、再送フレームよりも、他の送信フレームが常に先に送信開始されることになる。そのため、再送フレームよりも、他の送信フレームが優先的にCANバス90上に送信されることになるため、再送フレームが送信されるときに、高優先IDの送信フレームの送信が抑止されることがなくなる。また、再送要求フレームを送信したノードは、1ビット分、時間が遅れて送信された送信フレームを、再送フレームとして特定することができるため、送信順序に従ったフレームの処理も可能となる。
In
続いて、図14を参照して、実施の形態3に係るCANシステム1000の再送フレームと他の送信フレームの同時送信時の動作を示すタイムチャートである。図14は、実施の形態3に係るCANシステム1000の再送フレームと他の送信フレームの同時送信時の動作を示すタイムチャートである。
Next, with reference to FIG. 14, it is a time chart showing an operation at the time of simultaneous transmission of a retransmission frame and another transmission frame of the
以下、図8と同様に、CANシステム1000において、前述のノード100として動作するノードA、B、Zが存在する場合について説明する。また、ノードAが送信フレームを送信したが、エラーパッシブ状態のノードZが、その送信フレームの受信フレームとしての受信に失敗した場合について説明する。
Hereinafter, as in FIG. 8, a case where nodes A, B, and Z that operate as the above-described
そして、図8と同様に、ノードZによる再送要求フレームの送信中に、ノードBにおいて、さらに高優先IDの送信フレームがキューイングされたものとする(図14のT1')。この場合、ノードBも、再送要求フレームを受信しているが、本実施の形態3では、ノードBによる送信フレームの送信の抑制は行われない。また、ノードAは、ノードZからの再送要求フレームに応じた再送フレームの送信を、次に送信フレームが送信可能となったタイミング(T2)から、1ビット分の時間遅延したタイミングから開始する(T2')。 As in FIG. 8, it is assumed that a transmission frame with a higher priority ID is queued in the node B during transmission of the retransmission request frame by the node Z (T1 ′ in FIG. 14). In this case, the node B also receives the retransmission request frame, but in the third embodiment, the transmission of the transmission frame by the node B is not suppressed. In addition, the node A starts transmission of a retransmission frame corresponding to the retransmission request frame from the node Z from a timing delayed by one bit from the timing (T2) when the transmission frame can be transmitted next (T2) ( T2 ′).
そのため、先に送信が開始されたノードBからの送信フレームが送信され、ノードAからの再送フレームの送信は行われない。そして、ノードBからの送信フレームの送信終了後、次に送信フレームが送信可能となったタイミング(T3)において他のノードからの送信フレームの送信が無ければ、そのタイミングから1ビット分の時間遅延したタイミングで、ノードAによる再送フレームの送信が行われる(T3')。 Therefore, a transmission frame from Node B that has started transmission is transmitted, and a retransmission frame from Node A is not transmitted. Then, after the transmission of the transmission frame from the node B is completed, if there is no transmission of a transmission frame from another node at the timing (T3) when the transmission frame can be transmitted next, a time delay of 1 bit from that timing At this timing, a retransmission frame is transmitted by the node A (T3 ′).
このように、本実施の形態3で、ノード100が再送フレームの送信主体でない場合であっても、送信フレームの送信を抑制しないようにしている。また、再送要求を受けたノード100は、再送フレームを1ビット分の時間遅延したタイミングから送信開始するようにしている。そのため、再送フレームの送信主体でないノードにおいて、再送フレームの送信までに送信フレームがキューイングされた場合、その送信フレームを優先的に送信することができる。
As described above, in the third embodiment, transmission of transmission frames is not suppressed even when the
したがって、高優先IDが割り当てられたフレームのように、即時性が要求される送信フレームの処理を遅延させることがない。また、再送フレームは、送信フレームを送信可能となったタイミングから1ビット遅延したタイミングで送信されるようになっている。これによれば、ノードZは、受信に失敗してしまい、再送を要求したフレームが、いつ送信されるのかを把握することができる。すなわち、送信フレームを送信可能となったタイミングから1ビット遅延したタイミングで送信が開始された送信フレームを、再送フレームとして特定することが可能となる。そのため、ノードZは、フレームの受信エラーが発生した場合であっても、フレームの本来の送信順序に通りに、フレームの内容に従った装置の制御を行うことが可能である。 Therefore, processing of a transmission frame that requires immediacy, such as a frame to which a high priority ID is assigned, is not delayed. The retransmission frame is transmitted at a timing delayed by 1 bit from the timing at which the transmission frame can be transmitted. According to this, the node Z fails to receive and can grasp when the frame for which retransmission is requested is transmitted. That is, it is possible to specify a transmission frame whose transmission is started at a timing delayed by 1 bit from the timing at which the transmission frame can be transmitted as a retransmission frame. Therefore, even when a frame reception error occurs, the node Z can control the apparatus according to the contents of the frame in the original transmission order of the frame.
次に、図15を参照して、その動作について説明する。図15は、実施の形態3に係るCANシステム1000の再送要求発生時のフレーム処理動作を示すタイムチャートである。ここで、図15において、ノードZは、ボディ系ノード101であり、ノードA、Bは、ボディ系ノード101であるノードZに、ボディ系の制御を指示する送信フレームを送信するノードであるものとして説明する。また、ノードBは、ボディ系ノード101(ノードZ)以外のノードに対する送信フレームも送信するものとする。
Next, the operation will be described with reference to FIG. FIG. 15 is a time chart showing a frame processing operation when a retransmission request occurs in the
ノードAが、ボディ系の装置の制御を指示する送信フレームAを送信したが、エラーパッシブ状態のノードZが、その送信フレームAの受信に失敗した時点から説明を開始する。この場合、ノードZは、その送信フレームAの再送を要求する再送要求フレームの送信を開始する(T20)。ここで、他のノードBから、再送要求フレームと同じタイミングで、ボディ系の装置の制御を指示する送信フレームBの送信が開始されたものとする。ここで、このノードBから送信された送信フレームのIDは、ノードZから送信された再送要求フレームのIDよりも優先度が高いものとする。 The node A transmits the transmission frame A instructing the control of the body device, but the description starts from the point in time when the node Z in the error passive state fails to receive the transmission frame A. In this case, the node Z starts transmission of a retransmission request frame requesting retransmission of the transmission frame A (T20). Here, it is assumed that transmission of a transmission frame B instructing control of the body apparatus is started from another Node B at the same timing as the retransmission request frame. Here, it is assumed that the ID of the transmission frame transmitted from the node B has a higher priority than the ID of the retransmission request frame transmitted from the node Z.
この場合、再送要求フレームは、アービトレーション負けとなるため、ノードZは、再送要求フレームの送信を中断する。そして、ノードBによって送信フレームが送信される。ノードZは、ノードBから送信された送信フレームBを受信し、受信フレームBとしてメッセージバッファメモリ4の受信バッファに格納する。このとき、ノードAからの送信フレームAを追い越して、ノードBからの送信フレームBがノードZによって受信されたことになる。そのため、ノードAからの送信フレームAよりも先にノードBからの送信フレームBを処理してしまうと、装置制御に不整合が生じてしまうおそれがある。そのため、ノードZのCPU21は、メッセージバッファメモリ4の受信バッファに格納された受信フレームBの処理を抑止する。
In this case, since the retransmission request frame loses arbitration, the node Z interrupts transmission of the retransmission request frame. Then, the transmission frame is transmitted by the node B. The node Z receives the transmission frame B transmitted from the node B, and stores it in the reception buffer of the
ここで、再送要求フレームの送信中に、ノードBにおいて、ボディ系以外のノードを送信対象とした高優先度の送信フレームCがメッセージバッファメモリ4の送信バッファに格納されたものとする。この場合、ノードBは、再送要求フレームの送信終了後に、送信フレームCを送信する(T22)。また、ノードAは、再送要求フレームの受信に応じて、そのタイミング(T22)から1ビット分の時間遅延したタイミングで、再送フレームの送信を開始しようとする。しかし、先にノードBからの送信フレームCの送信が開始されているため、再送フレームの送信は行われない(T22')。ノードZは、ノードBから送信された送信フレームCを受信し、受信フレームCとしてメッセージバッファメモリ4の受信バッファに格納する。しかし、ノードZのCPU21は、受信フレームCのIDがボディ系の送信フレームでないと判断し、その受信フレームCは破棄して処理を実行しない。
Here, it is assumed that a high-priority transmission frame C intended for transmission to a node other than the body system is stored in the transmission buffer of the
そして、ノードAは、送信フレームCの送信終了後のタイミング(T23)で、他のフレームからの送信が無ければ、再送フレームを送信する(T23')。ノードZは、ノードAから送信された再送フレームである送信フレームAを受信し、受信フレームAとしてメッセージバッファメモリ4の受信バッファに格納する。このとき、ノードZは、送信フレームの送信が可能となったタイミング(T23)から1ビット分の時間遅延したタイミング(T23')で送信された再送フレームが、T20の前に受信に失敗した送信フレームAであると判断することができる。すなわち、ノードZは、1ビット遅れのT23'から受信した送信フレームAが、T20の前に受信に失敗した送信フレームAであると判断することができる。
Then, the node A transmits a retransmission frame (T23 ′) if there is no transmission from another frame at the timing (T23) after the transmission of the transmission frame C is completed. The node Z receives a transmission frame A that is a retransmission frame transmitted from the node A, and stores it as a reception frame A in the reception buffer of the
そのため、ノードZのCPU21は、メッセージバッファメモリ4に格納された送信フレームのうち、ノードAから受信した受信フレームAを先に処理し(T24)、その後、ノードBから受信した受信フレームBを処理することで(T25)、装置制御の整合性を保つことが可能となる。
Therefore, the
なお、本実施の形態3では、その技術を実施の形態1に係るノード100に適用する場合について説明したが、実施の形態2に係る過去フレームサーバノード109に適用するようにしてもよい。すなわち、本実施の形態3として、実施の形態1に係るノード100のビットストリーム制御部2及びメッセージハンドラ3の動作を変更した実施形態について例示したが、実施の形態2に係る過去フレームサーバノード109のビットストリーム制御部2及びメッセージハンドラ3の動作を同様に変更することによっても実施可能である。
In the third embodiment, the case where the technology is applied to the
以上に説明したように、本実施の形態3では、ノード100は、再送要求フレームの受信後にフレームを送信可能となったときから所定の遅延時間の経過後に再送要求フレームで再送が要求されたフレームを再送するようにしている。これによれば、再送を要求したノード100において、再送フレームを特定し、装置制御の整合性を保つことが可能となる。
As described above, in the third embodiment, the
<他の実施の形態>
上述した実施の形態1〜3では、再送要求フレームを受信したノードにおいて、再送対象のフレームを特定可能とするために、フレームカウンタ5のフレームカウンタ値の差分値を再送要求フレームのデータフィールドに含めるようにしているが、これに限られない。フレームカウンタ値の差分値を、再送要求フレームのIDで示すようにしてもよい。再送要求フレームのIDは、フレームカウンタ値の差分値がとり得る値のそれぞれに応じて、任意に予め定めるようにしてよい。例えば、フレームカウンタ値の差分値が「1」である場合は、IDを「1F」とし、レームカウンタ値の差分値が「2」である場合は、IDを「2F」とする等してよい。
<Other embodiments>
In Embodiments 1 to 3 described above, the difference value of the frame counter value of the
これによれば、再送要求フレームのデータフィールドを省略して、再送要求フレームの長さを極力短くすることができる。そのため、CANバス90上において送受信さえるデータ量を低減することができ、CANバス90上における通信効率を向上することができる。
According to this, the length of the retransmission request frame can be shortened as much as possible by omitting the data field of the retransmission request frame. Therefore, the amount of data that can be transmitted and received on the
<実施の形態の概要構成>
上記実施の形態は、次に説明する概要構成として捉えることができる。図16を参照して、実施の形態の概要構成について説明する。図16は、実施の形態に係るCANシステム1000の概要構成となるCANシステム900の構成図である。
<Outline configuration of the embodiment>
The above embodiment can be understood as a schematic configuration described below. A schematic configuration of the embodiment will be described with reference to FIG. FIG. 16 is a configuration diagram of a
CANシステム900は、第1のノード91及び第2のノード92を有する。第1のノード91と第2のノード92は、CANバスを介してフレームを相互に送受信する。
The
第1のノード91は、CAN仕様に基づいたエラーカウンタ911、エラー管理部912、及び再送要求部913を有する。エラーカウンタ911は、エラーカウンタ11に対応する。
The
エラー管理部912は、CANバス90を介したフレームの受信に失敗したときに、エラーカウンタ11が所定の閾値を超えて、自ノードがエラーパッシブ状態となっているか否かを判断する。エラー管理部912は、エラー管理部8に対応する。
When the
再送要求部913は、エラー管理部912によってフレームの受信に失敗したときに自ノードがエラーパッシブ状態であると判断された場合、フレームの再送を要求する再送要求フレームを送信する。再送要求部913は、再送要求送信制御部9に対応する。
If the
第2のノード92は、記憶部921、記録制御部922、及び再送制御部923を有する。
The
記憶部921は、フレームが格納される。記憶部921は、送信記録FIFO7及び過去フレーム記録FIFO13に対応する。
The
記録制御部922は、CANバス90に対して送信されたフレームを記憶部921に格納する。記録制御部922は、送信記録制御部6及び過去フレーム記録制御部12に対応する。
The
再送制御部923は、第1のノード91から送信された再送要求フレームで再送が要求されたフレームを記憶部921から取得し、第1のノード91に再送する。再送制御部923は、メッセージハンドラ3に対応する。
The
以上、本発明者によってなされた発明を実施の形態に基づき具体的に説明したが、本発明は既に述べた実施の形態に限定されるものではなく、その要旨を逸脱しない範囲において種々の変更が可能であることはいうまでもない。 As mentioned above, the invention made by the present inventor has been specifically described based on the embodiments. However, the present invention is not limited to the embodiments already described, and various modifications can be made without departing from the scope of the invention. It goes without saying that it is possible.
本実施の形態では、再送要求フレームにおいて、再送対象のフレームを特定可能とする情報としてフレームカウンタ5のフレームカウンタ値の差分値を利用する場合について例示したが、フレームカウンタ5のフレームカウンタ値に基づいて再送対象のフレームが特定可能となる情報であれば、これに限られない。例えば、再送対象のフレームを特定可能とする情報として、受信エラー発生時のフレームカウンタ5のフレームカウンタ値43をそのまま再送要求フレームに含めるようにしてもよい。この場合、ステップS13における算出は不要となる。また、送信記録制御部6又は過去フレーム記録制御部12は、ステップS14において再送要求フレームに含まれるフレームカウンタ値をメッセージハンドラ3から取得し、そのフレームカウンタ値を送信記録FIFO7又は過去フレーム記録FIFO13から検索するようにすればよい。
In the present embodiment, the case where the difference value of the frame counter value of the
本実施の形態では、送信フレームと、その送信フレームの送信完了によるカウントアップ後のフレームカウンタ5のフレームカウンタ値とを紐付けて管理することで、再送対象の送信フレームを特定可能としているが、これに限られない。例えば、送信フレームと、その送信フレームの送信完了によるカウントアップ前のフレームカウンタ5のフレームカウンタ値とを紐付けて管理するようにしてもよい。なお、この場合は、ステップS4において、受信に失敗した受信フレームの受信によるフレームカウンタ110のカウントアップ前のフレームカウンタ値43をキャプチャする必要がある。
In this embodiment, it is possible to identify a transmission frame to be retransmitted by managing a transmission frame and a frame counter value of the
本実施の形態3では、再送フレームを送信開始する遅延時間を、1ビット分の時間としたが、この時間に限られない。再送フレームを送信開始する遅延時間として、任意の時間を予め定めるようにしてもよい。例えば、ビットストリーム制御部2は、再送フレームを2ビット分の時間遅延させて送信するようにしてもよい。
In the third embodiment, the delay time for starting transmission of the retransmission frame is set to one bit, but is not limited to this time. An arbitrary time may be determined in advance as a delay time for starting transmission of the retransmission frame. For example, the bit
本発明の実施の形態にかかるノード100、108、109は、上述の実施の形態の機能を実現するプログラムを、ノード(コンピュータ)又はノードが有するCPU(Central Processing Unit)が実行することによっても、構成することが可能である。
The
また、上述したプログラムは、様々なタイプの非一時的なコンピュータ可読媒体(non−transitory computer readable medium)を用いて格納され、コンピュータに供給することができる。非一時的なコンピュータ可読媒体は、様々なタイプの実体のある記録媒体(tangible storage medium)を含む。非一時的なコンピュータ可読媒体の例は、磁気記録媒体(例えばフレキシブルディスク、磁気テープ、ハードディスクドライブ)、光磁気記録媒体(例えば光磁気ディスク)、CD−ROM(Read Only Memory)、CD−R、CD−R/W、半導体メモリ(例えば、マスクROM、PROM(Programmable ROM)、EPROM(Erasable PROM)、フラッシュROM、RAM(Random Access Memory))を含む。また、プログラムは、様々なタイプの一時的なコンピュータ可読媒体(transitory computer readable medium)によってコンピュータに供給されてもよい。一時的なコンピュータ可読媒体の例は、電気信号、光信号、及び電磁波を含む。一時的なコンピュータ可読媒体は、電線及び光ファイバ等の有線通信路、又は無線通信路を介して、プログラムをコンピュータに供給できる。 Further, the above-described program can be stored using various types of non-transitory computer readable media and supplied to a computer. Non-transitory computer readable media include various types of tangible storage media. Examples of non-transitory computer-readable media include magnetic recording media (for example, flexible disks, magnetic tapes, hard disk drives), magneto-optical recording media (for example, magneto-optical disks), CD-ROMs (Read Only Memory), CD-Rs, CD-R / W, semiconductor memory (for example, mask ROM, PROM (Programmable ROM), EPROM (Erasable PROM), flash ROM, RAM (Random Access Memory)). The program may also be supplied to the computer by various types of transitory computer readable media. Examples of transitory computer readable media include electrical signals, optical signals, and electromagnetic waves. The temporary computer-readable medium can supply the program to the computer via a wired communication path such as an electric wire and an optical fiber, or a wireless communication path.
上記の実施の形態の一部又は全部は、以下の付記のようにも記載され得る。 A part or all of the above embodiments can be described as in the following supplementary notes.
(付記1)第1のノード及び第2のノードを含む複数のノードの間で、CAN(Controller Area Network)バスを介してフレームを相互に送受信するCAN通信方法であって、
前記第2のノードが、前記CANバスに対して送信されたフレームを記憶部に格納し、
前記第1のノードが、前記CANバスを介したフレームの受信に失敗したときに、自ノードの、前記CANバスに対するフレーム送受信のエラー回数をカウントするエラーカウンタのカウント値が所定の閾値を超えて、自ノードがエラーパッシブ状態となっているか否かを判断し、
前記第1のノードが、前記フレームの受信に失敗したときに自ノードがエラーパッシブ状態であると判断した場合、当該フレームの再送を要求する再送要求フレームを送信し、
前記第2のノードが、前記第1のノードから送信された再送要求フレームで再送が要求されたフレームを前記記憶部から取得し、当該第1のノードに再送する、
CAN通信方法。
(Supplementary note 1) A CAN communication method for transmitting and receiving frames to and from each other via a CAN (Controller Area Network) bus between a plurality of nodes including a first node and a second node,
The second node stores a frame transmitted to the CAN bus in a storage unit;
When the first node fails to receive a frame via the CAN bus, the count value of an error counter that counts the number of frame transmission / reception errors for the CAN bus exceeds a predetermined threshold. , Determine whether the node is in an error passive state,
When the first node determines that its own node is in an error passive state when it fails to receive the frame, it transmits a retransmission request frame requesting retransmission of the frame,
The second node acquires a frame requested to be retransmitted by the retransmission request frame transmitted from the first node from the storage unit and retransmits the frame to the first node;
CAN communication method.
(付記2)複数のノードとの間で、CAN(Controller Area Network)バスを介してフレームを相互に送受信するノードを制御するための制御プログラムであって、
前記CANバスに対して送信されたフレームを記憶部に格納する処理と、
他のノードが前記CANバスを介したフレームの受信に失敗したときにエラーパッシブ状態である場合に送信する再送要求フレームの受信に応じて、当該再送要求フレームで再送が要求されたフレームを前記記憶部から取得し、当該他のノードに再送する処理と、
をノードに実行させる制御プログラム。
(Supplementary Note 2) A control program for controlling a node that transmits and receives a frame to and from a plurality of nodes via a CAN (Controller Area Network) bus,
A process of storing a frame transmitted to the CAN bus in a storage unit;
In response to reception of a retransmission request frame to be transmitted when another node fails to receive a frame via the CAN bus and is in an error passive state, a frame requested to be retransmitted in the retransmission request frame is stored in the memory A process of acquiring from the network and resending to the other node;
A control program that causes nodes to execute.
(付記3)複数のノードとの間で、CAN(Controller Area Network)バスを介してフレームを相互に送受信するノードを制御するための制御プログラムであって、
前記CANバスを介したフレームの受信に失敗したときに、自ノードの、前記CANバスに対するフレーム送受信のエラー回数をカウントするエラーカウンタのカウント値が所定の閾値を超えて、自ノードがエラーパッシブ状態となっているか否かを判断する処理と、
前記フレームの受信に失敗したときに自ノードがエラーパッシブ状態であると判断した場合、前記CANバスに対して送信されたフレームを保持する他のノードに対して、当該フレームの再送を要求する再送要求フレームを送信する処理と、
をノードに実行させる制御プログラム。
(Supplementary Note 3) A control program for controlling a node that mutually transmits and receives frames to and from a plurality of nodes via a CAN (Controller Area Network) bus,
When reception of a frame through the CAN bus fails, the count value of an error counter that counts the number of frame transmission / reception errors with respect to the CAN bus exceeds a predetermined threshold value, and the own node is in an error passive state. Processing to determine whether or not,
When it is determined that the current node is in an error passive state when reception of the frame fails, retransmission for requesting retransmission of the frame to another node holding the frame transmitted to the CAN bus Processing to send a request frame;
A control program that causes nodes to execute.
1 CANコントローラモジュール
2 ビットストリーム制御部
3 エラー管理部
4 再送要求送信制御部
5 メッセージハンドラ
6 メッセージバッファメモリ
7、110 フレームカウンタ
8 送信記録制御部
9、120 送信記録FIFO
10 CANコントローラLSI
11 エラーカウンタ
12 過去フレーム記録制御部
13、130 過去フレーム記録FIFO
20 バストランシーバ
21 CPU
22 他周辺モジュール
23 ローカルバス
30 送信信号線
31 受信信号線
40 送信フレーム
41 受信フレーム
42 エンドオブフレーム信号
43 フレームカウンタ値
44 送信完了信号
45 エラー発生信号
46 再送要求トリガ信号
47 再送要求フレーム送信データ
48 再送要求フレーム送信開始信号
49 再送要求受信信号
50 再送要求フレーム差分値
51 再送フレーム
52 再送フレーム検索結果信号
90 CANバス
91 第1のノード
92 第2のノード
100 ノード
101 ボディ系ノード
102 安全系ノード
103 情報系ノード
104 エンジン系ノード
105 シャーシ系ノード
108 一般ノード
109 過去フレームサーバノード
911 エラーカウンタ
912 エラー管理部
913 再送要求部
921 記憶部
922 記録制御部
923 再送制御部
1000 CANシステム
DESCRIPTION OF SYMBOLS 1
10 CAN controller LSI
11
20
22 Other
Claims (12)
前記第1のノードは、
自ノードの、前記CANバスに対するフレーム送受信のエラー回数をカウントするエラーカウンタと、
前記CANバスを介したフレームの受信に失敗したときに、前記エラーカウンタのカウント値が所定の閾値を超えて、自ノードがエラーパッシブ状態となっているか否かを判断するエラー管理部と、
前記エラー管理部によって前記フレームの受信に失敗したときに自ノードがエラーパッシブ状態であると判断された場合、当該フレームの再送を要求する再送要求フレームを送信する再送要求部を有し、
前記第2のノードは、
前記フレームが格納される記憶部と、
前記CANバスに対して送信されたフレームを前記記憶部に格納する記録制御部と、
前記第1のノードから送信された再送要求フレームで再送が要求されたフレームを前記記憶部から取得し、当該第1のノードに再送する再送制御部と、を有する、
CANシステム。 A CAN system comprising a plurality of nodes including a first node and a second node that transmit and receive frames to and from each other via a CAN (Controller Area Network) bus,
The first node is:
An error counter for counting the number of frame transmission / reception errors for the CAN bus of the own node;
An error management unit that determines whether or not the count value of the error counter exceeds a predetermined threshold and the own node is in an error passive state when frame reception via the CAN bus fails;
When the error management unit determines that the current node is in an error passive state when reception of the frame fails, it has a retransmission request unit that transmits a retransmission request frame requesting retransmission of the frame,
The second node is
A storage unit for storing the frame;
A recording control unit for storing a frame transmitted to the CAN bus in the storage unit;
A retransmission control unit that obtains, from the storage unit, a frame requested to be retransmitted by the retransmission request frame transmitted from the first node, and retransmits the frame to the first node.
CAN system.
前記記録制御部は、自ノードが前記CANバスに対して送信したフレームを前記記憶部に格納し、
前記再送制御部は、前記再送要求フレームで再送が要求されたフレームが前記記憶部に格納されている場合、当該フレームを前記第1のノードに再送する、
請求項1に記載のCANシステム。 Each of the plurality of nodes includes the error counter, the error management unit, the retransmission request unit, the storage unit, the recording control unit, and the retransmission control unit, and the first node and the second control unit Acts as a node,
The recording control unit stores, in the storage unit, a frame transmitted from the node to the CAN bus,
The retransmission control unit, when a frame requested to be retransmitted in the retransmission request frame is stored in the storage unit, retransmits the frame to the first node;
The CAN system according to claim 1.
請求項2に記載のCANシステム。 The retransmission control unit suppresses frame transmission for a predetermined transmission suppression time when a frame requested to be retransmitted in the retransmission request frame is not stored in the storage unit.
The CAN system according to claim 2.
請求項2に記載のCANシステム。 The retransmission control unit retransmits a frame for which retransmission is requested in the retransmission request frame after a predetermined delay time has elapsed since the frame can be transmitted after receiving the retransmission request frame.
The CAN system according to claim 2.
前記記録制御部は、前記第1のノードから前記CANバスに対して送信されたフレームを前記記憶部に格納し、
前記再送制御部は、前記再送要求フレームで再送が要求されたフレームを、当該フレームを送信した第1のノードに代わって、当該再送要求フレームを送信した第1のノードに再送する、
請求項1に記載のCANシステム。 The plurality of nodes include a plurality of the first nodes;
The recording control unit stores the frame transmitted from the first node to the CAN bus in the storage unit;
The retransmission control unit retransmits the frame requested to be retransmitted in the retransmission request frame to the first node that transmitted the retransmission request frame, instead of the first node that transmitted the frame.
The CAN system according to claim 1.
前記送信制御部は、他の第1のノードから前記再送要求フレームが送信された場合、所定の送信抑止時間の間、フレームの送信を抑止する、
請求項5に記載のCANシステム。 The first node further includes a transmission control unit that transmits the frame;
The transmission control unit suppresses transmission of a frame for a predetermined transmission suppression time when the retransmission request frame is transmitted from another first node.
The CAN system according to claim 5.
請求項5に記載のCANシステム。 The retransmission control unit retransmits a frame for which retransmission is requested in the retransmission request frame after a predetermined delay time has elapsed since the frame can be transmitted after receiving the retransmission request frame.
The CAN system according to claim 5.
前記記録制御部は、前記CANバスに対して送信されたフレームを前記フレームカウンタのカウンタ値と対応付けて前記記憶部に格納し、
前記再送要求部は、前記フレームカウンタのカウンタ値に基づいて、前記再送を要求するフレームを特定する特定情報を生成し、生成した特定情報を前記再送要求フレームに含めて送信し、
前記再送制御部は、前記再送要求フレームに含まれる特定情報に基づいて、前記記憶部に格納されたフレームから、当該再送要求フレームで再送が要求されたフレームを特定する、
請求項1に記載のCANシステム。 Each of the first node and the second node further includes a frame counter that counts the number of frames transmitted or received by the own node;
The recording control unit stores the frame transmitted to the CAN bus in the storage unit in association with the counter value of the frame counter;
The retransmission request unit generates specific information for specifying a frame for which retransmission is requested based on a counter value of the frame counter, includes the generated specific information in the retransmission request frame, and transmits the specific information.
The retransmission control unit specifies a frame requested to be retransmitted in the retransmission request frame from the frames stored in the storage unit, based on identification information included in the retransmission request frame.
The CAN system according to claim 1.
前記再送制御部は、前記フレームカウンタのカウンタ値と、前記再送要求フレームに含まれる差分値に基づいて、前記受信に失敗したフレームが送信されたときにおける前記フレームカウンタのカウンタ値を算出し、算出したカウンタ値と対応付けられたフレームを、当該再送要求フレームで再送が要求されたフレームとして特定する、
請求項8に記載のCANシステム。 The specific information is a difference value between a counter value of the frame counter when the retransmission request frame is transmitted and a counter value of the frame counter when the frame that has failed to be received is transmitted,
The retransmission control unit calculates a counter value of the frame counter when a frame that has failed to be received is transmitted based on a counter value of the frame counter and a difference value included in the retransmission request frame. Identify the frame associated with the counter value as the frame requested for retransmission in the retransmission request frame,
The CAN system according to claim 8.
請求項8に記載のCANシステム。 The specific information is included in the retransmission request frame as an ID of the retransmission request frame.
The CAN system according to claim 8.
前記フレームが格納される記憶部と、
前記CANバスに対して送信されたフレームを前記記憶部に格納する記録制御部と、
他のノードが前記CANバスを介したフレームの受信に失敗したときにエラーパッシブ状態である場合に送信する再送要求フレームの受信に応じて、当該再送要求フレームで再送が要求されたフレームを前記記憶部から取得し、当該他のノードに再送する再送制御部と、
を備えたノード。 A node that transmits and receives frames to and from a plurality of nodes via a CAN (Controller Area Network) bus.
A storage unit for storing the frame;
A recording control unit for storing a frame transmitted to the CAN bus in the storage unit;
In response to reception of a retransmission request frame to be transmitted when another node fails to receive a frame via the CAN bus and is in an error passive state, a frame requested to be retransmitted in the retransmission request frame is stored in the memory A retransmission control unit that obtains from the unit and retransmits to the other node;
A node with
自ノードの、前記CANバスに対するフレーム送受信のエラー回数をカウントするエラーカウンタと、
前記CANバスを介したフレームの受信に失敗したときに、前記エラーカウンタのカウント値が所定の閾値を超えて、自ノードがエラーパッシブ状態となっているか否かを判断するエラー管理部と、
前記エラー管理部によって前記フレームの受信に失敗したときに自ノードがエラーパッシブ状態であると判断された場合、前記CANバスに対して送信されたフレームを保持する他のノードに対して、当該フレームの再送を要求する再送要求フレームを送信する再送要求部と、
を備えたノード。 A node that transmits and receives frames to and from a plurality of nodes via a CAN (Controller Area Network) bus.
An error counter for counting the number of frame transmission / reception errors for the CAN bus of the own node;
An error management unit that determines whether or not the count value of the error counter exceeds a predetermined threshold and the own node is in an error passive state when frame reception via the CAN bus fails;
If the error management unit determines that the node is in an error passive state when reception of the frame fails, the frame is transmitted to another node that holds the frame transmitted to the CAN bus. A retransmission request unit that transmits a retransmission request frame for requesting retransmission of
A node with
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012233118A JP2014086812A (en) | 2012-10-22 | 2012-10-22 | Can system and node |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012233118A JP2014086812A (en) | 2012-10-22 | 2012-10-22 | Can system and node |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2014086812A true JP2014086812A (en) | 2014-05-12 |
Family
ID=50789520
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012233118A Pending JP2014086812A (en) | 2012-10-22 | 2012-10-22 | Can system and node |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2014086812A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104363032A (en) * | 2014-10-29 | 2015-02-18 | 三一汽车起重机械有限公司 | Communication line self repairing system, bus network and engineering machine |
JP2017220759A (en) * | 2016-06-06 | 2017-12-14 | オムロンオートモーティブエレクトロニクス株式会社 | On-vehicle equipment control system, on-vehicle control device, and portable unit |
DE112016003908T5 (en) | 2015-08-31 | 2018-05-17 | Autonetworks Technologies, Ltd. | communication device |
DE112016003907T5 (en) | 2015-08-31 | 2018-05-30 | Autonetworks Technologies, Ltd. | Forwarding device |
US10384625B2 (en) | 2015-05-18 | 2019-08-20 | National University Corporation Nagoya University | Communication device and non-transitory recording medium |
CN113225240A (en) * | 2020-02-04 | 2021-08-06 | 恩智浦有限公司 | CAN transceiver |
KR102338422B1 (en) * | 2021-07-30 | 2021-12-10 | 클로우플레이크(주) | Method, device and system for providing collaboration tool service in cloud environment based on did |
-
2012
- 2012-10-22 JP JP2012233118A patent/JP2014086812A/en active Pending
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104363032A (en) * | 2014-10-29 | 2015-02-18 | 三一汽车起重机械有限公司 | Communication line self repairing system, bus network and engineering machine |
US10384625B2 (en) | 2015-05-18 | 2019-08-20 | National University Corporation Nagoya University | Communication device and non-transitory recording medium |
DE112016003908T5 (en) | 2015-08-31 | 2018-05-17 | Autonetworks Technologies, Ltd. | communication device |
DE112016003907T5 (en) | 2015-08-31 | 2018-05-30 | Autonetworks Technologies, Ltd. | Forwarding device |
US10404721B2 (en) | 2015-08-31 | 2019-09-03 | National University Corporation Nagoya University | Communication device for detecting transmission of an improper message to a network |
US10439842B2 (en) | 2015-08-31 | 2019-10-08 | National University Corporation Nagoya University | Relay device |
JP2017220759A (en) * | 2016-06-06 | 2017-12-14 | オムロンオートモーティブエレクトロニクス株式会社 | On-vehicle equipment control system, on-vehicle control device, and portable unit |
CN113225240A (en) * | 2020-02-04 | 2021-08-06 | 恩智浦有限公司 | CAN transceiver |
KR102338422B1 (en) * | 2021-07-30 | 2021-12-10 | 클로우플레이크(주) | Method, device and system for providing collaboration tool service in cloud environment based on did |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2014086812A (en) | Can system and node | |
US10979245B2 (en) | Gateway device determining whether or not received frame is appropriate | |
US10693905B2 (en) | Invalidity detection electronic control unit, in-vehicle network system, and communication method | |
JP5308802B2 (en) | CAN node | |
JP6377143B2 (en) | In-vehicle network system, electronic control unit, and update processing method | |
US9197373B2 (en) | Method, apparatus, and system for retransmitting data packet in quick path interconnect system | |
US11843477B2 (en) | Anomaly determination method, anomaly determination device, and recording medium | |
US10439840B1 (en) | Method and device for communicating data frames on a multi-master bus | |
JP2012257122A (en) | Vehicle controller and vehicle control system | |
US10447384B2 (en) | Communication apparatus, communication method, and program | |
US20190273755A1 (en) | Communication control device, communication control method, and program | |
EP2940935A1 (en) | Controller area network (CAN) device and method for controlling CAN traffic | |
JP6527647B1 (en) | Fraud detection method, fraud detection device and program | |
CN110999225A (en) | Control device | |
JP2006319381A (en) | Method for transmitting urgent message | |
CN116155826A (en) | Message receiving and transmitting method, network equipment, system and storage medium | |
CN113315601B (en) | Multipoint-assisted data transmission method and device, storage medium and electronic equipment | |
JP4890909B2 (en) | Communication system and communication method. | |
JP3785995B2 (en) | Ring network access control method and terminal device | |
EP4387176A1 (en) | Can device and method for the can device | |
WO2024190387A1 (en) | Communication device, communication control method, and communication control program | |
US20240121036A1 (en) | Network device, communication system and method for the network device | |
US20230353417A1 (en) | Can module, can transceiver, can system and method for can module | |
JP2020025194A (en) | Information processing apparatus, information processing system, information processing method, and program | |
JP5320571B2 (en) | Internode data response system |