38.3.3.8 Bit Time Configuration Example

The following tables illustrate the configuration of the CAN FD Bit Time registers, assuming there is a CAN FD network in an automobile with the following parameters:
  • 500 kbps NBR – sample point at 80%
  • 2 Mbps DBR – sample point at 80%
  • 40 meters – minimum bus length

Table 38-3 and Table 38-4 illustrate how the bit time parameters are calculated. Since the parameters depend on multiple constraints and equations, and are calculated using an iterative process, it is recommended to enter the equations in a spreadsheet.

Table 38-5 translates the calculated values into register values. It is recommended to let the CAN FD Protocol module measure the Transmitter Delay Compensation Value (TDCV). This is accomplished by setting TDCMOD[1:0] (C1TDCH[1:0]) = 10 (Automatic mode). To set the SSP to 80%, the TDCO[6:0] bits are set to 1 + DTSEG1.

Table 38-3. Step-by-Step Nominal Bit Rate Configuration
ParameterConstraintValueUnitEquations and Comments
NBTNBT ≥ µs2µsEquation 38-1
FSYSCLKFSYSCLK ≤ 40 MHz40MHzCAN clock frequency = 40 MHz
NBRP1 to 2561-Select smallest possible BRP value to maximize resolution.
NTQNBT, FSYSCLK25nsEquation 38-3
NBT/NTQ4 to 38580-Equation 38-5
NSYNCFixed1NTQDefined in ISO11898-1:2015
NPRSEGNPRSEG > TPROP47NTQEquation 38-9; TPROP = 910 ns, minimum NPRSEG = TPROP/NTQ = 72.8 NTQ. Selecting 95 will allow up to a 60m bus length
NTSEG12 to 256 NTQ64NTQEquation 38-7. Select NTSEG1 to achieve 80% NSP.
NTSEG21 to 128 NTQ16NTQThere are 32 NTQ left to reach NBT/NTQ = 160
NSJW1 to 128 NTQ; SJW ≤ min(NPHSEG1, NPHSEG2)16NTQMaximizing NSJW lessens the requirement for the oscillator tolerance.
Table 38-4. Step-by-Step Data Bit Rate Configuration
ParameterConstraintValueUnitEquations and Comments
DBTDBT ≥ 125 ns500nsEquation 38-2
DBRP1 to 2561-Selecting the same prescaler as for NBT ensures that to the TQresolution does not change during the Bit Rate Switching
DTQDBT, FSYSCLK25nsEquation 38-4
DBT/DTQ3 to 4920-Equation 38-6
DSYNCFixed1DTQDefined in ISO11898-1:2015.
DTSEG11 to 32 DTQ16DTQEquation 38-8
DTSEG21 to 16 DTQ4DTQThere are 8 DTQ left to reach DBT/DTQ = 40
DSJW1 to 16 DTQ; SJWmin (DPHSEG1, DPHSEG2)4DTQMaximizing DSJW lessens the requirement for the oscillator tolerance
Oscillator Tolerance Conditions 1-5Minimum of Conditions 1-5.78%Equation 38-11 through Equation 38-16
Table 38-5. Bit Time Register Initialization (500k/2M)
CxNBTCFGValueCxDBTCFGValueCxTDCValue
BRP[7:0]0BRP[7:0]0TDCMOD[1:0]2
TSEG[7:0]63TSEG[7:0]15TDCO[6:0]31
TSEG2[6:0]15TSEG2[6:0]3TDCV[5:0]0
SJW[6:0]15SJW[6:0]3--