CAN Frame Types & Structure

Module 3: CAN Data Link Layer40 min

CAN Frame Types & Structure

The Four CAN Frame Types

Frame TypePurposeFrequency in Practice
Data FrameCarries application data (0–8 bytes)~99% of all bus traffic
Remote FrameRequests data from another nodeRarely used in automotive
Error FrameSignals a detected error to all nodesOnly during fault conditions
Overload FrameRequests extra delay between framesExtremely rare

CAN 2.0B Data Frame Structure

FieldBitsDescription
SOF1Always dominant (0). Start of frame.
Arbitration Field12 or 3211-bit or 29-bit identifier + RTR bit
Control Field6IDE bit, reserved bit, and DLC (4 bits)
Data Field0–64Payload: 0 to 8 bytes
CRC Field1615-bit CRC + delimiter
ACK Field2ACK slot + delimiter
EOF7Seven recessive bits
Key Concept: The ACK mechanism: the transmitter sends a recessive bit in the ACK slot while reading the bus. If any receiver drives it dominant, the message was received. If it stays recessive, the transmitter flags an ACK error.

Standard vs Extended Identifiers

  • IDE = dominant (0): Standard frame with 11-bit ID (2,048 unique IDs). Most automotive CAN uses this.
  • IDE = recessive (1): Extended frame with 29-bit ID (536 million IDs). Used in J1939 and sometimes diagnostic communication.
Common Mistake: Mixing standard and extended frames on the same bus creates arbitration complications. Most automotive communication matrices use exclusively 11-bit IDs.

Bit Stuffing

After five consecutive bits of the same polarity, the transmitter inserts one bit of the opposite polarity. The receiver discards stuff bits automatically.

Original DataAfter StuffingStuff Bits Inserted
11111000111110000...One '0' after five '1's
00000111000001111...One '1' after five '0's
1010101010101010None needed
Key Concept: Bit stuffing means frame length varies with data content. Always use worst-case frame lengths when calculating bus load.
Exercise: Open a CAN trace file (.asc or .blf). Pick any data frame and identify: the message ID, DLC, and data bytes. Verify the byte count matches the DLC.