Understanding NI-XNET Clock Rate and CAN FD Bit Timing

Updated Jul 2, 2026

Reported In

Driver

  • NI-XNET

Issue Details

I am using NI-XNET hardware together with Vector CAN hardware and observe differences in the timing register values between both devices.

I would like to understand what clock rate NI-XNET hardware uses and how the bit timing parameters translate into real-world time units such as nanoseconds or microseconds.

Solution

NI-XNET hardware uses a 40 MHz clock for CAN and CAN FD communication. This corresponds to a time quantum of 25 ns, which defines the smallest unit used to build the CAN bit time.

 

Bit timing parameters such as TSEG1, TSEG2, and SJW are expressed in multiples of this time quantum. The actual time represented by each segment is obtained by multiplying the number of time quanta by 25 ns. Additionally, NI-XNET internally interprets several timing parameters as one greater than the configured value.

 

When comparing with third-party hardware such as Vector devices, differences arise because those devices may use a different clock rate, commonly 80 MHz. As a result, timing parameters must be adapted to match the 40 MHz time base used by NI-XNET hardware.

 

Use the following relationships to interpret and convert timing parameters:

 

  • Time Quantum (Tq) = 25 ns
  • Actual TSEG1 time = (TSEG1 + 1) × Tq
  • Actual TSEG2 time = (TSEG2 + 1) × Tq
  • Total bit time = (1 + TSEG1 + TSEG2) × Tq

 

To illustrate how to translate timing parameters from Vector to NI-XNET, consider the following example Vector configuration:

 

ParameterValue
CanControllerBaudRate500k
CanControllerPropSeg47
CanControllerSeg116
CanControllerSeg216
CanControllerSyncJumpWidth16
CanBrp1

 

The conversion is performed by applying the NI-XNET relationships to the Vector parameters. First, combine the Vector segments:

 

  • TSEG1 = PropSeg + Seg1 = 47 + 16 = 63
  • TSEG2 = Seg2 = 16
  • SJW = 16

 

Then apply the NI-XNET parameter interpretation:

 

  • TSEG1 = 63 - 1 = 62
  • TSEG2 = 16 - 1 = 15
  • SJW = 16 - 1 = 15

 

Based on these calculations, the equivalent NI-XNET configuraiton is:

 

ParameterVector ValueNI-XNET Value
Baud Rate500k500k
BRP11
TSEG14762
TSEG21615
SJW1615

 

These adjustments account for the fact that NI-XNET interprets configured timing parameters as the programmed value plus one. When converting from hardware using a different clock rate, additional scaling may be required to match the NI-XNET 40 MHz time base.

 

If an exact match is not possible, configure a custom baud rate using the NI-XNET Database Editor and iteratively adjust the timing parameters until the desired baud rate and sample point are achieved. For example, you can modify an existing .dbc file, set the baud rate to Custom, and refine the parameters while verifying the resulting timing.