Home Learning Paths ECU Lab Assessments Interview Preparation Arena Pricing Log In Sign Up

Frame Anatomy: Fields and Bit Counts

CAN 2.0B Standard Frame (11-bit ID)
  SOF  Arbitration Field    Control   Data (0-8B)  CRC      ACK  EOF  IFS
   1    ID[10:0] RTR IDE r0  DLC[3:0]  0-64 bits    15+DEL   2    7    3
   |    |                |   |         |             |        |    |    |
   1b   11b+1b+1b+1b   4b   0-64b    16b          2b   7b  3b
   ─────────────────────────────────────────────────────────────────────
   Total: 47 bits (no data) to 111 bits (8 bytes data)
   At 1 Mbps: 47-111 µs per frame before bit stuffing

   Extended Frame (29-bit ID) adds:
   SRR(1) + IDE(1) + ID[17:0](18) = 20 extra bits in arbitration field
   → total 67-131 bits before stuffing
FieldBitsValue / Notes
SOF (Start of Frame)1Always dominant (0) — synchronises all nodes
Base ID (standard)11Unique message identifier; 0x000 = highest priority
RTR (Remote Transmission Request)10 = data frame; 1 = remote frame (no payload)
IDE (Identifier Extension)10 = standard 11-bit; 1 = extended 29-bit
r0 (reserved)1Must be dominant (0)
DLC (Data Length Code)40–8 = number of data bytes
Data Field0–640–8 bytes payload
CRC15+115-bit CRC + recessive delimiter
ACK Slot + Delimiter2Any receiver drives dominant in ACK slot
EOF (End of Frame)77 recessive bits
IFS (Intermission)33 recessive bits between frames

NRZ Encoding and Bit Stuffing

CAN uses NRZ (Non-Return-to-Zero) encoding — the signal level holds for the full bit time, providing no automatic edge for clock recovery. To guarantee receiver synchronisation, bit stuffing adds a complementary bit after every 5 consecutive same-polarity bits in the SOF-through-CRC region.

Bit Stuffing Example
  Original data: 1 1 1 1 1 0 0 0 0 0  (5 ones, 5 zeros)
  After stuffing: 1 1 1 1 1 [0] 0 0 0 0 0 [1]
                              ^               ^
                        stuff bit          stuff bit
                    (complementary)    (complementary)

  Receiver strips stuff bits automatically.
  More than 5 consecutive same-level bits outside EOF/IFS:
    → Stuff Error detected
    → Node transmits Active Error Flag (6 dominant bits)
ConditionResult
5 consecutive dominant bits (in data/CRC)Insert 1 recessive stuff bit
5 consecutive recessive bits (in data/CRC)Insert 1 dominant stuff bit
6+ consecutive same bits detected by receiverStuff Error → Active Error Flag transmitted
Fixed-format fields (EOF, IFS, CRC delimiter)No bit stuffing applied — violations = Frame Check Error

Dominant/Recessive and Physical Layer

CAN Bus Differential Signal (ISO 11898-2)
  CANH ─────┐   ┌─────────────┐   ┌──── (2.5 + 1.0 = 3.5 V)
             │   │             │   │
  ─────────── ─── ─────────────────── CANH (recessive: 2.5 V)
  ─────────── ─── ─────────────────── CANL (recessive: 2.5 V)
             │   │             │   │
  CANL ─────┘   └─────────────┘   └──── (2.5 - 1.0 = 1.5 V)

  Dominant:   CANH-CANL differential ≥ 1.5 V  → logic 0
  Recessive:  CANH-CANL differential ≤ 0.5 V  → logic 1
  Wired-AND:  any transmitter driving dominant overrides all recessive transmitters
ParameterValueNote
Bus topologySingle wire pair (twisted pair)120 Ω termination at each end
Max bus length at 1 Mbps~40 mPropagation delay constraint
Max bus length at 125 kbps~500 mBody networks
Max nodes per segment~30Input capacitance limit
Termination120 Ω at each bus endSplit termination (60Ω + 4.7nF) for EMC

Frame Types and State Machine Transitions

Frame TypeRTRIDEDLCPurpose
Data frame00 or 10–8Normal data transmission — most common
Remote frame10 or 10–8Request another node to send its data frame (same ID)
Error frame6-bit Error Flag + 8-bit echo; transmitted on any error detection
Overload frameReceiver requests delay before next frame (rare)

⚠️ Remote Frames Avoided in Production

Remote frames (RTR=1) cause two nodes to compete for transmission of the same CAN ID — the requester sends the remote frame, the provider responds with a data frame of the same ID. This creates priority inversion and timing unpredictability. Modern automotive systems use periodic cyclic transmission instead; remote frames are explicitly prohibited in many OEM CAN communication matrices.

Summary

A CAN 2.0 data frame is 47–111 bits (standard ID) of which up to 20% are overhead (SOF, control, CRC, ACK, EOF, IFS). Bit stuffing adds overhead in the worst case (alternating bits produce no stuffing; maximum run data maximises stuffing). The wired-AND physical layer means dominant bits always win — the foundation of the collision-free arbitration mechanism.

🔬 Deep Dive — Core Concepts Expanded

This section builds on the foundational concepts covered above with additional technical depth, edge cases, and configuration nuances that separate competent engineers from experts. When working on production ECU projects, the details covered here are the ones most commonly responsible for integration delays and late-phase defects.

Key principles to reinforce:

  • Configuration over coding: In AUTOSAR and automotive middleware environments, correctness is largely determined by ARXML configuration, not application code. A correctly implemented algorithm can produce wrong results due to a single misconfigured parameter.
  • Traceability as a first-class concern: Every configuration decision should be traceable to a requirement, safety goal, or architecture decision. Undocumented configuration choices are a common source of regression defects when ECUs are updated.
  • Cross-module dependencies: In tightly integrated automotive software stacks, changing one module's configuration often requires corresponding updates in dependent modules. Always perform a dependency impact analysis before submitting configuration changes.

🏭 How This Topic Appears in Production Projects

  • Project integration phase: The concepts covered in this lesson are most commonly encountered during ECU integration testing — when multiple software components from different teams are combined for the first time. Issues that were invisible in unit tests frequently surface at this stage.
  • Supplier/OEM interface: This is a topic that frequently appears in technical discussions between Tier-1 ECU suppliers and OEM system integrators. Engineers who can speak fluently about these details earn credibility and are often brought into critical design review meetings.
  • Automotive tool ecosystem: Vector CANoe/CANalyzer, dSPACE tools, and ETAS INCA are the standard tools used to validate and measure the correct behaviour of the systems described in this lesson. Familiarity with these tools alongside the conceptual knowledge dramatically accelerates debugging in real projects.

⚠️ Common Mistakes and How to Avoid Them

  1. Assuming default configuration is correct: Automotive software tools ship with default configurations that are designed to compile and link, not to meet project-specific requirements. Every configuration parameter needs to be consciously set. 'It compiled' is not the same as 'it is correctly configured'.
  2. Skipping documentation of configuration rationale: In a 3-year ECU project with team turnover, undocumented configuration choices become tribal knowledge that disappears when engineers leave. Document why a parameter is set to a specific value, not just what it is set to.
  3. Testing only the happy path: Automotive ECUs must behave correctly under fault conditions, voltage variations, and communication errors. Always test the error handling paths as rigorously as the nominal operation. Many production escapes originate in untested error branches.
  4. Version mismatches between teams: In a multi-team project, the BSW team, SWC team, and system integration team may use different versions of the same ARXML file. Version management of all ARXML files in a shared repository is mandatory, not optional.

📊 Industry Note

Engineers who master both the theoretical concepts and the practical toolchain skills covered in this course are among the most sought-after professionals in the automotive software industry. The combination of AUTOSAR standards knowledge, safety engineering understanding, and hands-on configuration experience commands premium salaries at OEMs and Tier-1 suppliers globally.

Next →Arbitration, Priority & Bus Access