AnsweredAssumed Answered

How to configure  CAN in MPC5746 to filter useless id frame

Question asked by gaoxu gao on Nov 12, 2018
Latest reply on Nov 29, 2018 by gaoxu gao

"Here's my code, but it doesn't filter messages"

while (FLEXCAN_DRV_Init(INST_CANCOM1, &canCom1_State, &canCom1_InitConfig0)!= STATUS_SUCCESS) ;
flexcan_id_table_t stfilter[] ={{0,0,0x111},{0,0,0x222},{0,0,0x333},{0,0,0x444},{0,0,0x555},{0,0,0x666},{0,0,0x777},{0,0,0x888}};
FLEXCAN_DRV_SetRxMaskType(0, FLEXCAN_RX_MASK_GLOBAL);
FLEXCAN_DRV_ConfigRxFifo(0,FLEXCAN_RX_FIFO_ID_FORMAT_B,stfilter);
FLEXCAN_DRV_SetRxFifoGlobalMask(0,FLEXCAN_MSG_ID_STD,0xffffffff);

 

Outcomes