Search topics...
CANArbitrationfoundational

Walk through CAN arbitration with a concrete bit-by-bit example.

0 upvotes
Practice with AISoon
Study the fundamentals first — CAN topic page

CAN uses CSMA/CR (Carrier Sense Multiple Access with Collision Resolution) — nodes listen for an idle bus, then begin transmitting simultaneously. Arbitration happens non-destructively on the identifier field, exploiting the physical property that a dominant bit (0) always overrides a recessive bit (1) on the open-collector/open-drain bus.

Consider three nodes transmitting simultaneously:

  • Node A: ID = 0x64A = 0b110 0100 1010
  • Node B: ID = 0x649 = 0b110 0100 1001
  • Node C: ID = 0x658 = 0b110 0101 1000

Bit-by-bit (MSB first, bit 10 down to bit 0):

BitA sendsB sendsC sendsBusResult
101111All match — continue
91111All match — continue
80000All match — continue
70000All match — continue
61111All match — continue
50000All match — continue
40010C loses — C sent 1 (recessive) but read 0 (dominant). C stops transmitting.
3111A and B match — continue
2000A and B match — continue
1100A loses — A sent 1 but read 0. A stops.
011B wins — sole remaining transmitter

Node B has the lowest identifier (0x649) and wins arbitration. Its frame is transmitted without any corruption or delay. Nodes A and C become receivers and retry their transmissions after the bus returns to idle. The key insight: lower ID = higher priority, and the winning node never even knows that arbitration occurred — from its perspective, every bit it sent appeared correctly on the bus.

This is why message identifiers in CAN are not arbitrary — they must be carefully assigned based on the priority requirements of each message. Safety-critical messages (brake commands, airbag triggers) are assigned the lowest IDs.

Source: CAN Q&A