38.3.3.7 Bit Time Configuration Example

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

Table 38-2 illustrates 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-3 translates the calculated values into register values.

Table 38-2. Step-by-Step Nominal Bit Rate Configuration
Parameter Constraint Value Unit Equations and Comments
NBT NBT ≥ µs 2 µs Equation 38-1
FSYSCLK FSYSCLK ≤ 40 MHz 40 MHz CAN clock frequency = 40 MHz
NBRP 1 to 256 1 - Select smallest possible BRP value to maximize resolution.
NTQ NBT, FSYSCLK 25 ns Equation 38-2
NBT/NTQ 4 to 385 80 - Equation 38-3
NSYNC Fixed 1 NTQ Defined in ISO11898-1
NPRSEG NPRSEG > TPROP 47 NTQ Equation 38-5;TPROP = 910 ns, minimum NPRSEG = TPROP/NTQ = 72.8 NTQ. Selecting 95 will allow up to a 60m bus length
NTSEG1 2 to 256 NTQ 64 NTQ Equation 38-4. Select NTSEG1 to achieve 80% NSP.
NTSEG2 1 to 128 NTQ 16 NTQ There are 32 NTQ left to reach NBT/NTQ = 160
NSJW 1 to 128 NTQ; SJW ≤ min(NPHSEG1, NPHSEG2) 16 NTQ Maximizing NSJW lessens the requirement for the oscillator tolerance.
Table 38-3. Bit Time Register Initialization (500k)
CxNBTCFG Value
BRP[7:0] 0
TSEG[7:0] 63
TSEG2[6:0] 15
SJW[6:0] 15