LAUNCHXL-F2800157: BRS Enable and data tx and on can

Part Number: LAUNCHXL-F2800157
Other Parts Discussed in Thread: TMS320F2800157, TMS320F28388D, C2000WARE

Dear Support Team,

I am testing CAN-FD communication between a TI LAUNCHXL-F2800157 LaunchPad and your USB-CAN-FD analyzer.

I am facing an issue specifically when using different arbitration and data-phase bit rates with CAN-FD Bit Rate Switching (BRS).

Hardware

1. TI LaunchPad

  • Board: TI LAUNCHXL-F2800157

  • MCU: TMS320F2800157

  • Interface: MCAN / CAN-FD

  • CAN connection: CANH, CANL

2. CAN Analyzer

  • Product: Waveshare USB-CAN-FD-B

  • Serial No.: USBCANFD21250618 1464

  • Interface: CAN-FD

Test Results

The basic CAN/CAN-FD communication works when the arbitration and data bit rates are configured with the same value.

For example:

Arbitration Bit Rate Data Bit Rate Result
500 kbps 500 kbps Working
1 Mbps 1 Mbps Working
500 kbps 1 Mbps Not working
1 Mbps 5 Mbps Not working

The problem occurs when BRS is enabled and the arbitration-phase bit rate is different from the data-phase bit rate.

TI MCAN Configuration

I am using CAN-FD mode with:

txMsg[loopCnt].brs = 1U;    // Bit-rate switching enabled
txMsg[loopCnt].fdf = 1U;    // CAN-FD frame

The transmit message uses an 11-bit standard CAN identifier and a CAN-FD payload.

Example:

CAN ID       = 0x004
Frame format = CAN-FD
BRS          = Enabled
Payload      = 64 bytes

The CAN-FD frame works when BRS is disabled or when both bit rates are configured the same, but communication fails when different arbitration and data-phase bit rates are used.

Issue to Be Confirmed

Could you please help confirm the following for the USB-CAN-FD-B analyzer:

  1. Does the analyzer support CAN-FD Bit Rate Switching (BRS) with different arbitration and data-phase bit rates?

  2. For example, is this configuration supported?

Arbitration phase = 500 kbps
Data phase        = 1 Mbps
BRS               = Enabled
  1. What exact analyzer settings should be used for:

    • Arbitration bit rate

    • Data bit rate

    • CAN-FD mode

    • BRS

    • Sample point

    • SJW

    • Any automatic bit-timing settings

  2. Does the analyzer require a specific CAN-FD bit-timing configuration when BRS is enabled?

  3. Is there any limitation on the supported combinations of arbitration/data bit rates?

  4. Does the analyzer require the data-phase bit rate to be configured separately, or is the data bit rate automatically derived from another setting?

  5. Is there any firmware update available for the analyzer that addresses CAN-FD BRS or different arbitration/data bit-rate communication?

  6. Could you provide a recommended working configuration for testing:

Arbitration = 500 kbps
Data        = 1 Mbps
BRS         = Enabled
CAN-FD      = Enabled

Additional Information

The physical CAN connection has been checked and basic CAN-FD communication is working. The same analyzer communicates correctly when arbitration and data-phase bit rates are identical.

Therefore, I would like to determine whether the problem is caused by:

  • Analyzer CAN-FD/BRS configuration

  • CAN-FD bit timing

  • Sample point/SJW mismatch

  • Analyzer firmware limitation

  • TI MCAN nominal/data-phase timing configuration

  • Analyzer compatibility with the selected CAN-FD bit-rate combination

Please provide the recommended analyzer configuration and, if possible, a step-by-step procedure for testing CAN-FD BRS using different arbitration and data-phase bit rates.

 

  • Hi Amit,

    Yes, the Waveshare USB-CAN-FD-B fully supports CAN-FD Bit Rate Switching (BRS). When BRS is enabled, the analyzer switches speeds at the sample point. Because your communication works at unified rates but fails during bit-rate switching, the issue may stem from a mismatch in bit-timing parameters (Sample Points) or a missing Transmitter Delay Compensation (TDC) configuration.
  • CAN-FD is highly sensitive to sample point alignment during the phase shift. If the TI LaunchPad samples at 70% but the CAN analyzer samples at 90%, the edge transitions will trigger error frames immediately upon switching to 1 Mbps or 5 Mbps.
    Check your MCAN initialization code (NBTP and DBTP registers), and calculate the sample point:
    Sample Point = (1+Tseg1} / (1 + Tseg1 + Tseg2)
    Force both the CAN analyzer and the TI F28x to use the exact same percentage (75% or 80% is recommended)
  • Hi QJ,
    I am using the F2800157 DriverLib example mcan_ex9_transmit with a 40 MHz MCAN clock:
    nomRatePrescalar = 3
    nomTimeSeg1      = 9
    nomTimeSeg2      = 8
    dataRatePrescalar = 1
    dataTimeSeg1      = 9
    dataTimeSeg2      = 8
    The example gives 500 kbps arbitration and 1 Mbps data rate.
    I am using a Waveshare USB-CAN-FD-B analyzer configured as:
    ABIT = 500 kbps (80%)
    DBIT = 1 Mbps (80%)
    Using the formula:
    Sample Point = (1 + Tseg1) / (1 + Tseg1 + Tseg2)
    I calculate:
    (1 + 9) / (1 + 9 + 8) = 55.6%
    which does not match the analyzer's 80% sample point.
    Could you please clarify:
    1. What is the actual sample point of the default mcan_ex9_transmit example?
    2. Should NTSEG1/NTSEG2 and DTSEG1/DTSEG2 be used directly, or should they be interpreted as register value + 1?
    3. Could you provide recommended NBTP, DBTP, and TDC settings for:
       - 500 kbps ABIT / 1 Mbps DBIT @ 80% sample point
       - 1 Mbps ABIT / 5 Mbps DBIT @ 80% sample point
    My communication works without BRS, but fails when switching to the CAN-FD data phase, so I would like to verify that the MCAN sample point and TDC settings match the Waveshare 80% configuration.
    Thank you.
  • nomRatePrescalar = 3
    nomTimeSeg1      = 9
    nomTimeSeg2      = 8
    dataRatePrescalar = 1
    dataTimeSeg1      = 9
    dataTimeSeg2      = 8
    TSEG1 = 9+1, and TSEG2 = 8+1.  --> The sample point is (9+2)/20 = 55.5%
    dataTimeSeg1      = 9  --> 14   
    dataTimeSeg2      = 8  --> 3         --> sample point = (14+2)/20 = 80%
    please change SJW = 3 too
  • Query: F28388 MCAN Bit Timing Configuration for 1 Mbps Arbitration and 5 Mbps CAN-FD Data Rate

    Device: TI TMS320F28388D
    Peripheral: MCAN
    MCAN clock: 40 MHz
    Required nominal/arbitration bit rate: 1 Mbps
    Required CAN-FD data bit rate: 5 Mbps
    Required sampling point: 75%
    Configuration interface: TI C2000Ware DriverLib MCAN_BitTimingParams

    1. Current configuration

    I am configuring CAN-FD communication between the TI controller and a CAN-FD analyzer. My current bit-timing configuration is:

    // Initialize bit timings
    bitTimes.nomRatePrescalar   = 0x3U;
    bitTimes.nomTimeSeg1        = 0x6U;
    bitTimes.nomTimeSeg2        = 0x1U;
    bitTimes.nomSynchJumpWidth  = 0x1U;
    
    bitTimes.dataRatePrescalar  = 0x0U;
    bitTimes.dataTimeSeg1       = 0x4U;
    bitTimes.dataTimeSeg2       = 0x1U;
    bitTimes.dataSynchJumpWidth = 0x1U;

    With an MCAN clock of 40 MHz, my understanding is that these values produce:

    • Nominal/arbitration phase: 1 Mbps, 10 TQ, 80% sampling point.

    • Data phase: 5 Mbps, 8 TQ, 75% sampling point.

    Please confirm whether these calculations and the interpretation of the DriverLib field values are correct for the TMS320F28388D.

    2. Required nominal-phase calculation

    I would like to understand how to configure the nominal phase for 1 Mbps using 20 TQ and a 75% sampling point.

    The intended calculation is:

    • MCAN clock = 40 MHz

    • Actual prescaler = 2

    • Total TQ = 20

    • TSEG1 = 14 TQ

    • TSEG2 = 5 TQ

    Bit rate:

    40 MHz / (2 × 20) = 1 Mbps

    Sampling point:

    (1 + 14) / 20 × 100 = 75%

    Could TI please confirm the corresponding nomRatePrescalar, nomTimeSeg1, nomTimeSeg2, and nomSynchJumpWidth DriverLib values, including whether each field uses a value-minus-one encoding?

    3. Required data-phase calculation

    My target data bit rate is 5 Mbps.

    At a 40 MHz MCAN clock, using 20 TQ would produce only 2 Mbps with the minimum actual prescaler of 1:

    40 MHz / (1 × 20) = 2 Mbps

    Therefore, my understanding is that 5 Mbps requires 8 TQ when the actual prescaler is 1.

    For a 75% sampling point, I propose:

    • Actual prescaler = 1

    • Total TQ = 8

    • TSEG1 = 5 TQ

    • TSEG2 = 2 TQ

    • SJW = 1 TQ

    Bit rate:

    40 MHz / (1 × 8) = 5 Mbps

    Sampling point:

    (1 + 5) / 8 × 100 = 75%

    Could TI confirm the correct dataRatePrescalar, dataTimeSeg1, dataTimeSeg2, and dataSynchJumpWidth DriverLib values for this configuration?

    4. Main technical questions

    1. Is it correct that the nominal phase can use 20 TQ at 1 Mbps, while the data phase must use 8 TQ at 5 Mbps when the MCAN clock is 40 MHz?

    2. Can the F28388D MCAN independently use different TQ counts for the nominal and data phases?

    3. Are the proposed TSEG1, TSEG2, prescaler and SJW values valid according to the F28388D MCAN timing-register constraints?

    4. Please provide the exact DriverLib field values for a 75% sampling point in both phases, including register-value encoding.

    5. Are any additional constraints or settings required for CAN-FD bit-rate switching, such as transmitter delay compensation (TDC), at a 5 Mbps data rate?

    6. Which F28388D Technical Reference Manual sections or C2000Ware examples should be followed to verify these calculations?

    My objective is to obtain a technically validated configuration for 1 Mbps nominal/arbitration and 5 Mbps data-phase communication between the F28388D and a CAN-FD analyzer.

    Thank you.