Skip to content

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

ISO 11898-1 bit segments and clock tolerance · prescaler closest to the bit rateAPI slug can-bus-timing

Sign in to saveSave

Inputs

Example
Microcontroller peripheral clock frequency feeding the CAN controller

1 MHz or more

Target CAN bus baud rate

1 kbps or more

Sample point position as percentage of bit time (CiA 601 recommends 75–87.5%)
%

50 to 95 %

How far a resynchronisation may move the sample point; a wider jump lets the bus take a looser clock, up to the length of either phase segment
tq

1 to 4 tq

Bit Rate ErrorPASS
0.00%
budget ±0.313 %
Prescaler
6
Actual Bit Rate
500kbps
Time Quantum (TQ)
125ns
Nominal Bit Time
16tq

One bit in time quanta

CANSYNCPROPPHASE1PHASE21 tq6 tq7 tq2 tqtqtq 125 nsSP 1.75 µsbit 2 µs0 s500 ns1 µs1.5 µs2 µs

sample point · Actual Sample Point SPset 87.5 %

Standard values of CAN Baud Rate

Select a row to use it
CAN Baud RatePrescalerNominal Bit TimeBit Rate ErrorStatus
30016tq0.00%PASS
15016tq0.00%PASS
6016tq0.00%PASS
2416tq0.00%PASS
1216tq0.00%PASS
616tq0.00%PASS
415tq0.00%PASS
316tq0.00%PASS
Sync SegmentSS
1tq
Propagation SegmentPROP
6tq
Phase Buffer 1 (BS1)BS1
7tq
Phase Buffer 2 (BS2)BS2
2tq
Clock Tolerance AllowedΔf
0.313%

Formula

tq=1/(fclk/BRP),NBT=SS+PROP+BS1+BS2tq = 1/(f_{clk}/\mathrm{BRP}),\quad \mathrm{NBT} = SS + \mathrm{PROP} + BS1 + BS2
SymbolQuantityYour value
tqTime quantum (ns)125 ns
BRPBaud rate prescaler6
NBTNominal bit time in TQ (tq)16 tq
SSSync segment (1 tq) (tq)1 tq
BS1Phase buffer segment 1 (tq)7 tq
BS2Phase buffer segment 2 (tq)2 tq

Assumptions

5 items
  1. 01A bit holds 8 to 25 time quanta (CAN 2.0, part B, section 8): a sync segment of one quantum, then the propagation segment and phase 1, which share the quanta before the sample point (propagation the smaller half), and phase 2 after it. The quantum is the prescaler over the clock.
  2. 02The prescaler and quanta are, of every bit of 8 to 25 quanta with the prescaler on either side of the one it calls for, the closest to the bit rate; then the sample point nearest the one asked for (CiA 601-3); then nearest 16 quanta; then the smallest prescaler. A controller's register range (a ten-bit prescaler on bxCAN) is not checked.
  3. 03The sample point lies at the nearest whole quantum to the percentage asked for, a half up, and at the latest a quantum before the end of the bit, so phase 2 always keeps a quantum and the segments add up to the bit.
  4. 04The clock tolerance allowed is ISO 11898-1's: the smaller of min(PS1, PS2)/(2·(13·NBT − PS2)) and SJW/(20·NBT), each node's deviation from nominal. The synchronisation jump width used is at most the shorter phase segment.
  5. 05The bit-rate error comes from the whole-number prescaler and quanta, and adds to the oscillator's own tolerance; the page passes it while it is within the tolerance the bit timing allows, which leaves the oscillator's share to you. Classical CAN only: no CAN FD data phase, and the bus's propagation delay (cable and transceivers) is not checked against the propagation segment.

Worked example

STM32F1 CAN at 36 MHz, 500 kbps

An STM32F1's CAN controller runs from its 36 MHz APB1 clock on a 500 kbps bus sampled at 87.5 %. Which prescaler and how many quanta, where does it really sample, and how much clock error does the timing allow?

StepExpressionResult
Quanta and prescaler36 MHz/500 kbps = 3 × 243
Time quantum3/36 MHz83.33 ns
SegmentsSYNC_SEG 1 + PROP_SEG 10 + PHASE_SEG1 10 + PHASE_SEG2 324 tq
Sample point(1 + 10 + 10)/2487.5 %
Clock tolerance allowedmin(min(10, 3)/(2 × (13 × 24 − 3)), 1/(20 × 24))0.208 %

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).

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

3 questions
What is the typical CAN Bus bit rate?

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.

How do time quanta relate to bit timing?

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.

Why is sampling point important in CAN Bus?

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 AdapterUSB to serial adapter for protocol debugging and flashingAmazon →
  • USB Logic Analyzer8-channel USB logic analyzer for capturing digital bus trafficAmazon →