Free CAN Tools › Bit Timing Calculator
CAN / CAN FD Bit Timing Calculator
Enter your CAN clock, bit rates and target sample points to get valid prescaler, TSEG1, TSEG2 and SJW values for the nominal and CAN FD data phases — with controller register limits, a bit timing diagram, TDC guidance and a check mode for existing register values.
- Classic CAN and CAN FD – nominal and data phase together
- Controller presets – Bosch M_CAN (SAME5x, STM32 FDCAN), MCP2517FD/MCP2518FD, STM32 bxCAN, MCP2515, ESP32 TWAI
- All valid combinations, ranked by bit-rate error and sample point
- CiA 601-3 checks – same prescaler in both phases, data prescaler, sample point
- Transmitter delay compensation offset for the data phase
- Check mode – decode the bit rate and sample point of existing settings
Example
With a 40 MHz CAN clock, 500 kbit/s nominal at 80 % and 2 Mbit/s data at 75 %, the calculator recommends a prescaler of 1 in both phases. Nominal: 80 time quanta of 25 ns, TSEG1 = 63, TSEG2 = 16, SJW = 16, giving exactly 500 kbit/s at 80.0 %. Data: 20 time quanta, TSEG1 = 14, TSEG2 = 5, SJW = 5, giving exactly 2 Mbit/s at 75.0 %, with a TDC offset of 15 clock periods.
How it works
Every CAN bit is divided into time quanta (tq). One time quantum is tq = BRP / fclk, where BRP is the prescaler. A bit consists of the 1-tq synchronisation segment, TSEG1 (propagation + phase segment 1) and TSEG2 (phase segment 2):
bit rate = fclk / (BRP × (1 + TSEG1 + TSEG2)) sample point = (1 + TSEG1) / (1 + TSEG1 + TSEG2)
The calculator tries every prescaler the selected controller allows, keeps the combinations that hit the bit rate within your error limit, and chooses TSEG1/TSEG2 to land closest to the target sample point. SJW is set to the largest value allowed up to TSEG2. For CAN FD it prefers the same prescaler in both phases, as CiA 601-3 recommends. The oscillator tolerance shown for the nominal phase uses the classic Bosch conditions and is an estimate.
Frequently asked questions
Which sample point should I use?
For the nominal (arbitration) phase, about 80–87.5 % is typical (CiA 601-3 and SAE J1939 networks commonly use 80–87.5 %). For the CAN FD data phase, around 70–80 % is common. All nodes on a network should use the same sample point.
Why use the same prescaler for both phases?
CiA 601-3 recommends identical time quanta in the arbitration and data phases so that the phase switch and resynchronisation behave consistently. It also recommends a low data-phase prescaler, ideally 1 or 2, for fine timing resolution.
Why can’t my clock reach 5 Mbit/s?
The bit rate must divide the clock into a whole number of time quanta. 48 MHz / 5 Mbit/s is 9.6, so no setting is exact. CAN clocks of 20, 40 or 80 MHz divide evenly into the common CAN FD rates.
What is SJW?
The synchronisation jump width limits how far a node may lengthen or shorten a bit when it resynchronises on an edge. A larger SJW tolerates more clock deviation; it can never exceed TSEG2 (phase segment 2).
What is transmitter delay compensation (TDC)?
At high data rates the round trip through the transceiver becomes a large part of the bit time, so the transmitter checks its own bits at a secondary sample point delayed by the measured loop delay plus an offset. TDC is usually needed above 1 Mbit/s; a common offset equals the data sample point, DBRP × (DTSEG1 + 1).
Do I enter the register value or the actual value?
The calculator shows actual time quanta. Most controllers store each field as value − 1; the register column shows the value to write for the selected controller. Always confirm field widths in your device reference manual.
Related free CAN tools
Estimate bus utilisation from a message schedule, a DBC file or a recorded log — Classic CAN, CAN FD and BRS.ΩTermination & Electrical Calculator
Interpret CAN_H/CAN_L resistance and voltages, calculate parallel and split termination, and estimate bus and stub length.0xHex / Decimal / Binary Converter
Convert numbers, CAN IDs and payload bytes between hex, decimal and binary — with J1939 PGN decoding.~CAN Signal Generator
Generate simulated CAN / CAN FD traffic from sine, ramp, counter and step waveforms — export ASC, TRC, candump or CSV.
See all free CAN tools.
Built by SeRoSys Technology. Bringing up new hardware? Lab CAN Pro and Desk CAN Pro support Classic CAN and CAN FD with configurable bit timing.
