these are my set in the function of ID filter mask.But when the can modoule receives the value of 0x1f128000,the value of 0x1f128000 is received.the 8 of the 0x1f128000 is not match the 3 of the 0x1f123000 .why the value is teceived? How is the ID filter mask work? How to set the ID filter mask in MPC5604P？
How do you set elements of the RXFIFO ID table in fact? The ID table specifies filtering criteria for accepting frames into the RXFIFO.
Note there is a misalignment between the position of the ID field in the Rx MB and in RXIDA, RXIDB and RXIDC fields of the ID Tables. In fact RXIDA filter in the ID Tables is shifted one bit to the left from Rx MBs ID. This leads the RXGMASK to affect Rx MB and Rx FIFO filtering in different ways.
Thus it is recommended to used Individual Mask registers if RXFIFO is used.
The eight elements of the filter table are individually affected by the first eight Individual Mask Registers
(RXIMR0–RXIMR7). The rest of the RXIMR, starting from RXIM8, continue to affect the regular MBs, starting from MB8. If the BCC bit is negated, then the FIFO filter table is affected by the legacy mask registers as follows: element 6 is affected by RX14MASK, element 7 is affected by RX15MASK and the other elements (0 to 5) are affected by RXGMASK.
If the RXFIFO is enabled the ID table resides in MB6-MB7 space. You have to initialize whole ID table.
Each element in ID table ( the IDs you want to receive into an RXFIFO) is affected by Mask registers in following manner
If a mask bit is asserted, then the corresponding ID bit is compared. If the mask bit is negated, the corresponding ID bit is “don’t care”.
thank you for your asking very much! but you said that If a mask bit is asserted, then the corresponding ID bit is compared.that is the mask bit is "1" and the corresponding ID must be "1",the CAN can recicve the ID?or the corresponding ID must be "0",the CAN can recicve the ID?