Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP6443066B2 - Electronic control unit - Google Patents
[go: Go Back, main page]

JP6443066B2 - Electronic control unit - Google Patents

Electronic control unit Download PDF

Info

Publication number
JP6443066B2
JP6443066B2 JP2015006989A JP2015006989A JP6443066B2 JP 6443066 B2 JP6443066 B2 JP 6443066B2 JP 2015006989 A JP2015006989 A JP 2015006989A JP 2015006989 A JP2015006989 A JP 2015006989A JP 6443066 B2 JP6443066 B2 JP 6443066B2
Authority
JP
Japan
Prior art keywords
received
reception
register
mailbox
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2015006989A
Other languages
Japanese (ja)
Other versions
JP2016132318A (en
Inventor
佐藤 征司
征司 佐藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Original Assignee
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Corp filed Critical Denso Corp
Priority to JP2015006989A priority Critical patent/JP6443066B2/en
Publication of JP2016132318A publication Critical patent/JP2016132318A/en
Application granted granted Critical
Publication of JP6443066B2 publication Critical patent/JP6443066B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Description

本発明は、少なくとも一つの他の電子制御装置との間で、CAN(Controller Area Network)プロトコルに基づくCAN通信を行う電子制御装置に関する。   The present invention relates to an electronic control device that performs CAN communication based on a CAN (Controller Area Network) protocol with at least one other electronic control device.

他の電子制御装置との間でCAN通知を行う電子制御装置として、下記特許文献1に記載のものが一例として知られている。下記特許文献1に記載されている通信装置は、複数のメールボックスを有しており、それぞれのメールボックスに格納するCAN−IDが予め割り付けられている。   As an electronic control device that performs CAN notification with another electronic control device, one described in Patent Document 1 below is known as an example. The communication device described in Patent Document 1 below has a plurality of mailboxes, and a CAN-ID stored in each mailbox is assigned in advance.

特開2013−55593号公報JP 2013-55593 A

上述したようなCAN−IDの割り付け態様では、例えば、送信側ノードが、第1態様ではノードA及びノードBであるのに対し、別の第2態様ではノードA及びノードCである場合に、一つの電子制御装置で対応しようとすれば、ノードA,B,Cの全てから送信されるCAN−IDを割り付ける必要がある。このように割り付けてしまうと、第1態様の場合はノードCに対応するCAN−ID分のメールボックスが無駄になり、第2態様の場合はノードBに対応するCAN−ID分のメールボックスが無駄になる。   In the CAN-ID allocation mode as described above, for example, when the transmitting side node is the node A and the node B in the first mode, but is the node A and the node C in another second mode, In order to cope with one electronic control device, it is necessary to assign CAN-IDs transmitted from all of the nodes A, B, and C. If assigned in this way, the CAN-ID mailbox corresponding to the node C is wasted in the first mode, and the CAN-ID mailbox corresponding to the node B in the second mode. It becomes useless.

また、メールボックスの数は有限であるため、CAN−IDが増えていった場合に、受信するのに必要なCAN−IDを割り付けるメールボックスが無くなってしまうという課題も想定される。   In addition, since the number of mailboxes is limited, when CAN-IDs increase, there may be a problem that there is no mailbox that allocates a CAN-ID necessary for reception.

本発明はこのような課題に鑑みてなされたものであり、その目的は、メールボックスにCAN−IDを効率良く割り付けることが可能な電子制御装置を提供することにある。   The present invention has been made in view of such problems, and an object thereof is to provide an electronic control device capable of efficiently assigning a CAN-ID to a mailbox.

上記課題を解決するために、本発明に係る電子制御装置は、少なくとも一つの他の電子制御装置(5,6)との間で、CANプロトコルに基づくCAN通信を行う電子制御装置(10)であって、前記他の電子制御装置から送信される受信メッセージを格納する複数のメールボックス(310,311)を備え、前記複数のメールボックスはそれぞれ、前記受信メッセージの受信CAN−IDを格納するCAN−IDレジスタ(310a,311a)と、前記受信メッセージを格納するメッセージレジスタ(310b,311b)と、を有している。本発明に係る電子制御装置は、前記複数のメールボックスの中の少なくとも一つのメールボックスの前記CAN−IDレジスタが未使用状態とされている場合であって、前記受信CAN−IDが受信対象メッセージを特定する受信対象CAN−IDと一致し、且つそれが初回の受信である場合に、前記複数のメールボックスの中の第1メールボックスに、前記受信対象CAN−IDを割り付けると共に、対応する前記受信メッセージを格納する新規割付処理を行うように構成されている。前記新規割付処理においては、前記受信対象CAN−IDと併せて受信することが予定される受信予定CAN−IDが特定される場合は、前記第1メールボックス以外の第2メールボックスに、前記受信予定CAN−IDを割り付ける予定割付処理を行う。 In order to solve the above problems, an electronic control device according to the present invention is an electronic control device (10) that performs CAN communication based on a CAN protocol with at least one other electronic control device (5, 6). A plurality of mailboxes (310, 311) for storing received messages transmitted from the other electronic control units, each of the plurality of mailboxes storing a CAN-ID for receiving the received message. -It has an ID register (310a, 311a) and a message register (310b, 311b) for storing the received message. The electronic control device according to the present invention is a case where the CAN-ID register of at least one mailbox among the plurality of mailboxes is unused, and the received CAN-ID is a message to be received. When the first reception of the plurality of mailboxes is matched with the reception target CAN-ID, the reception target CAN-ID is assigned to the first mailbox in the plurality of mailboxes. A new allocation process for storing received messages is performed. In the new allocation process, when a reception scheduled CAN-ID scheduled to be received together with the reception target CAN-ID is specified, the reception is performed in a second mailbox other than the first mailbox. Schedule assignment processing for assigning the schedule CAN-ID is performed.

本発明によれば、受信CAN−IDが受信対象メッセージを特定する受信対象CAN−IDと一致し、且つそれが初回の受信である場合に新規割付処理を行うので、未使用状態のメールボックスに確実に受信対象CAN−IDを割り付け、メールボックスを有効に活用することができる。   According to the present invention, when the reception CAN-ID matches the reception target CAN-ID for specifying the reception target message and this is the first reception, the new assignment process is performed. The receiving object CAN-ID can be reliably assigned and the mailbox can be used effectively.

本発明によれば、メールボックスにCAN−IDを効率良く割り付けることが可能な電子制御装置を提供することができる。   ADVANTAGE OF THE INVENTION According to this invention, the electronic controller which can allocate CAN-ID efficiently to a mailbox can be provided.

本発明の実施形態に係るECU(電子制御装置)の構成を示すブロック図である。It is a block diagram which shows the structure of ECU (electronic control apparatus) which concerns on embodiment of this invention. 図1に示すCANコントローラの構成を示すブロック図である。It is a block diagram which shows the structure of the CAN controller shown in FIG. 図2に示すCANコントローラの動作を示すフローチャートである。3 is a flowchart showing the operation of the CAN controller shown in FIG. 図2に示すCANコントローラの動作を説明するための図である。It is a figure for demonstrating operation | movement of the CAN controller shown in FIG. 図2に示すCANコントローラの動作を説明するための図である。It is a figure for demonstrating operation | movement of the CAN controller shown in FIG. 図2に示すCANコントローラの動作を示すフローチャートである。3 is a flowchart showing the operation of the CAN controller shown in FIG. 図2に示すCANコントローラの動作を説明するための図である。It is a figure for demonstrating operation | movement of the CAN controller shown in FIG. 従来のCANコントローラの構成を示すブロック図である。It is a block diagram which shows the structure of the conventional CAN controller.

以下、添付図面を参照しながら本発明の実施形態について説明する。説明の理解を容易にするため、各図面において同一の構成要素に対しては可能な限り同一の符号を付して、重複する説明は省略する。   Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In order to facilitate the understanding of the description, the same constituent elements in the drawings will be denoted by the same reference numerals as much as possible, and redundant description will be omitted.

図1に示されるように、本実施形態のECU10(電制制御装置)は、他の電子制御装置であるノードA5及びノードB6との間で、CAN(Controller Area Network)プロトコルに基づくCAN通信を行うものである。ECU10と、ノードA5と、ノードB6とは、CANバス4を経由して相互にメッセージを送受信可能なように構成されている。   As shown in FIG. 1, the ECU 10 (electric control device) according to the present embodiment performs CAN communication based on a CAN (Controller Area Network) protocol between the node A5 and the node B6 which are other electronic control devices. Is what you do. The ECU 10, the node A 5, and the node B 6 are configured to be able to send and receive messages to and from each other via the CAN bus 4.

ECU10は、CANトランシーバ2と、CANコントローラ3と、を備えている。CANトランシーバ2は、CANコントローラ3とCANバス4との間で、メッセージを送受信するものである。CANトランシーバ2は、CANバス4の電気的条件を満たす信号を送受信するように構成されている。CANコントローラ3は、CANプロトコルに従って他のECU(ノードA5、ノードB6)との通信を制御するものである。   The ECU 10 includes a CAN transceiver 2 and a CAN controller 3. The CAN transceiver 2 transmits and receives messages between the CAN controller 3 and the CAN bus 4. The CAN transceiver 2 is configured to transmit and receive signals that satisfy the electrical conditions of the CAN bus 4. The CAN controller 3 controls communication with other ECUs (node A5, node B6) according to the CAN protocol.

CANコントローラ3について、図2を参照しながらより詳細に説明する。図2に示されるように、CANコントローラ3は、データ格納部31と、受信CAN−IDリスト32と、を備えている。   The CAN controller 3 will be described in more detail with reference to FIG. As shown in FIG. 2, the CAN controller 3 includes a data storage unit 31 and a reception CAN-ID list 32.

データ格納部31は、32個のメールボックス0〜31を有している(図2ではメールボックス0,1のみを示している)。メールボックス0_310は、設定項目と、それに対応する設定値を格納することができるように構成されている。メールボックス0_310には、CAN−IDレジスタ310aと、メッセージレジスタ310bと、送受信設定レジスタ310cと、DLCレジスタ310dと、が設けられている。   The data storage unit 31 has 32 mailboxes 0 to 31 (only the mailboxes 0 and 1 are shown in FIG. 2). Mailbox 0_310 is configured to be able to store setting items and corresponding setting values. Mailbox 0_310 is provided with a CAN-ID register 310a, a message register 310b, a transmission / reception setting register 310c, and a DLC register 310d.

CAN−IDレジスタ310aは、メッセージの種類及び優先度を表す識別コードであるCAN−IDを格納する領域である。メッセージレジスタ310bは、フレームに載せて送信するメッセージ又は受信フレームから抽出したメッセージを格納する領域である。送受信設定レジスタ310cは、メールボックスの使用方法(送信/受信)を示す送受信設定情報を格納する領域である。DLCレジスタ310dは、メッセージのデータ長を示すDLC(Data Length Code)を格納する領域である。   The CAN-ID register 310a is an area for storing a CAN-ID that is an identification code indicating the type and priority of a message. The message register 310b is an area for storing a message transmitted in a frame or a message extracted from a received frame. The transmission / reception setting register 310c is an area for storing transmission / reception setting information indicating how to use the mailbox (transmission / reception). The DLC register 310d is an area for storing a DLC (Data Length Code) indicating the data length of the message.

メールボックス1_311も同様に、設定項目と、それに対応する設定値を格納することができるように構成されている。メールボックス1_311には、CAN−IDレジスタ311aと、メッセージレジスタ311bと、送受信設定レジスタ311cと、DLCレジスタ311dと、が設けられている。CAN−IDレジスタ311aは、CAN−IDレジスタ310aと同様であるので説明を省略する。メッセージレジスタ311b、送受信設定レジスタ311c、及びDLCレジスタ311dも同様に、メッセージレジスタ310b、送受信設定レジスタ310c、及びDLCレジスタ310dと同様であるので説明を省略する。また、メールボックス2以降についても同様の構成であるので、それらの説明を省略する。   Similarly, the mailbox 1_311 is configured to be able to store setting items and corresponding setting values. The mailbox 1_311 is provided with a CAN-ID register 311a, a message register 311b, a transmission / reception setting register 311c, and a DLC register 311d. Since the CAN-ID register 311a is similar to the CAN-ID register 310a, the description thereof is omitted. Similarly, the message register 311b, the transmission / reception setting register 311c, and the DLC register 311d are the same as the message register 310b, the transmission / reception setting register 310c, and the DLC register 310d. Further, since the same configuration is applied to the mailboxes 2 and later, the description thereof is omitted.

受信CAN−IDリスト32は、受信対象CAN−IDレジスタ321と、ノードレジスタ322と、DLCレジスタ323と、を備えている。受信対象CAN−IDレジスタ321は、このCANコントローラ3が受信するメッセージを示す識別コードであるCAN−IDを格納する領域である。ノードレジスタ322は、受信対象CAN−IDレジスタ321に格納されるCAN−IDに対応する送信元ノードを特定する情報を格納する領域である。DLCレジスタ323は、受信対象CAN−IDレジスタ321に格納されるCAN−IDが特定するメッセージのDLCを格納する領域である。   The reception CAN-ID list 32 includes a reception target CAN-ID register 321, a node register 322, and a DLC register 323. The reception target CAN-ID register 321 is an area for storing a CAN-ID that is an identification code indicating a message received by the CAN controller 3. The node register 322 is an area for storing information for specifying a transmission source node corresponding to the CAN-ID stored in the reception target CAN-ID register 321. The DLC register 323 is an area for storing the DLC of the message specified by the CAN-ID stored in the reception target CAN-ID register 321.

続いて、図3,4,5を参照しながら、CANコントローラ3の動作について説明する。図3は、CANコントローラ3の動作について説明するフローチャートである。図4は、最初にメッセージを受信した場合のCANコントローラ3の状態を示す図である。図5は、図4の状態の後にメッセージを受信した場合のCANコントローラ3の状態を示す図である。尚、受信CAN−IDリスト32の受信対象CAN−IDレジスタ321には、CAN−IDが「0x0123」「0x0111」「0x1234」であるメッセージが受信対象となるように情報が格納され、ノードレジスタ322及びDLCレジスタ323には対応する情報が格納されている。初期状態では、データ格納部31に含まれる各メールボックス0〜31には何も情報が格納されていない状態である。   Next, the operation of the CAN controller 3 will be described with reference to FIGS. FIG. 3 is a flowchart for explaining the operation of the CAN controller 3. FIG. 4 is a diagram illustrating a state of the CAN controller 3 when a message is first received. FIG. 5 is a diagram showing a state of the CAN controller 3 when a message is received after the state of FIG. The reception target CAN-ID register 321 of the reception CAN-ID list 32 stores information so that messages with CAN-IDs “0x0123”, “0x0111”, and “0x1234” are targeted for reception, and the node register 322. The DLC register 323 stores corresponding information. In an initial state, no information is stored in each of the mailboxes 0 to 31 included in the data storage unit 31.

図4に示されるように、ノードA5から、CAN−IDが「0x0123」であるメッセージを受信したものとする。図3のステップS101では、受信したCAN−ID「0x0123」と、受信CAN−IDリスト32に格納されている受信対象CAN−ID「0x0123」「0x0111」「0x1234」とを比較する。   As illustrated in FIG. 4, it is assumed that a message with CAN-ID “0x0123” is received from the node A5. In step S101 of FIG. 3, the received CAN-ID “0x0123” is compared with the reception target CAN-IDs “0x0123”, “0x0111”, and “0x1234” stored in the received CAN-ID list 32.

ステップS101に続くステップS102では、ステップS101の比較の結果、該当するCAN−IDが存在するか否かを判断する。該当するCAN−IDが存在しなければ処理を終了し、該当するCAN−IDが存在すればステップS103の処理に進む。本例では、受信したCAN−ID「0x0123」と、受信CAN−IDリスト32に格納されている受信対象CAN−ID「0x0123」とが一致するので、ステップS103の処理に進む。   In step S102 following step S101, it is determined whether or not the corresponding CAN-ID exists as a result of the comparison in step S101. If the corresponding CAN-ID does not exist, the process ends. If the corresponding CAN-ID exists, the process proceeds to step S103. In this example, since the received CAN-ID “0x0123” matches the reception target CAN-ID “0x0123” stored in the reception CAN-ID list 32, the process proceeds to step S103.

ステップS103では、受信したCAN−ID「0x0123」がデータ格納部31に含まれるメールボックス0〜31に割り当て済みか否かを判断する。割り当て済みであればステップS106の処理に進み、割り当て済みでなければステップS105の処理に進む。上述したように、初期状態では、データ格納部31に含まれる各メールボックスには何も情報が格納されていない状態なので、ステップS105の処理に進む。   In step S <b> 103, it is determined whether or not the received CAN-ID “0x0123” has been assigned to the mailboxes 0 to 31 included in the data storage unit 31. If it has been assigned, the process proceeds to step S106, and if it has not been assigned, the process proceeds to step S105. As described above, since no information is stored in each mailbox included in the data storage unit 31 in the initial state, the process proceeds to step S105.

ステップS105では、未使用のメールボックスに、受信したCAN−ID及びDLCを登録する。図4に示す例では、メールボックス0_310に、CAN−ID「0x0123」及びDLC「8」を登録する。   In step S105, the received CAN-ID and DLC are registered in an unused mailbox. In the example illustrated in FIG. 4, the CAN-ID “0x0123” and DLC “8” are registered in the mailbox 0_310.

ステップS106では、対象メールボックスに、受信したメッセージを記憶する。図4に示す例では、受信したメッセージをメッセージレジスタ310bに記憶している。尚、この後に同じCAN−IDのメッセージを受信した場合は、メッセージレジスタ310bを書き換えていく。   In step S106, the received message is stored in the target mailbox. In the example shown in FIG. 4, the received message is stored in the message register 310b. If a message with the same CAN-ID is subsequently received, the message register 310b is rewritten.

続いて、図5に示されるように更にノードA5から、CAN−IDが「0x0111」であるメッセージを受信した場合の処理について説明する。図3のステップS101に続くステップS102では、受信したCAN−ID「0x0111」と、受信CAN−IDリスト32に格納されている受信対象CAN−ID「0x0111」とが一致するので、ステップS103の処理に進む。   Subsequently, as illustrated in FIG. 5, a process when a message having a CAN-ID “0x0111” is further received from the node A5 will be described. In step S102 following step S101 in FIG. 3, the received CAN-ID “0x0111” matches the reception target CAN-ID “0x0111” stored in the reception CAN-ID list 32. Proceed to

ステップS103では、メールボックス0_310にCAN−ID「0x0123」が割り当てられ、新たに受信したCAN−ID「0x0111」はいずれのメールボックスにも割り当てられていないことが確認できる。従って、ステップS104の判断の結果、ステップS105の処理に進み、メールボックス1_311に、CAN−ID「0x0111」及びDLC「8」を登録する。続くステップS106では、受信したメッセージをメッセージレジスタ311bに記憶している。   In step S103, it can be confirmed that the CAN-ID “0x0123” is assigned to the mailbox 0_310, and the newly received CAN-ID “0x0111” is not assigned to any mailbox. Therefore, as a result of the determination in step S104, the process proceeds to step S105, and CAN-ID “0x0111” and DLC “8” are registered in the mailbox 1_311. In the subsequent step S106, the received message is stored in the message register 311b.

続いて、図6及び図7を参照しながら、CANコントローラ3の別の動作について説明する。尚、受信CAN−IDリスト32の受信対象CAN−IDレジスタ321には、CAN−IDが「0x0123」「0x0111」「0x1234」であるメッセージが受信対象となるように情報が格納され、ノードレジスタ322及びDLCレジスタ323には対応する情報が格納されている。初期状態では、データ格納部31に含まれる各メールボックスには何も情報が格納されていない状態である。   Subsequently, another operation of the CAN controller 3 will be described with reference to FIGS. 6 and 7. The reception target CAN-ID register 321 of the reception CAN-ID list 32 stores information so that messages with CAN-IDs “0x0123”, “0x0111”, and “0x1234” are targeted for reception, and the node register 322. The DLC register 323 stores corresponding information. In an initial state, no information is stored in each mailbox included in the data storage unit 31.

図7に示されるように、ノードA5から、CAN−IDが「0x0123」であるメッセージを受信したものとする。図6のステップS201では、受信したCAN−ID「0x0123」と、受信CAN−IDリスト32に格納されている受信対象CAN−ID「0x0123」「0x0111」「0x1234」とを比較する。   As illustrated in FIG. 7, it is assumed that a message with CAN-ID “0x0123” is received from the node A5. In step S201 of FIG. 6, the received CAN-ID “0x0123” is compared with the reception target CAN-IDs “0x0123”, “0x0111”, and “0x1234” stored in the reception CAN-ID list 32.

ステップS201に続くステップS202では、ステップS201の比較の結果、該当するCAN−IDが存在するか否かを判断する。該当するCAN−IDが存在しなければ処理を終了し、該当するCAN−IDが存在すればステップS203の処理に進む。本例では、受信したCAN−ID「0x0123」と、受信CAN−IDリスト32に格納されている受信対象CAN−ID「0x0123」とが一致するので、ステップS203の処理に進む。   In step S202 following step S201, it is determined whether or not the corresponding CAN-ID exists as a result of the comparison in step S201. If the corresponding CAN-ID does not exist, the process ends. If the corresponding CAN-ID exists, the process proceeds to step S203. In this example, since the received CAN-ID “0x0123” matches the reception target CAN-ID “0x0123” stored in the received CAN-ID list 32, the process proceeds to step S203.

ステップS203では、受信したCAN−ID「0x0123」がデータ格納部31に含まれるメールボックス0〜31に割り当て済みか否かを判断する。割り当て済みであればステップS208の処理に進み、割り当て済みでなければステップS205の処理に進む。上述したように、初期状態では、データ格納部31に含まれる各メールボックスには何も情報が格納されていない状態なので、ステップS205の処理に進む。   In step S <b> 203, it is determined whether or not the received CAN-ID “0x0123” has been assigned to the mailboxes 0 to 31 included in the data storage unit 31. If it has already been assigned, the process proceeds to step S208. If it has not been assigned, the process proceeds to step S205. As described above, since no information is stored in each mailbox included in the data storage unit 31 in the initial state, the process proceeds to step S205.

ステップS205では、受信したCAN−ID「0x0123」に対応するノード「A」と同一のノードである受信対象CAN−IDがあるかどうかを判断する。同一ノードが受信CAN−IDリスト32に含まれていればステップS207の処理に進み、同一ノードが受信CAN−IDリスト32に含まれていなければステップS206の処理に進む。図7に示す例では、ノード「A」に対応する受信対象CAN−IDは「0x0123」に加えて、「0x0111」もあるのでステップS207の処理に進む。   In step S205, it is determined whether there is a reception target CAN-ID that is the same node as the node “A” corresponding to the received CAN-ID “0x0123”. If the same node is included in the reception CAN-ID list 32, the process proceeds to step S207. If the same node is not included in the reception CAN-ID list 32, the process proceeds to step S206. In the example illustrated in FIG. 7, since the reception target CAN-ID corresponding to the node “A” includes “0x0111” in addition to “0x0123”, the process proceeds to step S207.

ステップS207では、未使用のメールボックスに、受信したCAN−ID及びDLCを登録すると共に、同一ノードのCAN−ID及びDLCを登録する。図7に示す例では、メールボックス0_310に、CAN−ID「0x0123」及びDLC「8」を登録すると共に、メールボックス1_311に、CAN−ID「0x0111」及びDLC「8」を登録する。   In step S207, the received CAN-ID and DLC are registered in an unused mailbox, and the CAN-ID and DLC of the same node are registered. In the example illustrated in FIG. 7, the CAN-ID “0x0123” and DLC “8” are registered in the mailbox 0_310, and the CAN-ID “0x0111” and DLC “8” are registered in the mailbox 1_311.

ステップS206では、未使用のメールボックスに、受信したCAN−ID及びDLCを登録する。   In step S206, the received CAN-ID and DLC are registered in an unused mailbox.

ステップS208では、対象メールボックスに、受信したメッセージを記憶する。図7に示す例では、受信したメッセージをメッセージレジスタ310bに記憶している。従って、メールボックス0_310には、CAN−ID「0x0123」に対応するメッセージが格納されるが、メールボックス1_311には、CAN−ID「0x0111」が割り当てられただけの状態となっている。   In step S208, the received message is stored in the target mailbox. In the example shown in FIG. 7, the received message is stored in the message register 310b. Therefore, a message corresponding to the CAN-ID “0x0123” is stored in the mailbox 0_310, but the CAN-ID “0x0111” is only assigned to the mailbox 1_311.

従来は、図8に示されるような、CANコントローラ3Fが用いられており、図2,4,5,7に例示するような受信CAN−IDリスト32を有するものではなく、データ格納部31Fのみを有するものであった。そのため、メールボックス0_310Fが有するCAN−IDレジスタ310aFには初期状態でCAN−IDが割り付けられており、メールボックス1_311F以降も同様に初期状態でCAN−IDが割り付けられていた。従って、メッセージレジスタ310bF、送受信設定レジスタ310cF、DLCレジスタ310dFに格納される情報は固定化されており、受信する可能性のあるメッセージの種別分だけメールボックスが必要であった。   Conventionally, a CAN controller 3F as shown in FIG. 8 is used, and it does not have the reception CAN-ID list 32 as illustrated in FIGS. 2, 4, 5, and 7, but only the data storage unit 31F. It was what had. Therefore, a CAN-ID is assigned to the CAN-ID register 310aF of the mailbox 0_310F in the initial state, and the CAN-ID is similarly assigned to the CAN-ID register 310aF in the initial state after the mailbox 1_311F. Therefore, the information stored in the message register 310bF, the transmission / reception setting register 310cF, and the DLC register 310dF is fixed, and mailboxes are required for the types of messages that may be received.

一方、本実施形態では、複数のメールボックス0〜31の中の少なくとも一つのメールボックスのCAN−IDレジスタが未使用状態とされている場合、例えば、メールボックス0_310のCAN−IDレジスタ310aが未使用状態とされている場合(図2に示すようなメールボックスの状態である場合)であって、受信CAN−IDが受信対象メッセージを特定する受信対象CAN−IDと一致し、且つそれが初回の受信である場合に、複数のメールボックス0〜31の中の第1メールボックスであるメールボックス0_310に、受信対象CAN−IDを割り付けると共に、対応する受信メッセージを格納する新規割付処理を行っている。そのため、予めメールボックスにCAN−IDを割り付ける必要が無くなり、実際に受信したメッセージや高い確度で受信することが想定されるCAN−IDを割り付けることができ、メールボックスを効率的に使うことができる。   On the other hand, in this embodiment, when the CAN-ID register of at least one mailbox among the plurality of mailboxes 0 to 31 is unused, for example, the CAN-ID register 310a of the mailbox 0_310 is not used. When it is in a use state (when it is a mailbox state as shown in FIG. 2), the reception CAN-ID matches the reception target CAN-ID for specifying the reception target message, and this is the first time. In the case of receiving, a new assignment process for assigning the reception target CAN-ID to the mailbox 0_310 which is the first mailbox among the plurality of mailboxes 0 to 31 and storing the corresponding received message is performed. Yes. Therefore, it is not necessary to assign a CAN-ID to a mailbox in advance, a CAN-ID that is expected to be received with a message that is actually received or with high accuracy can be assigned, and the mailbox can be used efficiently. .

また、メールボックス0_310のCAN−IDレジスタ310aに受信対象CAN−IDが既に割り付けられている場合(図4に例示する状態)に、受信CAN−IDが、割り付け済みの受信対象CAN−IDと一致する場合は、対応する受信メッセージを格納し、受信CAN−IDが、割り付け済みの受信対象CAN−IDと一致しない場合(図5に例示する状態)は、メールボックス0_310の受信対象CAN−IDを変更しない割付維持処理を行う。この場合、メールボックス1_311に受信対象CAN−IDを割り付ける新規割付処理を行う。   In addition, when the reception target CAN-ID is already assigned to the CAN-ID register 310a of the mailbox 0_310 (the state illustrated in FIG. 4), the reception CAN-ID matches the assigned reception target CAN-ID. If the reception message corresponding to the received CAN-ID does not match the allocated reception target CAN-ID (the state illustrated in FIG. 5), the reception target CAN-ID of the mailbox 0_310 is set. Perform the allocation maintenance process that does not change. In this case, a new assignment process for assigning the reception target CAN-ID to the mailbox 1_311 is performed.

このような割付処理を行うにあたって、ECU10の電源投入時に、メールボックス0〜31それぞれのCAN−IDレジスタ310a,311a等に割り付けられているCAN−IDを保持することが一つの好ましい態様である。ECU10が自動車に搭載されることを想定した場合、ノードA5やノードB6の構成が変わることはその自動車が商品として流通した後は想定しにくいので、割付状態を保持することで起動処理を円滑に行うことができる。   In performing such an allocation process, it is one preferable aspect that the CAN-IDs allocated to the CAN-ID registers 310a, 311a, etc. of the mailboxes 0 to 31 are held when the ECU 10 is turned on. Assuming that the ECU 10 is mounted on a vehicle, it is difficult to assume that the configuration of the node A5 or the node B6 changes after the vehicle has been distributed as a product. It can be carried out.

一方、このような割付け処理を行うにあたって、ECU10の電源投入時に、メールボックス0〜31それぞれのCAN−IDレジスタ310a,311a等に割り付けられているCAN−IDを初期化することも別の好ましい態様である。上述したように、ECU10を搭載した自動車が商品として流通した後は、ノードA5やノードB6の構成が変わることが想定しにくいものの、自動車を開発中の状況においてはノードA5やノードB6の構成が変わることが想定される。このような状況に対応するため、上述した初期化処理を行うことも好ましい態様である。   On the other hand, when performing such an allocation process, it is another preferable aspect to initialize the CAN-IDs allocated to the CAN-ID registers 310a and 311a of the mailboxes 0 to 31 when the ECU 10 is turned on. It is. As described above, it is unlikely that the configuration of the node A5 and the node B6 will change after the vehicle equipped with the ECU 10 is distributed as a product. However, in the situation where the vehicle is being developed, the configuration of the node A5 and the node B6 is It is expected to change. In order to cope with such a situation, it is also a preferable aspect to perform the above-described initialization process.

5:ノードA(電子制御装置)
6:ノードB(電子制御装置)
10:ECU(電子制御装置)
310,311:メールボックス
310a,311a:CAN−IDレジスタ
310b,311b:メッセージレジスタ
5: Node A (electronic control unit)
6: Node B (electronic control unit)
10: ECU (electronic control unit)
310, 311: Mailboxes 310a, 311a: CAN-ID registers 310b, 311b: Message registers

Claims (3)

少なくとも一つの他の電子制御装置(5,6)との間で、CANプロトコルに基づくCAN通信を行う電子制御装置(10)であって、
前記他の電子制御装置から送信される受信メッセージを格納する複数のメールボックス(310,311)を備え、
前記複数のメールボックスはそれぞれ、前記受信メッセージの受信CAN−IDを格納するCAN−IDレジスタ(310a,311a)と、前記受信メッセージを格納するメッセージレジスタ(310b,311b)と、を有しており、
前記複数のメールボックスの中の少なくとも一つのメールボックスの前記CAN−IDレジスタが未使用状態とされている場合であって、
前記受信CAN−IDが受信対象メッセージを特定する受信対象CAN−IDと一致し、且つそれが初回の受信である場合に、
前記複数のメールボックスの中の第1メールボックスに、前記受信対象CAN−IDを割り付けると共に、対応する前記受信メッセージを格納する新規割付処理を行うものであって、
前記新規割付処理において、前記受信対象CAN−IDと併せて受信することが予定される受信予定CAN−IDが特定される場合は、
前記第1メールボックス以外の第2メールボックスに、前記受信予定CAN−IDを割り付ける予定割付処理を行う、ことを特徴とする電子制御装置。
An electronic control device (10) that performs CAN communication based on a CAN protocol with at least one other electronic control device (5, 6),
A plurality of mailboxes (310, 311) for storing received messages transmitted from the other electronic control units;
Each of the plurality of mailboxes has a CAN-ID register (310a, 311a) for storing the received CAN-ID of the received message and a message register (310b, 311b) for storing the received message. ,
The CAN-ID register of at least one mailbox among the plurality of mailboxes is unused;
If the received CAN-ID matches the received CAN-ID that identifies the received message and it is the first reception,
A new assignment process for assigning the reception target CAN-ID to the first mailbox of the plurality of mailboxes and storing the corresponding received message ,
In the new allocation process, when a reception scheduled CAN-ID scheduled to be received together with the reception target CAN-ID is specified,
An electronic control device , comprising: performing a scheduled allocation process for allocating the scheduled reception CAN-ID to a second mailbox other than the first mailbox .
前記新規割付処理において、前記受信対象CAN−IDの送信ノードと同一の送信ノードから受信することが予定されるCAN−IDを受信予定CAN−IDとして特定する、ことを特徴とする請求項1に記載の電子制御装置。2. The new assignment process, wherein a CAN-ID scheduled to be received from the same transmission node as the transmission node of the reception target CAN-ID is specified as a reception scheduled CAN-ID. The electronic control device described. 前記電子制御装置の電源投入時に、前記複数のメールボックスそれぞれの前記CANIDレジスタに割り付けられているCAN−IDを保持することを特徴とする請求項1又は2に記載の電子制御装置。 The electronic controller at power up of the electronic control device according to claim 1 or 2, characterized in that to hold the CANID which is allocated to the CANID register of each of the plurality of mailboxes.
JP2015006989A 2015-01-16 2015-01-16 Electronic control unit Active JP6443066B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015006989A JP6443066B2 (en) 2015-01-16 2015-01-16 Electronic control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015006989A JP6443066B2 (en) 2015-01-16 2015-01-16 Electronic control unit

Publications (2)

Publication Number Publication Date
JP2016132318A JP2016132318A (en) 2016-07-25
JP6443066B2 true JP6443066B2 (en) 2018-12-26

Family

ID=56437185

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015006989A Active JP6443066B2 (en) 2015-01-16 2015-01-16 Electronic control unit

Country Status (1)

Country Link
JP (1) JP6443066B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113141288B (en) * 2021-04-23 2022-08-23 北京航天发射技术研究所 Mailbox message receiving and sending method and device of CAN bus controller
CN114979058B (en) * 2022-06-30 2023-10-03 东风电驱动系统有限公司 CAN multi-mailbox multiplexing processing method and system
CN116208581B (en) * 2023-04-26 2023-08-01 南京芯驰半导体科技有限公司 The method of obtaining the mailbox configuration information of the CAN controller and the method of configuring the mailbox
CN118842671B (en) * 2024-08-09 2025-02-25 湖南进芯电子科技有限公司 A CAN mailbox sharing and sending method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3829679B2 (en) * 2001-10-09 2006-10-04 株式会社デンソー Communication control device
JP5700426B2 (en) * 2011-03-29 2015-04-15 ダイハツ工業株式会社 Vehicle network system
JP5605338B2 (en) * 2011-09-06 2014-10-15 株式会社デンソー Communication device
JP2013074420A (en) * 2011-09-27 2013-04-22 Denso Corp Vehicle communication device

Also Published As

Publication number Publication date
JP2016132318A (en) 2016-07-25

Similar Documents

Publication Publication Date Title
US10405309B2 (en) System and method of distinct duty cycle support for distinct multi-network protocol networks for industrial wireless sensor networks
JP6443066B2 (en) Electronic control unit
CN109936640A (en) Address allocation method and device for slave node equipment
CN107249048B (en) Air conditioning system and address allocation method and device thereof
KR20130033197A (en) Method for allocating unique identifier and battery management system using the same
US9413552B2 (en) Internet protocol addressing of devices employing the network ring topology
JP6224475B2 (en) Vehicle control device
Phung et al. The OpenLISP control plane architecture
JP5714182B2 (en) Communication apparatus and communication system
CN111587560A (en) Master-slave bus system and method for operating a bus system
US10230657B2 (en) BUS system, method of operating a BUS system, and fluidic system with a BUS system
CN105393241B (en) Control systems, master control sites, and remote sites
JP4948839B2 (en) Method and apparatus for allocating network subscriber device addresses in a ProfitetIO network
JP2017530643A5 (en)
JP5212476B2 (en) Inter-node communication method, server device, inter-node communication program
CN105027509B (en) Communicator and control device
JP7110950B2 (en) network system
JP5692345B2 (en) Gateway device
CN111492349B (en) Method, computing unit and memory pool for enabling use of remote memory resources
JP6418043B2 (en) Switching hub and communication network
CN114157455A (en) Data transmission method, device, equipment and storage medium
JP7124681B2 (en) repeater
JP6415719B2 (en) Radio, repeater, communication system, and identifier assignment method
JP2017108247A (en) Communications system
KR101038795B1 (en) How to assign device address of wireless device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170526

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180302

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180320

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180517

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20181030

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181112

R151 Written notification of patent or utility model registration

Ref document number: 6443066

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250