11.3.16.1 Example for Bit Timing at High Baud Rate
In this example, the frequency of CAN clock is 25 MHz, and the bit rate is 1 Mbps.
Equation 12. bit time = 1 µs = n × t
q= 5 × t
q
where
- tq= 200 ns
- tq= (baud rate prescaler) / CAN clock
- Baud rate prescaler = tq × CAN clock
- Baud rate prescaler = 200E–9 × 25E6 = 5
- tSync = 1 × tq= 200 ns
\\fixed at 1 time quanta
- delay of bus driver = 50 ns
- delay of receiver circuit = 30 ns
- delay of bus line (40 m) = 220 ns
Equation 13. tProp 400 ns = 2 × tq
\\400 is next integer multiple of tq
Equation 14. bit time = tSync + tTSeg1 + tTSeg2 = 5 × tq
Equation 15. bit time = tSync + tProp + tPhase 1 + tPhase2
Equation 16. tPhase 1 + tPhase2 = bit time – tSync – tProp
Equation 17. tPhase 1 + tPhase2 = (5 × tq) – (1 × tq) – (2 × tq)
Equation 18. tPhase 1 + tPhase2 = 2 × tq
Equation 19. tPhase1 = 1 × tq
Equation 20. tPhase2 = 1 × tq
\\tPhase2 = tPhase1
Equation 21. tTSeg1 = tProp + tPhase1
where
- tTSeg1 = (2 × tq) + (1 × tq
- tTSeg1 = 3 × tq
Equation 22. tTSeg2 = tPhase2
where
- tTSeg2 = (Information Processing Time + 1) × tq
- tTSeg2 = 1 × tq
\\Assumes IPT = 0
Equation 23. tSJW = 1 × tq
\\Least of 4, Phase1 and Phase2
In the previous examples, the bit field values for the CANBIT register are as follows (see Table 11-4):
Table 11-4 CANBIT Register Values for High Baud Rate Example
| Bit |
Value |
| TSEG2 |
= TSeg2 – 1
= 1 – 1
= 0 |
| TSEG1 |
= TSeg1 – 1
= 3 – 1
= 2 |
| SJW |
= SJW – 1
= 1 – 1
= 0 |
| BRP |
= Baud rate prescaler – 1
= 5 – 1
= 4 |
The final value programmed into the CANBIT register = 0x0204.