This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

F29H859TU-Q1: F29 CAN-FD mcal demo problem

Part Number: F29H859TU-Q1

Hi team,

I ask this for my customer

Customer want to realize the CAN-FD communication based on 1Mbps(nominal bit rate) and 5Mbps(data bit rate)

I share the demo in C:\ti\c2000\F29H85xMCAL--01.04.01\examples\Can\Can_Example_Classic_FD to them.

But after running this demo in Launchpad, we find:

  1. The BRS is not enabled(but it should be enabled in CAN-FD)

If we run it directly(BRS is not enable, that means CAN communication), PCAN can receive the right data, that means we have correct hardware.

  1. Then we enable the BRS(CAN-FD communication), PCAN receive all the wrong CAN data

Could you help to check it in your side? Thanks in advance!

BRs

Shuqing

  • Hi Shuqng,

    I will investigate the issue you found on MCAL driver 1.04.01.

  • The BRS is not enabled(but it should be enabled in CAN-FD)

    In CAN-FD (Flexible Data-Rate), the Bit Rate Switch (BRS) must be manually enabled. The BRS bit acts as the physical toggle. Without it, the hardware never switches its internal clock dividers to the data-phase timing.

    Once a frame begins, the two bit rates (nominal and data) are fixed for that specific frame; they cannot be changed dynamically while the data phase is in progress.

    if the BRS bit is not enabled, the controller will use the Arbitration (Nominal) bit rate for the entire frame, including the data phase. Even if you have defined high-speed data timing parameters in the hardware registers (DBTP), those settings remain "dormant" unless the BRS bit in the individual message header is set to Recessive.
  • Then we enable the BRS(CAN-FD communication), PCAN receive all the wrong CAN data

    Need to know if the application code is for TX CAN-FD frame. Will come back to you later afternoon.

  • Hi Qingjun,

    according to our communication in Webex, I try the CAN-FD communication in my side using SDK

    I use Launchpad, PEAK, and use the project:mcan_project.zip

    (project is modified based on mcan_ex5_receive.c and mcan_ex4_transmit.c, modify MCAN GPIO init, MCAN parameters), now MCAN clock is 40Mbps, data rate is 5Mbps, nominal is 1Mbps.

    And I can use mcan_ex5_receive code to receive the data(transmited from PCAN-view) but I can't transmit data from F29 to PCAN-view(no error information in PCAN-view)

    PCAN view configuation:

    Could you help to check it and give me a demo(based on SDK and MCAL) that can realize the CAN-FD communication in data rate is 5Mbps, nominal is 1Mbps.

    Thanks

    BRs

    Shuqing

  • Hi Shuqing,

    Have you tried slower data rate, for example 2Mbps or 4Mbps?

  • Hi QJ,

    If you test the SDK directly in launchpad(1Mbps+2Mbps), you can find this can work.

    BRs

    Shuqing

  • Hi Shuqing,

    I just run the modified mcan_ex5_receive.c, it doesn't work on my side. It never runs into the interrupt ISR.I have the same setup on PCAN-View side. The message ID is 0x4.

  • Hi Shuqing,

    I have make the MCAL example work with 5mbps data bit rate. I will share the project with you tomorrow.

  • Hi QJ,

    1. In the Mcu_PBcfg.c you shared me before, it configurates the MCAN module to 50MHz? Is it possible to let MCAN run in 80MHz?

    2. In your Can_PBcfg.c you shared me before, it configurates the sample point is 80%, but their end customer need to configurate the sample point is 62.5%, could you help to give the configuration based on their requirement?

    3. In my understanding, it may be need to tune the delay compensation value? How to tune it when it fail to have a good communication?

    BRs

    Shuqing

  • Hi Shuqing,

    If CPU is running at 200MHz, we can not get 80MHz clock for MCAN module. The MCAN clock is the system clock divided by an integer. 200MHz, 100MHz, 66.7MHz, 50MHz, 40MHz,...

    The sample point: for auto application. It is usually 60%~80% for data phase depending on the transceiver and cable length. I will check it to 62.5%. But I need to check if this SP works or not.

  • The working project has been sent to you through the webex. Any question please let me know. I am closing this thread.