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.

AWRL1432: Dynamic Baud Rate Adjustment for CAN FD and non-CAN FD Modes

Part Number: AWRL1432

Tool/software:

Dear Owner,

I am currently working with your hardware and software ecosystem and would like guidance on dynamically adjusting the baud rate when switching between CAN FD and non-CAN FD modes.

We are conducting tests with both CAN FD and standard CAN communication on our system. However, due to real-time operational requirements, we need to switch between these modes dynamically. I would appreciate your advice on the recommended approach for adjusting the baud rate during these transitions.

Could you please provide guidance on how to get started with this project, including any relevant documentation, examples, or specific configurations within your SDK to support this functionality?

Thank you for your assistance.

Best regards,

DANA

  • Hi Dana,

    Thanks for reaching out over E2E. Please allow us a day or two for one of our software experts to respond.

    Regards,

    Deexith.

  • Hey Dana,

    Thanks for reaching out regarding dynamically switching between CAN-FD and classic CAN mode. If you haven't worked with our MCAN driver before, I would highly recommend looking over the MCAN external read write example located under <MMWAVE_LSDK_INSTALL_DIR>/examples/drivers/mcan/mcan_external_read_write. This example will send out a message and will wait to receive the same message and repeat this ten times. 

    For your purposes, I'd recommend looking over the App_mcanConfig function which configures the MCAN into CAN-FD mode with nominal bit rate of 1 Mbps, nominal sampling point of 85%, data bit rate of 5 Mbps, and data sampling point of 87.5%. The FD mode is specified by the fdMode field of the initParams variable and is either TRUE (FD Mode is enabled - i.e., CCCR.FDOE = 1) or FALSE (FD Mode is disabled - i.e., CCCR.FDOE = 0). Keep in mind, that when configuring a Tx message, you will also need to specify whether the message will have the FD flag set as shown in the App_mcanConfigTxMsg and its subsequent call to MCAN_initTxBufElement.

    Speaking a bit looser here, I think your best bet would be to either define two functions similar to App_mcanConfig where one is for enabling CAN-FD and the other is for classical CAN or redefine the App_mcanConfig to be more parameterized so that you can specify whether or not you want to configure the device in either mode at function call.

    Let me know if you have any other questions.

    Regards,

    Kristien