CAN Frame Types & Structure
The Four CAN Frame Types
| Frame Type | Purpose | Frequency in Practice |
|---|
| Data Frame | Carries application data (0–8 bytes) | ~99% of all bus traffic |
| Remote Frame | Requests data from another node | Rarely used in automotive |
| Error Frame | Signals a detected error to all nodes | Only during fault conditions |
| Overload Frame | Requests extra delay between frames | Extremely rare |
CAN 2.0B Data Frame Structure
| Field | Bits | Description |
|---|
| SOF | 1 | Always dominant (0). Start of frame. |
| Arbitration Field | 12 or 32 | 11-bit or 29-bit identifier + RTR bit |
| Control Field | 6 | IDE bit, reserved bit, and DLC (4 bits) |
| Data Field | 0–64 | Payload: 0 to 8 bytes |
| CRC Field | 16 | 15-bit CRC + delimiter |
| ACK Field | 2 | ACK slot + delimiter |
| EOF | 7 | Seven 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 Data | After Stuffing | Stuff Bits Inserted |
|---|
| 11111000 | 111110000... | One '0' after five '1's |
| 00000111 | 000001111... | One '1' after five '0's |
| 10101010 | 10101010 | None 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.