CAN MASK & Filter setting

Dinesh Guleria <[email protected]> Sat, 6 Feb 2016 17:32:27 +0530
Newsgroups gmane.comp.hardware.bus.can
Message-ID <CAKpDV8sb+xq7kN+ZvtkPVQiA=VU3yJD+mfVtZYTGJU1-po_3wA@mail.gmail.com>
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