All projects
Live in the browser

CAN tools

A CAN FD bit-timing calculator that runs entirely in the browser. A frame decoder comes next.

CAN FDBit timingBrowserOpen source

Try it: bit-timing calculator

Enter the CAN clock and bit rates. Everything is calculated in your browser.

Limits (M_CAN): nominal prescaler 1–512, TSEG1 2–256, TSEG2 2–128; data prescaler 1–32, TSEG1 1–32, TSEG2 1–16. SJW = TSEG2. Sync segment = 1 tq.

Try it: CAN FD frame builder

Type an ID and data bytes and see every bit that goes on the wire.

Problem

Choosing CAN FD bit timing (prescaler, segments, sample point, transmitter delay compensation) is error-prone and usually done in spreadsheets. A clear visual tool helps.

Architecture

  1. 01 Clock + bit rates
  2. 02 Bit-timing solver
  3. 03 Sample point & TDC
  4. 04 Registers + Linux command
  5. 05 Next: frame decoder

Key decisions

  1. Built only from public standards, in my own time.
  2. Pure client-side: no server, no cost, works offline.
  3. Shows every intermediate value, so the result can be checked by hand.

What I learned

  • Most clock and bit-rate pairs have only a few exact settings. Using the same prescaler in both phases narrows them down further, so it is worth showing the alternatives.
  • TDC is only allowed with a data prescaler of 1 or 2, so the clock frequency decides early whether high data rates are possible.

Repository

GitHub