Re: How to set MASK & filter value for -- freescale Flexcan controller
J Nagy <[email protected]>
| Newsgroups | gmane.comp.hardware.bus.can |
|---|---|
| Message-ID | <[email protected]> |
> 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