Skip to content
RFrftools.io
Comms

CAN Bus Bit Timing Calculator

Calculate CAN bus bit timing parameters including prescaler, time quanta, sync segment, propagation segment, and phase buffer segments for a given baud rate and sample point

Loading calculator...

Formula

tq=1/(fclk/BRP);NBT=SS+PROP+BS1+BS2tq = 1/(f_clk/BRP); NBT = SS + PROP + BS1 + BS2
tqTime quantum (ns)
BRPBaud rate prescaler
NBTNominal bit time in TQ (tq)
SSSync segment (1 tq) (tq)
BS1Phase buffer segment 1 (tq)
BS2Phase buffer segment 2 (tq)

How It Works

This calculator determines CAN bus bit timing parameters for automotive and industrial networks. Embedded engineers and automotive system designers use it to configure CAN controllers per ISO 11898-1 (CAN 2.0) and ISO 11898-2 (high-speed physical layer) specifications. The bit time is divided into 4 segments: Sync_Seg (always 1 TQ), Prop_Seg (1-8 TQ for propagation delay compensation), Phase_Seg1 (1-8 TQ), and Phase_Seg2 (1-8 TQ). The sample point, where the bus level is read, should be positioned at 75-87.5% of the bit time per ISO 11898-1:2015 Section 11.3.1.1 (Road vehicles — Controller area network — Part 1: Data link layer and physical signalling) and ISO 11898-2:2016 (Physical medium attachment layer). CAN FD timing is specified in ISO 11898-1:2015 Amendment 1. For a 500 kbps network (the most common automotive rate), bit time is 2 microseconds. With an 80 MHz clock and 8-16 time quanta per bit, achievable prescaler values range from 10-20. CAN FD extends speeds to 2-8 Mbps in the data phase, requiring sample points of 70-80% and tighter oscillator tolerance (0.1% versus 0.5% for classic CAN).

Worked Example

An automotive body control module requires CAN communication at 500 kbps using an S32K144 microcontroller with 80 MHz CAN clock. Per ISO 11898-1 timing requirements: Bit time = 1/500000 = 2 microseconds. Target 16 TQ per bit for fine adjustment. Time quantum = 2 us / 16 = 125 ns. Prescaler = 80 MHz x 125 ns = 10. Segment allocation for 87.5% sample point: Sync_Seg = 1 TQ, Prop_Seg = 5 TQ, Phase_Seg1 = 8 TQ, Phase_Seg2 = 2 TQ. Sample point = (1 + 5 + 8) / 16 = 87.5%. SJW (Synchronization Jump Width) = min(Phase_Seg1, Phase_Seg2, 4) = 2 TQ, allowing resynchronization of +/-250 ns per bit. This configuration supports networks up to 100 meters with 5 ns/m propagation delay.

Practical Tips

  • Per ISO 11898-2, use 87.5% sample point for networks under 40 meters, reduce to 75% for networks 40-500 meters to accommodate propagation delay
  • Set SJW (Synchronization Jump Width) to the maximum allowed value (typically 1-4 TQ) to tolerate oscillator drift up to 1.58% per Bosch CAN specification
  • For CAN FD at 2 Mbps data phase, use transceiver propagation delay <150 ns (TJA1042 family) and keep stub lengths under 30 cm

Common Mistakes

  • Using mismatched bit timing between nodes - even 1 TQ difference causes sample point mismatch, increasing error frames by 10-50x on bus lengths >20 meters
  • Setting sample point above 90%, which violates ISO 11898-1 and causes 5-15% error rate on multi-node networks due to insufficient Phase_Seg2
  • Neglecting oscillator tolerance - ceramic resonators (0.5% accuracy) fail at cable lengths >50 meters while crystals (20 ppm) support the full 1 km range

Frequently Asked Questions

ISO 11898 defines rates from 10 kbps to 1 Mbps. Automotive uses 500 kbps (powertrain CAN) and 125 kbps (body CAN). Industrial networks use 250 kbps (DeviceNet) and 125 kbps (CANopen). CAN FD extends data phase to 2-8 Mbps while arbitration remains at 500 kbps.
Time quantum (TQ) is the smallest timing unit, derived from CAN clock via prescaler: TQ = Prescaler / f_CAN. Each bit contains 8-25 TQ (typically 16 for optimal adjustment). With 80 MHz clock, prescaler=10 gives TQ=125 ns, yielding 2 us bit time (500 kbps) with 16 TQ.
Per ISO 11898-1, all nodes must sample the bus at consistent points to read the same bit value. A sample point at 87.5% provides 12.5% margin for signal settling after propagation. Too early (75%) wastes margin; too late (>90%) risks sampling during bit transition, causing 100% arbitration failures.

Shop Components

As an Amazon Associate we earn from qualifying purchases.

USB-UART Adapter

USB to serial adapter for protocol debugging and flashing

USB Logic Analyzer

8-channel USB logic analyzer for capturing digital bus traffic

Related Calculators