Explain the CAN frame format. What is the purpose of each field?
A standard CAN 2.0A data frame consists of seven fields, each serving a specific purpose:
Start of Frame (SOF) — a single dominant (0) bit that marks the beginning of a frame. All nodes synchronize their bit timing on the falling edge of SOF.
Arbitration Field — the 11-bit message identifier (standard CAN) or 29-bit identifier (extended CAN 2.0B), followed by the RTR (Remote Transmission Request) bit. The identifier determines both the message's content and its priority during arbitration. Lower identifier values have higher priority because dominant (0) bits override recessive (1) bits.
Control Field — includes the IDE bit (standard vs. extended frame), a reserved bit, and the 4-bit DLC (Data Length Code) specifying the number of data bytes (0-8).
Data Field — 0 to 8 bytes of payload. The content and meaning are defined by the application protocol (CANopen, J1939, etc.), not by CAN itself.
CRC Field — a 15-bit CRC computed over all preceding fields (SOF through data), followed by a CRC delimiter (recessive bit). This catches transmission errors with extremely high probability — the Hamming distance of 6 means any 5 or fewer bit errors are guaranteed to be detected.
ACK Field — the transmitter sends a recessive bit; any receiver that has successfully received the frame pulls the ACK slot dominant. If the transmitter reads the ACK slot as recessive, no node acknowledged the frame, indicating either no receivers are on the bus or all receivers detected an error.
End of Frame (EOF) — seven recessive bits that mark the end of the frame, followed by a 3-bit inter-frame space (IFS) before the next frame can begin.
A common interview follow-up: "What is the maximum frame length?" For a standard frame with 8 data bytes, the fixed fields total 47 bits. With worst-case bit stuffing (a stuff bit every 5 bits), the total is approximately 130 bits, giving a maximum frame rate of about 7700 frames/second at 1 Mbit/s.
Source: CAN Q&A
