Main Content

C28x-CAN_A, C28x-CAN_B

You can set the following parameters for the CAN module:

CAN module clock frequency (= SYSCLKOUT) in MHz

The clock to the enhanced CAN module. The CAN module clock frequency is equal to SYSCLKOUT for processors such as c280x, c281x, c28044.

CAN module clock frequency (=SYSCLKOUT/2) in MHz

The clock to the enhanced CAN module. The CAN module clock frequency is equal to SYSCLKOUT/2 for processors such as piccolo, c2834x, c28x3x.

Baud rate prescaler (BRP: 2 to 256)/Baud rate prescaler (BRP: 1 to 1024)

The value using which bit rate is scaled.

Time segment 1 (TSEG1):

Set the value of time segment 1. This value, with TSEG2 and Baud rate prescaler, determines the length of a bit on the CAN bus. Valid values for TSEG1 are from 1 through 16.

Time segment 2 (TSEG2):

Set the value of time segment 2. This value, with TSEG1 and Baud rate prescaler, determines the length of a bit on the CAN bus. Valid values for TSEG2 are from 1 through 8.

Baud rate (CAN Module Clock/BRP/(TSEG1 + TSEG2 +1)) in bits/sec:

CAN module communication speed represented in bits/sec.

SBG

Set the message resynchronization triggering.

SJW

Set the synchronization jump width, which determines how many units of TQ a bit can be shortened or lengthened when resynchronizing. Where, TQ=Baud Rate Prescaler/CAN_CLK.

SAM

Number of samples used by the CAN module to determine the CAN bus level. Selecting Sample_one_time samples once at the sampling point. Selecting Sample_three_times samples once at the sampling point and twice before at a distance of TQ/2. The CAN module makes a majority decision from the three points.

Enhanced CAN Mode

Enable time-stamping and usage of Mailbox Numbers 16 through 31 in the C2000 CAN blocks. Texas Instruments® documentation refers to this as “HECC mode”.

Self test mode

If you set this parameter to True, the CAN module goes to loopback mode. The loopback mode sends a “dummy” acknowledge message back. This mode does not need an acknowledge bit. The default is False.

Pin assignment (Tx)

Assign the CAN transmit pin to use with the CAN_B module.

Pin assignment (Rx)

Assign the CAN receive pin to use with the CAN_B module.

For more information about setting the timing parameters for the CAN modules, see Configuring Timing Parameters for CAN Blocks.

Related Topics