askvity

CAN Frame Size in Bytes?

Published in CAN Protocol 3 mins read

Understanding the size of a CAN (Controller Area Network) frame involves looking at its different components, particularly the data payload it can carry. Based on the provided information, the focus is on the data section within the frame.

A standard CAN message or frame is composed of several parts, including an identifier (ID), control fields, data, Cyclic Redundancy Check (CRC), an acknowledge slot (ACK), and other overhead bits like Start of Frame (SOF), End of Frame (EOF), and Interframe Space (IFS).

The provided reference specifically states the size limit for the data section:

  • A standard CAN frame can contain up to eight data bytes.
  • The improved CAN FD (Flexible Data-Rate) extends the length of the data section to up to 64 bytes per frame.

While the data payload is a significant part of the frame, it's important to note that the total size of a CAN frame on the bus is larger, encompassing the ID, control information, CRC, ACK, and other overhead, as mentioned in the reference: "A CRC, acknowledge slot [ACK] and other overhead are also part of the message." The exact total size in bytes for a CAN frame varies depending on the data length and the number of stuff bits inserted for synchronization, and is typically described in bits rather than a fixed number of bytes for the entire frame structure.

Data Payload Size Limits

Here's a breakdown of the maximum data payload size for different CAN versions as highlighted by the reference:

  • Standard CAN: Up to 8 bytes
  • CAN FD: Up to 64 bytes

This data section is where the actual application data is transmitted. The variable data length allows for efficient use of the bus bandwidth, transmitting only the necessary amount of data for each message.

Summary of Data Length

CAN Type Maximum Data Payload Size Reference Detail
Standard CAN 8 bytes "...up to eight data bytes..."
CAN FD 64 bytes "The improved CAN FD extends the length of the data section to up to 64 bytes"

Keep in mind that these sizes refer specifically to the data field within the CAN frame. The total frame size, including all overhead fields, is larger and more complex to state as a fixed byte count due to its bit-oriented nature and the inclusion of stuff bits.

Related Articles