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: MCAN_ECR Error Handling

Part Number: TDA4VM

Hi team,

Here's an issue from the customer may need your help:

In the CAN receive processing function, here's the following sample code:

 /* Checking for Errors */
            MCAN_getErrCounters(mcanModAddr, &errCounter);
            if ((0U == errCounter.recErrCnt) &&
                (0U == errCounter.canErrLogCnt))
            {
                MCAN_RxFIFOStatus fifoStatus;
                fifoStatus.num = (uint32_t)MCAN_RX_FIFO_NUM_1;
                MCAN_getRxFIFOStatus(mcanModAddr, &fifoStatus);
                MCAN_readMsgRam(mcanModAddr,
                                MCAN_MEM_TYPE_FIFO,
                                fifoStatus.getIdx,
                                (uint32_t)fifoStatus.num,
                                &rxMsg);
                (void)MCAN_writeRxFIFOAck(mcanModAddr,
                                          (uint32_t)fifoStatus.num,
                                          fifoStatus.getIdx);

            }
            else
            {
                appLogPrintf("MCAN: Error in reception %d: rec %d, cel %d!!!\n", inst->index, errCounter.recErrCnt, errCounter.canErrLogCnt);

            }

During a normal CAN transmission, it suddenly fails to receive, but the transmit is ok.

The rec in the ECR register is decrementing by log, but the cel is always 0.

Issues:

1) what to do when an ECR error occurs?

2) how to clear the value of the rec field in the ECR register?

3) why is the value of the gel always 0 when the ECR register rec field changes?

Could you help check this case? Thanks.

Best Regards,

Cherry