CAN MASK & Filter setting

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

CAN MASK & Filter setting

Dinesh Guleria
Hi,

suppose i want to receive following two base frame ID on can bus :--
0x01;                // 0000 0001
0x33;                // 0011 0011

mask = 0xCD;        // 1100 1101                        -----> put 0 for diffrent bits ------ & ------ 1 for common bits
filter = 0x01;      // 0000 0001                         ------>put 0 for dont care bits ------ & ------ SAME VALUE for common bits

Is this mask filter setting correct ?


At hardware level following operation will be performed, :---
result = ( filter XOR id ) OR mask;
Acceptance happens  if all bits are set in result. i.e result = 0x07FF

is it right ? 

Regards,
Dinesh