CAN Message Frame Format
CAN Message Frame Format
Frame Format
The Controller Area Network (CAN) protocol is a robust and widely
adopted communication protocol used in automotive and industrial
applications. CAN enables different electronic control units (ECUs)
within a system to communicate with each other, facilitating data
exchange and coordination. A critical aspect of CAN
communication is the message frame format, which defines the
structure of data transmitted over the CAN bus. This document will
delve into the various components of a CAN message frame,
providing a detailed understanding of its structure and function.
NS
by Nikhil Sapre
Previously we have completed
• The Controller area network CAN Bus
• Developed by Robert Bosch in 1986
• No Host required
• CAN bus is a broadcast type of bus
• Message Based Protocol
• Serial Half-duplex Asynchronous Communication
• Differential Two Wired Communication
• Designed Originally for Automobiles, but used in many other Contexts
• One of five Protocol used in the on-board diagnostics
Standard CAN Frame
The standard CAN frame is the most basic type of CAN message frame, designed for applications where a smaller
identifier field is sufficient. It consists of several essential fields, including the identifier (ID), data, and CRC (Cyclic
Redundancy Check).
The identifier field in a standard The data field can hold up to 8 The CRC field is a 15-bit value used
CAN frame uses 11 bits to bytes of data, providing flexibility for error detection, ensuring the
distinguish between different for transmitting various types of integrity of the transmitted data.
messages. It allows the receiving information.
ECUs to filter and process only
relevant messages.
4 bits are available in DLC to configure number of bytes required in a particular message frame
Extended CAN Frame
For applications requiring a larger address space, the extended CAN frame format provides a 29-bit identifier. The extended frame
format allows for a greater number of unique messages, accommodating complex systems with a larger number of ECUs.
Data Request
A remote frame requests data from another ECU.
Data Transmission
A data frame carries data for transmission.
Identifier (ID) Field
The identifier (ID) field is a crucial component of a CAN message
frame. It serves as a unique address that differentiates between
various messages transmitted over the CAN bus. The ID field is
used by receiving ECUs to filter and prioritize incoming messages,
ensuring that only relevant data is processed. This selective
processing is essential for efficient communication in complex
systems where multiple ECUs are exchanging data.
Type Description
Diagnostic Information
Status information, error codes, and system health data.
Cyclic Redundancy Check
(CRC) Field
The Cyclic Redundancy Check (CRC) field is a crucial part of the CAN message frame,
ensuring the integrity of the transmitted data. The CRC field is a 15-bit value calculated
based on the data field and other parts of the frame. This value is appended to the
message before transmission. When the receiving ECU receives the message, it
recalculates the CRC based on the received data. If the calculated CRC matches the
received CRC, the data is deemed error-free. The CRC mechanism provides a robust method
for detecting errors that may occur during transmission, enhancing the reliability of CAN
communication.
1 Calculation
The CRC code is calculated based on the data field and other parts of the frame.
2 Appending
The CRC code is appended to the message before transmission.
3 Verification
The receiving ECU recalculates the CRC and compares it to the received CRC.
Acknowledgment (ACK) Fiel
The Acknowledgment (ACK) field is a single bit in the CAN message frame
that is used to indicate successful reception of a message. When a
receiving ECU receives a message successfully, it will set the ACK bit to 1,
signifying a successful transmission. This mechanism provides a simple
and effective way to confirm that the message has been received correctly.
The ACK field is an important part of the CAN protocol, ensuring that
messages are delivered reliably and efficiently.
3 Reliability Enhancement
The ACK mechanism contributes to the reliability and efficiency of
CAN communication.