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.

AWRL6432: About range filter in CAN

Part Number: AWRL6432

Dear TI team

How can I configure CAN filter to achieve range filter function.

In example of mcan which is located in MMWAVE_L_SDK_05_01_00_04\examples\drivers\mcan\mcan_external_loopback_rx_interrupt,

I changed source as below.

ASIS

static void App_mcanInitStdFilterElemParams(MCAN_StdMsgIDFilterElement *stdFiltElem,
                                            uint32_t bufNum)
{
    /* sfid1 defines the ID of the standard message to be stored. */
    stdFiltElem->sfid1 = APP_MCAN_STD_ID;
    /* As buffer mode is selected, sfid2 should be bufNum[0 - 63] */
    stdFiltElem->sfid2 = bufNum;
    /* Store message in buffer */
    stdFiltElem->sfec  = MCAN_STD_FILT_ELEM_BUFFER;
    /* Below configuration is ignored if message is stored in buffer */
    stdFiltElem->sft   = MCAN_STD_FILT_TYPE_RANGE;

    return;
}

AFTER CHANGE

static void App_mcanInitStdFilterElemParams(MCAN_StdMsgIDFilterElement *stdFiltElem,
                                            uint32_t bufNum)
{
    /* sfid1 defines the ID of the standard message to be stored. */
    stdFiltElem->sfid1 = 0xC0;
    
    /* . */
    stdFiltElem->sfid2 = 0xCF;
    
    /* Store message in FIFO0 */
    stdFiltElem->sfec  = MCAN_STD_FILT_ELEM_FIFO0;
    
    /* Below configuration is ignored if message is stored in buffer */
    stdFiltElem->sft   = MCAN_STD_FILT_TYPE_RANGE;

    return;
}

I intended to receive CAN message of which message id is betwenn 0xC0 to 0xCF, but failed.

( Only 0xC0 can be received )

check this please.

Best and Regards

Choi