14.6.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 14-6 and Table 14-7 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 14-8 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] (CxTDC[1:0]) = 10
(Automatic mode). In order to set the SSP
to 80%, TDCO[6:0] are set to (DBRP * DTSEG1).
Parameter | Constraint | Value | Unit | Equations and Comments |
---|---|---|---|---|
NBT | NBT ≥ 1 µs | 2 | µs | Equation 14-1 |
FCAN | FCAN ≤ 80 MHz | 80 | MHz | CAN clock frequency= 80 MHz |
NBRP | 1 to 256 | 1 | — | Select smallest possible BRP value to maximize resolution. |
NTQ | NBT, FCAN | 12.5 | ns | Equation 14-3 |
NBT/NTQ | 4 to 385 | 160 | — | Equation 14-5 |
NSYNC | Fixed | 1 | NTQ | Defined in ISO11898-1:2015. |
NPRSEG | NPRSEG > TPROP | 95 | NTQ | Equation 14-9: 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 | 127 | NTQ | Equation 14-7. Select NTSEG1 to achieve 80% NSP. |
NTSEG2 | 1 to 128 NTQ | 32 | NTQ | There are 32 NTQ left to reach NBT/NTQ = 160. |
NSJW | 1 to 128 NTQ; SJW ≤ min (NPHSEG1, NPHSEG2) | 32 | NTQ | Maximizing NSJW lessens the requirement for the oscillator tolerance. |
Parameter | Constraint | Value | Unit | Equations and Comments |
---|---|---|---|---|
DBT | DBT ≥ 125 ns | 500 | ns | Equation 14-2 |
DBRP | 1 to 256 | 1 | — | Selecting the same prescaler as for NBT ensures that the TQ resolution does not change during the Bit Rate Switching. |
DTQ | DBT, FCAN | 12.5 | ns | Equation 14-4 |
DBT/DTQ | 3 to 49 | 40 | — | Equation 14-6 |
DSYNC | Fixed | 1 | DTQ | Defined in ISO11898-1:2015. |
DTSEG1 | 1 to 32 DTQ | 31 | DTQ | Equation 14-7. Select DTSEG1 to achieve 80% DSP. |
DTSEG2 | 1 to 16 DTQ | 8 | DTQ | There are 8 DTQ left to reach DBT/DTQ = 40. |
DSJW | 1 to 16 DTQ; SJW ≤ min (DPHSEG1, DPHSEG2) | 8 | DTQ | Maximizing DSJW lessens the requirement for the oscillator tolerance. |
Oscillator Tolerance Conditions 1-5 | Minimum of Conditions 1-5 | 0.78 | % | Equation 14-11 through Equation 14-16 |
CxNBTCFGL/H | Value | CxDBTCFGL/H | Value | CxTDCL/H | Value |
---|---|---|---|---|---|
BRP[7:0] | 0 | BRP[7:0] | 0 | TDCMOD[1:0] | 2 |
TSEG1[7:0] | 126 | TSEG1[4:0] | 30 | TDCO[6:0] | 31 |
TSEG2[6:0] | 31 | TSEG2[3:0] | 7 | TDCV[5:0] | 0 |
SJW[6:0] | 31 | SJW[3:0] | 7 | — | — |