CAN Bus Timing Configuration

CAN Bit Timing Calculator

Use this CAN Bit Timing Calculator to find practical CAN bus timing configurations from the controller clock and target bitrate. Calculate the bit rate prescaler, TSEG1, TSEG2, SJW, time quantum, total time quanta, sample point, actual CAN bitrate and bitrate error.

✓ BRP ✓ TSEG1 / TSEG2 ✓ Sample Point ✓ SJW ✓ Bitrate Error
TQ
Find CAN Bit Timing
● Ready
Frequency supplied to the CAN timing logic, in MHz.
Enter the desired nominal bitrate in kbit/s.
Target sample point as a percentage of one CAN bit.
Configurations outside this bitrate error are excluded.
Hardware timing limits vary between CAN controllers.
SJW must fit within both the controller limit and TSEG2.
Generic Classical CAN profile: BRP 1–1024, TSEG1 1–16 TQ, TSEG2 1–8 TQ and SJW 1–4 TQ. Always verify the final values against the datasheet for your CAN controller.
Best CAN Bit Timing Best Match
Actual CAN Bitrate
BRP
Total TQ / Bit
TSEG1
TSEG2
SJW
Sample Point
Time Quantum
Bitrate Error
SYNC
TSEG1
TSEG2
Top Timing Alternatives
# BRP TQ TSEG1 TSEG2 SJW Sample Point Bitrate Error

What Is a CAN Bit Timing Calculator?

A CAN Bit Timing Calculator determines the timing parameters required by a Controller Area Network controller to achieve a desired nominal bus bitrate. A CAN controller does not normally receive a setting such as “500 kbit/s” alone. Its hardware uses a clock divider and a number of time segments to construct each transmitted and received bit.

The important parameters commonly include the Bit Rate Prescaler (BRP), Time Segment 1 (TSEG1), Time Segment 2 (TSEG2), Synchronization Jump Width (SJW), the number of time quanta per bit, and the resulting sample point.

This calculator searches combinations that fit the selected controller timing limits and ranks them according to bitrate accuracy and closeness to the desired sample point.

How to Use the CAN Bit Timing Calculator

Enter the CAN controller clock

Use the frequency actually supplied to the CAN timing logic, not automatically the CPU frequency.

Enter the target CAN bitrate

Examples include 125, 250, 500 and 1000 kbit/s.

Choose a sample point

Enter the desired percentage of the bit time at which the controller should sample the bus.

Select the controller profile

The profile defines the search ranges for BRP, TSEG1, TSEG2 and SJW.

Find the timing

The calculator searches possible combinations and ranks the best solutions.

CAN Bit Timing Formula

A CAN bit is divided into time quanta. In the simplified functional timing model used by this calculator:

Time quantum: tq = BRP / CAN clock Number of time quanta in one bit: N_TQ = 1 + TSEG1 + TSEG2 CAN bitrate: bitrate = CAN clock / (BRP × N_TQ)

The additional one time quantum represents the synchronization segment at the start of every bit.

What Is a CAN Time Quantum?

The time quantum, usually abbreviated TQ or tq, is the basic timing unit from which a CAN controller constructs one bit period.

The CAN clock is divided by the bit-rate prescaler. The resulting time quantum is then repeated for the synchronization segment, TSEG1, and TSEG2.

For a 16 MHz CAN clock and BRP = 2: tq = 2 / 16,000,000 = 125 ns If one bit contains 16 time quanta: bit time = 16 × 125 ns = 2 µs Therefore: bitrate = 1 / 2 µs = 500 kbit/s

CAN Sample Point Formula

CAN receivers sample the bus near the boundary between TSEG1 and TSEG2. Using functional timing values, the sample point is:

Sample Point = (1 + TSEG1) / (1 + TSEG1 + TSEG2) × 100%

The synchronization segment is included before TSEG1, so the numerator contains one additional time quantum.

500 kbit/s CAN Timing Example

Suppose the controller timing clock is 16 MHz and the target nominal bitrate is 500 kbit/s with an 87.5% sample point.

One exact solution is: Clock = 16 MHz Target = 500 kbit/s BRP = 2 Total TQ = 16 Sync Segment = 1 TQ TSEG1 = 13 TQ TSEG2 = 2 TQ Bitrate: 16 MHz / (2 × 16) = 500,000 bit/s Sample point: (1 + 13) / 16 = 87.5%

What Are TSEG1 and TSEG2?

TSEG1

The programmable timing region before the sample point. Many CAN controllers represent propagation and Phase Segment 1 together as TSEG1.

TSEG2

The programmable timing region after the sample point. It corresponds to the second phase segment in common CAN timing terminology.

Bosch M_CAN documentation explicitly defines nominal TSEG1 as the combination of Prop_Seg and Phase_Seg1, while TSEG2 represents Phase_Seg2.

What Is CAN SJW?

SJW means Synchronization Jump Width. It limits how much a CAN controller may lengthen or shorten a bit segment during resynchronization.

The usable SJW range is controller-specific, and SJW must be compatible with the phase timing. This calculator prevents the suggested SJW from exceeding TSEG2 or the selected controller-profile limit.

If you have a required SJW from the ECU, transceiver, network design, or controller datasheet, use that value instead of treating a generic suggestion as universal.

What Does BRP Mean in CAN?

BRP stands for Bit Rate Prescaler. It divides the CAN controller timing clock to create the duration of one time quantum.

An important implementation detail is that CAN controller registers often use encoded values. For example, a register field of zero may represent a functional prescaler of one, while a programmed register value of one may represent a functional prescaler of two.

This calculator displays functional timing values. Before writing hardware registers, convert them according to your controller’s datasheet.

Bosch M_CAN Bit Timing

Bosch M_CAN provides a wide nominal timing range. In functional terms, its nominal prescaler can range from 1 to 512 clock periods, while the programmable timing segments provide substantially larger ranges than many older Classical CAN controllers.

The M_CAN documentation states that the nominal bit time is formed from the synchronization segment plus the programmable segments before and after the sample point.

For M_CAN register programming, remember that several register fields are encoded as: functional value = register value + 1 For example: functional BRP = NBRP + 1

CAN Controller Limits Matter

There is no single universal set of BRP and timing-segment limits for every CAN controller. Older controllers may allow relatively small TSEG1, TSEG2 and SJW ranges, while newer CAN/CAN FD IP blocks may support much larger values.

Profile BRP TSEG1 TSEG2 SJW
Generic Classical CAN search 1–1024 1–16 1–8 1–4
Bosch M_CAN nominal 1–512 2–256 2–128 1–128

The generic profile is a search convenience rather than a promise that every controller supports every displayed value. Always verify hardware limits.

What Is CAN Bitrate Error?

A requested bitrate may not always be exactly obtainable from a particular CAN clock and the available integer timing values.

The calculator reports: bitrate error = |actual bitrate – target bitrate| / target bitrate × 100%

An exact zero-error configuration is preferable whenever the controller clock allows one. If an exact configuration is unavailable, acceptable tolerance depends on the complete CAN network timing budget.

Why the Sample Point Matters

The sample point determines how far into a CAN bit the receiver waits before deciding whether the bus is recessive or dominant. Moving it later provides more time before sampling for propagation through the bus, transceivers and nodes.

However, a later sample point leaves a smaller TSEG2 interval after sampling. The best setting therefore depends on bitrate, oscillator tolerance, physical network length, transceiver delays and controller restrictions.

Typical CAN Bitrates

Bitrate Bit Time Common Context
10 kbit/s 100 µs Very low-speed CAN applications
50 kbit/s 20 µs Lower-speed networks
125 kbit/s 8 µs Industrial and automotive CAN
250 kbit/s 4 µs Common CAN network bitrate
500 kbit/s 2 µs Very common Classical CAN bitrate
1 Mbit/s 1 µs Upper Classical CAN nominal bitrate commonly encountered

CAN Clock Frequency vs CPU Clock

Do not automatically enter the microcontroller’s CPU frequency. The CAN peripheral may receive its clock through a peripheral clock tree, PLL, divider, oscillator source or dedicated CAN clock.

For example, a processor running at 160 MHz could still supply an 80 MHz, 40 MHz or another frequency to its CAN peripheral. The timing calculation must use the frequency seen by the CAN bit timing logic.

Why Two CAN Nodes Can Use Different Timing Values

Two CAN nodes do not necessarily need identical BRP and time-segment register values. Different microcontrollers can have different clock frequencies and different CAN controller implementations.

What matters is that the resulting nominal bit rate and network timing are compatible. A 16 MHz controller and an 80 MHz controller can communicate at 500 kbit/s using different internal timing configurations.

CAN Bit Timing vs CAN FD Data Timing

CAN FD can use separate timing for the nominal arbitration phase and the faster data phase. Modern CAN FD controllers therefore commonly expose a nominal bit timing configuration and a separate data bit timing configuration.

This page is focused on the nominal CAN bit timing problem: finding BRP, TSEG1, TSEG2, SJW and sample point for a requested CAN bitrate. It does not duplicate a separate CAN FD data-phase timing calculator.

Common CAN Bit Timing Mistakes

Using the CPU Clock

The CAN peripheral clock may differ from the processor core frequency.

Forgetting Sync Segment

Total time quanta include the one-TQ synchronization segment.

Using Register Values Directly

Many CAN registers store values one less than their functional timing value.

Ignoring Sample Point

Two configurations with the same bitrate can place the sample point differently.

Ignoring Controller Limits

A mathematically valid timing combination may not be supported by a particular controller.

Choosing Excessive SJW

SJW must fit within the permitted phase segment and hardware range.

CAN Bit Timing Calculator FAQs

How do I calculate CAN bitrate?
Using functional timing values, CAN bitrate is the CAN timing clock divided by BRP multiplied by the total number of time quanta in one bit.
How many time quanta are in one CAN bit?
Total TQ equals one synchronization time quantum plus TSEG1 plus TSEG2.
How is the CAN sample point calculated?
Sample point percentage is (1 + TSEG1) divided by (1 + TSEG1 + TSEG2), multiplied by 100.
What is BRP in CAN?
BRP is the Bit Rate Prescaler used to divide the CAN controller timing clock and create the time quantum.
What is TSEG1?
TSEG1 is the programmable timing portion before the sample point and commonly represents Prop_Seg plus Phase_Seg1.
What is TSEG2?
TSEG2 is the timing portion after the sample point and corresponds to the second phase segment.
What is CAN SJW?
SJW is Synchronization Jump Width, which limits the amount of timing adjustment that can be applied during resynchronization.
What is the CAN time quantum?
The time quantum is the basic CAN timing interval created by dividing the controller timing clock according to the bit-rate prescaler.
What is the bit time at 500 kbit/s?
The bit period is 2 microseconds because 1 / 500,000 equals 2 µs.
What is the bit time at 1 Mbit/s?
One bit lasts 1 microsecond at exactly 1 Mbit/s.
Is 87.5% always the best CAN sample point?
No. The correct sample point depends on bitrate, physical network delays, oscillator tolerance and controller requirements.
Can two timing settings produce the same CAN bitrate?
Yes. Different BRP and TQ combinations can generate the same nominal bitrate while producing different time-quantum lengths and sample points.
Why does the calculator show multiple results?
A clock and target bitrate often allow several valid integer timing configurations. The calculator ranks them by bitrate error and closeness to the requested sample point.
Why must I check my CAN controller datasheet?
BRP, TSEG1, TSEG2, SJW and register encoding limits vary between controller implementations.
Does this calculate CAN FD data-phase timing?
No. This page focuses on nominal CAN timing. CAN FD data-phase timing has its own controller-specific parameters and constraints.
Does the calculator display register values?
It displays functional timing values. Many CAN controllers encode register fields as functional value minus one, so consult your datasheet before writing hardware registers.

Find CAN Bus Timing Parameters

Enter the controller clock, target bitrate and preferred sample point to find BRP, time quanta, TSEG1, TSEG2, SJW and actual CAN bitrate configurations directly in your browser.

Scroll to Top