| Target Support Package™ TC6 | ![]() |
| On this page… |
|---|
Accessing the Timing Parameters |
The timing parameters that control the bit rate for DM6437 EVM CAN Receive and DM6437 EVM CAN Transmit blocks are Baud rate prescaler, TSEG1, and TSEG2 in the DM6437 EVM CAN Setup block:

The following sections describe the process of setting these parameters.
The following steps guide you through the process of configuring the required timing parameters.
Review the known entities:
Obtain the Bit Rate of the CAN network. (Expressed as "Bitrate" in the following formulas).
This is equivalent to the CAN module system clock frequency. The CAN peripheral in the DM6437 is in the CLKIN clock domain, which operates at the same frequency as the primary reference clock to the DSP. In the DM6437EVM board, the primary reference clock operates at 27 MHz.
Estimate the value of the Baud rate prescaler (BRP) and substitute this value, along with the known values of Bitrate and SYSCLKOUT, into the equation below as follows:
Bitrate = SYSCLKOUT/(BRP * BitTime)
Solve this equation for BitTime to obtain a value:
BitTime = SYSCLKOUT/(BRP * Bitrate)
Estimate values of TSEG1 and TSEG2 that satisfy the following equation:
BitTime = TSEG1 + TSEG2 + 1
Remember that BitTime is now a known quantity, calculated in the previous step.
Validate these estimated values of BRP, TSEG1, and TSEG2 against the following rules:
| TSEG1 >= TSEG2 |
| IPT (Information Processing Time) = 3/BRP |
| IPT <= TSEG1 <= 16 TQ |
| IPT <= TSEG2 <= 8 TQ |
| 1 TQ <= SJW <= min(4 TQ, TSEG2) |
where:
IPT is Information Processing Time, TQ is Time Quanta, and SJW is Synchronization Jump Width, which can be set in the CAN Setup block.
Iterate steps two through four until the values selected for TSEG1, TSEG2, and BRP meet all of the criteria.
The following illustration gives an alternate view of the CAN bit timing parameters.

Assume that SYSCLKOUT = 27 MHz, and a bit rate of 1 Mbits/s is required.
With the Baud rate prescaler (BRP) set to 12, substitute the values of bit rate, BRP, and SYSCLKOUT into the following equation, solving for BitTime:
BitTime = SYSCLKOUT/(BRP * Bitrate)
BitTime = 27MHz/(12 * 0.25 MBits/sec) = 9TQ
Try to set the values of TSEG1 and TSEG2 to 6TQ and 2TQ respectively. Substitute the values of BitTime from the previous equation, and the chosen values for TSEG1 and TSEG2 into the following equation:
BitTime = TSEG1 + TSEG2 + 1
9TQ = 6TQ + 2TQ + 1
Finally, check the selected values against the rules:
| IPT = 3/BRP = 3/12 = .25 |
| IPT <= TSEG1 <= 16 TQ True! .25 <= 6TQ <= 16TQ |
| IPT <= TSEG2 <= 8TQ True! .25 <= 2TQ <= 8TQ |
| 1TQ <= SJW <= min(4TQ, TSEG2), as a result of which SJW can be set to either 1 or 2. |
Because all chosen values satisfy the criteria, no further iteration is necessary.
The following table provides common timing parameter settings for 3 typical values of Bit Rate and SYSCLKOUT = 27 MHz. This clock frequency is the maximum for the DM6437 EVM blocks.
| Bit Rate | TSEG1 | TSEG2 | Bit Time | BRP | SJW |
|---|---|---|---|---|---|
| 250 Kbits/sec | 6 | 2 | 3 | 12 | 1 or 2 |
| 500 Kbits/sec | 3 | 1 | 6 | 9 | 1 |
| 1 Mbits/sec* | 6 | 2 | 9 | 3 | 1 or 2 |
| 2 Mbits/sec* | 1 | 1 | 4.5 | 3 | ERROR |
*Due to a limitation in the DM643x CAN module, 3-time sampling is not possible at this Bit Rate. In the DM6437 EVM CAN Setup block, the SAM parameter cannot be set to Sample three times.
For detailed information on the CAN module, see TMS320DM643x DMP High-End CAN Controller User's Guide (Rev. A), Literature Number SPRU981A, available at the Texas Instruments Web site.
DM6437EVM, DM6437 EVM CAN Setup, DM6437 EVM CAN Transmit
![]() | Configuring Timing Parameters for CAN Blocks | Using External Mode | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |