JP2014086812A - Can system and node - Google Patents

Can system and node Download PDF

Info

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
Application number
JP2012233118A
Other languages
Japanese (ja)
Inventor
Masataka Yatsugayo
雅高 八ヶ代
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2012233118A priority Critical patent/JP2014086812A/en
Publication of JP2014086812A publication Critical patent/JP2014086812A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a system capable of increasing failure resistance while suppressing bus usage efficiency degradation.SOLUTION: A CAN system 900 includes: a first node 91; and a second node 92. The first node transmits a re-transmission request frame for requesting frame re-transmission, if own node is in an error passive state when frame reception through a CAN bus 90 fails. The second node stores a frame transmitted to CAN bus in a storage part, obtains a frame whose re-transmission is requested by a re-transmission frame transmitted by the first node, and re-transmits the frame to the first node.

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.

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

しかしながら、特許文献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.

実施の形態1に係るCANシステムの構成図である。1 is a configuration diagram of a CAN system according to a first embodiment. 実施の形態1に係るCANシステムの動作概要を説明するための構成図である。3 is a configuration diagram for explaining an outline of operation of a CAN system according to Embodiment 1. FIG. 実施の形態1に係るノードの構成図である。3 is a configuration diagram of a node according to Embodiment 1. FIG. 実施の形態1に係るノードの受信エラー検出時の動作を示すフローチャートである。4 is a flowchart illustrating an operation when a reception error is detected by a node according to the first embodiment. 実施の形態1に係るノードの再送要求フレーム受信時の動作を示すフローチャートである。4 is a flowchart showing an operation when a retransmission request frame is received by a node according to the first embodiment. 実施の形態1に係るCANシステムの再送要求フレーム競合時の動作を示す概念図である。FIG. 5 is a conceptual diagram showing an operation when a retransmission request frame conflicts in the CAN system according to the first embodiment. 実施の形態1に係るCANシステムの再送要求フレーム競合時の動作を示すタイムチャートである。6 is a time chart illustrating an operation when a retransmission request frame conflicts in the CAN system according to the first embodiment. 実施の形態1に係るCANシステムの再送フレームと他の送信フレームの同時送信時の動作を示すタイムチャートである。6 is a time chart showing an operation at the time of simultaneous transmission of a retransmission frame and another transmission frame of the CAN system according to the first embodiment. 実施の形態1に係るCANシステムの再送要求発生時のフレーム処理動作を示すタイムチャートである。6 is a time chart illustrating a frame processing operation when a retransmission request is generated in the CAN system according to the first embodiment. 実施の形態2に係るCANシステムの構成図である。3 is a configuration diagram of a CAN system according to a second embodiment. FIG. 実施の形態2に係るCANシステムの動作概要を説明するための構成図である。FIG. 10 is a configuration diagram for explaining an operation outline of a CAN system according to a second embodiment. 実施の形態2に係る一般ノードの構成図である。6 is a configuration diagram of a general node according to Embodiment 2. FIG. 実施の形態2に係る過去フレームサーバノードの構成図である。6 is a configuration diagram of a past frame server node according to Embodiment 2. FIG. 実施の形態3に係るCANシステムの再送フレームと他の送信フレームの同時送信時の動作を示すタイムチャートである。14 is a time chart showing an operation at the time of simultaneous transmission of a retransmission frame and another transmission frame of the CAN system according to the third embodiment. 実施の形態3に係るCANシステムの再送要求発生時のフレーム処理動作を示すタイムチャートである。10 is a time chart illustrating a frame processing operation when a retransmission request is generated in the CAN system according to the third embodiment. 実施の形態の概要構成となるCANシステムの構成図である。It is a lineblock diagram of a CAN system used as an outline composition of an embodiment.

説明の明確化のため、以下の記載及び図面は、適宜、省略、及び簡略化がなされている。また、様々な処理を行う機能ブロックとして図面に記載される各要素は、ハードウェア的には、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 system 1000 according to the first embodiment will be described with reference to FIG. FIG. 1 is a configuration diagram of a CAN system 1000 according to the first embodiment.

CANシステム1000は、例えば、ボディ系ノード101、安全系ノード102、情報系ノード103、エンジン系ノード104、及びシャーシ系ノード105等を有する。ノード101〜105のそれぞれは、CANバス90によって相互に接続されており、CANバス90によって任意のフレームを相互に送受信することができる。CANシステム1000は、自動車内に構築される。   The CAN system 1000 includes, for example, a body system node 101, a safety system node 102, an information system node 103, an engine system node 104, a chassis system node 105, and the like. Each of the nodes 101 to 105 is connected to each other by a CAN bus 90, and an arbitrary frame can be transmitted / received to / from the CAN bus 90. The CAN system 1000 is built in an automobile.

ボディ系ノード101は、他のノードから受信したフレームに基づいて、ヘッドランプ、ミラー、エアコン、及びドア等のボディ系の装置の制御を行う。安全系ノード102は、他のノードから受信したフレームに基づいて、センサ及びエアバック等の安全系の装置の制御を行う。情報系ノード103は、他のノードから受信したフレームに基づいて、カーオーディオ、カーラジオ及びカーテレビ等の情報系の装置の制御を行う。エンジン系ノード104は、他のノードから受信したフレームに基づいて、エンジン及びAT(Automatic Transmission)等のエンジン系の装置の制御を行う。シャーシ系ノード105は、他のノードから受信したフレームに基づいて、ステアリング及びブレーキ等のシャーシ系の装置の制御を行う。また、ノード101〜105のそれぞれは、必要に応じて、任意のフレームを他のノードに送信する。以下、ノード101〜105のそれぞれを、総じて「ノード100」とも呼ぶ。また、CANシステム1000におけるノードの種類は、上述したボディ系、安全系、情報系、エンジン系、及びシャーシ系に限られず、異なる種類のノードを有していてもよい。   The body node 101 controls body devices such as a headlamp, a mirror, an air conditioner, and a door based on a frame received from another node. The safety node 102 controls safety devices such as sensors and airbags based on frames received from other nodes. The information node 103 controls information devices such as car audio, car radio, and car TV based on frames received from other nodes. The engine node 104 controls the engine and engine-related devices such as AT (Automatic Transmission) based on frames received from other nodes. The chassis node 105 controls chassis devices such as steering and brakes based on frames received from other nodes. In addition, each of the nodes 101 to 105 transmits an arbitrary frame to another node as necessary. Hereinafter, each of the nodes 101 to 105 is also collectively referred to as “node 100”. In addition, the types of nodes in the CAN system 1000 are not limited to the above-described body system, safety system, information system, engine system, and chassis system, and may have different types of nodes.

また、ノード101〜105のうち、少なくともいずれか1つのノードは、複数の同一種類のノードと、CANバス90とを接続するゲートウェイ(バスブリッジ)ノードであってもよい。例えば、ボディ系のゲートウェイノードは、それぞれがボディ系の装置の制御を行う複数のボディ系ノードとLIN(Local Interconnect Network)バスによって接続される。すなわち、ゲートウェイノードは、同一種類のノードと、CANバス90上の他のノードとの間で、フレームを送受信する。   In addition, at least one of the nodes 101 to 105 may be a gateway (bus bridge) node that connects a plurality of nodes of the same type and the CAN bus 90. For example, a body gateway node is connected to a plurality of body nodes, each of which controls a body device, by a LIN (Local Interconnect Network) bus. That is, the gateway node transmits and receives frames between the same type of node and other nodes on the CAN bus 90.

続いて、図2を参照して、実施の形態1に係るCANシステム1000の動作概要について説明する。図2は、実施の形態1に係るCANシステム1000の動作概要を説明するための構成図である。   Subsequently, an outline of operation of the CAN system 1000 according to the first embodiment will be described with reference to FIG. FIG. 2 is a configuration diagram for explaining an operation outline of the CAN system 1000 according to the first embodiment.

ノード100のそれぞれは、フレームカウンタ110及び送信記録FIFO120を有している。フレームカウンタ110は、CANバス90上に現れたフレームを数えるフリーランニングカウンタである。送信記録FIFO120は、自ノードの送信済みフレームを保管するためのストレージである。   Each of the nodes 100 includes a frame counter 110 and a transmission record FIFO 120. The frame counter 110 is a free running counter that counts the frames that appear on the CAN bus 90. The transmission record FIFO 120 is a storage for storing the transmitted frames of the own node.

ノード100のそれぞれは、自ノード/他ノードのどちらが送信したかに関わらず、CANバス90上に現れたフレームの送信又は受信が完了したときに、フレームカウンタ110をカウントアップする。ノード100のそれぞれは、自ノードがフレームを送信し終わり、それによるフレームカウンタ110のカウントアップを終えたタイミングで、フレームカウンタ110のフレームカウンタ値とともに、送信したフレームを送信記録FIFO120に格納する。   Each of the nodes 100 counts up the frame counter 110 when transmission or reception of a frame appearing on the CAN bus 90 is completed regardless of whether the node 100 or another node has transmitted. Each of the nodes 100 stores the transmitted frame together with the frame counter value of the frame counter 110 in the transmission record FIFO 120 at the timing when the node 100 finishes transmitting the frame and finishes counting up the frame counter 110 accordingly.

ノード100のそれぞれは、自ノードがエラーパッシブ状態のときにフレームの受信エラーが発生した場合、そのフレームの再送を要求する再送要求フレームを送信する。この再送要求フレームは、その時点のフレームカウンタ110のフレームカウンタ値に基づいて、再送を要求するフレームの送信時のフレームカウンタ110のフレームカウンタ値を特定可能とする情報が含められる。   Each node 100 transmits a retransmission request frame for requesting retransmission of a frame when a reception error of the frame occurs when the node 100 is in an error passive state. The retransmission request frame includes information that can specify the frame counter value of the frame counter 110 at the time of transmission of the frame that requests retransmission based on the frame counter value of the frame counter 110 at that time.

ノード100のそれぞれは、再送要求フレームを受信した場合、その再送要求フレームの情報によって特定されるフレームカウンタ値に基づいて、送信記録FIFO120に格納されるフレームの中から、再送が要求されたフレームを特定する。ノード100のそれぞれは、再送要求フレームで再送が要求されたフレームが送信記録FIFO120に存在する場合、そのフレーム(再送フレーム)を再送する。また、ノード100のそれぞれは、再送要求フレームで再送が要求されたフレームが送信記録FIFO120に存在しない場合には、所定の時間の間、自フレームからのフレームの送信を抑止して、再送フレームを再送するノードにバス使用権を譲る。   When each of the nodes 100 receives a retransmission request frame, the node 100 selects a frame requested for retransmission from the frames stored in the transmission record FIFO 120 based on the frame counter value specified by the information of the retransmission request frame. Identify. Each of the nodes 100 retransmits the frame (retransmission frame) when a frame requested to be retransmitted in the retransmission request frame exists in the transmission record FIFO 120. Further, each of the nodes 100 suppresses transmission of a frame from its own frame for a predetermined time when a frame requested to be retransmitted in the retransmission request frame does not exist in the transmission record FIFO 120, and transmits a retransmission frame. The right to use the bus is given to the retransmitting node.

続いて、図3を参照して、実施の形態1に係るノード100の構成について説明する。図3は、実施の形態1に係るノード100の構成図である。   Next, the configuration of the node 100 according to Embodiment 1 will be described with reference to FIG. FIG. 3 is a configuration diagram of the node 100 according to the first embodiment.

ノード100は、CANコントローラLSI(Large Scale Integration)10及びバストランシーバ20を有する。CANコントローラLSI10は、CANコントローラモジュール1、CPU(Central Processing Unit)21、及び他周辺モジュール22、及びを有する。CANコントローラモジュール1、CPU21、及び他周辺モジュール22のそれぞれは、ローカルバス23を介して相互に接続されている。   The node 100 includes a CAN controller LSI (Large Scale Integration) 10 and a bus transceiver 20. The CAN controller LSI 10 includes a CAN controller module 1, a CPU (Central Processing Unit) 21, and other peripheral modules 22. Each of the CAN controller module 1, the CPU 21, and the other peripheral module 22 is connected to each other via a local bus 23.

CANコントローラモジュール1は、ビットストリーム制御部2、メッセージハンドラ3、メッセージバッファメモリ4、フレームカウンタ5、送信記録制御部6、及び送信記録FIFO(First In First Out)7、エラー管理部8、及び再送要求送信制御部9を有する。   The CAN controller module 1 includes a bit stream control unit 2, a message handler 3, a message buffer memory 4, a frame counter 5, a transmission record control unit 6, a transmission record FIFO (First In First Out) 7, an error management unit 8, and a retransmission. A request transmission control unit 9 is included.

CANコントローラモジュール1は、ローカルバス23を介して、CPU21からアクセスされる。CANコントローラモジュール1は、バストランシーバ20を介して、CANバス90に接続されている。CANコントローラモジュール1は、他のノード100との間でフレームを送受信する。   The CAN controller module 1 is accessed from the CPU 21 via the local bus 23. The CAN controller module 1 is connected to the CAN bus 90 via the bus transceiver 20. The CAN controller module 1 transmits / receives a frame to / from another node 100.

ビットストリーム制御部2は、メッセージハンドラ3から出力された送信フレーム40を受け取る。ビットストリーム制御部2は、受け取った送信フレーム40に基づいて、CRC(Cyclic Redundancy Check)を算出する。ビットストリーム制御部2は、CANプロトコルのフレームフォーマットに従って、算出したCRCを送信フレーム40に付加する。ビットストリーム制御部2は、CRCが付加された送信フレームに、CANプロトコルで定められたビットスタッフィングに基づいてスタッフビットを挿入する。つまり、同一論理値が連続した5ビットの次に、その論理値とは反転した論理値をとるスタッフビットが挿入される。ビットストリーム制御部2は、スタッフビットを挿入した送信フレームをビットストリーム形式で、送信信号線(TxD)30を介してバストランシーバ20に出力する。   The bit stream control unit 2 receives the transmission frame 40 output from the message handler 3. The bit stream control unit 2 calculates a CRC (Cyclic Redundancy Check) based on the received transmission frame 40. The bit stream control unit 2 adds the calculated CRC to the transmission frame 40 in accordance with the CAN protocol frame format. The bit stream control unit 2 inserts stuff bits into the transmission frame to which the CRC is added based on bit stuffing defined by the CAN protocol. That is, a stuff bit having a logical value inverted from the logical value is inserted after five consecutive bits having the same logical value. The bit stream control unit 2 outputs the transmission frame in which the stuff bit is inserted in the bit stream format to the bus transceiver 20 via the transmission signal line (TxD) 30.

また、ビットストリーム制御部2は、バストランシーバ20から受信信号線(RxD)31を介して出力された受信フレームをビットストリーム形式で受け取る。ビットストリーム制御部2は、受け取った受信フレームからCANプロトコルで定義されたスタッフビットを除去する。ビットストリーム制御部2は、スタッフビットを除去した受信フレームに基づいてCRCチェックを行う。ビットストリーム制御部2は、CRCチェック後、受信フレームからCRCを除去する。ビットストリーム制御部2は、CRCを除去した受信フレーム41をメッセージハンドラ3に出力する。   The bit stream control unit 2 receives a reception frame output from the bus transceiver 20 via the reception signal line (RxD) 31 in a bit stream format. The bit stream control unit 2 removes stuff bits defined by the CAN protocol from the received reception frame. The bit stream control unit 2 performs a CRC check based on the received frame from which the stuff bits are removed. The bit stream control unit 2 removes the CRC from the received frame after the CRC check. The bit stream control unit 2 outputs the reception frame 41 from which the CRC is removed to the message handler 3.

また、ビットストリーム制御部2は、受信フレームの受信エラー(受信失敗)を検出した場合、エラー発生信号45をエラー管理部8に出力する。エラー発生信号45は、受信エラーの発生を通知する信号である。受信エラーは、例えば、前述のCRCチェックにおいて検出されるCRCエラー、スタッフエラー、及びフォームエラー等が該当する。   Further, when the bit stream control unit 2 detects a reception error (reception failure) of the received frame, the bit stream control unit 2 outputs an error occurrence signal 45 to the error management unit 8. The error occurrence signal 45 is a signal for notifying the occurrence of a reception error. The reception error corresponds to, for example, a CRC error, a stuff error, and a form error detected in the CRC check described above.

また、ビットストリーム制御部2は、送信フレームの出力(送信フレームの送信)が完了したとき、又は、受信フレームの受け取り(受信フレームの受信)が完了したときに、エンドオブフレーム信号42をフレームカウンタ5に出力する。エンドオブフレーム信号42は、フレームの送信完了又は受信完了を通知する信号となる。具体的には、ビットストリーム制御部2は、受信フレームがデータフレーム又はリモートフレームである場合、受信フレームのEOF(エンドオブフレーム)を観測し、その最終ビットを観測し終えた際にエンドオブフレーム信号をフレームカウンタ5に出力する。ビットストリーム制御部2は、受信フレームがアクティブエラーフレームである場合、受信フレームのエラーデミリタを観測し、その最終ビットを観測し終えた際にエンドオブフレーム信号42をフレームカウンタ5に出力する。このように、ビットストリーム制御部2は、自ノードによってCANバス90上に送信されたフレームか、他ノードによってCANバス90上に送信されたフレームかに関わらず、CANバス90上へのフレームの送信完了に応じて、エンドオブフレーム信号42をフレームカウンタ5に出力する。   Also, the bit stream control unit 2 sends the end-of-frame signal 42 to the frame counter 5 when the output of the transmission frame (transmission of the transmission frame) is completed or when reception of the reception frame (reception of the reception frame) is completed. Output to. The end-of-frame signal 42 is a signal for notifying completion of frame transmission or reception. Specifically, when the received frame is a data frame or a remote frame, the bit stream control unit 2 observes the EOF (end-of-frame) of the received frame and outputs the end-of-frame signal when the final bit is observed. Output to the frame counter 5. When the received frame is an active error frame, the bit stream control unit 2 observes the error delimiter of the received frame, and outputs the end-of-frame signal 42 to the frame counter 5 when the final bit is observed. As described above, the bit stream control unit 2 transmits the frame to the CAN bus 90 regardless of whether the frame is transmitted on the CAN bus 90 by the own node or the frame transmitted on the CAN bus 90 by another node. In response to the completion of transmission, an end-of-frame signal 42 is output to the frame counter 5.

また、ビットストリーム制御部2は、送信フレームの送信を完了した際には、エンドオブフレーム信号42を出力した直後に、送信フレームの送信完了を通知する送信完了信号44を送信記録制御部6に出力する。   Further, when the transmission of the transmission frame is completed, the bit stream control unit 2 outputs a transmission completion signal 44 for notifying the transmission completion of the transmission frame to the transmission record control unit 6 immediately after outputting the end-of-frame signal 42. To do.

メッセージハンドラ3は、メッセージバッファメモリ4の送信バッファに格納された送信フレーム40を取得してビットストリーム制御部2に出力する。この際、メッセージハンドラ3は、その送信フレーム40を送信記録制御部6にも出力する。また、メッセージハンドラ3は、ビットストリーム制御部2から出力された受信フレーム41をメッセージバッファメモリ4の受信バッファに格納する。   The message handler 3 acquires the transmission frame 40 stored in the transmission buffer of the message buffer memory 4 and outputs it to the bitstream control unit 2. At this time, the message handler 3 also outputs the transmission frame 40 to the transmission record control unit 6. Further, the message handler 3 stores the reception frame 41 output from the bit stream control unit 2 in the reception buffer of the message buffer memory 4.

メッセージバッファメモリ4は、受信バッファ及び送信バッファを有する。送信バッファは、他のノード100に送信する送信フレームが格納される。受信バッファは、他のノード100から受信した受信フレームが格納される。メッセージバッファメモリ4は、受信バッファ及び送信バッファを構成するための任意の記憶装置を含む。記憶装置は、例えば、レジスタ及びメモリ等である。送信フレーム及び受信フレームのそれぞれは、CAN仕様に基づき、IDが含まれるアービトレーションフィールド、データ長コード(DLC)が含まれるコントロールフィールド、任意のデータが含まれるデータフィールド等を有する。   The message buffer memory 4 has a reception buffer and a transmission buffer. The transmission buffer stores transmission frames to be transmitted to other nodes 100. The reception buffer stores reception frames received from other nodes 100. The message buffer memory 4 includes an arbitrary storage device for configuring a reception buffer and a transmission buffer. The storage device is, for example, a register and a memory. Each of the transmission frame and the reception frame has an arbitration field including an ID, a control field including a data length code (DLC), a data field including arbitrary data, and the like based on the CAN specification.

フレームカウンタ5は、CANバス90に対して送信されたフレーム数をカウントする。フレームカウンタ5は、フレームカウンタ110に相当する。フレームカウンタ5は、ビットストリーム制御部2からのエンドオブフレーム信号42の出力に応じて、その内部に保持するフレームカウンタ値43をインクリメントする。フレームカウンタ5は、フレームカウンタ値43を保持するための任意の記憶装置を含む。フレームカウンタ5は、フレームカウンタ値43を送信記録制御部6及び再送要求送信制御部9に出力する。   The frame counter 5 counts the number of frames transmitted to the CAN bus 90. The frame counter 5 corresponds to the frame counter 110. The frame counter 5 increments the frame counter value 43 held therein according to the output of the end-of-frame signal 42 from the bit stream control unit 2. The frame counter 5 includes an arbitrary storage device for holding the frame counter value 43. The frame counter 5 outputs the frame counter value 43 to the transmission record control unit 6 and the retransmission request transmission control unit 9.

送信記録制御部6は、ビットストリーム制御部2からの送信完了信号44の出力に応じて、フレームカウンタ5から出力されたフレームカウンタ値43と、メッセージハンドラ3から出力された送信フレーム40と、送信イネーブルビットのそれぞれを関連付けて、送信記録FIFO7に格納する。これによって、CANバス90上に送信された送信フレームは、その送信に応じてインクリメントされた後のフレームカウンタ値43と一意に紐付けられることになる。また、このように、送信フレーム40を送信記録FIFO7に保持しておくことで、後述するように、再送が要求された送信フレーム40を特定して再送することが可能となる。   In response to the transmission completion signal 44 output from the bit stream control unit 2, the transmission record control unit 6 transmits the frame counter value 43 output from the frame counter 5, the transmission frame 40 output from the message handler 3, and the transmission Each enable bit is associated and stored in the transmission record FIFO 7. As a result, the transmission frame transmitted on the CAN bus 90 is uniquely associated with the frame counter value 43 after being incremented according to the transmission. Further, by holding the transmission frame 40 in the transmission record FIFO 7 in this way, it is possible to identify and retransmit the transmission frame 40 requested to be retransmitted, as will be described later.

また、この際には、送信イネーブルビットの値は、「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 transmission record FIFO 7 stores the frame counter value, the transmission enable bit, and the transmission frame by the transmission record control unit 6. The transmission record FIFO 7 corresponds to the transmission record FIFO 120. The transmission record FIFO 7 stores a frame counter value, a transmission enable bit, and a transmission frame in a FIFO format for each unit with which each is associated. The transmission record FIFO 7 includes a frame counter value, a transmission enable bit, and an optional storage device for holding a transmission frame.

エラー管理部8は、自ノードの、CANバス90に対するフレーム送受信のエラー回数をカウントするエラーカウンタ11を内蔵しており、自ノード100の状態を管理する。エラー管理部8は、CAN仕様に従って、自ノード100においてエラーが発生した場合に、エラーカウンタ11のカウンタ値をカウントアップする。そして、エラーカウンタ11のカウンタ値が所定の閾値を超えた場合、エラー管理部8は、自ノード100の状態を「エラーパッシブ状態」に遷移させる。エラーパッシブ状態では、前述の通り、CAN仕様上では、他のノード100からの再送要求に応じたフレームの再送が抑止される。   The error management unit 8 includes an error counter 11 that counts the number of frame transmission / reception errors with respect to the CAN bus 90 of the own node, and manages the state of the own node 100. The error management unit 8 counts up the counter value of the error counter 11 when an error occurs in the own node 100 according to the CAN specification. When the counter value of the error counter 11 exceeds a predetermined threshold, the error management unit 8 changes the state of the own node 100 to the “error passive state”. In the error passive state, as described above, retransmission of a frame in response to a retransmission request from another node 100 is suppressed according to the CAN specification.

また、エラー管理部8は、ビットストリーム制御部2からのエラー発生信号45の出力に応じて、自ノード100の状態が「エラーパッシブ状態」となっているか否かを判断する。具体的には、エラー管理部8は、エラーカウンタ11のカウンタ値が所定の閾値を超えている場合、自ノード100の状態が「エラーパッシブ状態」であると判断する。エラー管理部8は、自ノード100の状態が「エラーパッシブ状態」であると判断した場合、受信フレームの再送要求を指示する再送要求トリガ信号46を再送要求送信制御部9に出力する。   Further, the error management unit 8 determines whether or not the state of the own node 100 is “error passive state” in accordance with the output of the error occurrence signal 45 from the bit stream control unit 2. Specifically, when the counter value of the error counter 11 exceeds a predetermined threshold, the error management unit 8 determines that the state of the own node 100 is “error passive state”. When the error management unit 8 determines that the state of the node 100 is “error passive state”, the error management unit 8 outputs a retransmission request trigger signal 46 instructing a retransmission request of the received frame to the retransmission request transmission control unit 9.

具体的には、エラー管理部8は、エラーカウンタ11として、送信エラーと受信エラーをそれぞれカウントする送信エラーカウンタと受信エラーカウンタを備える。すなわち、図3では、1つのエラーカウンタ11のみを図示しているが、厳密には、エラー管理部8は、送信エラーカウンタと受信エラーカウンタの2つのエラーカウンタ11を有する。送信エラーカウンタと受信エラーカウンタのカウントアップおよびカウントダウンのタイミングおよびカウント数は、CANプロトコルの規格を参照されたいが、概して、送信エラーカウンタは、送信エラーを検出したときにはカウントアップし、正常送信できたときにはカウントダウンする。同様に、受信エラーカウンタは、受信エラーを検出したときにはカウントアップし、正常受信できたときにはカウントダウンする。   Specifically, the error management unit 8 includes, as the error counter 11, a transmission error counter and a reception error counter that count transmission errors and reception errors, respectively. That is, in FIG. 3, only one error counter 11 is shown, but strictly speaking, the error management unit 8 has two error counters 11, that is, a transmission error counter and a reception error counter. Refer to the CAN protocol standard for the timing and number of counts up and down of the transmission error counter and the reception error counter. In general, the transmission error counter counts up when a transmission error is detected, and transmission can be performed normally. Sometimes it counts down. Similarly, the reception error counter counts up when a reception error is detected, and counts down when normal reception is possible.

エラー管理部8は、その受信エラーカウンタのカウント値(REC)と、送信エラーカウンタのカウント値(TEC)に応じて、自ノード100の状態を、エラーアクティブ状態、エラーパッシブ状態、バスオフ状態の3つのエラー状態間で遷移する。エラーアクティブ状態は、バス上の通信に正常に参加できる状態であり、エラーパッシブ状態は、エラーアクティブ状態よりエラーを起こしやすい状態である。エラーパッシブ状態にあるノード100は、エラーアクティブ状態のノード100と比べ、連続送信時の制限と、エラー通知の制限が設けられている。また、バスオフ状態は、エラーパッシブ状態よりさらにエラーを起こしやすい状態であり、この状態にあるノード100は、送受信すべての動作が禁止され、CANバス90上の通信に参加できない。   The error management unit 8 sets the status of the node 100 according to the count value (REC) of the reception error counter and the count value (TEC) of the transmission error counter to the error active state, the error passive state, and the bus off state. Transition between two error states. The error active state is a state in which communication on the bus can be normally joined, and the error passive state is a state in which an error is more likely to occur than the error active state. Compared with the node 100 in the error active state, the node 100 in the error passive state is provided with restrictions on continuous transmission and error notification. The bus off state is a state in which an error is more likely to occur than in the error passive state, and the node 100 in this state is prohibited from performing all transmission and reception operations and cannot participate in communication on the CAN bus 90.

上述した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 node 100 is in an error active state, and when either TEC or REC is 128 to 255, The node 100 enters an error passive state. Regardless of the REC, when the TEC becomes 256 or more, the node 100 is in a bus-off state and is disconnected from the communication on the CAN bus 90.

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 node 90, thereby enabling communication of the node 90 that is likely to cause an error. Avoid interference.

再送要求送信制御部9は、エラー管理部8からの再送要求トリガ信号46の出力に応じて、再送要求フレームのデータとなる再送要求フレーム送信データ47をビットストリーム制御部2に送信する。これによって、後述するように、ビットストリーム制御部2によって再送要求フレームが他のノード100に送信される。   The retransmission request transmission control unit 9 transmits retransmission request frame transmission data 47 serving as data of a retransmission request frame to the bit stream control unit 2 in response to the output of the retransmission request trigger signal 46 from the error management unit 8. As a result, the retransmission request frame is transmitted to the other nodes 100 by the bit stream control unit 2 as will be described later.

CPU21は、ローカルバス23を介して、他周辺モジュール22に対して、ノード100に含まれる装置の制御を指示する制御指示データを出力することによって、ノード100に含まれる装置を制御する。具体的には、CPU21は、ローカルバス23を介して、他のノード100から受信した受信フレームをメッセージバッファメモリ4の受信バッファから取得する。CPU21は、他のノード100から受信した受信フレームの内容に基づいて、ノード100に含まれる装置を制御する。また、CPU21は、他のノード100に送信する送信フレームを生成し、ローカルバス23を介してメッセージバッファメモリ4の送信バッファに格納する。   The CPU 21 controls the devices included in the node 100 by outputting control instruction data that instructs the other peripheral modules 22 to control the devices included in the node 100 via the local bus 23. Specifically, the CPU 21 acquires a reception frame received from another node 100 from the reception buffer of the message buffer memory 4 via the local bus 23. The CPU 21 controls devices included in the node 100 based on the content of the received frame received from the other node 100. Further, the CPU 21 generates a transmission frame to be transmitted to another node 100 and stores it in the transmission buffer of the message buffer memory 4 via the local bus 23.

他周辺モジュール22は、CPU11から出力された制御指示データに基づいて、ノード100に含まれる装置を制御する。例えば、ノード100が装置としてミラーを制御するボディ系ノード101である場合、他周辺モジュール22は、ミラーを駆動するアクチュエータ等が該当する。   The other peripheral module 22 controls the devices included in the node 100 based on the control instruction data output from the CPU 11. For example, when the node 100 is a body node 101 that controls a mirror as a device, the other peripheral module 22 corresponds to an actuator that drives the mirror.

バストランシーバ20は、ビットストリーム制御部2から送信信号線30を介して出力された送信フレームを、CANバス90を介して他のノード100に送信する。バストランシーバ20は、CANバス90を介して他のノード100から受信した受信フレームを、受信信号線31を介してビットストリーム制御部2に出力する。   The bus transceiver 20 transmits the transmission frame output from the bit stream control unit 2 via the transmission signal line 30 to another node 100 via the CAN bus 90. The bus transceiver 20 outputs a reception frame received from another node 100 via the CAN bus 90 to the bit stream control unit 2 via the reception signal line 31.

続いて、図4を参照して、実施の形態1に係るノード100の受信エラー検出時の動作について説明する。図4は、実施の形態1に係るノード100の受信エラー検出時の動作を示すフローチャートである。   Next, with reference to FIG. 4, an operation at the time of reception error detection of the node 100 according to Embodiment 1 will be described. FIG. 4 is a flowchart showing an operation when the node 100 according to the first embodiment detects a reception error.

ビットストリーム制御部2は、バストランシーバ20を介して受信フレームを受信したときに(S1)、その受信フレームの受信に失敗したか否かを判断する(S2)。すなわち、ビットストリーム制御部2は、前述の通り、受信フレームに基づいて、CRCエラー、スタッフエラー、及びフォームエラー等の受信エラーが発生しているか否かを判断する。   When receiving the received frame via the bus transceiver 20 (S1), the bit stream control unit 2 determines whether the reception of the received frame has failed (S2). That is, as described above, the bit stream control unit 2 determines whether a reception error such as a CRC error, a stuff error, and a form error has occurred based on the received frame.

受信フレームの受信に失敗したと判断した場合(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 stream control unit 2 outputs an error occurrence signal 45 to the error management unit 8. In response to the output of the error occurrence signal 45 from the bitstream control unit 2, the error management unit 8 determines whether or not the state of the own node 100 is the “error passive state” (S3). When determining that the state of the own node 100 is the “error passive state” (S3: Yes), the error management unit 8 outputs a retransmission request trigger signal 46 to the retransmission request transmission control unit 9.

再送要求送信制御部9は、エラー管理部8からの再送要求トリガ信号46の出力に応じて、フレームカウンタ5から出力されたフレームカウンタ値43をキャプチャし(S4)、再送要求フレーム送信データ47をビットストリーム制御部2に送信する。この再送要求フレーム送信データ47は、再送要求フレームのIDが含まれている。なお、フレームカウンタ値43をキャプチャは、受信に失敗した受信フレームの受信によるフレームカウンタ110のカウントアップを終えたタイミングで行う。例えば、ビットストリーム制御部2が、エンドオブフレーム信号42を出力した後に、エラー発生信号45を出力するようにすればよい。   The retransmission request transmission control unit 9 captures the frame counter value 43 output from the frame counter 5 in response to the output of the retransmission request trigger signal 46 from the error management unit 8 (S4), and stores the retransmission request frame transmission data 47. Transmit to the bitstream control unit 2. The retransmission request frame transmission data 47 includes a retransmission request frame ID. Note that the capture of the frame counter value 43 is performed at the timing when the frame counter 110 has finished counting up due to reception of a received frame that has failed to be received. For example, the bit stream control unit 2 may output the error occurrence signal 45 after outputting the end-of-frame signal 42.

ビットストリーム制御部2は、再送要求送信制御部9からの再送要求フレーム送信データ47の出力に応じて、再送要求フレームを生成する。この再送要求フレームのIDには、再送要求フレーム送信データ47に含まれる再送要求のIDが設定される。ビットストリーム制御部2は、生成した再送要求フレームを送信フレームとして、バストランシーバ20を介して送信開始する(S5)。   The bit stream control unit 2 generates a retransmission request frame according to the output of the retransmission request frame transmission data 47 from the retransmission request transmission control unit 9. In this retransmission request frame ID, the ID of the retransmission request included in the retransmission request frame transmission data 47 is set. The bit stream control unit 2 starts transmission via the bus transceiver 20 using the generated retransmission request frame as a transmission frame (S5).

再送要求フレームが競合負けせずに、その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 stream control unit 2 outputs a retransmission request frame transmission start signal 48 to the retransmission request transmission control unit 9. In this case, the “arbitration loss” in the so-called CAN protocol does not occur, the transmission of the arbitration field in which the ID of the retransmission request frame is set is completed, and the transmission of the retransmission request frame is continued. The retransmission request frame transmission start signal 48 is a signal notifying that transmission of the retransmission request frame is started without losing the competition.

なお、再送要求フレームが競合負けして、その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 other node 100 that won the contention is completed. Frame transmission is started (S5).

再送要求送信制御部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 transmission start signal 48 from the bit stream control unit 2, the retransmission request transmission control unit 9 calculates a difference value between the current frame counter value 18 and the frame counter value 18 captured in step S4. Is calculated. This difference value is a value obtained by subtracting the captured frame counter value 18 from the current frame counter value 18. The retransmission request transmission control unit 9 additionally outputs the calculated difference value to the bit stream control unit 2 as retransmission request frame transmission data 47. The bit stream control unit 2 transmits the difference value of the retransmission request frame transmission data 47 output from the retransmission request transmission control unit 9 as data of the retransmission request frame via the bus transceiver 20 (S7). That is, the difference value is set, for example, in the data field of the retransmission request frame. As described above, the bit stream control unit 2 generates the bit stream of the retransmission request frame from the ID and the difference value sequentially transmitted from the retransmission request transmission control unit 9 and transmits them.

続いて、図5を参照して、実施の形態1に係るノード100の再送要求フレーム受信時の動作について説明する。図5は、実施の形態1に係るノード100の再送要求フレーム受信時の動作を示すフローチャートである。   Next, with reference to FIG. 5, the operation of node 100 according to Embodiment 1 when receiving a retransmission request frame will be described. FIG. 5 is a flowchart showing an operation when the node 100 according to Embodiment 1 receives a retransmission request frame.

ビットストリーム制御部2は、バストランシーバ20を介して受信フレームを受信した場合(S11)、その受信フレーム41をメッセージハンドラ3に出力する。メッセージハンドラ3は、ビットストリーム制御部2から出力された受信フレーム41が再送要求フレームであるか否かを判定する(S12)。具体的には、メッセージハンドラ3は、受信フレーム41のIDが再送要求フレームのIDである場合に、受信フレーム41が再送要求フレームであると判断する。   When the bit stream control unit 2 receives a reception frame via the bus transceiver 20 (S11), the bit stream control unit 2 outputs the reception frame 41 to the message handler 3. The message handler 3 determines whether or not the received frame 41 output from the bitstream control unit 2 is a retransmission request frame (S12). Specifically, the message handler 3 determines that the received frame 41 is a retransmission request frame when the ID of the received frame 41 is the ID of a retransmission request frame.

受信フレーム41が再送要求フレームである場合(S12:Yes)、再送要求受信信号49及び再送要求フレーム差分値50を送信記録制御部6に出力する。再送要求受信信号49は、再送要求フレームを受信したことを通知する信号である。再送要求フレーム差分値50は、その再送要求フレームに含まれている差分値である。   When the reception frame 41 is a retransmission request frame (S12: Yes), the retransmission request reception signal 49 and the retransmission request frame difference value 50 are output to the transmission record control unit 6. The retransmission request reception signal 49 is a signal notifying that a retransmission request frame has been received. The retransmission request frame difference value 50 is a difference value included in the retransmission request frame.

送信記録制御部6は、メッセージハンドラ3からの再送要求受信信号49の出力に応じて、再送要求フレームの受信によるカウントアップ前のフレームカウンタ値43から、メッセージハンドラ3から出力された再送要求フレーム差分値50を減算した値を算出する(S13)。送信記録制御部6は、フレームカウンタ値43から再送要求フレーム差分値50を減算した値を、送信記録FIFO7に格納されているフレームカウンタ値から検索する(S14)。   In response to the output of the retransmission request reception signal 49 from the message handler 3, the transmission record control unit 6 determines the retransmission request frame difference output from the message handler 3 from the frame counter value 43 before counting up due to reception of the retransmission request frame. A value obtained by subtracting the value 50 is calculated (S13). The transmission record control unit 6 searches for a value obtained by subtracting the retransmission request frame difference value 50 from the frame counter value 43 from the frame counter value stored in the transmission record FIFO 7 (S14).

検索した値が送信記録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 record control unit 6 determines whether or not the transmission enable bit associated with the frame counter value is “1”. Is determined (S15). When the transmission enable bit is “1” (S15: Yes), the transmission record control unit 6 reads the transmission frame associated with the frame counter value and the transmission enable bit from the transmission record FIFO 7 (S16). The transmission record control unit 6 outputs the read transmission frame as a retransmission frame 51 to the message handler 3. At the same time, the transmission record control unit 6 outputs a command meaning “transmission of retransmission frame” to the message handler 3 as the retransmission frame search result signal 52.

メッセージハンドラ3は、送信記録制御部6からのそれらのデータの出力に応じて、送信記録制御部6から出力された再送フレーム51を、送信フレーム40としてビットストリーム制御部2に出力する。この場合、メッセージハンドラ3は、メッセージバッファメモリ4の送信バッファに格納される送信データの送信は後回しにする。そして、ビットストリーム制御部2は、メッセージハンドラ3から送信フレーム40として出力された再送フレームを、バストランシーバ20を介して送信する(S17)。   The message handler 3 outputs the retransmission frame 51 output from the transmission recording control unit 6 to the bit stream control unit 2 as the transmission frame 40 in response to the output of those data from the transmission recording control unit 6. In this case, the message handler 3 delays transmission of transmission data stored in the transmission buffer of the message buffer memory 4. Then, the bit stream control unit 2 transmits the retransmission frame output from the message handler 3 as the transmission frame 40 via the bus transceiver 20 (S17).

一方、ステップ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 record control unit 6 outputs a command meaning “retransmission frame transmission unnecessary” to the message handler 3 as the retransmission frame search result signal 52.

メッセージハンドラ3は、送信記録制御部6からの「再送フレーム送信不要」の再送フレーム検索結果信号52の出力に応じて、所定の一定期間(一定時間)の間、アイドル状態を保ち、送信フレームの送信を抑止する(S18)。これによって、他のノード100が再送フレームを送信できるようにする。また、メッセージハンドラ3は、この一定期間の間に受信フレームを受信した場合には、その受信フレームは、自ノード100には不要な再送フレームであるため、メッセージバッファメモリ4への格納対象から除外し、重複受信を回避する。すなわち、この一定時間として、例えば、再送フレームの送信が完了するまでの時間を定めるようにすればよい。   In response to the output of the retransmission frame search result signal 52 indicating that “retransmission frame transmission is not required” from the transmission record control unit 6, the message handler 3 maintains an idle state for a predetermined fixed period (fixed time). Transmission is suppressed (S18). This enables another node 100 to transmit a retransmission frame. Further, when the message handler 3 receives a received frame during this fixed period, the received frame is a retransmission frame unnecessary for the node 100 itself, and is therefore excluded from being stored in the message buffer memory 4. And avoiding duplicate reception. That is, as this fixed time, for example, a time until transmission of a retransmission frame is completed may be determined.

なお、再送要求フレームが再送を要求するフレームが、アクティブエラーフレームである場合、及び、他のノード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 node 100, it is stored in the transmission record FIFO 7. Since the transmission enable bit of the corresponding frame is set to “0”, retransmission is not performed.

続いて、図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 system 1000 according to Embodiment 1 will be described. FIG. 6 is a conceptual diagram showing an operation when the retransmission request frame conflicts in the CAN system 1000 according to the first embodiment. FIG. 7 is a time chart showing an operation at the time of a retransmission request frame contention of the CAN system 1000 according to the first embodiment. FIG. 8 is a time chart showing an operation at the time of simultaneous transmission of a retransmission frame and another transmission frame of the CAN system 1000 according to the first embodiment.

以下、CANシステム1000において、前述のノード100として動作するノードA、B、Zが存在する場合について説明する。また、ノードAが送信フレームを送信したが、エラーパッシブ状態のノードZが、その送信フレームの受信フレームとしての受信に失敗した場合について説明する。   Hereinafter, a case where nodes A, B, and Z that operate as the node 100 described above exist in the CAN system 1000 will be described. A case will be described in which the node A transmits a transmission frame, but the error passive node Z fails to receive the transmission frame as a reception frame.

この場合、ノード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 chassis node 105 to control the brake or a frame that instructs the safety node 102 to operate the airbag. This corresponds to a frame that requires. An ID (high priority ID) having a higher priority than an ID (low priority ID) of another frame having a lower importance is assigned to the frame having a higher importance. For example, an ID having a higher priority than an ID of a retransmission request frame is assigned to a frame having a high importance.

これによれば、図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 CAN system 1000 according to the first embodiment. Here, in FIG. 9, the node Z is the body system node 101, and the nodes A and B are nodes that transmit a transmission frame instructing the body system control to the node Z that is the body system node 101. Will be described.

ノード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 message buffer memory 4 as the reception frame B. At this time, the transmission frame B from the node B is received by the node Z, overtaking the transmission frame A from the node A. For this reason, if the transmission frame B from the node B is processed before the transmission frame A from the node A, there is a risk that inconsistency occurs in device control. Therefore, the CPU 21 of the node Z suppresses the processing of the reception frame B stored in the reception buffer of the message buffer memory 4.

ノード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 message buffer memory 4 as the reception frame A. At this time, even if the transmission frame C having a higher priority than the transmission frame A transmitted from the node A is stored in the transmission buffer of the message buffer memory 4 in the node B, the transmission of the transmission frame C is suppressed. Is done. Therefore, the node Z can determine that the retransmission frame received from the node A after transmission of the retransmission request frame is the transmission frame A that has failed to be received at T10 to T11. That is, the node Z can determine that the retransmission frame received from the node A is the transmission frame A transmitted immediately before the transmission frame B transmitted from the node B.

そのため、ノードZのCPU21は、メッセージバッファメモリ4に格納された受信フレームのうち、ノードAから受信した受信フレームAを先に処理し(T14)、その後、ノードBから受信した受信フレームBを処理することで(T15)、装置制御の整合性を保つことが可能となる。例えば、ノードZのCPU21は、受信フレームAに基づいて装置を制御した後に、受信フレームBに基づいて装置を制御する。また、ノードZがゲートウェイノードである場合には、ノードZは、受信フレームAを対象となるノードに転送した後に、受信フレームBを対象となるノードに転送する。   Therefore, the CPU 21 of the node Z first processes the received frame A received from the node A among the received frames stored in the message buffer memory 4 (T14), and then processes the received frame B received from the node B. By doing this (T15), it becomes possible to maintain the consistency of device control. For example, the CPU 21 of the node Z controls the apparatus based on the received frame B after controlling the apparatus based on the received frame A. When the node Z is a gateway node, the node Z transfers the received frame A to the target node, and then transfers the received frame B to the target node.

以上に説明したように、本実施の形態1では、ノード100は、フレームの受信に失敗したときに、エラーカウンタ11が所定の閾値を超えており、自ノード100がエラーパッシブ状態であると判断した場合には、そのフレームの再送を要求する再送要求フレームを送信するようにしている。また、ノード100は、CANバス90に対して送信されたフレームを送信記録FIFO7に格納するとともに、再送要求フレームで再送が要求されたフレームを送信記録FIFO7から取得し、再送するようにしている。   As described above, in the first embodiment, when the node 100 fails to receive a frame, the error counter 11 exceeds the predetermined threshold, and the node 100 determines that the node 100 is in the error passive state. In such a case, a retransmission request frame for requesting retransmission of the frame is transmitted. Further, the node 100 stores the frame transmitted to the CAN bus 90 in the transmission record FIFO 7, acquires the frame requested to be retransmitted from the retransmission request frame from the transmission record FIFO 7, and retransmits the frame.

これによれば、ノード100がフレームの受信に失敗した場合のみに、そのフレームの再送が要求されるため、バスの使用効率の低下を抑制することができる。また、CANの使用上、受信エラー通知不可となるエラーパッシブ状態となっている場合にも、フレームの受信に失敗した場合にフレームの再送を要求されるようになるため、耐障害性を向上することができる。   According to this, since the frame 100 is requested to be retransmitted only when the node 100 fails to receive the frame, it is possible to suppress a decrease in bus use efficiency. Also, even in the error passive state where reception error notification is not possible due to the use of CAN, the frame resending is requested when frame reception fails, thus improving fault tolerance. be able to.

また、本実施の形態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 node 100 that has received the retransmission request frame can identify the frame that has failed to be received based on the information indicating “how many frames ago”. Thus, even when a retransmission request frame cannot be transmitted immediately after a frame that has failed to be received, it is possible to identify and retransmit the frame that has failed to be received.

<実施の形態2>
続いて、実施の形態2について説明する。まず、図10を参照して、実施の形態2に係るCANシステム1000の構成について説明する。図10は、実施の形態2に係るCANシステム1000の構成図である。以下、実施の形態1と同様の内容については、適宜、その説明を省略する。
<Embodiment 2>
Next, the second embodiment will be described. First, the configuration of the CAN system 1000 according to the second embodiment will be described with reference to FIG. FIG. 10 is a configuration diagram of a CAN system 1000 according to the second embodiment. Hereinafter, the description of the same contents as those in Embodiment 1 will be omitted as appropriate.

CANシステム1000は、実施の形態1と比較して、さらに、過去フレームサーバノード109を有している。過去フレームサーバノード109は、CANバス90上に現れたフレームを保管するとともに、ノード101〜105のそれぞれからの再送要求に応じて保管したフレームのうち、再送要求されたフレームを再送する。また、ノード101〜105のそれぞれは、実施の形態1とは異なり、エラーパッシブ状態のノードからの再送要求に応じてフレームを再送する機能は有していない。以下、このようなノード101〜105を、「一般ノード108」とも呼ぶ。すなわち、実施の形態2では、エラーパッシブ状態でフレームの受信に失敗したノードからの再送要求に応じたフレームの再送機能が過去フレームサーバノード109に集約されている。ただし、一般ノード101〜105は、CAN仕様による通常のフレーム再送機能(エラーパッシブ状態でないノードからの再送要求)は、当然に有するようにしてもよい。   The CAN system 1000 further includes a past frame server node 109 as compared with the first embodiment. The past frame server node 109 stores the frame appearing on the CAN bus 90, and retransmits the frame requested for retransmission among the frames stored in response to the retransmission request from each of the nodes 101 to 105. Further, unlike the first embodiment, each of the nodes 101 to 105 does not have a function of retransmitting a frame in response to a retransmission request from a node in an error passive state. Hereinafter, such nodes 101 to 105 are also referred to as “general nodes 108”. That is, in the second embodiment, the past frame server node 109 collects the frame retransmission function according to the retransmission request from the node that failed to receive the frame in the error passive state. However, the general nodes 101 to 105 may naturally have a normal frame retransmission function according to the CAN specification (retransmission request from a node that is not in the error passive state).

続いて、図11を参照して、実施の形態2に係るCANシステム1000の動作概要について説明する。図11は、実施の形態2に係るCANシステム1000の動作概要を説明するための構成図である。   Next, an outline of operation of the CAN system 1000 according to the second embodiment will be described with reference to FIG. FIG. 11 is a configuration diagram for explaining an operation outline of the CAN system 1000 according to the second embodiment.

一般ノード108のそれぞれは、フレームカウンタ110を有している。それに対して、過去フレームサーバノード109は、フレームカウンタ110及び過去フレーム記録FIFO130を有している。実施の形態2では、過去フレーム記録FIFO130は、過去フレームサーバノード109において、自ノード109/他ノード108のどちらが送信したフレームに関わらず、CANバス90上に現れたフレームを保管するためのストレージとして機能する。   Each general node 108 has a frame counter 110. On the other hand, the past frame server node 109 has a frame counter 110 and a past frame recording FIFO 130. In the second embodiment, the past frame recording FIFO 130 is used as a storage for storing the frame appearing on the CAN bus 90 in the past frame server node 109 regardless of the frame transmitted by either the own node 109 or the other node 108. Function.

一般ノード108及び過去フレームサーバノード109は、自ノード/他ノードのどちらが送信したかに関わらず、CANバス90上に現れたフレームの送信又は受信が完了したときに、フレームカウンタ110をカウントアップする。過去フレームサーバノード109は、一般ノード108のフレームが送信し終わり、それによるフレームカウンタ110のカウントアップを終えたタイミングで、フレームカウンタ110のフレームカウンタ値とともに、送信又は受信したフレームを過去フレーム記録FIFO130に格納する。   The general node 108 and the past frame server node 109 count up the frame counter 110 when transmission or reception of a frame appearing on the CAN bus 90 is completed regardless of which of the own node / other nodes has transmitted. . The past frame server node 109 transmits the received or received frame together with the frame counter value of the frame counter 110 together with the frame counter value of the frame counter 110 at the timing when the transmission of the frame of the general node 108 has been completed and the frame counter 110 has finished counting up. To store.

一般ノード108のそれぞれは、自ノードがエラーパッシブ状態のときにフレームの受信エラーが発生した場合、そのフレームの再送を要求する再送要求フレームを送信する。この再送要求フレームは、その時点のフレームカウンタ110のフレームカウンタ値に基づいて、その再送要求対象のフレームの送信時のフレームカウンタ110のフレームカウンタ値を特定可能とする情報が含められる。   Each of the general nodes 108 transmits a retransmission request frame requesting retransmission of the frame when a reception error of the frame occurs when the own node is in the error passive state. The retransmission request frame includes information that can specify the frame counter value of the frame counter 110 at the time of transmission of the retransmission request target frame based on the frame counter value of the frame counter 110 at that time.

過去フレームサーバノード109は、再送要求フレームを受信した場合、その再送要求フレームの情報によって特定されるフレームカウンタ値に基づいて、過去フレーム記録FIFO130に格納されるフレームの中から、再送が要求されたフレームを特定し、そのフレームを再送する。また、一般ノード108のそれぞれは、他のノード108から再送要求フレームを受信した場合には、所定の時間の間、自フレームからのフレームの送信を抑止して、フレームを再送する過去フレームサーバノード109にバス使用権を譲る。   When the past frame server node 109 receives a retransmission request frame, a retransmission is requested from the frames stored in the past frame recording FIFO 130 based on the frame counter value specified by the information of the retransmission request frame. Identify the frame and retransmit the frame. Each general node 108, when receiving a retransmission request frame from another node 108, suppresses transmission of the frame from its own frame for a predetermined time and retransmits the frame. The right to use the bus is transferred to 109.

続いて、図12を参照して、実施の形態2に係る一般ノード108の構成について説明する。図12は、実施の形態2に係る一般ノード108の構成図である。   Next, the configuration of the general node 108 according to the second embodiment will be described with reference to FIG. FIG. 12 is a configuration diagram of the general node 108 according to the second embodiment.

本実施の形態2に係る一般ノード108は、実施の形態1に係るノード100と比較して、送信記録制御部6及び送信記録FIFO7を有していない。   The general node 108 according to the second embodiment does not include the transmission record control unit 6 and the transmission record FIFO 7 as compared with the node 100 according to the first embodiment.

本実施の形態2では、送信記録制御部6及び送信記録FIFO7を有していないため、実施の形態1において、メッセージハンドラ3が、一定期間の間、送信フレームの送信を抑止するか否かを判断していた再送フレーム検索結果信号52が存在しない。そのため、本実施の形態2では、メッセージハンドラ3は、再送要求フレームを受信したことによる、ビットストリーム制御部2からの再送要求フレームの出力に応じて、一定期間の間、アイドル状態を保ち、送信フレーム40の送信を抑止するようにする。   Since the second embodiment does not include the transmission record control unit 6 and the transmission record FIFO 7, in the first embodiment, the message handler 3 determines whether or not to suppress transmission of a transmission frame for a certain period. The determined retransmission frame search result signal 52 does not exist. Therefore, in the second embodiment, the message handler 3 maintains an idle state for a certain period according to the output of the retransmission request frame from the bitstream control unit 2 due to the reception of the retransmission request frame, and transmits Transmission of the frame 40 is suppressed.

なお、受信エラー検出時の動作については、図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 frame server node 109 according to the second embodiment will be described with reference to FIG. FIG. 13 is a configuration diagram of the past frame server node 109 according to the second embodiment.

過去フレームサーバノード109は、実施の形態1に係るノード100と比較して、送信記録制御部6に代えて過去フレーム記録制御部12を有し、送信記録FIFO7に代えて過去フレーム記録FIFO13を有する。また、過去フレームサーバノード109は、実施の形態1に係るノード100と比較して、送信記録制御部6の動作トリガとなっていた送信完了信号44が廃止され、その代わりにエンドオブフレーム信号42が過去フレーム記録制御部12にも動作トリガとして出力されるようになっている。また、ビットストリーム制御部2は、バストランシーバ20を介して受信した受信フレーム41を過去フレーム記録制御部12にも出力する。   The past frame server node 109 has a past frame recording control unit 12 instead of the transmission recording control unit 6 and a past frame recording FIFO 13 instead of the transmission recording FIFO 7 as compared with the node 100 according to the first embodiment. . Further, the past frame server node 109 abolishes the transmission completion signal 44 that was the operation trigger of the transmission record control unit 6 as compared with the node 100 according to the first embodiment, and instead of the end of frame signal 42, It is also output to the past frame recording control unit 12 as an operation trigger. The bit stream control unit 2 also outputs the received frame 41 received via the bus transceiver 20 to the past frame recording control unit 12.

そして、過去フレーム記録制御部12は、送信記録制御部6が送信完了信号44の出力に応じて実行していた動作を、エンドオブフレーム信号42の出力に応じて実行する。ただし、過去フレーム記録制御部12が過去フレーム記録FIFOへの格納対象とするフレームは、送信フレーム40のみならず、受信フレーム41も対象となる。これによって、自ノード109が送信した送信フレーム40のみならず、他ノード108から受信した受信フレーム41も過去フレーム記録FIFO13に記録されることになる。   Then, the past frame recording control unit 12 executes the operation performed by the transmission recording control unit 6 according to the output of the transmission completion signal 44 according to the output of the end-of-frame signal 42. However, the frame to be stored in the past frame recording FIFO by the past frame recording control unit 12 is not only the transmission frame 40 but also the reception frame 41. As a result, not only the transmission frame 40 transmitted by the own node 109 but also the reception frame 41 received from the other node 108 is recorded in the past frame recording FIFO 13.

ここで、フレームの送信又は受信に応じてインクリメントされた後のフレームカウンタ値43と、そのフレームとが関連付けられて過去フレーム記録FIFO13に格納されるようにするために、過去フレーム記録制御部12に出力されるエンドオブフレーム信号42は、フレームカウンタ5に出力されるに出力されるエンドオブフレーム信号42よりも一次遅れとなるようにする。また、送信フレーム40及び受信フレーム41のうち、最後に過去フレーム記録制御部12に出力されたフレームが過去フレーム記録FIFO13に格納されるようにすることで、そのときに送信又は受信したフレームが格納されるようにする。   Here, in order to store the frame counter value 43 after being incremented according to the transmission or reception of the frame and the frame in association with each other, the past frame recording control unit 12 stores the frame counter value 43 in the past frame recording FIFO 13. The output end-of-frame signal 42 is delayed from the end-of-frame signal 42 output to the frame counter 5 by the first order. In addition, among the transmission frame 40 and the reception frame 41, the last frame output to the past frame recording control unit 12 is stored in the past frame recording FIFO 13, so that the frame transmitted or received at that time is stored. To be.

このように、過去フレーム記録FIFO13は、実施の形態1に係る送信記録FIFO7と比較して、自ノード109が送信した送信フレーム40のみならず、他ノード108が送信した受信フレーム41も格納される。過去フレーム記録FIFO13は、過去フレーム記録FIFO130に相当する。   As described above, the past frame recording FIFO 13 stores not only the transmission frame 40 transmitted by the own node 109 but also the reception frame 41 transmitted by the other node 108 as compared with the transmission recording FIFO 7 according to the first embodiment. . The past frame recording FIFO 13 corresponds to the past frame recording FIFO 130.

なお、実施の形態2に係る過去フレームサーバノード109の再送要求フレーム受信時の動作については、原則、図5を参照して説明した実施の形態1に係るノード100の再送要求フレーム受信時の動作と同様であるため、その説明を省略する。ただし、本実施の形態2では、再送要求フレームに応じて、再送フレームを再送するノードは、過去フレームサーバノード109のみである。そのため、実施の形態1において再送フレーム送信時の競合を防止するために、ステップS18で行っていた一定時間の送信フレームの抑止は、過去フレームサーバノード109において実行する必要はない。   Note that the operation when the retransmission request frame is received by the past frame server node 109 according to the second embodiment is basically the operation when the retransmission request frame is received by the node 100 according to the first embodiment described with reference to FIG. Since this is the same, the description thereof is omitted. However, in the second embodiment, only the past frame server node 109 retransmits the retransmission frame in response to the retransmission request frame. Therefore, in order to prevent contention during retransmission frame transmission in the first embodiment, it is not necessary for the past frame server node 109 to execute the suppression of transmission frames for a certain period of time performed in step S18.

以上に説明したように、本実施の形態2では、一般ノード108は、フレームの受信に失敗したときに、エラーカウンタ11が所定の閾値を超えており、自ノード108がエラーパッシブ状態であると判断した場合には、そのフレームの再送を要求する再送要求フレームを送信するようにしている。また、過去フレームサーバノード109は、CANバス90に対して送信されたフレームを過去フレーム記録FIFO13に格納するとともに、再送要求フレームで再送が要求されたフレームを過去フレーム記録FIFO13から取得し、再送するようにしている。   As described above, in the second embodiment, when the general node 108 fails to receive a frame, the error counter 11 exceeds a predetermined threshold, and the own node 108 is in the error passive state. If it is determined, a retransmission request frame requesting retransmission of the frame is transmitted. Further, the past frame server node 109 stores the frame transmitted to the CAN bus 90 in the past frame recording FIFO 13 and acquires the frame requested to be retransmitted by the retransmission request frame from the past frame recording FIFO 13 and retransmits it. I am doing so.

これによれば、一般ノード108がフレームの受信に失敗した場合のみに、そのフレームの再送が要求されるため、バスの使用効率の低下を抑制することができる。また、CANの使用上、受信エラー通知不可となるエラーパッシブ状態となっている場合にも、フレームの受信に失敗した場合にフレームの再送を要求されるようになるため、耐障害性を向上することができる。   According to this, since the retransmission of the frame is requested only when the general node 108 fails to receive the frame, it is possible to suppress a decrease in bus use efficiency. Also, even in the error passive state where reception error notification is not possible due to the use of CAN, the frame resending is requested when frame reception fails, thus improving fault tolerance. be able to.

また、本実施の形態2では、一般ノード108が送信記録FIFO7を備える必要がないため、その分のコストを削減することができる。   In the second embodiment, since the general node 108 does not need to include the transmission record FIFO 7, the cost can be reduced accordingly.

<実施の形態3>
続いて、実施の形態3について説明する。まず、図8を参照して、実施の形態3で解決しようとする内容について説明する。
<Embodiment 3>
Subsequently, Embodiment 3 will be described. First, contents to be solved in the third embodiment will be described with reference to FIG.

上述した実施の形態1では、図8で説明したように、ノード100のそれぞれは、再送要求フレームを受信したときに、自ノード100が再送フレームの送信主体でない場合は、一定時間の間、送信フレームの送信を抑制している。また、これによって、再送要求フレームを送信したノード100は、再送要求フレームの次に送信されるフレームを、再送フレームとして特定することができ、送信順序に従ったフレームの処理が可能となる。   In Embodiment 1 described above, as described with reference to FIG. 8, when each of the nodes 100 receives a retransmission request frame, if the own node 100 is not a transmission subject of the retransmission frame, the transmission is performed for a certain period of time. Frame transmission is suppressed. Also, this allows the node 100 that has transmitted the retransmission request frame to identify the frame transmitted next to the retransmission request frame as a retransmission frame, and can process the frame according to the transmission order.

しかしながら、このようにした場合には、図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 CAN system 1000 according to Embodiment 3 is the same as that of CAN system 1000 according to Embodiment 1 described with reference to FIG. The operation overview of the CAN system 1000 according to the third embodiment is the same as the operation overview of the CAN system 1000 according to the first embodiment described with reference to FIG.

ここで、実施の形態3に係るノード100の構成は、図3を参照して説明した、実施の形態1に係るノード100の構成と同様であるが、以下の点で、その動作が異なる。その他、実施の形態1と同様の内容については、適宜、その説明を省略する。   Here, the configuration of the node 100 according to the third embodiment is the same as the configuration of the node 100 according to the first embodiment described with reference to FIG. 3, but the operation is different in the following points. Other explanations of the same contents as those in Embodiment 1 are omitted as appropriate.

本実施の形態3では、メッセージハンドラ3は、自ノードが再送フレームの再送するノードでない場合であっても、一定時間の間の送信フレームの送信抑制を行わないようにする。すなわち、メッセージハンドラ3は、送信記録制御部6から「再送フレーム送信不要」の再送フレーム検索結果信号52が出力された場合、再送フレームの送信は行わないが、一定期間の送信抑止も実施しない。   In the third embodiment, the message handler 3 does not perform transmission frame transmission suppression for a certain period of time even when the own node is not the node that retransmits the retransmission frame. That is, when the retransmission record search result signal 52 indicating that “retransmission frame transmission is not required” is output from the transmission record control unit 6, the message handler 3 does not transmit the retransmission frame, but does not suppress transmission for a certain period.

また、本実施の形態3では、ビットストリーム制御部2は、送信フレーム40が再送フレームである場合、1ビット分の時間を遅らせて、送信フレーム(再送フレーム)の送信を開始する。これによれば、再送フレームと他の送信フレームの送信が開始される場合、再送フレームよりも、他の送信フレームが常に先に送信開始されることになる。そのため、再送フレームよりも、他の送信フレームが優先的にCANバス90上に送信されることになるため、再送フレームが送信されるときに、高優先IDの送信フレームの送信が抑止されることがなくなる。また、再送要求フレームを送信したノードは、1ビット分、時間が遅れて送信された送信フレームを、再送フレームとして特定することができるため、送信順序に従ったフレームの処理も可能となる。   In Embodiment 3, when the transmission frame 40 is a retransmission frame, the bit stream control unit 2 delays the time for one bit and starts transmission of the transmission frame (retransmission frame). According to this, when transmission of a retransmission frame and another transmission frame is started, transmission of another transmission frame is always started earlier than the retransmission frame. For this reason, other transmission frames are preferentially transmitted on the CAN bus 90 over the retransmission frame, and therefore transmission of a transmission frame with a high priority ID is suppressed when the retransmission frame is transmitted. Disappears. In addition, since the node that has transmitted the retransmission request frame can identify the transmission frame transmitted with a delay of one bit as the retransmission frame, it is possible to process the frame according to the transmission order.

続いて、図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 CAN system 1000 according to the third embodiment. FIG. 14 is a time chart showing an operation at the time of simultaneous transmission of a retransmission frame and another transmission frame of the CAN system 1000 according to the third embodiment.

以下、図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 node 100 exist in the CAN system 1000 will be described. A case will be described in which the node A transmits a transmission frame, but the error passive node Z fails to receive the transmission frame as a reception frame.

そして、図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 node 100 is not a retransmission frame transmission subject. In addition, the node 100 that has received the retransmission request is configured to start transmitting the retransmission frame at a timing delayed by one bit. Therefore, when a transmission frame is queued by a node that is not a retransmission frame transmission subject until the retransmission frame is transmitted, the transmission frame can be preferentially transmitted.

したがって、高優先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 CAN system 1000 according to the third embodiment. Here, in FIG. 15, node Z is body system node 101, and nodes A and B are nodes that transmit a transmission frame instructing body system control to node Z that is body system node 101. Will be described. Node B also transmits a transmission frame to nodes other than body node 101 (node Z).

ノード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 message buffer memory 4 as the reception frame B. At this time, the transmission frame B from the node B is received by the node Z, overtaking the transmission frame A from the node A. For this reason, if the transmission frame B from the node B is processed before the transmission frame A from the node A, there is a risk that inconsistency occurs in device control. Therefore, the CPU 21 of the node Z suppresses the processing of the reception frame B stored in the reception buffer of the message buffer memory 4.

ここで、再送要求フレームの送信中に、ノード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 message buffer memory 4 in the node B during transmission of the retransmission request frame. In this case, the Node B transmits the transmission frame C after completing the transmission of the retransmission request frame (T22). Further, in response to reception of the retransmission request frame, the node A tries to start transmission of the retransmission frame at a timing delayed by one bit from the timing (T22). However, since transmission of the transmission frame C from the node B has been started first, the retransmission frame is not transmitted (T22 ′). The node Z receives the transmission frame C transmitted from the node B, and stores it in the reception buffer of the message buffer memory 4 as the reception frame C. However, the CPU 21 of the node Z determines that the ID of the reception frame C is not a body transmission frame, discards the reception frame C, and does not execute the process.

そして、ノード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 message buffer memory 4. At this time, the node Z transmits that the retransmission frame transmitted at the timing (T23 ′) delayed by one bit from the timing at which the transmission frame can be transmitted (T23) failed to be received before T20. It can be determined that it is frame A. That is, the node Z can determine that the transmission frame A received from T23 ′ delayed by 1 bit is the transmission frame A that failed to be received before T20.

そのため、ノードZのCPU21は、メッセージバッファメモリ4に格納された送信フレームのうち、ノードAから受信した受信フレームAを先に処理し(T24)、その後、ノードBから受信した受信フレームBを処理することで(T25)、装置制御の整合性を保つことが可能となる。   Therefore, the CPU 21 of the node Z first processes the reception frame A received from the node A among the transmission frames stored in the message buffer memory 4 (T24), and then processes the reception frame B received from the node B. By doing so (T25), it becomes possible to maintain consistency of device control.

なお、本実施の形態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 node 100 according to the first embodiment has been described. However, the technique may be applied to the past frame server node 109 according to the second embodiment. That is, as the third embodiment, the embodiment in which the operations of the bitstream control unit 2 and the message handler 3 of the node 100 according to the first embodiment are changed is illustrated, but the past frame server node 109 according to the second embodiment is illustrated. This can also be implemented by changing the operations of the bit stream control unit 2 and the message handler 3 in the same manner.

以上に説明したように、本実施の形態3では、ノード100は、再送要求フレームの受信後にフレームを送信可能となったときから所定の遅延時間の経過後に再送要求フレームで再送が要求されたフレームを再送するようにしている。これによれば、再送を要求したノード100において、再送フレームを特定し、装置制御の整合性を保つことが可能となる。   As described above, in the third embodiment, the node 100 transmits a frame requested to be retransmitted by a retransmission request frame after a predetermined delay time has elapsed since the frame can be transmitted after the retransmission request frame is received. To resend. According to this, the node 100 that has requested retransmission can identify the retransmission frame and maintain the consistency of device control.

<他の実施の形態>
上述した実施の形態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 frame counter 5 is included in the data field of the retransmission request frame so that the retransmission target frame can be identified at the node that has received the retransmission request frame. However, it is not limited to this. The difference value of the frame counter value may be indicated by the ID of the retransmission request frame. The ID of the retransmission request frame may be arbitrarily determined in advance according to each value that can be taken by the difference value of the frame counter value. For example, when the difference value of the frame counter value is “1”, the ID may be “1F”, and when the difference value of the frame counter value is “2”, the ID may be “2F”. .

これによれば、再送要求フレームのデータフィールドを省略して、再送要求フレームの長さを極力短くすることができる。そのため、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 CAN bus 90 can be reduced, and the communication efficiency on the CAN bus 90 can be improved.

<実施の形態の概要構成>
上記実施の形態は、次に説明する概要構成として捉えることができる。図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 system 900 that is a schematic configuration of the CAN system 1000 according to the embodiment.

CANシステム900は、第1のノード91及び第2のノード92を有する。第1のノード91と第2のノード92は、CANバスを介してフレームを相互に送受信する。   The CAN system 900 includes a first node 91 and a second node 92. The first node 91 and the second node 92 exchange frames with each other via the CAN bus.

第1のノード91は、CAN仕様に基づいたエラーカウンタ911、エラー管理部912、及び再送要求部913を有する。エラーカウンタ911は、エラーカウンタ11に対応する。   The first node 91 includes an error counter 911, an error management unit 912, and a retransmission request unit 913 based on the CAN specification. The error counter 911 corresponds to the error counter 11.

エラー管理部912は、CANバス90を介したフレームの受信に失敗したときに、エラーカウンタ11が所定の閾値を超えて、自ノードがエラーパッシブ状態となっているか否かを判断する。エラー管理部912は、エラー管理部8に対応する。   When the error management unit 912 fails to receive a frame via the CAN bus 90, the error management unit 912 determines whether or not the error counter 11 exceeds a predetermined threshold and the own node is in an error passive state. The error management unit 912 corresponds to the error management unit 8.

再送要求部913は、エラー管理部912によってフレームの受信に失敗したときに自ノードがエラーパッシブ状態であると判断された場合、フレームの再送を要求する再送要求フレームを送信する。再送要求部913は、再送要求送信制御部9に対応する。   If the error management unit 912 determines that the node is in the error passive state when the error management unit 912 fails to receive a frame, the retransmission request unit 913 transmits a retransmission request frame requesting retransmission of the frame. The retransmission request unit 913 corresponds to the retransmission request transmission control unit 9.

第2のノード92は、記憶部921、記録制御部922、及び再送制御部923を有する。   The second node 92 includes a storage unit 921, a recording control unit 922, and a retransmission control unit 923.

記憶部921は、フレームが格納される。記憶部921は、送信記録FIFO7及び過去フレーム記録FIFO13に対応する。   The storage unit 921 stores frames. The storage unit 921 corresponds to the transmission recording FIFO 7 and the past frame recording FIFO 13.

記録制御部922は、CANバス90に対して送信されたフレームを記憶部921に格納する。記録制御部922は、送信記録制御部6及び過去フレーム記録制御部12に対応する。   The recording control unit 922 stores the frame transmitted to the CAN bus 90 in the storage unit 921. The recording control unit 922 corresponds to the transmission recording control unit 6 and the past frame recording control unit 12.

再送制御部923は、第1のノード91から送信された再送要求フレームで再送が要求されたフレームを記憶部921から取得し、第1のノード91に再送する。再送制御部923は、メッセージハンドラ3に対応する。   The retransmission control unit 923 acquires from the storage unit 921 a frame requested to be retransmitted by the retransmission request frame transmitted from the first node 91 and retransmits the frame to the first node 91. The retransmission control unit 923 corresponds to the message handler 3.

以上、本発明者によってなされた発明を実施の形態に基づき具体的に説明したが、本発明は既に述べた実施の形態に限定されるものではなく、その要旨を逸脱しない範囲において種々の変更が可能であることはいうまでもない。   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 frame counter 5 is used as the information that can identify the frame to be retransmitted in the retransmission request frame has been illustrated, but based on the frame counter value of the frame counter 5 Thus, the information is not limited to this as long as it can identify the frame to be retransmitted. For example, the frame counter value 43 of the frame counter 5 when a reception error occurs may be included as it is in the retransmission request frame as information that makes it possible to specify the frame to be retransmitted. In this case, the calculation in step S13 is not necessary. Further, the transmission recording control unit 6 or the past frame recording control unit 12 acquires the frame counter value included in the retransmission request frame from the message handler 3 in step S14, and obtains the frame counter value from the transmission recording FIFO 7 or the past frame recording FIFO 13. Search should be done.

本実施の形態では、送信フレームと、その送信フレームの送信完了によるカウントアップ後のフレームカウンタ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 frame counter 5 after counting up by completion of transmission of the transmission frame. It is not limited to this. For example, the transmission frame and the frame counter value of the frame counter 5 before counting up due to the completion of transmission of the transmission frame may be associated and managed. In this case, in step S4, it is necessary to capture the frame counter value 43 before the frame counter 110 counts up due to reception of a received frame that has failed to be received.

本実施の形態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 stream control unit 2 may transmit the retransmission frame with a time delay of 2 bits.

本発明の実施の形態にかかるノード100、108、109は、上述の実施の形態の機能を実現するプログラムを、ノード(コンピュータ)又はノードが有するCPU(Central Processing Unit)が実行することによっても、構成することが可能である。   The nodes 100, 108, and 109 according to the embodiment of the present invention can be executed by a node (computer) or a CPU (Central Processing Unit) included in the node executing a program that realizes the functions of the above-described embodiments. It is possible to configure.

また、上述したプログラムは、様々なタイプの非一時的なコンピュータ可読媒体(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 CAN controller module 2 Bit stream control part 3 Error management part 4 Retransmission request transmission control part 5 Message handler 6 Message buffer memory 7, 110 Frame counter 8 Transmission recording control part 9, 120 Transmission recording FIFO
10 CAN controller LSI
11 Error counter 12 Past frame recording control unit 13, 130 Past frame recording FIFO
20 Bus transceiver 21 CPU
22 Other peripheral module 23 Local bus 30 Transmission signal line 31 Reception signal line 40 Transmission frame 41 Reception frame 42 End-of-frame signal 43 Frame counter value 44 Transmission completion signal 45 Error occurrence signal 46 Retransmission request trigger signal 47 Retransmission request frame transmission data 48 Retransmission Request frame transmission start signal 49 Retransmission request reception signal 50 Retransmission request frame difference value 51 Retransmission frame 52 Retransmission frame search result signal 90 CAN bus 91 First node 92 Second node 100 Node 101 Body node 102 Safety node 103 Information System node 104 Engine system node 105 Chassis system node 108 General node 109 Past frame server node 911 Error counter 912 Error management unit 913 Retransmission request unit 921 Storage unit 922 Recording control unit 923 Retransmission control unit 1000 CAN system

Claims (12)

CAN(Controller Area Network)バスを介してフレームを相互に送受信する、第1のノード及び第2のノードを含む複数のノードを備えたCANシステムであって、
前記第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.
前記複数のノードのそれぞれは、前記エラーカウンタ、前記エラー管理部、前記再送要求部、前記記憶部、前記記録制御部、及び前記再送制御部を有し、前記第1のノード及び前記第2のノードとして機能し、
前記記録制御部は、自ノードが前記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のノードを複数含み、
前記記録制御部は、前記第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のノードは、さらに、前記フレームを送信する送信制御部を有し、
前記送信制御部は、他の第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.
前記第1のノード及び前記第2のノードのそれぞれは、さらに、自ノードが送信又は受信したフレーム数をカウントするフレームカウンタを有し、
前記記録制御部は、前記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.
前記特定情報は、前記再送要求フレームのIDとして、前記再送要求フレームに含められる、
請求項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(Controller Area Network)バスを介してフレームを相互に送受信するノードであって、
前記フレームが格納される記憶部と、
前記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(Controller Area Network)バスを介してフレームを相互に送受信するノードであって、
自ノードの、前記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
JP2012233118A 2012-10-22 2012-10-22 Can system and node Pending JP2014086812A (en)

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)

* Cited by examiner, † Cited by third party
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

Cited By (9)

* Cited by examiner, † Cited by third party
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