CAN Baud Rate Calculator
CAN / CAN FD Bit Timing Calculator
Target Settings
Features
This tool supports bit time parameter calculation for Classic CAN and CAN FD modes, helping engineers quickly find the optimal configuration for target baud rate and sample point.
Input Parameters
| Parameter | Description |
|---|---|
| Mode | Select Classic CAN or CAN FD mode |
| Clock (MHz) | Controller clock frequency (1-200 MHz) |
| Arbitration Baud | Arbitration phase target baud rate |
| Data Baud | Data phase target baud rate (CAN FD only) |
| Sample Point (%) | Target sample point position |
| Max Baud Error (%) | Baud rate error tolerance threshold |
| Max SP Error (%) | Sample point error threshold |
Output Parameters
| Parameter | Description |
|---|---|
| BRP | Baud Rate Prescaler |
| TSEG1 | Time Segment 1 (Propagation Segment + Phase Segment 1) |
| TSEG2 | Time Segment 2 (Phase Segment 2) |
| SJW | Synchronization Jump Width |
| Baud | Actual baud rate |
| Error (%) | Percentage error from target baud rate |
| Sample % | Actual sample point position |
| Tq (ns) | Time Quantum value in nanoseconds |
Bit Time Basics
Bit Time Structure
CAN bus bit time consists of the following components:
Bit Time = 1 Tq (Sync_Seg) + TSEG1 + TSEG2- Sync_Seg: Fixed at 1 Tq, used for synchronizing nodes on the bus
- TSEG1: Contains propagation segment and phase buffer segment 1, used to compensate for network delay and positive edge phase errors
- TSEG2: Phase buffer segment 2, used to compensate for negative edge phase errors
Sample Point Calculation
The sample point position determines when the bus level is sampled:
Sample Point (%) = (1 + TSEG1) / (1 + TSEG1 + TSEG2) × 100Recommended Sample Points
| Standard Protocol | Recommended Sample Point |
|---|---|
| CANopen | 87.5% |
| DeviceNet | 87.5% |
| ARINC 825 | 75% - 87.5% |
Tip: The tool provides 70%, 75%, 80%, 85% quick options by default, and also supports manual input of other values.
Controller Parameter Ranges
The tool has built-in parameter ranges for two types of controllers:
Classic CAN (CAN 2.0)
| Parameter | Range |
|---|---|
| BRP | 1 - 64 |
| TSEG1 | 1 - 16 |
| TSEG2 | 1 - 8 |
| SJW | max 4 |
CAN FD
| Parameter | Range |
|---|---|
| BRP | 1 - 512 |
| TSEG1 | 2 - 256 |
| TSEG2 | 1 - 128 |
| SJW | max 128 |
CAN FD controllers have larger parameter ranges, supporting more flexible configurations.
CAN FD Dual-Phase Configuration
CAN FD uses two different baud rates within the same frame:
- Arbitration Phase: Uses standard baud rate, all nodes participate in arbitration
- Data Phase: Switches to high baud rate for data transmission after arbitration
Typical baud rate combinations:
| Arbitration Phase | Data Phase | Switch Ratio |
|---|---|---|
| 500 kbps | 2 Mbps | 4x |
| 500 kbps | 4 Mbps | 8x |
| 1 Mbps | 2 Mbps | 2x |
| 1 Mbps | 5 Mbps | 5x |
Export Formats
After selecting a configuration, it can be exported in three formats:
Param Format
Suitable for PCAN series device parameter configuration:
f_clock=80000000,nom_brp=10,nom_tseg1=13,nom_tseg2=2,nom_sjw=2SocketCAN Format
Linux SocketCAN configuration command:
ip link set can0 up type can bitrate 500000 sample-point 0.875CAN FD mode:
ip link set can0 up type can bitrate 500000 sample-point 0.875 dbitrate 2000000 dsample-point 0.750 fd onJSON Format
Structured configuration data for program parsing:
{
"mode": "canfd",
"clock_mhz": 80,
"arbitration": {
"brp": 10,
"tseg1": 13,
"tseg2": 2,
"sjw": 2,
"baud": 500000,
"sample_point": 87.5
},
"data_phase": {
"brp": 4,
"tseg1": 9,
"tseg2": 2,
"sjw": 2,
"baud": 2000000,
"sample_point": 83.3
}
}FAQ
Why can't I find a valid configuration?
Possible causes and solutions:
- Inappropriate clock frequency: Try other common clocks (8/16/24/40/80 MHz)
- Too strict error threshold: Appropriately relax baud rate or sample point error
- Target baud rate too high/low: Check the match between clock and target baud rate
Actual baud rate differs from calculated value?
Investigation directions:
- Crystal frequency deviation from nominal value
- Clock source accuracy (recommended crystal with ±50ppm or better)
- Controller actual parameter range does not match tool settings
How to choose prescaler value?
Prescaler value affects Time Quantum (Tq):
- Smaller BRP → Smaller Tq → More precise time adjustment
- Larger BRP → Larger Tq → Larger time range
Usually choose BRP value that produces 8-25 Tq total bit time.
CAN FD data phase baud rate limit?
Limited by the following factors:
- Transceiver performance: Usually max 5-8 Mbps
- Bus length: Longer buses require lower baud rates
- Signal quality: Harsh environments need margin