Re: How to set MASK & filter value for -- freescale Flexcan controller

Dinesh Guleria <[email protected]>
Newsgroups gmane.comp.hardware.bus.can
Message-ID <CAKpDV8tFwkeaM0bGVifchA1Xd4uKhrPjJnJ=uzFSjm=HbaXjJw@mail.gmail.com>
Thanks for reply, is it fine now ?
*MASK ---> put 0 where ever bits differ & 1 where bits are same*


On Mon, Sep 2, 2013 at 6:06 PM, J Nagy <[email protected]> wrote:

> Suppose i want to receive only ID_1 & ID_2.
>
> ID_1  =  0x01;       // 0000 0001
> ID_2  =  0x33;       // 0011 0011
> mask = 0x32;       // 0011 0010
> filter =    0x01;       // 0000 0001
>
> For MASK ---> put 1 where ever bits differ & 0 where bits are same
> For FILTER  --> dont care different bits & copy value where bits are same
>
>
> Is above two steps right ?
>
>
> No. The filter sounds right, but the mask must be 1 whenever the filter
> bit is significant, whether it is a 0 or a 1.
>
> Jim
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.