Starting from the CAN bus of new energy vehicles, learn about a more compatible communication system

Publisher:艺泉阁Latest update time:2018-04-04 Source: ZLG致远电子 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In the process of CAN bus communication development, in order to be compatible with real-time operating systems, is there a corresponding real-time communication network protocol? Today we will learn about a communication system with stronger compatibility.

The interpretation of the first three parts of ISO11898 improves the understanding of traditional CAN networks, and explains in detail whether it is high-speed CAN or low-speed CAN, or the most basic physical layer definition. Traditional CAN network bus communication is basically event-triggered. When there are many messages to be transmitted at the same time, it may cause bus overload. In order to avoid this phenomenon, the traditional CAN network uses an arbitration mechanism to transmit according to the priority of the information.

Figure 1 Perspective view of the CAN bus of new energy vehicles

Obviously, if the traditional distributed CAN network can be used in a real-time operating system (based on time-triggered scheduling rather than event-triggered), the compatibility and comprehensive integration of the system will be greatly improved. But the question is how can we combine the two that do not follow the same time scheduling?

1. Time-triggered CAN

1 Overview

Time-triggered CAN is a high-level protocol built on standard CAN. It will synchronize the communication of all nodes in the network, that is, each node sends information at a fixed time, so there is no need to arbitrate the priority of the information. Since the time allocated to each node is fixed, the delay time of the entire network can also be predicted.

1.1 There are two ways to achieve such time-triggered CAN communication

Method 1: used for periodic information transmission.

Method 2: Support global system time transmission.

1.2 Several important concepts

  • Basic cycle: The time between two reference frames is called a basic cycle, which is composed of several time windows;

  • Reference frame: A data frame that starts a basic cycle and provides a global time for the network. It acts like Greenwich Mean Time to world time, and is used to synchronize the time of all nodes.

  • Time window: The time period allocated for transmitting information in the system matrix, including arbitration time window, free time window and dedicated time window, see Figure 2.

Figure 2. Several time windows in a cycle

The so-called time trigger means that the data allocated above is sent in sequence from left to right. The following introduces these three time windows:

  • Exclusive Windows: used to transmit special periodic information. These messages will not participate in bus competition and play a recorder role.

  • Arbitrating Windows: CAN nodes cannot transmit messages when the bus is not idle. In the arbitration window of time-triggered CAN, several nodes in the network can be arranged to send messages at the same time, but there is no retransmission function.

  • Free Windows: Reserved for system expansion, can be configured to increase the arbitration time window or dedicated time window of the node, equivalent to a mobile force.

Figure 3 System matrix

The system matrix in the figure above has 4 basic cycles. A basic cycle can be composed of time windows of different types and lengths. The columns of the matrix are also called transmission arrays. The time windows in the transmission array have the same length but can be of different types.

2. Receiving and sending

Now that we have clarified the concept, let's learn how time-triggered CAN receives and sends information.

1. Sending of information

Message sending trigger

In a time-triggered CAN network, the information sent by a node is controlled by a message send trigger. The message send trigger shows in which time window in the system matrix the information is transmitted and how.

Therefore, the information sending trigger has multiple functional groups, one is the judgment of information correctness, two is the time mark of sending, three is the judgment of sending position in the transmission array, and four is the retransmission factor. When the triggering condition of an information sending trigger is met, it will be started immediately even if the information transmission is erroneous and causes the information to fail.

Figure 4 shows an example of a trigger for sending a dedicated message

The figure above is a trigger for sending a dedicated message D, which describes the sending in the fifth time window (dedicated window) of the third basic cycle in the system matrix, with a cycle deviation of 0 and a retransmission factor of 2.

2. Receiving information

Message receiving trigger

In time-triggered CAN, the reception of information is controlled by the information reception trigger. The composition of the information reception trigger is the same as the information transmission trigger mentioned above. The time stamp of the information reception trigger will determine the time point after the information reception is completed.

3. Sending of reference frames

Message receiving trigger

The reference frame sending trigger is a special information sending trigger that only exists in the backup time master node. In a strictly time-triggered network, only one reference frame sending trigger is used to ensure the periodic sending of the reference frame. As long as the time is up, the reference frame will be sent.

In the basic cycle system of event synchronization, there are two reference frame sending triggers, one of which is sent regularly according to the basic cycle of the system matrix, and the other is used as a backup to resend the reference frame when the event synchronization is abnormal.

3. Time Master Node Initialization and Error Handling

1. Concept of time master node initialization

Although there is only one time master node when normal communication is established, there may be more than 8 backup time master nodes in time-triggered CAN. When the system starts, the hardware is initialized, and all backup time master nodes can start trying to send reference frames according to priority and waiting time. After hardware initialization, the frame synchronization entity (execution unit of the data link layer and the media access control layer) with a high priority CAN identifier can be transmitted first.

2. Error handling

CAN failure handling complies with the provisions of ISO 11898-1. When the frame synchronization entity detects an error in the scheduling table, it will be handled through CAN's ISO 11898-1 protocol.

Figure 5 Error handling

IV. Summary

So far, we have given an overview of the time-triggered CAN network and briefly introduced this high-level protocol that is different from the traditional CAN standard. For a more detailed discussion, please refer to the original text of ISO 11898-4. Reply [ISO11898-4] in the backend of the official account to receive the original document.


Reference address:Starting from the CAN bus of new energy vehicles, learn about a more compatible communication system

Previous article:6-way CAN vehicle gateway optimal device solution
Next article:Innovative digital bus architecture reduces audio system costs

Latest Automotive Electronics Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号