hi,
how to add CAN ID filter?
uint32_t id_filter_table[]={0x001,0x002,0x003,0x004,0x022};
void CAN_id_filter(uint8_t instance)
{
for(int i=0;i<sizeof(id_filter_table);i++)
FLEXCAN_DRV_SetRxMbGlobalMask(instance,FLEXCAN_MSG_ID_STD,id_filter_table[i]);
}
is right?
I test,it receive all can ID,why?
Hi,
this example configures 1 TX MB and 1 RX MB with different IDs, exact match is expected. If you set loopback mode, message is received, but does not match with configured ID, so it is not stored into RX MB and no LED can be toggled.
Try to simple configure same ID for both MBs, for example use
#define RX_MSG_ID (1UL)
BR, Petr