SLAAET4 April 2025 MSPM0G3506 , MSPM0G3507 , MSPM0G3518 , MSPM0G3519
The Sysconfig does not currently support the configuration of more than one filter. More filters can be added in the user application, however, make sure that enough RAM is allocated during initialization. Remember to configure the number of filters in Sysconfig before configuring the filters in application code.
An example of how to add more filters in the application code is shown below. The start address is configured as 0x0 and the number of filters is configured as 2 in Sysconfig.
static const DL_MCAN_StdMsgIDFilterElement gMCAN0StdFiltelem_0 = {
.sfec = 0x1,
.sft = 0x0,
.sfid1 = 3,
.sfid2 = 4,
};
static const DL_MCAN_StdMsgIDFilterElement gMCAN0StdFiltelem_1 = {
.sfec = 0x10,
.sft = 0x0,
.sfid1 = 13,
.sfid2 = 14,
};
/* Configure Standard ID filter element */
DL_MCAN_addStdMsgIDFilter(MCAN0_INST, 0U, (DL_MCAN_StdMsgIDFilterElement *) &gMCAN0StdFiltelem_0);
DL_MCAN_addStdMsgIDFilter(MCAN0_INST, 1U, (DL_MCAN_StdMsgIDFilterElement *) &gMCAN0StdFiltelem_1);
The example below shows how to add more extended filters.
static const DL_MCAN_ExtMsgIDFilterElement gMCAN0ExtFiltelem_0 = {
.efec = 0x1,
.eft = 0x2,
.efid1 = 0x3,
.efid2 = 0x1FFFFFFF,
};
/* Configure Extended ID filter element */
DL_MCAN_addExtMsgIDFilter(MCAN0_INST, 0U, (DL_MCAN_ExtMsgIDFilterElement *) &gMCAN0ExtFiltelem_0);