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.

TDA4VM: Can not read frames from MCAN interfaces.

Part Number: TDA4VM
Other Parts Discussed in Thread: CODECOMPOSER

Hi there,

I'm trying to use the MCAN interfaces on a system that's based on your TDA4 EVM.

I'm running a modified version of your can_eth_gateway demo.

The CAN interface on the EVM is connected to a PC via a Peak CAN adapter.

I can send CAN frames from the EVM, and I receive them on the PC.

When I send frames from the PC, I don't receive anything in the application running on the EVM.

I tried both MCAN0 and MCAN4 interfaces and got the same results.

When I look with the CodeComposer memory browser at the MCAN RAM (starting at address 0x02708000) I see the CAN message that I sent at 0x0270813C. So, the message made it into the Rx FIFO. But the interrupt service routine doesn't get called.

I added a counter that's incremented in the Can_mcanProcessISR function. The counter stays at zero.

Here's my interrupt configuration for the MCAN0 and MCAN4 interfaces:

        if (CAN_CONTROLLER_INSTANCE_MCAN0 ==
            CanConfigSet_CanController_List_PC[idx]->CanControllerInst)
        {
            intNum = APP_MCAN_0_INT0;
            pIsrHandler = Can_2_Int0ISR;
            flag = 1U;
        }

        if (CAN_CONTROLLER_INSTANCE_MCAN4 ==
            CanConfigSet_CanController_List_PC[idx]->CanControllerInst)
        {
            intNum = APP_MCAN_4_INT0;
            pIsrHandler = Can_6_Int0ISR;
            flag = 1U;
        }

I also added a HwiP_enableInterrupt() to the for loop in CanApp_Init() because I believe the application didn't enable the interrupts.

    for (ctlr_cnt = 0U; ctlr_cnt < CAN_NUM_CONTROLLER; ctlr_cnt++)
    {
        CanApp_ProfileStatus = E_OK;

        /* Set Controller Mode to Start */
        status = Can_SetControllerMode(
        CanConfigSet_CanController_List_PC[ctlr_cnt]->ControllerId, CAN_T_START);
        if (status != CAN_OK)
        {
            CanApp_ProfileStatus = E_NOT_OK;
        }
        else {
            HwiP_enableInterrupt(CanApp_IntNumbers[ctlr_cnt]);
        }
    }

Now two questions:

Do you see anything that I missed here?

Do you have a different demo that you know for sure that can recevie CAN frames?

Thank you.