Topics / Communication Protocols / Q21
How does CAN arbitration work?
Short answer: CAN is a multi-controller bus with non-destructive bitwise arbitration. All nodes that want to send start at the same time and transmit their identifier bit by bit while reading the bus. A dominant bit (0) overwrites a recessive bit (1). A node that sends recessive but reads dominant knows a higher-priority frame is on the bus, stops transmitting immediately and becomes a receiver. The frame with the lowest identifier wins and continues without delay or corruption; losers retry automatically when the bus is free.
Example
Node A ID 0x123 = 001 0010 0011
Node B ID 0x0F5 = 000 1111 0101
Bit 2 (from MSB): A sends 1 (recessive), B sends 0 (dominant) → bus = 0
A reads 0 ≠ 1 → A loses; B's frame continues uninterrupted
Consequences for system design
- IDs are priorities: assign low IDs to urgent messages (brake, airbag, engine torque).
- The highest-priority message has bounded latency (one frame time for the frame in progress plus its own), which allows schedulability analysis of CAN networks (like RTA for tasks).
- Two nodes must never send data frames with the same ID at the same time (arbitration would not resolve it and errors follow), so each ID has one owner.
- Standard frames win over extended frames with the same 11-bit base ID (the IDE bit is dominant for standard frames).
Physical requirement: arbitration needs every node to see every bit within the bit time, which limits bus length vs bit rate (about 40 m at 1 Mbps, 500 m at 125 kbps).