Embedded Calculators & Part Finder
Size a value with 64 free calculators, then find the real component that fits — in stock, at the best price. For MCU, power, RF & firmware. No account.
CAN Bus Bit Timing Calculator
Calculate bit timing parameters and register values for STM32 bxCAN, STM32 FDCAN, and MCP2515 controllers.
STM32 bxCAN
STM32 FDCAN (Nominal)
MCP2515 Standalone CAN
CAN (Controller Area Network) bit timing splits one bit time into four segments: Sync_Seg, Prop_Seg, Phase_Seg1, and Phase_Seg2. The sample point is the time at which the bus level is read.
Timing Segment Formulas:
- Total TQ:
1 + Prop_Seg + Phase_Seg1 + Phase_Seg2(or1 + TS1 + TS2whereTS1 = Prop_Seg + Phase_Seg1) - Baud Rate:
Clock / (BRP * Total_TQ) - Sample Point (%):
(1 + Prop_Seg + Phase_Seg1) / Total_TQ * 100
Usage: Input the peripheral clock frequency, target baud rate, and desired sample point. The solver automatically searches for the best timing registers that minimize sample point error and fit the hardware limits.
When you need it: Bringing up bxCAN/FDCAN on an STM32, or an MCP2515, and needing to hit an exact bus bit rate (e.g. 500 kbit/s) with a sample point that matches every other node on the bus. Get it wrong and the node throws error frames, goes bus-off, or silently drops messages — one of the most common CAN bring-up problems.
Worked example: 36 MHz APB clock, 500 kbit/s, 87.5% sample point → 8 total time quanta with BRP = 9 gives 36e6 / (9 × 8) = 500 kbit/s. With TS1 = 6 and TS2 = 1, the sample point is (1 + 6) / 8 = 87.5%.
Tips & gotchas:
- CiA recommends a sample point of 87.5% for bit rates up to 800 kbit/s and 75% for 1 Mbit/s.
- Keep
SJW ≤ min(Phase_Seg1, Phase_Seg2); a larger SJW tolerates more oscillator drift between nodes. - All nodes must agree on bit rate and roughly on sample point — mixed sample points reduce noise margin.
- STM32 and MCP2515 number their timing segments differently; always cross-check the exact register fields in your datasheet.