AnsweredAssumed Answered

msCAN xep100: Implementation of acceptance filtering

Question asked by Mandar Sansare on Sep 5, 2018
Latest reply on Sep 12, 2018 by lama


I want to implement acceptance filtering for can message. Using msCAN XEP100.

For eg i want to filter msg id: 1234

for this i have configured below things


if( Init_CAN (2,FAST) == ERR_OK_CAN)
err_temp = Config_CAN_MB(2,0,TXDF,0);
err_temp |= Config_CAN_MB(2,1,TXDF,0);
err_temp |= Config_CAN_MB(2,2,TXDF,0);
err_temp |= Config_CAN_MB(2,3,TXDF,0);
err_temp |= Config_CAN_MB(2,4,RXDF,0);
err_temp |= Config_CAN_MB(2,5,RXDF,0);
err_temp |= Config_CAN_MB(2,6,RXDF,0);
err_temp |= Config_CAN_MB(2,7,RXDF,0);

if(err_temp != ERR_OK_CAN)

and for filtering i have used the below part

#define ID_MASK0_CAN2 0x00
#define ID_MASK1_CAN2 0x00

#define ID_CODE0_CAN2 0x9A
#define ID_CODE1_CAN2 0x40

what is significance of AIdentifierRef in below function defination?

uint8 Config_CAN_MB(uint8 AChn, uint8 ABuffer, uint8 ACmode, uint8 AIdentifierRef)

additionaly i have defined below things

#define MO0_ID_CAN2 0x4D2

after updating the MO0_ID i was able to filter the msg ID.


I want to filter more signals for this, how to handle MOx_ID_CAN thing for filtering.


what is difference between msg buffer and msg object.


It will be helpful if anyone can provide more documentation or sample code for acceptance filtering usage in msCAN driver