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.

TDA4AL-Q1: On issues with increasing load on the can_fd bus

Part Number: TDA4AL-Q1

Background

The current demand is that can_fd1 and can_fd2 should be combined into group1 and the bus load rate should reach 60%. can_fd1 is used to realize the load demand, and the standard frame message length is 48 bytes, which can achieve the required load rate, but the receiving side can only receive about 1000 frames of data by using interrupt mode.

Question

  1. When receiving data, what is the upper limit of the receiving frequency using interrupt mode? How can the current number of receptions be increased so that it does not drop frames?
  2. Can the sending side achieve 60% bus load ratio with a sending interval greater than 1ms?

The following figure shows the interrupt configuration of the receiver.

The logic to achieve 60% load rate is shown below

  • Hi,

    The logic of the receiver is as follows, please help to see how to solve the problem of low number of received frames.Thanks.

    When our APP_MCAN_FIFO_0_NUM configuration is 5 and water mask configuration is 3, when RX interrupt is triggered, several packets are saved in FIFO at this time

    #define APP_MCAN_FIFO_0_NUM (5U)
    msgRAMConfigParams.rxFIFO0size = APP_MCAN_FIFO_0_NUM;
    msgRAMConfigParams.rxFIFO0waterMark = 3U;
    msgRAMConfigParams.rxFIFO0OpMode = 1U;

    The interrupt function is as follows,

    static void App_mcan2Intr1ISR(uintptr_t arg)
    {
        uint32_t intrStatus;
    
        intrStatus = MCAN_getIntrStatus(gCan2ModAddr);
        //appLogPrintf("---CAN2---ISR1---intrStatus = 0x%x\n",intrStatus);
        MCAN_clearIntrStatus(gCan2ModAddr, intrStatus);
    
        if (MCAN_INTR_SRC_DEDICATED_RX_BUFF_MSG ==
            (intrStatus & MCAN_INTR_SRC_DEDICATED_RX_BUFF_MSG))
        {
            gMcan2IsrIntr1Flag = 0U;
            APP_mcan2RxTest();
        }
        if(MCAN_INTR_SRC_RX_FIFO0_NEW_MSG ==
            (intrStatus & MCAN_INTR_SRC_RX_FIFO0_NEW_MSG))
        {
            gMcan2IsrIntr1Flag = 0U;
            APP_mcan2RxTest();
        }
    }

    If there are multiple packets, how do I read them all?
    Read the function code as follows,

    static void APP_mcan2RxTest(void)
    {
        MCAN_RxNewDataStatus newDataStatus;
        MCAN_ErrCntStatus    errCounter;
    
        {
            while (gMcan2IsrIntr1Flag)
            {}
            gMcan2IsrIntr1Flag = 1U;
            /* Checking for Errors */
            MCAN_getErrCounters(gCan2ModAddr, &errCounter);
            if ((0U == errCounter.recErrCnt) &&
                (0U == errCounter.canErrLogCnt))
            {
                MCAN_getNewDataStatus(gCan2ModAddr, &newDataStatus);
                MCAN_clearNewDataStatus(gCan2ModAddr, &newDataStatus);
                MCAN_readMsgRam(gCan2ModAddr,
                    MCAN_MEM_TYPE_FIFO,
                    //MCAN_MEM_TYPE_BUF,
                    0U,
                    0U,
                    &rxMsg);
    			// ...
    		}
    	}
    }

  • Hello, 

    Please expect delay in my response, as today is holiday in TI India.

    Regards

    Tarun Mukesh 

  • Hello,

    Thanks for waiting.

    May i which SDK you are facing the issue ? Is it MCAL driver or PDK driver ?

    The current demand is that can_fd1 and can_fd2 should be combined into group1 and the bus load rate should reach 60%. can_fd1 is used to realize the load demand, and the standard frame message length is 48 bytes, which can achieve the required load rate, but the receiving side can only receive about 1000 frames of data by using interrupt mode.

    What does combined into group 1 mean here?

    Which CAN instances are you using ?

    Regards

    Tarun Mukesh

  • Hello,

    Thank you for your reply, the problem appears in the can instance in the SDK.

    I am sorry that I could not give you the feedback in time because of the recent National Day holiday.

    The demand for 60% load has been turned off.

    Thanks

  • Hello li liu,

    I am sorry that I could not give you the feedback in time because of the recent National Day holiday.

    No issues.Understandable.

    Is the problem still open here ?

    Regards

    Tarun Mukesh