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.

LAUNCHXL-F28P65X: Are there any working examples using MCAN?

Part Number: LAUNCHXL-F28P65X
Other Parts Discussed in Thread: C2000WARE, SYSCONFIG

Tool/software:

I am trying to find a working example for how to use MCAN.

I have the LAUNCHXL-F28P65X board connected to a Komodo CAN DUO so i can see traffic.

The switch  on the launchpad is set to use the onboard transceiver.

When I try the CAN examples in C2000Ware_5_05_00_00\driverlib\f28p65x\examples\c28x\can  I can get the examples to work if I change the GPIO's to 4/5.

I tried the same thing with the MCAN examples in C2000Ware_5_05_00_00\driverlib\f28p65x\examples\c28x\mcan but that doesn't seem to be enough to get any of the examples to work.

Other than changing the GPIO's to match the board, what else do I need to change to use the MCAN peripheral examples with the launchpad? 

Is there a set of MCAN examples that work with this launchpad?

  • Hi Amber,

    Apologies for the delayed response.

    The DCAN and MCAN TX/RX pins are overlapped in the pinmux on GPIO4/5 to enable either CAN or CAN-FD to be used with the CAN transciever.

    Can you verify that the correct Mux Mode is set when using the MCAN examples to ensure that the MCANA_RX/TX signals are routed to GPIO 4/5 instead of the CANA_RX/TX signals?

    All of the MCAN examples should work with the launchpad after proper configuration. My recommendation would be to start with the mcan_ex3_loopback_syscfg example and ensure the proper pin configurations in SysConfig.

    Please try this example and share the results.

    Best Regards,

    Zackary Fleenor

  • I already checked this, which is why I was asking for anything other than PIN settings, but... I'll walk through it to see if there is some step I'm missing.

    Starting from the mcan_ex3_loopback_syscfg example:

    I opened the syscfg and changed the PinMux to 4,5
    PinMux setting

    After compiling, here is the code from board.h for the Pins:

    Which is used by board.c

    Which is called by Board_init() in main in mcan_ex3_loopback_syscfg.c


    Also, just in case device.h is being used:
    Since I'm using a LAUNCHXL_F28P65X board, I added a define to the compiler predefines for the project: so that when device.h is loaded, the correct pin definitions are applied:


    define.h snippets:
    define.h

    The code runs until it gets to 

    And stays locked in that loop.

  • Hi Amber,

    Thanks for providing these details. These configurations look correct.

    Can you confirm the hardware connectivity between the LP and the Komodo CAN Duo device? Are these the only 2 nodes on the CAN bus? If so, are the termination resistors properly populated?

    Can you add a breakpoint at the beginning of MCANIntr1ISR to check if the interrupt is ever being triggered/entered? This ISR is where the isrIntr1Flag is reset to 0 which would break out of the while loop.

    Can you also probe the MCANA_TX/MCANA_RX signals to ensure data is actually being transmitted?

    Best Regards,

    Zackary Fleenor

  • I was able to sucessfully see the message frames transmitted using the mcan_ex7_classic_transmit example.

    I think that the Komodo CAN DUO I'm using for CAN analysis doesn't support CAN FD and that is why none of the other examples were working for me.

    Sorry.