JP2013082352A - Communication equipment for vehicle - Google Patents

Communication equipment for vehicle Download PDF

Info

Publication number
JP2013082352A
JP2013082352A JP2011224188A JP2011224188A JP2013082352A JP 2013082352 A JP2013082352 A JP 2013082352A JP 2011224188 A JP2011224188 A JP 2011224188A JP 2011224188 A JP2011224188 A JP 2011224188A JP 2013082352 A JP2013082352 A JP 2013082352A
Authority
JP
Japan
Prior art keywords
data
message
stored
frame
timing
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
JP2011224188A
Other languages
Japanese (ja)
Inventor
Tamae Nakamoto
珠江 中本
Atsushi Ota
淳 太田
Takeshi Kurebayashi
毅 紅林
Kazuo Iwase
一夫 岩瀬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Original Assignee
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Corp filed Critical Denso Corp
Priority to JP2011224188A priority Critical patent/JP2013082352A/en
Publication of JP2013082352A publication Critical patent/JP2013082352A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Communication Control (AREA)

Abstract

PROBLEM TO BE SOLVED: To correspond to the increase of communication data volume by using a previously set message buffer.SOLUTION: There are provided a plurality of message buffers (hereinafter called as MB) in which at least a message and CANID (hereinafter called as ID) showing a class of the message are stored, and a CAN controller 11 which extracts data stored in MBs to constitute a frame and transmits it, and when receiving a frame, stores an extracted message in the MB in which an ID matching an ID extracted from the frame is stored. When timing is approaching to transmit a frame in a data pattern (hereinafter called as DP)1 which is set up beforehand for each ID, data of DP1 and a sum value CSUM1 are stored in the MB in which an ID corresponding to the timing is stored, and when timing is approaching to transmit a frame by DP2, data of the DP2 and a sum value CSUM2 are stored in the MB in which the ID is stored.

Description

本発明は、メッセージバッファを利用してメッセージの送受信を行う車両用通信装置に関する。   The present invention relates to a vehicle communication apparatus that transmits and receives messages using a message buffer.

車両において制御の高度化やサービスの充実を図るために、電子制御ユニット(ECU)等の車載機器同士を通信バスで相互に接続してローカルエリアネットワーク(いわゆる車内LAN)を構成し、車載機器間で情報を共有することが行われており(例えば、特許文献1を参照)、特に車内LANに多用されている通信プロトコルとして、CSMA/CD方式の一つであるCAN(Controller Area Network )プロトコルが知られている。   In order to enhance control and enhance services in vehicles, in-vehicle devices such as electronic control units (ECUs) are connected to each other via a communication bus to form a local area network (so-called in-vehicle LAN). (See, for example, Patent Document 1), and a CAN (Controller Area Network) protocol, which is one of the CSMA / CD systems, is a communication protocol that is frequently used for in-vehicle LANs. Are known.

このCANプロトコルでは、送信メッセージをフレーム化して通信バスへ送信する前には、送信メッセージの種類を表す識別IDコード(以下、CANIDという)が設定されたメッセージバッファに送信メッセージを格納するとともに、通信バスを介してフレームを受信した場合には、フレームから抽出した受信メッセージを、この受信メッセージに付与されているCANIDと同一のCANIDが予め設定されたメッセージバッファに格納するように規定されている。   In this CAN protocol, before a transmission message is framed and transmitted to a communication bus, the transmission message is stored in a message buffer in which an identification ID code (hereinafter referred to as CANID) indicating the type of the transmission message is set, and communication is performed. When a frame is received via the bus, it is defined that the received message extracted from the frame is stored in a message buffer in which the same CANID as the CANID assigned to the received message is stored.

特開2001−265402号公報JP 2001-265402 A

近年、制御の高度化等により、車内LAN内の車載機器間でやり取りされる通信データ量が増大している。しかし、車載機器に搭載された通信装置内に設けられているメッセージバッファの数の上限は予め決められている(例えば32個)。このため、通信データ量が増大すると、メッセージバッファを増設しなければならなくなるという問題があった。   In recent years, with the advancement of control and the like, the amount of communication data exchanged between in-vehicle devices in the in-vehicle LAN has increased. However, the upper limit of the number of message buffers provided in the communication device mounted on the in-vehicle device is determined in advance (for example, 32). For this reason, when the amount of communication data increases, there is a problem that a message buffer must be added.

本発明は、こうした問題に鑑みてなされたものであり、予め設けられているメッセージバッファを用いて通信データ量の増大に対応することを可能とする技術を提供することを目的とする。   The present invention has been made in view of these problems, and an object of the present invention is to provide a technique that can cope with an increase in the amount of communication data using a message buffer provided in advance.

上記目的を達成するためになされた請求項1に記載の発明は、メッセージと、メッセージの種別であるメッセージ種別を示すメッセージ識別コードとが少なくとも格納される複数のメッセージバッファと、メッセージバッファに格納されたデータを抽出してフレームを構成し通信バス上に送信するとともに、通信バスを介してフレームを受信した場合には、受信したフレームから抽出したメッセージ識別コードと一致するメッセージ識別コードが格納されているメッセージバッファに、フレームから抽出したメッセージを格納する送受信手段とを備える車両用通信装置であって、第1格納手段が、メッセージ識別コード毎に予め設定された第1タイミングになると、第1タイミングに対応したメッセージ識別コードのメッセージについて予め設定された第1データ種別のデータと、第1データ種別を示す第1データ種別情報とを、第1タイミングに対応したメッセージ識別コードが格納されているメッセージバッファに格納するとともに、第2格納手段が、メッセージ識別コード毎に第1タイミングと異なるように予め設定された第2タイミングになると、第1タイミングに対応したメッセージ識別コードのメッセージについて第1データ種別と異なるように予め設定された第2データ種別のデータと、第2データ種別を示す第2データ種別情報とを、第2タイミングに対応したメッセージ識別コードが格納されているメッセージバッファに格納する。   In order to achieve the above-mentioned object, the invention according to claim 1 is characterized in that a message and a message identification code indicating a message type as a message type are stored at least in a plurality of message buffers, and stored in the message buffer. When the received data is extracted via the communication bus, the message identification code that matches the message identification code extracted from the received frame is stored. And a transmission / reception unit for storing a message extracted from the frame in a message buffer, wherein the first storage unit has a first timing when the first storage unit reaches a first timing preset for each message identification code. For messages with message identification codes corresponding to The data of the determined first data type and the first data type information indicating the first data type are stored in the message buffer in which the message identification code corresponding to the first timing is stored, and the second storage means However, when the second timing preset for each message identification code is different from the first timing, the message of the message identification code corresponding to the first timing is preset to be different from the first data type. Data of the data type and second data type information indicating the second data type are stored in a message buffer in which a message identification code corresponding to the second timing is stored.

このように構成された車両用通信装置では、まず、第1タイミングになると、第1タイミングに対応したメッセージ識別コードのメッセージについて、第1データ種別のデータと、第1データ種別情報とが、第1タイミングに対応したメッセージ識別コードが格納されているメッセージバッファに格納される。これにより、メッセージバッファに格納されたメッセージ識別コード、第1データ種別のデータ、および第1データ種別情報が含まれるフレームが送信される。さらに、第1タイミングと異なる第2タイミングになると、第2タイミングに対応したメッセージ識別コードのメッセージについて、第1データ種別と異なる第2データ種別のデータと、第2データ種別情報とが、第2タイミングに対応したメッセージ識別コードが格納されているメッセージバッファに格納される。これにより、メッセージバッファに格納されたメッセージ識別コード、第2データ種別のデータ、および第2データ種別情報が含まれるフレームが送信される。つまり、同一のメッセージ識別コードを含みデータ種別の異なるデータを含む2種類のフレームがそれぞれ異なるタイミングで送信される。そして、この2種類のフレームにはそれぞれ、データ種別を示す情報が含まれている。   In the vehicle communication device configured as described above, first, at the first timing, the data of the first data type and the first data type information for the message of the message identification code corresponding to the first timing are It is stored in a message buffer in which a message identification code corresponding to one timing is stored. Thereby, a frame including the message identification code stored in the message buffer, the data of the first data type, and the first data type information is transmitted. Furthermore, at a second timing different from the first timing, for a message with a message identification code corresponding to the second timing, data of a second data type different from the first data type and second data type information are It is stored in a message buffer in which a message identification code corresponding to the timing is stored. Thereby, the frame including the message identification code stored in the message buffer, the data of the second data type, and the second data type information is transmitted. That is, two types of frames including the same message identification code and different data types are transmitted at different timings. Each of these two types of frames includes information indicating the data type.

このため、第1タイミングの直後に送信されたフレームを受信した通信装置は、この受信フレームから抽出したメッセージ識別コードと一致するメッセージ識別コードが格納されているメッセージバッファに、フレームから抽出したメッセージ(すなわち、第1データ種別のデータと第1データ種別情報)を格納する一方、第2タイミングの直後に送信されたフレームを受信した通信装置は、この受信フレームから抽出したメッセージ識別コードと一致するメッセージ識別コードが格納されているメッセージバッファに、フレームから抽出したメッセージ(すなわち、第2データ種別のデータと第2データ種別情報)を格納する。   Therefore, the communication device that has received the frame transmitted immediately after the first timing stores the message (from the frame) in the message buffer in which the message identification code that matches the message identification code extracted from the received frame is stored. That is, the communication device that has received the frame transmitted immediately after the second timing, while storing the data of the first data type and the first data type information), matches the message identification code extracted from the received frame. The message extracted from the frame (that is, the data of the second data type and the second data type information) is stored in the message buffer in which the identification code is stored.

したがって、同一のメッセージ識別コードが格納されているメッセージバッファに、データ種別が異なる2種類のデータを時分割で格納することができるとともに、同一のメッセージ識別コードが格納されているメッセージバッファに格納されたデータのデータ種別を第1データ種別情報および第2データ種別情報により認識することができる。   Therefore, two types of data having different data types can be stored in a time-division manner in the message buffer storing the same message identification code, and stored in the message buffer storing the same message identification code. The data type of the received data can be recognized from the first data type information and the second data type information.

これにより、第1データ種別のデータと第2データ種別のデータのそれぞれのデータ量が1つのメッセージバッファに記憶可能なデータ量を超えておらず、且つ、第1データ種別のデータと第2データ種別のデータとの総データ量が、1つのメッセージバッファに記憶可能なデータ量を超えている場合において、第1データ種別のデータを格納するためのメッセージバッファと、第2データ種別のデータを格納するためのメッセージバッファとを別々に設ける必要がなくなり、予め設けられているメッセージバッファを用いて通信データ量の増大に対応することが可能になる。   Thereby, the data amount of each of the data of the first data type and the data of the second data type does not exceed the data amount that can be stored in one message buffer, and the data of the first data type and the second data When the total data amount with the type data exceeds the data amount that can be stored in one message buffer, the message buffer for storing the data of the first data type and the data of the second data type are stored. It is no longer necessary to provide a separate message buffer for this purpose, and it is possible to cope with an increase in the amount of communication data using a message buffer provided in advance.

さらに、第1データ種別のデータと第2データ種別のデータの受信を必要とする車両用通信装置(以下、第1,2データ必要通信装置という)と、第1データ種別のデータの受信を必要とするとともに第2データ種別のデータの受信を不要とする車両用通信装置(以下、第2データ不要通信装置という)とが混在する車両用通信システムにおいて、或る車両用通信装置が第2データ種別のデータを含むフレームを送信した場合に、第1,2データ必要通信装置では、受信したフレームに第2データ種別情報が含まれるか否かを判断するための機能が必要である一方、第2データ不要通信装置では、受信したフレームに第2データ種別情報が含まれるか否かを判断するための機能が不要である。そして、車両用通信システムを構成する複数の車両用通信装置のうち、第2データ種別のデータを必要とする車両用通信装置(第1,2データ必要通信装置)のみに、第2データ種別情報が含まれるか否かを判断するための上記機能を追加すればよく、第2データ不要通信装置に対しては何らかの機能を追加することなく、第2データ種別のデータを送受信することが可能な車両用通信システムを構築することが可能となる。   Further, it is necessary to receive a vehicle communication device (hereinafter referred to as first and second data required communication device) that requires reception of data of the first data type and data of the second data type, and data of the first data type. And a vehicle communication device that does not require reception of data of the second data type (hereinafter referred to as a second data unnecessary communication device). When a frame including data of a type is transmitted, the first and second data-needed communication devices need a function for determining whether the received frame includes the second data type information. The two-data unnecessary communication apparatus does not need a function for determining whether or not the second data type information is included in the received frame. Of the plurality of vehicle communication devices constituting the vehicle communication system, the second data type information is provided only to the vehicle communication device (first and second data required communication devices) that require data of the second data type. Can be added to the second data unnecessary communication device without adding any function to the second data type communication device. It is possible to construct a vehicle communication system.

また、請求項1に記載の車両用通信装置において、請求項2に記載のように、第1データ種別情報は、第1データ種別のデータについて、予め設定された第1チェックサム算出式に基づいて算出された第1チェックサム値であり、第2データ種別情報は、第2データ種別のデータについて、第1チェックサム算出式と異なるように予め設定された第2チェックサム算出式に基づいて算出された第2チェックサム値であるようにしてもよいし、請求項3に記載のように、第1データ種別情報は、第1データ種別のデータについてのデータ長であり、第2データ種別情報は、第2データ種別のデータについてのデータ長であり、第1データ種別のデータと第2データ種別のデータとで、データ長が異なるようにしてもよい。   In the vehicle communication device according to claim 1, as described in claim 2, the first data type information is based on a first checksum calculation formula set in advance for data of the first data type. And the second data type information is based on a second checksum calculation formula that is set in advance differently from the first checksum calculation formula for the data of the second data type. The calculated second checksum value may be used, or the first data type information may be a data length of data of the first data type, and the second data type may be the second data type. The information is the data length of the data of the second data type, and the data length may be different between the data of the first data type and the data of the second data type.

チェックサム値およびデータ長は、フレームに含まれる情報として、従来、広く利用されているものであり、チェックサム値またはデータ長を含むフレームを送受信するように構成された車両用通信システムにおいて、フレームに新たな情報を追加することなく、第1データ種別のデータと第2データ種別のデータとの識別を可能とすることができる。具体的には、送受信データの誤り検出のためにチェックサムを含むデータを送受信する通信システムでは第1,2データ種別情報としてチェックサム値を利用すればよく、データ長を含むデータを送受信する通信システムでは、第1,2データ種別情報としてデータ長を利用すればよい。   The checksum value and the data length are conventionally widely used as information included in the frame. In the vehicle communication system configured to transmit and receive a frame including the checksum value or the data length, It is possible to distinguish between data of the first data type and data of the second data type without adding new information. Specifically, in a communication system that transmits and receives data including a checksum for error detection of transmission and reception data, a checksum value may be used as the first and second data type information, and communication that transmits and receives data including a data length. In the system, the data length may be used as the first and second data type information.

車両用通信システム1とメッセージバッファの構成を示すブロック図である。It is a block diagram which shows the structure of the vehicle communication system 1 and a message buffer. 第1実施形態の送信メッセージ格納処理を示すフローチャートである。It is a flowchart which shows the transmission message storage process of 1st Embodiment. 第1実施形態のメッセージバッファMBのデータパターンを示す図である。It is a figure which shows the data pattern of message buffer MB of 1st Embodiment. 第1実施形態の受信メッセージ格納処理を示すフローチャートである。It is a flowchart which shows the received message storage process of 1st Embodiment. データパターン2が不要な第1実施形態の受信メッセージ格納処理を示すフローチャートである。It is a flowchart which shows the received message storage process of 1st Embodiment which does not require the data pattern 2. FIG. 第2実施形態の送信メッセージ格納処理を示すフローチャートである。It is a flowchart which shows the transmission message storage process of 2nd Embodiment. 第2実施形態のメッセージバッファMBのデータパターンを示す図である。It is a figure which shows the data pattern of message buffer MB of 2nd Embodiment. 第2実施形態の受信メッセージ格納処理を示すフローチャートである。It is a flowchart which shows the received message storage process of 2nd Embodiment.

(第1実施形態)
以下に本発明の第1実施形態を図面とともに説明する。
図1は、本発明が適用された車両用通信システム1の構成を示すブロック図である。
(First embodiment)
A first embodiment of the present invention will be described below with reference to the drawings.
FIG. 1 is a block diagram showing a configuration of a vehicle communication system 1 to which the present invention is applied.

車両用通信システム1は、車両に搭載され、図1に示すように、複数の電子制御装置(以下、ECUという)10a,10b,10c,…を、共通の通信バスBSを介して相互に通信可能となるように接続することで構成され、これらECU10a,10b,10c,…のそれぞれがノードとして機能するようにされている。なお、この車両用通信システム1では、通信プロトコルとしてCAN(CAN;Controller Area Network)が採用されている。以下、ECU10a,10b,10c…を特に区別しないでいずれか一つを指す場合は、ECU10と表記する。   A vehicle communication system 1 is mounted on a vehicle and communicates with each other via a common communication bus BS between a plurality of electronic control units (hereinafter referred to as ECUs) 10a, 10b, 10c,. These ECUs 10a, 10b, 10c,... Are configured so as to function as nodes. In this vehicle communication system 1, CAN (CAN: Controller Area Network) is adopted as a communication protocol. Hereinafter, when any one of ECUs 10a, 10b, 10c,.

ECU10a,10b,10c…としては、具体的には、エンジン制御を司るエンジンECU、ブレーキ制御を司るブレーキECU、ステアリング制御を司るステアリングECU、サスペンション制御を司るサスペンションECU、ライトのオン/オフを制御するECU等、種々の電子制御装置を挙げることができる。なお図1では、ECU10を5つ図示しているが、通信システム1を構成するECU10の数がこれに限定されないことは言うまでもない。   Specifically, the ECUs 10a, 10b, 10c,... Control the engine ECU that controls the engine, the brake ECU that controls the brake control, the steering ECU that controls the steering control, the suspension ECU that controls the suspension control, and the light on / off control. Various electronic control devices such as an ECU can be listed. In FIG. 1, five ECUs 10 are illustrated, but it goes without saying that the number of ECUs 10 constituting the communication system 1 is not limited to this.

ECU10は、CANプロトコルに従って他のECUとの通信を制御するCANコントローラ11と、CANコントローラ11と通信バスBSとの間でデータを送受信するためのCANトランシーバ12と、CANコントローラ11を介して他のECUとの間でメッセージを交換することにより、他のECUと連携して各種処理を実行する制御部13とを備えている。   The ECU 10 includes a CAN controller 11 that controls communication with other ECUs according to the CAN protocol, a CAN transceiver 12 that transmits and receives data between the CAN controller 11 and the communication bus BS, and other CAN controllers 11 through the CAN controller 11. By exchanging messages with the ECU, a control unit 13 that executes various processes in cooperation with other ECUs is provided.

CANトランシーバ12は、予め規定された通信バスの電気的条件を満たす信号を確実に送受信するように構成されている。
CANコントローラ11は、ECU間で送受信されるメッセージ等を格納するためのメッセージバッファMBを複数(本実施形態で32個)備えたデータ格納部21と、メッセージバッファMBの格納値に基づいてメッセージをフレーム化し、CANトランシーバ12を介して通信バスBSに送信する送信制御、CANトランシーバ12を介してフレームを受信してメッセージの抽出等を行う受信制御、バス上でフレームが衝突した際のバス権の調停制御等、CANプロトコルに従った通信制御を実行するプロトコルコア部22と、プロトコルコア部22の送信制御および受信制御時に、データ格納部21へのアクセスを制御するアクセス制御部23とを備えている。
The CAN transceiver 12 is configured to reliably transmit and receive a signal that satisfies a predetermined electrical condition of the communication bus.
The CAN controller 11 includes a data storage unit 21 provided with a plurality of message buffers MB (32 in this embodiment) for storing messages transmitted and received between ECUs, and a message based on the stored value of the message buffer MB. Transmission control that is framed and transmitted to the communication bus BS via the CAN transceiver 12, reception control that receives a frame via the CAN transceiver 12 and extracts a message, and the bus right when a frame collides on the bus A protocol core unit 22 that executes communication control according to the CAN protocol, such as arbitration control, and an access control unit 23 that controls access to the data storage unit 21 during transmission control and reception control of the protocol core unit 22 are provided. Yes.

なお、データ格納部21に設けられたメッセージバッファMBのそれぞれには、メッセージバッファを識別するためのボックス番号(本実施形態では0〜31の整数値)が付与されている。   Each message buffer MB provided in the data storage unit 21 is given a box number (an integer value of 0 to 31 in this embodiment) for identifying the message buffer.

また各メッセージバッファMBには、メッセージの種類および優先度を表す識別コード(以下、CANIDという)を格納するためのCANIDレジスタR1、メッセージのデータ長を示すDLC(Data Length Code)を格納するためのDLCレジスタR2、フレームに載せて送信するメッセージまたは受信フレームから抽出したメッセージを格納するためのメッセージレジスタR3が設けられている。なお、メッセージレジスタR3には1バイトのデータ記憶領域が8個設けられており、メッセージレジスタR3は最大8バイトのデータを記憶することができる。そして、1バイトのデータ記憶領域のそれぞれには、記憶領域を識別するためデータ番号(本実施形態では1〜8の整数値)が付与されている。以下、付与されたデータ番号がnであるデータ記憶領域を第nデータ記憶領域(nは1〜8の整数値)というとともに、付与されたデータ番号が1,2,3,4,5,6,7,8であるデータ記憶領域に格納されているデータをそれぞれ、data1,data2,data3,data4,data5,data6,data7,data8と表記する。   Each message buffer MB stores a CANID register R1 for storing an identification code (hereinafter referred to as CANID) indicating the type and priority of the message, and a DLC (Data Length Code) indicating the data length of the message. A DLC register R2 and a message register R3 for storing a message transmitted in a frame or a message extracted from a received frame are provided. The message register R3 has eight 1-byte data storage areas, and the message register R3 can store a maximum of eight bytes of data. Each 1-byte data storage area is assigned a data number (an integer value of 1 to 8 in this embodiment) for identifying the storage area. Hereinafter, the data storage area where the assigned data number is n is referred to as the nth data storage area (n is an integer value of 1 to 8), and the assigned data numbers are 1, 2, 3, 4, 5, 6 , 7 and 8 are represented as data1, data2, data3, data4, data5, data6, data7, and data8, respectively.

また制御部13は、CPU31、ROM32、およびRAM33を備え、ROM32が記憶するプログラムに基づく処理をCPU31が実行することにより、各種処理を実行する。例えば、他のECUに対して送信すべきメッセージ(以下、送信メッセージという)がある場合、メッセージの内容からそのメッセージに対応するCANIDを特定し、特定したCANIDが設定されているメッセージバッファMBのメッセージレジスタR3にメッセージを格納する。   The control unit 13 includes a CPU 31, a ROM 32, and a RAM 33, and executes various processes when the CPU 31 executes processes based on programs stored in the ROM 32. For example, when there is a message to be transmitted to another ECU (hereinafter referred to as a transmission message), the CANID corresponding to the message is identified from the message content, and the message in the message buffer MB in which the identified CANID is set A message is stored in the register R3.

また制御部13は、CANコントローラ11からフレームを受信した旨の通知を受けた場合に、メッセージバッファMBのメッセージレジスタR3の内容を読み出すことにより、他のECUからのメッセージを受信する。   Further, when receiving a notification that the frame has been received from the CAN controller 11, the control unit 13 receives a message from another ECU by reading the contents of the message register R3 of the message buffer MB.

このように構成されたECU10において、制御部13は、送信メッセージをメッセージバッファMBに格納する送信メッセージ格納処理と、メッセージバッファMBに格納された受信メッセージをRAM33に格納する受信メッセージ格納処理を実行する。   In the ECU 10 configured as described above, the control unit 13 executes a transmission message storage process for storing the transmission message in the message buffer MB, and a reception message storage process for storing the reception message stored in the message buffer MB in the RAM 33. .

まず、制御部13が実行する送信メッセージ格納処理の手順を図2,3を用いて説明する。図2は送信メッセージ格納処理を示すフローチャートである。図3は、メッセージバッファMBのデータパターンを示す図である。この送信メッセージ格納処理は、ECU10が起動している間に繰り返し実行される処理である。   First, the procedure of the transmission message storage process executed by the control unit 13 will be described with reference to FIGS. FIG. 2 is a flowchart showing the transmission message storage process. FIG. 3 is a diagram showing a data pattern of the message buffer MB. This transmission message storage process is a process repeatedly executed while the ECU 10 is activated.

この送信メッセージ格納処理が実行されると、制御部13のCPU31は、まずS10にて、フレームを送信するタイミングに近づいているCANIDがあるか否かを判断する。ここで、フレームを送信するタイミングに近づいているCANIDがない場合には(S10:NO)、送信メッセージ格納処理を一旦終了する。一方、フレームを送信するタイミングに近づいているCANIDがある場合には(S10:YES)、S20にて、データパターン1で送信するタイミングであるか否かを判断する。   When this transmission message storage process is executed, the CPU 31 of the control unit 13 first determines in S10 whether there is a CANID approaching the timing for transmitting a frame. Here, if there is no CANID approaching the timing for transmitting a frame (S10: NO), the transmission message storage process is temporarily terminated. On the other hand, if there is a CANID approaching the timing for transmitting a frame (S10: YES), it is determined in S20 whether or not it is the timing for transmitting data pattern 1.

なお、データパターン1は、下式(1)で算出されたサム値CSUM1が、メッセージバッファMBの第8データ記憶領域に格納されるものである(図3(a)を参照)。   In the data pattern 1, the sum value CSUM1 calculated by the following equation (1) is stored in the eighth data storage area of the message buffer MB (see FIG. 3A).

Figure 2013082352
Figure 2013082352

また、データパターン2は、下式(2)で算出されたサム値CSUM2が、メッセージバッファMBの第8データ記憶領域に格納されるものである(図3(b)を参照)。   In the data pattern 2, the sum value CSUM2 calculated by the following equation (2) is stored in the eighth data storage area of the message buffer MB (see FIG. 3B).

Figure 2013082352
Figure 2013082352

また、データパターン1でフレーム送信を実行するタイミングと、データパターン2でフレーム送信を実行するタイミングが、CANID毎に予め設定されている。
そしてS20にて、データパターン1で送信するタイミングである場合には(S20:YES)、S30にて、今回送信するデータ(すなわち、data1〜7)について上式(1)でサム値CSUM1を算出して、S50に移行する。
The timing for executing frame transmission with data pattern 1 and the timing for executing frame transmission with data pattern 2 are set in advance for each CANID.
If the transmission timing is the data pattern 1 at S20 (S20: YES), the sum value CSUM1 is calculated by the above equation (1) for the data (ie, data 1 to 7) to be transmitted this time at S30. Then, the process proceeds to S50.

一方、S20にて、データパターン1で送信するタイミングでない場合には(S20:NO)、データパターン2で送信するタイミングであると判断して、S40にて、今回送信するデータ(すなわち、data1〜7)について上式(2)でサム値CSUM2を算出して、S50に移行する。   On the other hand, if it is not the timing to transmit with data pattern 1 at S20 (S20: NO), it is determined that it is the timing to transmit with data pattern 2, and the data to be transmitted this time (ie, data1 to data1) is determined at S40. 7) The sum value CSUM2 is calculated by the above equation (2), and the process proceeds to S50.

そしてS50に移行すると、フレームを送信するタイミングに近づいているとS10で判断されたCANIDが格納されたメッセージバッファMBの第1〜7データ記憶領域に、今回送信するデータ(data1〜7)を格納するとともに、第8データ記憶領域に、S30またはS40で算出されたサム値CSUM1またはサム値CSUM2を格納する。その後S60にて、S50の処理でメッセージバッファMBに格納されたメッセージをフレーム化して送信する処理をCANコントローラ11に実行させて、送信メッセージ格納処理を一旦終了する。   In S50, the data (data 1 to 7) to be transmitted this time are stored in the first to seventh data storage areas of the message buffer MB in which the CANID determined in S10 is approaching the frame transmission timing. At the same time, the sum value CSUM1 or sum value CSUM2 calculated in S30 or S40 is stored in the eighth data storage area. Thereafter, in S60, the CAN controller 11 is caused to execute a process of framing and transmitting the message stored in the message buffer MB in the process of S50, and the transmission message storage process is temporarily ended.

次に、制御部13が実行する受信メッセージ格納処理の手順を図4を用いて説明する。図4は受信メッセージ格納処理を示すフローチャートである。この受信メッセージ格納処理は、ECU10が起動している間に繰り返し実行される処理である。   Next, the procedure of the received message storage process executed by the control unit 13 will be described with reference to FIG. FIG. 4 is a flowchart showing received message storage processing. This received message storage process is a process repeatedly executed while the ECU 10 is activated.

この受信メッセージ格納処理が実行されると、制御部13のCPU31は、まずS110にて、メッセージバッファMBにメッセージが格納されたか否かを判断する。ここで、メッセージバッファMBにメッセージが格納されていない場合には(S110:NO)、受信メッセージ格納処理を一旦終了する。一方、メッセージバッファMBにメッセージが格納された場合には(S110:YES)、S120にて、メッセージが格納されたとS110の処理で判断されたメッセージバッファMBのメッセージレジスタR3について上式(1)でサム値CSUM1を算出する。   When this received message storage process is executed, the CPU 31 of the control unit 13 first determines in S110 whether or not a message has been stored in the message buffer MB. Here, if no message is stored in the message buffer MB (S110: NO), the received message storage process is temporarily terminated. On the other hand, when the message is stored in the message buffer MB (S110: YES), the message register R3 of the message buffer MB determined in S120 that the message is stored in S120 is expressed by the above equation (1). The sum value CSUM1 is calculated.

その後S130にて、S120で算出されたサム値CSUM1が、メッセージが格納されたとS110の処理で判断されたメッセージバッファMBのdata8と一致しているか否かを判断する。ここで、サム値CSUM1がdata8と一致している場合には(S130:YES)、S160に移行する。   Thereafter, in S130, it is determined whether or not the sum value CSUM1 calculated in S120 matches the data 8 of the message buffer MB determined in S110 that the message is stored. Here, when the sum value CSUM1 coincides with data8 (S130: YES), the process proceeds to S160.

一方、サム値CSUM1がdata8と一致していない場合には(S130:NO)、S140にて、メッセージが格納されたとS110の処理で判断されたメッセージバッファMBのメッセージレジスタR3について上式(2)でサム値CSUM2を算出する。   On the other hand, when the sum value CSUM1 does not coincide with data8 (S130: NO), the above equation (2) is applied to the message register R3 of the message buffer MB determined in S140 that the message is stored in S140. To calculate the sum value CSUM2.

その後S150にて、S140で算出されたサム値CSUM2が、メッセージが格納されたとS110の処理で判断されたメッセージバッファMBのdata8と一致しているか否かを判断する。ここで、サム値CSUM2がdata8と一致していない場合には(S150:NO)、受信メッセージ格納処理を一旦終了する。一方、サム値CSUM2がdata8と一致している場合には(S150:YES)、S160に移行する。   Thereafter, in S150, it is determined whether or not the sum value CSUM2 calculated in S140 matches the data 8 of the message buffer MB determined in S110 that the message is stored. If the sum value CSUM2 does not match data8 (S150: NO), the received message storage process is temporarily terminated. On the other hand, when the sum value CSUM2 matches data8 (S150: YES), the process proceeds to S160.

そしてS160に移行すると、メッセージが格納されたとS110で判断されたメッセージバッファMBのメッセージレジスタR3に格納されたメッセージを、制御用RAMにコピーし、受信メッセージ格納処理を一旦終了する。   In S160, the message stored in the message register R3 of the message buffer MB determined to have been stored in S110 is copied to the control RAM, and the received message storage process is temporarily terminated.

なお、制御用RAMは、RAM33内に設けられたデータ記憶領域であり、データ格納部21に設けられたメッセージバッファMBのそれぞれに対応して設けられている。これにより、制御部13のCPU31が、制御用RAMにコピーされたメッセージを参照し、このメッセージが示す情報を用いて、車両制御処理を実行することができる。   The control RAM is a data storage area provided in the RAM 33, and is provided corresponding to each message buffer MB provided in the data storage unit 21. Thereby, CPU31 of the control part 13 can refer to the message copied to control RAM, and can perform a vehicle control process using the information which this message shows.

このように構成されたECU10では、メッセージと、メッセージの種別を示すCANIDとが少なくとも格納される複数のメッセージバッファMBと、メッセージバッファMBに格納されたデータを抽出してフレームを構成し通信バスBS上に送信するとともに、通信バスBSを介してフレームを受信した場合には、受信したフレームから抽出したCANIDと一致するCANIDが格納されているメッセージバッファMBに、フレームから抽出したメッセージを格納するCANコントローラ11とを備え、CANID毎に予め設定された、データパターン1でフレームを送信するタイミングに近づくと(S10:YES,S20:YES)、データパターン1のデータと、サム値CSUM1とを、このタイミングに対応したCANIDが格納されているメッセージバッファMBに格納する(S30,S50)とともに、データパターン2でフレームを送信するタイミングに近づくと(S10:YES,S20:NO)、データパターン2のデータと、サム値CSUM2とを、このタイミングに対応したCANIDが格納されているメッセージバッファMBに格納する(S40,S50)。   The thus configured ECU 10 extracts a plurality of message buffers MB storing at least a message and a CANID indicating a message type, extracts data stored in the message buffer MB, forms a frame, and configures a communication bus BS. When the frame is received via the communication bus BS, the CAN that stores the message extracted from the frame in the message buffer MB in which the CANID that matches the CANID extracted from the received frame is stored. The controller 11 is provided, and when the timing of transmitting a frame with the data pattern 1 preset for each CANID approaches (S10: YES, S20: YES), the data of the data pattern 1 and the sum value CSUM1 are CANID corresponding to the timing When the data is stored in the stored message buffer MB (S30, S50) and the frame transmission timing approaches (S10: YES, S20: NO), the data of the data pattern 2 and the sum value CSUM2 Are stored in the message buffer MB in which the CANID corresponding to this timing is stored (S40, S50).

このため、まず、データパターン1のデータとサム値CSUM1とがメッセージバッファMBに格納されることにより、このメッセージバッファMBに格納されたCANID、データパターン1のデータ、およびサム値CSUM1が含まれるフレームが送信される。さらに、データパターン2のデータとサム値CSUM2とがメッセージバッファMBに格納されることにより、このメッセージバッファMBに格納されたCANID、データパターン2のデータ、およびサム値CSUM2が含まれるフレームが送信される。つまり、同一のCANIDを含みデータ種別の異なるデータを含む2種類のフレームがそれぞれ異なるタイミングで送信される。そして、この2種類のフレームにはそれぞれ、データ種別を示す情報(すなわち、サム値CSUM1,2)が含まれている(以下、データパターン1のデータおよびサム値CSUM1を含むフレームを第1フレーム、データパターン2のデータおよびサム値CSUM2を含むフレームを第2フレームともいう)。   Therefore, first, the data pattern 1 data and the sum value CSUM1 are stored in the message buffer MB, so that the CANID stored in the message buffer MB, the data of the data pattern 1, and the frame including the sum value CSUM1 are included. Is sent. Further, by storing the data pattern 2 data and the sum value CSUM2 in the message buffer MB, a frame including the CANID stored in the message buffer MB, the data pattern 2 data, and the sum value CSUM2 is transmitted. The That is, two types of frames including the same CANID and including different data types are transmitted at different timings. Each of the two types of frames includes information indicating the data type (that is, the sum value CSUM1, 2) (hereinafter, the frame including the data of the data pattern 1 and the sum value CSUM1 is referred to as the first frame, A frame including the data of data pattern 2 and the sum value CSUM2 is also referred to as a second frame).

このため、第1フレームを受信したECU10は、この受信フレームから抽出したCANIDと一致するCANIDが格納されているメッセージバッファMBに、フレームから抽出したメッセージ(すなわち、データパターン1のデータとサム値CSUM1)を格納する一方、第2フレームを受信したECU10は、この受信フレームから抽出したCANIDと一致するCANIDが格納されているメッセージバッファMBに、フレームから抽出したメッセージ(すなわち、データパターン2のデータとサム値CSUM2)を格納する。   Therefore, the ECU 10 that has received the first frame stores the message extracted from the frame (that is, the data of the data pattern 1 and the sum value CSUM1) in the message buffer MB that stores the CANID that matches the CANID extracted from the received frame. ) Is received, the ECU 10 that has received the second frame stores the message extracted from the frame (that is, the data of the data pattern 2) in the message buffer MB in which the CANID that matches the CANID extracted from the received frame is stored. Sum value CSUM2) is stored.

したがって、同一のCANIDが格納されているメッセージバッファMBに、データ種別が異なる2種類のデータを時分割で格納することができるとともに、同一のCANIDが格納されているメッセージバッファMBに格納されたデータのデータ種別をサム値CSUM1,2により認識することができる。   Therefore, two types of data having different data types can be stored in a time division manner in the message buffer MB in which the same CANID is stored, and the data stored in the message buffer MB in which the same CANID is stored. Can be recognized by the sum values CSUM1 and CSUM2.

これにより、データパターン1のデータとデータパターン2のデータのそれぞれのデータ量が1つのメッセージバッファMBに記憶可能なデータ量を超えておらず、且つ、データパターン1のデータとデータパターン2のデータとの総データ量が、1つのメッセージバッファMBに記憶可能なデータ量を超えている場合において、データパターン1のデータを格納するためのメッセージバッファMBと、データパターン2のデータを格納するためのメッセージバッファMBとを別々に設ける必要がなくなり、予め設けられているメッセージバッファMBを用いて通信データ量の増大に対応することが可能になる。   As a result, the data amount of each of the data pattern 1 and the data of the data pattern 2 does not exceed the amount of data that can be stored in one message buffer MB, and the data of the data pattern 1 and the data of the data pattern 2 When the total data amount exceeds the data amount that can be stored in one message buffer MB, the message buffer MB for storing data of data pattern 1 and the data for storing data of data pattern 2 There is no need to provide the message buffer MB separately, and it is possible to cope with an increase in the amount of communication data using the message buffer MB provided in advance.

さらに、データパターン1のデータとデータパターン2のデータの受信を必要とするECU10(以下、第1,2データ必要ECU10という)と、データパターン1のデータの受信を必要とするとともにデータパターン2のデータの受信を不要とするECU10(以下、第2データ不要ECU10という)とが混在する車両用通信システムにおいて、或るECU10がデータパターン2のデータを含むフレームを送信した場合に、第1,2データ必要ECU10では、受信したフレームにサム値CSUM2が含まれるか否かを判断するための機能が必要である一方、第2データ不要ECU10では、受信したフレームにサム値CSUM2が含まれるか否かを判断するための機能が不要である。   Furthermore, the ECU 10 that needs to receive the data of the data pattern 1 and the data of the data pattern 2 (hereinafter referred to as the first and second data required ECU 10), the data of the data pattern 1, and the data pattern 2 In a vehicle communication system in which there is a mixture of ECUs 10 that do not require data reception (hereinafter referred to as second data unnecessary ECUs 10), when a certain ECU 10 transmits a frame that includes data of data pattern 2, The data-required ECU 10 needs a function for determining whether or not the received frame includes the sum value CSUM2, while the second data-unnecessary ECU 10 determines whether or not the received frame includes the sum value CSUM2. The function for judging is unnecessary.

すなわち、データパターン2のフレームが不要なECU10(第2データ不要ECU10)における受信メッセージ格納処理は、図5に示すように、S140とS150の処理が省略されて、S130において、サム値CSUM1がdata8と一致していない場合には(S130:NO)、受信メッセージ格納処理を一旦終了するように構成された点以外は、データパターン2のフレームを必要とするECU10における受信メッセージ格納処理と同一である。   That is, in the received message storage process in the ECU 10 (second data unnecessary ECU 10) that does not require the frame of the data pattern 2, as shown in FIG. 5, the processes of S140 and S150 are omitted, and in S130, the sum value CSUM1 is data8. Is the same as the received message storage process in the ECU 10 that requires the frame of the data pattern 2 except that the received message storage process is once ended (S130: NO). .

つまり、車両用通信システム1を構成する複数のECU10のうち、データパターン2のデータを必要とする車両用通信装置(第1,2データ必要ECU10)のみに、サム値CSUM2が含まれるか否かを判断するための上記機能を追加すればよく、第2データ不要ECU10に対しては何らかの機能を追加することなく、データパターン2のデータを送受信することが可能な車両用通信システム1を構築することが可能となる。   That is, whether or not the sum value CSUM2 is included only in the vehicle communication device (first and second data necessity ECU 10) that requires data of the data pattern 2 among the plurality of ECUs 10 constituting the vehicle communication system 1. The vehicle communication system 1 capable of transmitting / receiving data of the data pattern 2 without adding any function to the second data unnecessary ECU 10 is constructed. It becomes possible.

また、チェックサム値は、フレームに含まれる情報として、従来、広く利用されているものであり、チェックサム値を含むフレームを送受信するように構成された車両用通信システム1において、フレームに新たな情報を追加することなく、データパターン1のデータとデータパターン2のデータとの識別を可能とすることができる。   The checksum value has been widely used as information included in the frame. In the vehicle communication system 1 configured to transmit / receive a frame including the checksum value, a new frame is added to the checksum value. It is possible to distinguish between data of data pattern 1 and data of data pattern 2 without adding information.

以上説明した実施形態において、ECU10は本発明における車両用通信装置、CANコントローラ11は本発明における送受信手段、S30,S50の処理は本発明における第1格納手段、S40,S50の処理は本発明における第2格納手段である。   In the embodiment described above, the ECU 10 is the vehicle communication device according to the present invention, the CAN controller 11 is the transmission / reception means according to the present invention, the processes at S30 and S50 are the first storage means according to the present invention, and the processes at S40 and S50 are according to the present invention. Second storage means.

また、CANIDは本発明におけるメッセージ識別コード、S10とS20でYESと判断されるタイミングは本発明における第1タイミング、データパターン1のデータは本発明における第1データ種別のデータ、サム値CSUM1は本発明における第1データ種別情報、S10でYESと判断されS20でNOと判断されるタイミングは本発明における第2タイミング、データパターン2のデータは本発明における第2データ種別のデータ、サム値CSUM2は本発明における第2データ種別情報である。   CANID is the message identification code in the present invention, the timing determined as YES in S10 and S20 is the first timing in the present invention, the data of data pattern 1 is the data of the first data type in the present invention, and the sum value CSUM1 is the present The first data type information in the invention, the timing determined as YES in S10 and NO in S20 is the second timing in the present invention, the data of the data pattern 2 is the data of the second data type in the present invention, and the sum value CSUM2 is It is the 2nd data classification information in the present invention.

また、式(1)は本発明における第1チェックサム算出式、サム値CSUM1は本発明における第1チェックサム値、式(2)は本発明における第2チェックサム算出式、サム値CSUM2は本発明における第2チェックサム値である。   Also, equation (1) is the first checksum calculation equation in the present invention, sum value CSUM1 is the first checksum value in the present invention, equation (2) is the second checksum calculation equation in the present invention, and sum value CSUM2 is the present one. It is a 2nd checksum value in invention.

(第2実施形態)
以下に本発明の第2実施形態を図面とともに説明する。なお第2実施形態では、第1実施形態と異なる部分のみを説明する。
(Second Embodiment)
A second embodiment of the present invention will be described below with reference to the drawings. In the second embodiment, only the parts different from the first embodiment will be described.

第2実施形態における車両用通信システム1は、送信メッセージ格納処理と受信メッセージ格納処理が変更された点以外は第1実施形態と同じである。
まず、第2実施形態における送信メッセージ格納処理の手順を図6,7を用いて説明する。図6は第2実施形態の送信メッセージ格納処理を示すフローチャートである。図7は、第2実施形態におけるメッセージバッファMBのデータパターンを示す図である。
The vehicle communication system 1 in the second embodiment is the same as that in the first embodiment except that the transmission message storage process and the reception message storage process are changed.
First, the procedure of the transmission message storage process in the second embodiment will be described with reference to FIGS. FIG. 6 is a flowchart showing a transmission message storage process according to the second embodiment. FIG. 7 is a diagram illustrating a data pattern of the message buffer MB in the second embodiment.

この送信メッセージ格納処理が実行されると、制御部13のCPU31は、まずS210にて、フレームを送信するタイミングに近づいているCANIDがあるか否かを判断する。ここで、フレームを送信するタイミングに近づいているCANIDがない場合には(S210:NO)、送信メッセージ格納処理を一旦終了する。一方、フレームを送信するタイミングに近づいているCANIDがある場合には(S210:YES)、S220にて、データパターン1で送信するタイミングであるか否かを判断する。   When this transmission message storage process is executed, the CPU 31 of the control unit 13 first determines in S210 whether there is a CANID approaching the timing for transmitting a frame. Here, if there is no CANID approaching the timing for transmitting a frame (S210: NO), the transmission message storage process is temporarily terminated. On the other hand, if there is a CANID that is approaching the timing for transmitting a frame (S210: YES), it is determined in S220 whether or not it is the timing for transmitting data pattern 1.

なお、データパターン11は、メッセージバッファMBのメッセージレジスタR3に8バイトのデータが格納されるものである(図7(a)を参照)。また、データパターン12は、メッセージバッファMBのメッセージレジスタR3に4バイトのデータが格納されるものである(図7(b)を参照)。   In the data pattern 11, 8-byte data is stored in the message register R3 of the message buffer MB (see FIG. 7A). In the data pattern 12, 4 bytes of data are stored in the message register R3 of the message buffer MB (see FIG. 7B).

また、データパターン11でフレーム送信を実行するタイミングと、データパターン12でフレーム送信を実行するタイミングが、CANID毎に予め設定されている。
そしてS220にて、データパターン11で送信するタイミングである場合には(S220:YES)、S230にて、フレームを送信するタイミングに近づいているとS210で判断されたCANIDが格納されたメッセージバッファMBのメッセージレジスタR3に、今回送信するデータ(data1〜8)を格納するとともに、データパターン11でのデータ長を示すデータ長値DLC1(本実施形態では8)をDLCレジスタR2に格納して、S250に移行する。
The timing for executing frame transmission with the data pattern 11 and the timing for executing frame transmission with the data pattern 12 are set in advance for each CANID.
If it is time to transmit the data pattern 11 in S220 (S220: YES), the message buffer MB storing the CANID determined in S210 that the frame is close to the timing to transmit in S230. The data (data 1 to 8) to be transmitted this time is stored in the message register R3, and the data length value DLC1 (8 in the present embodiment) indicating the data length in the data pattern 11 is stored in the DLC register R2, and S250 Migrate to

一方、S220にて、データパターン12で送信するタイミングでない場合には(S220:NO)、データパターン12で送信するタイミングであると判断して、S240にて、フレームを送信するタイミングに近づいているとS210で判断されたCANIDが格納されたメッセージバッファMBのメッセージレジスタR3に、今回送信するデータ(data1〜4)を格納するとともに、データパターン12でのデータ長を示すデータ長値DLC2(本実施形態では4)をDLCレジスタR2に格納して、S250に移行する。   On the other hand, if it is not the timing to transmit the data pattern 12 at S220 (S220: NO), it is determined that it is the timing to transmit the data pattern 12, and the timing to transmit the frame is approaching at S240. The data (data 1 to 4) to be transmitted this time are stored in the message register R3 of the message buffer MB in which the CANID determined in S210 is stored, and the data length value DLC2 indicating the data length in the data pattern 12 (this embodiment) In the embodiment, 4) is stored in the DLC register R2, and the process proceeds to S250.

そしてS250に移行すると、S230またはS240の処理でメッセージバッファMBに格納されたメッセージをフレーム化して送信する処理をCANコントローラ11に実行させて、送信メッセージ格納処理を一旦終了する。   When the process proceeds to S250, the CAN controller 11 is caused to execute the process of framing and transmitting the message stored in the message buffer MB in the process of S230 or S240, and the transmission message storage process is temporarily terminated.

次に、第2実施形態における受信メッセージ格納処理の手順を図8を用いて説明する。図8は第2実施形態の受信メッセージ格納処理を示すフローチャートである。
この受信メッセージ格納処理が実行されると、制御部13のCPU31は、まずS310にて、メッセージバッファMBにメッセージが格納されたか否かを判断する。ここで、メッセージバッファMBにメッセージが格納されていない場合には(S310:NO)、受信メッセージ格納処理を一旦終了する。一方、メッセージバッファMBにメッセージが格納された場合には(S310:YES)、S320にて、メッセージが格納されたとS310の処理で判断されたメッセージバッファMBのデータ長がデータ長値DLC1と一致しているか否かを判断する。
Next, the procedure of received message storage processing in the second embodiment will be described with reference to FIG. FIG. 8 is a flowchart showing the received message storage process of the second embodiment.
When this received message storage process is executed, the CPU 31 of the control unit 13 first determines in S310 whether or not a message is stored in the message buffer MB. If no message is stored in the message buffer MB (S310: NO), the received message storage process is temporarily terminated. On the other hand, if a message is stored in the message buffer MB (S310: YES), the data length of the message buffer MB determined in S310 that the message is stored in S320 matches the data length value DLC1. Judge whether or not.

ここで、データ長がデータ長値DLC1と一致している場合には(S320:YES)、S340に移行する。一方、データ長がデータ長値DLC1と一致していない場合には(S320:NO)、S330にて、メッセージが格納されたとS310の処理で判断されたメッセージバッファMBのデータ長がデータ長値DLC2と一致しているか否かを判断する。   If the data length matches the data length value DLC1 (S320: YES), the process proceeds to S340. On the other hand, if the data length does not match the data length value DLC1 (S320: NO), the data length of the message buffer MB determined in S310 that the message is stored in S330 is the data length value DLC2 It is judged whether or not.

ここで、データ長がデータ長値DLC2と一致している場合には(S330:YES)、S340に移行する。一方、データ長がデータ長値DLC2と一致していない場合には(S330:NO)、受信メッセージ格納処理を一旦終了する。   If the data length matches the data length value DLC2 (S330: YES), the process proceeds to S340. On the other hand, if the data length does not match the data length value DLC2 (S330: NO), the received message storage process is temporarily terminated.

そしてS340に移行すると、メッセージが格納されたとS110で判断されたメッセージバッファMBのメッセージレジスタR3に格納されたメッセージを、制御用RAMにコピーし、受信メッセージ格納処理を一旦終了する。   In S340, the message stored in the message register R3 of the message buffer MB determined to have been stored in S110 is copied to the control RAM, and the received message storage process is temporarily terminated.

このように構成されたECU10では、CANID毎に予め設定された、データパターン11でフレームを送信するタイミングに近づくと(S210:YES,S220:YES)、データパターン11のデータとデータ長値DLC1とを、このタイミングに対応したCANIDが格納されているメッセージバッファMBに格納する(S230)とともに、データパターン12でフレームを送信するタイミングに近づくと(S210:YES,S220:NO)、データパターン12のデータとデータ長値DLC2とを、このタイミングに対応したCANIDが格納されているメッセージバッファMBに格納する(S240)。   In the ECU 10 configured as described above, when the frame transmission timing set in advance for each CANID approaches the data pattern 11 (S210: YES, S220: YES), the data of the data pattern 11 and the data length value DLC1 Is stored in the message buffer MB in which the CANID corresponding to this timing is stored (S230), and when the timing of transmitting a frame with the data pattern 12 is approached (S210: YES, S220: NO), The data and the data length value DLC2 are stored in the message buffer MB in which the CANID corresponding to this timing is stored (S240).

このため、まず、データパターン11のデータとデータ長値DLC1とがメッセージバッファMBに格納されることにより、このメッセージバッファMBに格納されたCANID、データパターン11のデータ、およびデータ長値DLC1が含まれるフレームが送信される。さらに、データパターン12のデータとデータ長値DLC2とがメッセージバッファMBに格納されることにより、このメッセージバッファMBに格納されたCANID、データパターン12のデータ、およびデータ長値DLC2が含まれるフレームが送信される。つまり、同一のCANIDを含みデータ種別の異なるデータを含む2種類のフレームがそれぞれ異なるタイミングで送信される。そして、この2種類のフレームにはそれぞれ、データ種別を示す情報(すなわち、データ長値DLC1,2)が含まれている(以下、データパターン11のデータおよびデータ長値DLC1を含むフレームを第3フレーム、データパターン12のデータおよびデータ長値DLC2を含むフレームを第4フレームともいう)。   Therefore, first, the data of the data pattern 11 and the data length value DLC1 are stored in the message buffer MB, so that the CANID stored in the message buffer MB, the data of the data pattern 11, and the data length value DLC1 are included. Frame is transmitted. Further, by storing the data of the data pattern 12 and the data length value DLC2 in the message buffer MB, a frame including the CANID stored in the message buffer MB, the data of the data pattern 12, and the data length value DLC2 is generated. Sent. That is, two types of frames including the same CANID and including different data types are transmitted at different timings. Each of the two types of frames includes information indicating the data type (that is, data length values DLC1, 2) (hereinafter, the frame including the data of the data pattern 11 and the data length value DLC1 is the third frame). A frame including a frame, data of data pattern 12 and data length value DLC2 is also referred to as a fourth frame).

このため、第3フレームを受信したECU10は、この受信フレームから抽出したCANIDと一致するCANIDが格納されているメッセージバッファMBに、フレームから抽出したメッセージ(すなわち、データパターン11のデータとデータ長値DLC1)を格納する一方、第4フレームを受信したECU10は、この受信フレームから抽出したCANIDと一致するCANIDが格納されているメッセージバッファMBに、フレームから抽出したメッセージ(すなわち、データパターン12のデータとデータ長値DLC2)を格納する。   Therefore, the ECU 10 that has received the third frame stores the message extracted from the frame (that is, the data of the data pattern 11 and the data length value) in the message buffer MB that stores the CANID that matches the CANID extracted from the received frame. DLC1) is stored, and the ECU 10 that has received the fourth frame stores the message extracted from the frame (that is, the data of the data pattern 12) in the message buffer MB in which the CANID that matches the CANID extracted from the received frame is stored. And the data length value DLC2) are stored.

したがって、同一のCANIDが格納されているメッセージバッファMBに、データ種別が異なる2種類のデータを時分割で格納することができるとともに、同一のCANIDが格納されているメッセージバッファMBに格納されたデータのデータ種別をデータ長値DLC1,2により認識することができる。   Therefore, two types of data having different data types can be stored in a time division manner in the message buffer MB in which the same CANID is stored, and the data stored in the message buffer MB in which the same CANID is stored. Can be recognized by the data length values DLC1 and DLC2.

これにより、データパターン11のデータとデータパターン12のデータのそれぞれのデータ量が1つのメッセージバッファMBに記憶可能なデータ量を超えておらず、且つ、データパターン11のデータとデータパターン12のデータとの総データ量が、1つのメッセージバッファMBに記憶可能なデータ量を超えている場合において、データパターン11のデータを格納するためのメッセージバッファMBと、データパターン12のデータを格納するためのメッセージバッファMBとを別々に設ける必要がなくなり、予め設けられているメッセージバッファMBを用いて通信データ量の増大に対応することが可能になる。   As a result, the data amount of the data pattern 11 and the data of the data pattern 12 does not exceed the amount of data that can be stored in one message buffer MB, and the data of the data pattern 11 and the data of the data pattern 12 When the total amount of data exceeds the amount of data that can be stored in one message buffer MB, the message buffer MB for storing the data of the data pattern 11 and the data for storing the data of the data pattern 12 There is no need to provide the message buffer MB separately, and it is possible to cope with an increase in the amount of communication data using the message buffer MB provided in advance.

またデータ長は、フレームに含まれる情報として、従来、広く利用されているものであり、データ長値を含むフレームを送受信するように構成された車両用通信システム1において、フレームに新たな情報を追加することなく、データパターン11のデータとデータパターン12のデータとの識別を可能とすることができる。   The data length has been widely used as information included in the frame in the past. In the vehicle communication system 1 configured to transmit and receive a frame including the data length value, new information is added to the frame. It is possible to distinguish the data of the data pattern 11 from the data of the data pattern 12 without adding.

以上説明した実施形態において、S230の処理は本発明における第1格納手段、S240の処理は本発明における第2格納手段である。
また、S210とS220でYESと判断されるタイミングは本発明における第1タイミング、データパターン11のデータは本発明における第1データ種別のデータ、データ長値DLC1は本発明における第1データ種別情報、S210でYESと判断されS220でNOと判断されるタイミングは本発明における第2タイミング、データパターン12のデータは本発明における第2データ種別のデータ、データ長値DLC2は本発明における第2データ種別情報である。
In the embodiment described above, the process of S230 is the first storage means in the present invention, and the process of S240 is the second storage means in the present invention.
Further, the timing determined as YES in S210 and S220 is the first timing in the present invention, the data of the data pattern 11 is the data of the first data type in the present invention, the data length value DLC1 is the first data type information in the present invention, The timing when YES is determined in S210 and NO is determined in S220 is the second timing in the present invention, the data of the data pattern 12 is the data of the second data type in the present invention, and the data length value DLC2 is the second data type in the present invention. Information.

以上、本発明の一実施形態について説明したが、本発明は上記実施形態に限定されるものではなく、本発明の技術的範囲に属する限り種々の形態を採ることができる。
例えば上記実施形態においては、データパターンが2種類であるものを示したが、3種類以上であってもよい。
As mentioned above, although one Embodiment of this invention was described, this invention is not limited to the said embodiment, As long as it belongs to the technical scope of this invention, a various form can be taken.
For example, in the above embodiment, two types of data patterns are shown, but three or more types may be used.

1…車両用通信システム、10…ECU、11…CANコントローラ、12…CANトランシーバ、13…制御部、21…データ格納部、22…プロトコルコア部、23…アクセス制御部、31…CPU、32…ROM、33…RAM、BS…通信バス、MB…メッセージバッファ、R1…CANIDレジスタ、R2…DLCレジスタ、R3…メッセージレジスタ   DESCRIPTION OF SYMBOLS 1 ... Vehicle communication system, 10 ... ECU, 11 ... CAN controller, 12 ... CAN transceiver, 13 ... Control part, 21 ... Data storage part, 22 ... Protocol core part, 23 ... Access control part, 31 ... CPU, 32 ... ROM, 33 ... RAM, BS ... communication bus, MB ... message buffer, R1 ... CANID register, R2 ... DLC register, R3 ... message register

Claims (3)

メッセージと、該メッセージの種別であるメッセージ種別を示すメッセージ識別コードとが少なくとも格納される複数のメッセージバッファと、
前記メッセージバッファに格納されたデータを抽出してフレームを構成し通信バス上に送信するとともに、該通信バスを介して前記フレームを受信した場合には、受信した前記フレームから抽出した前記メッセージ識別コードと一致する前記メッセージ識別コードが格納されている前記メッセージバッファに、前記フレームから抽出した前記メッセージを格納する送受信手段とを備える車両用通信装置であって、
前記メッセージ識別コード毎に予め設定された第1タイミングになると、該第1タイミングに対応した前記メッセージ識別コードの前記メッセージについて予め設定された第1データ種別のデータと、前記第1データ種別を示す第1データ種別情報とを、前記第1タイミングに対応した前記メッセージ識別コードが格納されている前記メッセージバッファに格納する第1格納手段と、
前記メッセージ識別コード毎に前記第1タイミングと異なるように予め設定された第2タイミングになると、該第1タイミングに対応した前記メッセージ識別コードの前記メッセージについて前記第1データ種別と異なるように予め設定された第2データ種別のデータと、前記第2データ種別を示す第2データ種別情報とを、前記第2タイミングに対応した前記メッセージ識別コードが格納されている前記メッセージバッファに格納する第2格納手段とを備える
ことを特徴とする車両用通信装置。
A plurality of message buffers storing at least a message and a message identification code indicating a message type which is the type of the message;
The data stored in the message buffer is extracted to form a frame and transmitted on the communication bus. When the frame is received via the communication bus, the message identification code extracted from the received frame A vehicular communication apparatus comprising: transmission / reception means for storing the message extracted from the frame in the message buffer in which the message identification code that matches
When the first timing preset for each message identification code is reached, the data of the first data type preset for the message of the message identification code corresponding to the first timing and the first data type are indicated. First storage means for storing first data type information in the message buffer in which the message identification code corresponding to the first timing is stored;
When the second timing preset for each message identification code differs from the first timing, the message of the message identification code corresponding to the first timing is set differently from the first data type. A second storage for storing the second data type data and the second data type information indicating the second data type in the message buffer in which the message identification code corresponding to the second timing is stored A vehicle communication device.
前記第1データ種別情報は、前記第1データ種別のデータについて、予め設定された第1チェックサム算出式に基づいて算出された第1チェックサム値であり、
前記第2データ種別情報は、前記第2データ種別のデータについて、前記第1チェックサム算出式と異なるように予め設定された第2チェックサム算出式に基づいて算出された第2チェックサム値である
ことを特徴とする請求項1に記載の車両用通信装置。
The first data type information is a first checksum value calculated based on a preset first checksum calculation formula for the data of the first data type,
The second data type information is a second checksum value calculated based on a second checksum calculation formula set in advance differently from the first checksum calculation formula for the data of the second data type. The vehicle communication device according to claim 1, wherein:
前記第1データ種別情報は、前記第1データ種別のデータについてのデータ長であり、
前記第2データ種別情報は、前記第2データ種別のデータについてのデータ長であり、
前記第1データ種別のデータと前記第2データ種別のデータとで、データ長が異なる
ことを特徴とする請求項1に記載の車両用通信装置。
The first data type information is a data length for data of the first data type,
The second data type information is a data length for data of the second data type,
The vehicular communication device according to claim 1, wherein the first data type data and the second data type data have different data lengths.
JP2011224188A 2011-10-11 2011-10-11 Communication equipment for vehicle Pending JP2013082352A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011224188A JP2013082352A (en) 2011-10-11 2011-10-11 Communication equipment for vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011224188A JP2013082352A (en) 2011-10-11 2011-10-11 Communication equipment for vehicle

Publications (1)

Publication Number Publication Date
JP2013082352A true JP2013082352A (en) 2013-05-09

Family

ID=48528022

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011224188A Pending JP2013082352A (en) 2011-10-11 2011-10-11 Communication equipment for vehicle

Country Status (1)

Country Link
JP (1) JP2013082352A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017073834A (en) * 2014-09-12 2017-04-13 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America Electronic control unit, on-vehicle network system and communication method for vehicle
US9705699B2 (en) 2014-10-17 2017-07-11 Hyundai Motor Company Method and apparatus for reducing load in can communication

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017073834A (en) * 2014-09-12 2017-04-13 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America Electronic control unit, on-vehicle network system and communication method for vehicle
JPWO2016038816A1 (en) * 2014-09-12 2017-06-15 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America Electronic control unit, in-vehicle network system, and vehicle communication method
US10193896B2 (en) 2014-09-12 2019-01-29 Panasonic Intellectual Property Corporation Of America Vehicle communication apparatus, in-vehicle network system, and vehicle communication method
US10693889B2 (en) 2014-09-12 2020-06-23 Panasonic Intellectual Property Corporation Of America Vehicle communication apparatus, in-vehicle network system, and vehicle communication method
US11240253B2 (en) 2014-09-12 2022-02-01 Panasonic Intellectual Property Corporation Of America Vehicle communication apparatus, in-vehicle network system, and vehicle communication method
US11943233B2 (en) 2014-09-12 2024-03-26 Panasonic Intellectual Property Corporation Of America Vehicle communication apparatus, in-vehicle network system, and vehicle communication method
US9705699B2 (en) 2014-10-17 2017-07-11 Hyundai Motor Company Method and apparatus for reducing load in can communication

Similar Documents

Publication Publication Date Title
CN108028790B (en) Abnormality detection method, abnormality detection device, and abnormality detection system
US11296965B2 (en) Abnormality detection in an on-board network system
KR101956940B1 (en) Method and device for serial data transmission which is adapted to memory sizes
US9768979B2 (en) Can communication method and data frame structure for improving communication speed through increase in data amount
KR102030397B1 (en) Network monitoring device
US9843523B2 (en) Communication management apparatus and communication management method for vehicle network
RU2595962C2 (en) Method and device for adaptation of reliability of data transmission in serial bus system
US10153825B2 (en) Vehicle-mounted control device
US20140223258A1 (en) Method and device for improving the data transmission security in a serial data transmission having flexible message size
US11247694B2 (en) Control apparatus, control system, control method, and storage medium
CN104956626A (en) Network device and data sending and receiving system
CN104995874B (en) Data Transport Protocol with protocol anomaly state
EP3854651A1 (en) Electronic control device, electronic control method, and program
CN101106438B (en) Communication network system and error verification method
KR101334017B1 (en) Apparatus of checking a validity of message on network for a vehicle and method of thereof
JP2014226946A (en) Abnormality response system and abnormality response method for vehicular communication device
US10250434B2 (en) Electronic control apparatus
JP2015065546A (en) Vehicle control unit
JP2013082352A (en) Communication equipment for vehicle
JP2017017615A (en) Communication apparatus and communication system
JP2009017154A (en) On-vehicle gateway device
CN114667716A (en) Relay device, communication network system, and communication control method
JP2016146605A (en) On-vehicle communication device
CN114667715B (en) Relay device, communication network system, and communication control method
US11171857B2 (en) Identifying an electronic device connected to a communication network that has XCP enabled