CAN Bus Timing Calculator

Calculate CAN bus bit timing parameters (prescaler, TSEG1, TSEG2, SJW) for a target baud rate and sampling point.

CAN CAN bus bit timing baud rate sampling point prescaler SJW CANopen DeviceNet

Input values

⚙

Enter values and click Calculate to see results here.

Formula

Bit time = 1 / baud_rate TQ_count = F_osc / (baud_rate × prescaler) TSEG1 + TSEG2 = TQ_count - 1 (sync segment = 1 TQ)

Worked Example

Given: 8 MHz oscillator, 500 kbps baud rate, 80% sampling point.

Step 1: Bit time = 1/500,000 = 2 µs

Step 2: TQ = 8,000,000 / 500,000 = 16 TQ per bit

Step 3: Sync = 1 TQ, TSEG1 = 12 TQ (75%), TSEG2 = 3 TQ (18.75%), SJW = 1 TQ

Result: Prescaler=1, TSEG1=12, TSEG2=3, SJW=1, Sample=81.25%

Verify with your CAN controller register format — some use TSEG1 as propagation + phase1.

Engineering Notes

  • Sampling point: Typical values: CANopen = 87.5%, DeviceNet = 80%, high-speed CAN = 75-80%. Check your protocol specification.
  • SJW (Sync Jump Width): Controls resynchronization. Use 1-2 TQ. Larger SJW allows more clock tolerance but reduces noise immunity.
  • Propagation segment: Accounts for signal propagation delay. For cables > 100 m, increase TSEG1 to accommodate the delay.
  • Oscillator tolerance: Standard CAN requires ±1.5% oscillator accuracy. Use a crystal, not an RC oscillator.
  • CAN FD: CAN FD uses separate timing for arbitration and data phases. This calculator covers classic CAN only.

References

  • ISO 11898-1 — CAN data link layer
  • CAN in Automation (CiA) — Bit timing recommendations