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.

AWR1843BOOST: Radar sensor stops working when received non-registered CAN message, how to ignore the non-registered CAN messages?

Expert 2050 points
Part Number: AWR1843BOOST

In our use case, we connect several Radar sensors through CAN bus. Each radar sensor broadcast the detected objects by CAN messages with the different CAN ID. 

We modified the firmaware base on Automotive Mrr Lab Demo and we find 2 issues during our test:

Issue 1. Radar sensor stops working when received message's ID of out of the range 

Ex. 

Set up the recived message object:

rxMsgObjectParams.direction = CANFD_Direction_RX;
rxMsgObjectParams.msgIdType = CANFD_MCANXidType_29_BIT;
rxMsgObjectParams.msgIdentifier = 0xA1;
rxMsgObjHandle = CANFD_createMsgObject (canHandle, &rxMsgObjectParams, &errCode);

and Set up the received message range:

rxMsgObjectRangeParams.msgIdType = CANFD_MCANXidType_29_BIT;
rxMsgObjectRangeParams.startMsgIdentifier = 0xA1;
rxMsgObjectRangeParams.endMsgIdentifier = 0xA5;
rxMsgObjRangeHandle = CANFD_createRxRangeMsgObject(canHandle, &rxMsgObjectRangeParams, &errCode);

Then, when I broadcast a CAN FD message with CAN ID 0x10, the firmware will stop working immediately.

Issue 2. Radar sensor's running is interrupted

To solve issue 1, I increased the received message range. for example, I set the range to allow all CAN IDs:

rxMsgObjectRangeParams.msgIdType = CANFD_MCANXidType_29_BIT;
rxMsgObjectRangeParams.startMsgIdentifier = 0x00000000;
rxMsgObjectRangeParams.endMsgIdentifier = 0xFFFFFFFF;
rxMsgObjRangeHandle = CANFD_createRxRangeMsgObject(canHandle, &rxMsgObjectRangeParams, &errCode);

Then the issue1 is seems solved, but I find after running the sensors on the same CAN network for while, some sensors stop working again. The log shows the dss stops due to it couldn't receive the frame response on time. I check the description of the function CANFD_createRxRangeMsgObject and I believe that is caused by the CAN messages sent in bulk over the network. These CAN messages interrupt the running of Radar sensor and make the processing delay. 

My question is: 

I would like to know if there is a solution to allow the radar sensor receive any CAN messages and without interrpution of non-interested CAN ID,

Or a solution just simply fix the issue 1.  

  • Hi,

    Would it be possible to use filters?

    Thank you

    Cesar

  • Thank you. 

    I would like to use filter in the CAN settings. But could not find where to set the CAN ID in filter configuration. 

    {
        /*Intialize MCAN Config Params*/
        memset (mcanCfgParams, sizeof (CANFD_MCANInitParams), 0);
    
        mcanCfgParams->fdMode          = 0x1U;
        mcanCfgParams->brsEnable       = 0x1U;
        mcanCfgParams->txpEnable       = 0x0U;
        mcanCfgParams->efbi            = 0x0U;
        mcanCfgParams->pxhddisable     = 0x0U;
        mcanCfgParams->darEnable       = 0x1U;
        mcanCfgParams->wkupReqEnable   = 0x1U;
        mcanCfgParams->autoWkupEnable  = 0x1U;
        mcanCfgParams->emulationEnable = 0x0U;
        mcanCfgParams->emulationFAck   = 0x0U;
        mcanCfgParams->clkStopFAck     = 0x0U;
        mcanCfgParams->wdcPreload      = 0x0U;
        mcanCfgParams->tdcEnable       = 0x1U;
        mcanCfgParams->tdcConfig.tdcf  = 0U;
        mcanCfgParams->tdcConfig.tdco  = 8U;
        mcanCfgParams->monEnable       = 0x0U;
        mcanCfgParams->asmEnable       = 0x0U;
        mcanCfgParams->tsPrescalar     = 0x0U;
        mcanCfgParams->tsSelect        = 0x0U;
        mcanCfgParams->timeoutSelect   = CANFD_MCANTimeOutSelect_CONT;
        mcanCfgParams->timeoutPreload  = 0x0U;
        mcanCfgParams->timeoutCntEnable= 0x0U;
        mcanCfgParams->filterConfig.rrfe        = 0x1U;
        mcanCfgParams->filterConfig.rrfs        = 0x1U;
        mcanCfgParams->filterConfig.anfe        = 0x1U;
        mcanCfgParams->filterConfig.anfs        = 0x1U;
        mcanCfgParams->msgRAMConfig.lss         = 127U;
        mcanCfgParams->msgRAMConfig.lse         = 64U;
        mcanCfgParams->msgRAMConfig.txBufNum    = 32U;
        mcanCfgParams->msgRAMConfig.txFIFOSize  = 0U;
        mcanCfgParams->msgRAMConfig.txBufMode   = 0U;
        mcanCfgParams->msgRAMConfig.txEventFIFOSize         = 0U;
        mcanCfgParams->msgRAMConfig.txEventFIFOWaterMark    = 0U;
        mcanCfgParams->msgRAMConfig.rxFIFO0size             = 0U;
        mcanCfgParams->msgRAMConfig.rxFIFO0OpMode           = 0U;
        mcanCfgParams->msgRAMConfig.rxFIFO0waterMark        = 0U;
        mcanCfgParams->msgRAMConfig.rxFIFO1size             = 64U;
        mcanCfgParams->msgRAMConfig.rxFIFO1waterMark        = 64U;
        mcanCfgParams->msgRAMConfig.rxFIFO1OpMode           = 64U;
    
    
        mcanCfgParams->eccConfig.enable         = 1;
        mcanCfgParams->eccConfig.enableChk      = 1;
        mcanCfgParams->eccConfig.enableRdModWr  = 1;
    
        mcanCfgParams->errInterruptEnable   = 0U;
        mcanCfgParams->dataInterruptEnable  = 1U;
        mcanCfgParams->appErrCallBack       = MCANAppErrStatusCallback;
        mcanCfgParams->appDataCallBack      = MCANAppCallback;
    }
    
    /**
     * @brief   Data structure defines the MCAN Global Filter Configuration parameters.
     */
    typedef struct CANFD_MCANGlobalFiltConfig_t
    {
        /*! Reject Remote Frames Extended
         *   0 = Filter remote frames with 29-bit extended IDs
         *   1 = Reject all remote frames with 29-bit extended IDs
         */
        uint32_t        rrfe;
    
        /*! Reject Remote Frames Standard
         *   0 = Filter remote frames with 11-bit standard IDs
         *   1 = Reject all remote frames with 11-bit standard IDs
         */
        uint32_t        rrfs;
    
        /*! Accept Non-matching Frames Extended
         *   0 = Accept in Rx FIFO 0
         *   1 = Accept in Rx FIFO 1
         *   others = Reject
         */
        uint32_t        anfe;
    
        /*! Accept Non-matching Frames Standard
         *   0 = Accept in Rx FIFO 0
         *   1 = Accept in Rx FIFO 1
         *   others = Reject
         */
        uint32_t        anfs;
    }CANFD_MCANGlobalFiltConfig;

  • Hi,

    We will be able to get back to you early next week

    thank you
    Cesar