Mechanism of CAN Data Communication

This section explains the structure of frames and formats—the basics in CAN data communication—and their respective roles.

Basics in CAN communication—“dominant” and “recessive”

The serial communication protocol “CAN” is utilized in a wide variety of fields, mainly in automobiles but also in industrial machines and factory automation (FA). In CAN communication, information is converted to digital signals consisting of 0 and 1 before being transmitted. In this transmission, 0 is called “dominant” and 1 is called “recessive". If both dominant and recessive are transmitted simultaneously, this system gives priority to dominant. Additionally, CAN uses the Non-Return-to-Zero (NRZ) method, which is adopted in various communication protocols, for data conversion before transmission.

Non-Return-to-Zero (NRZ) method
Non-Return-to-Zero (NRZ) method

CAN communication unit “frame”

CAN communication digital signals have groups called “frames,” and there are four types of frames: data frame, remote frame, overload frame, and error frame.

Data frame

The format for data transmission is called the “data frame”. There are two types of data frames: standard format and extended format.

Frame structure in standard format

An explanation of the frame structure in “standard format” mainly used for CAN communication for automobiles is given below.

Frame structure in standard format

The values indicated here show the maximum bit length of each field. The upper line indicates recessive and the lower line indicates dominant. A field is fixed as dominant if a line is only shown for dominant. Similarly, a field is fixed as recessive if a line is only shown for recessive. If lines are shown for both dominant and recessive, it can vary depending on the transmitted data.

SOF
The part to be transmitted first from the relevant node. This field is called “start of frame (SOF)” because it indicates the start position and is also used for synchronization between nodes.
ID
Determines the data contents, the transmitting node identifier, the priority of arbitration, etc. This field consists of 11 bits in standard format and 29 bits (11 bits + 18 bits) in extended format.
RTR
The remote transmission request (RTR) field, which distinguishes between data frames and remote frames, is dominant for a data frame and recessive for a remote frame. As with the ID, this field is also used for arbitration.
Control field
Consists of the identifier extension (IDE) bit, the reserved bit “r” (1 bit each), and the 4-bit data length code (DLC).
Data field
The body of transmitted data is called the “data field.” The length varies between 0 and 8 bytes (0 to 64 bits) depending on the DLC setting, and the designer can determine what data is assigned.
CRC sequence
The transmitting node calculates the values to transmit for the SOF, ID, control field, and data field, and it transmits the results as the cyclic redundancy check (CRC) sequence. The receiving node also conducts the same calculation to determine if it has received the data properly.
CRC delimiter
Indicates the end of the CRC sequence. The combination of CRC sequence and CRC delimiter is called the CRC field.
ACK slot
Judges if the transmitted data up to the CRC field has been received properly.
ACK delimiter
Indicates the end of the ACK slot. The combination of ACK slot and ACK delimiter is called the ACK field.
EOF
The end of frame (EOF) field is transmitted at the end of a data frame.
ITM
Although this field is not included within the range of the data frame, ITM (intermission) is indicated, and the bus becomes idle after ITM. ITM can only be transmitted in an overload frame.

Frame structure in extended format

In extended format, the ID to RTR fields differ from those in standard format. This format is mainly used by large vehicles such as buses and trucks for CAN communication.

Frame structure in extended format
Base ID
The ID in standard format is described as the base ID in extended format. The contents are equivalent to those in standard format.
SRR
The substitute remote request (SRR) bit field is a 1-bit recessive.
IDE
The identifier extension (IDE) bit field is a 1-bit recessive.
Extended ID
An 11-bit standard ID plus an 18-bit extended ID make a 29-bit field. There are 2,048 identifiable types in standard format and approximately 5.4 million identifiable types in extended format.

Remote frame

In CAN communication, a node that will request certain data transmits a remote frame, and then the node that has the data returns a data frame. A remote frame is basically structured by deleting a data field from a data frame (or, by setting the DLC and data field to 0 bytes). The RTR is set to recessive to identify a remote frame (it is set to dominant in a data frame). However, to reduce the data occupancy ratio, remote frames are hardly used in recent years. Instead, data frames are regularly transmitted to each node, in general.

Remote frame
Remote frame

Overload frame

In the days after CAN came into existence, the processing capacity of microcontrollers and CAN controllers was low, so the “overload frame” was developed to address this problem. The main role of this frame is to be transmitted to a node that is slow in processing a data frame, thereby delaying the start of transmission of the next data frame.

Overload frame

Error frame

This frame is transmitted when a communication error (among the various types of communication errors) occurs, thereby indicating this occurrence on the CAN network.

Error frame

INDEX