SPRACE5A May   2019  – May 2021 F29H850TU , F29H859TU-Q1 , TMS320F280021 , TMS320F280021-Q1 , TMS320F280023 , TMS320F280023-Q1 , TMS320F280023C , TMS320F280025 , TMS320F280025-Q1 , TMS320F280025C , TMS320F280025C-Q1 , TMS320F280040-Q1 , TMS320F280040C-Q1 , TMS320F280041 , TMS320F280041-Q1 , TMS320F280041C , TMS320F280041C-Q1 , TMS320F280045 , TMS320F280048-Q1 , TMS320F280048C-Q1 , TMS320F280049 , TMS320F280049-Q1 , TMS320F280049C , TMS320F280049C-Q1 , TMS320F28075 , TMS320F28075-Q1 , TMS320F28076 , TMS320F28374D , TMS320F28374S , TMS320F28375D , TMS320F28375S , TMS320F28375S-Q1 , TMS320F28376D , TMS320F28376S , TMS320F28377D , TMS320F28377D-EP , TMS320F28377D-Q1 , TMS320F28377S , TMS320F28377S-Q1 , TMS320F28378D , TMS320F28378S , TMS320F28379D , TMS320F28379D-Q1 , TMS320F28379S , TMS320F28384D , TMS320F28384S , TMS320F28386D , TMS320F28386S , TMS320F28388D , TMS320F28388S , TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P659DH-Q1 , TMS320F28P659DK-Q1 , TMS320F28P659SH-Q1

 

  1.   1
  2.   2
    1.     3
  3.   4
  4.   5
    1.     6
    2.     7
    3.     8
      1.      9
      2.      10
      3.      11
  5.   12
    1.     13
      1.      14
    2.     15
    3.     16
    4.     17
    5.     18
  6.   19
  7.   20

Configuring the CANBTR Register

In this section, the usage of the various bit-fields in the CANBTR register is illustrated.

The formula for bit-rate is:

Equation 1. GUID-B4A0C570-37F4-450B-9EBB-8CC154B872DD-low.gif

Where BRP is the value of (BRPreg + 1) and Bit-time = (TSEG1reg + 1) + (TSEG2reg + 1) + 1

In the above equations BRPreg , TESG1reg and TSEG2reg represent the actual values written in the corresponding fields in the CANBTR register. The parameters TSEG1reg, TSEG2reg, SJWreg, and BRPreg are automatically enhanced by 1 when the CAN module accesses these parameters. If the BRPE field is used, it should be concatenated with the BRP field.

Example 1

Assume the following parameters are desired with a CAN module clock of 200 MHz:

Bit-rate = 500 kbps, SJW = 4, TSEG1 = 9 & TSEG2 = 6.

This is achieved by writing a value of 0x000058D8 in the CANBTR register. Here, TSEG1reg = 8, TSEG2reg = 5, SJWreg = 3, and BRPreg = 24

Effective BRP value = (BRPreg + 1) = 25

Effective TSEG1 value = (TSEG1reg + 1) = 9

Effective TSEG2 value = (TSEG2reg + 1) = 6

Effective SJW value = (SJWreg + 1) = 4

Bit-time = (TSEG1reg + 1) + (TSEG2reg + 1) + 1 = 16

Plugging these numbers into the bit-rate equation:

Equation 2. GUID-1799866C-185F-450F-91C2-B1DD24B03A03-low.gif

Example 2

Assume the following parameters are desired with a CAN module clock of 200 MHz:

Bit-rate = 50 kbps, SJW = 4, TSEG1 = 9 & TSEG2 = 6.

This is achieved by writing a value of 0x000358F9 in the CANBTR register. Here, TSEG1reg = 8, TSEG2reg = 5, SJWreg = 3, BRPE = 11b , BRP = 111001b. Effective BRPreg = 11111001b (249). Note that BRPE field is concatenated with the BRP field.

Effective BRP value = (BRPreg + 1) = 250

Effective TSEG1 value = (TSEG1reg + 1) = 9

Effective TSEG2 value = (TSEG2reg + 1) = 6

Effective SJW value = (SJWreg + 1) = 4

Bit-time = (TSEG1reg + 1) + (TSEG2reg + 1) + 1 = 16

Plugging these numbers into the bit-rate equation:

Equation 3. GUID-B9FE36B7-858B-4BEE-80A4-E7B3F7CC2848-low.gif