You can set the following parameters for the eCAN 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 eCAN bus. Valid values for TSEG1 are from
- 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 eCAN bus. Valid values for TSEG2 are from
- Baud rate (CAN Module Clock/BRP/(TSEG1 + TSEG2 +1)) in bits/sec:
CAN module communication speed represented in bits/sec.
Set the message resynchronization triggering.
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.
Number of samples used by the CAN module to determine the CAN bus level. Selecting
Sample_one_timesamples once at the sampling point. Selecting
Sample_three_timessamples 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 eCAN blocks. Texas Instruments™ documentation refers to this as “HECC mode”.
- Self test mode
If you set this parameter to
True, the eCAN 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
- Pin assignment (Tx)
Assign the CAN transmit pin to use with the
- Pin assignment (Rx)
Assign the CAN receive pin to use with the
For more information about setting the timing parameters for the eCAN modules, see Configuring Timing Parameters for CAN Blocks.