MPC5644A, CAN ID filter

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC5644A, CAN ID filter

910 Views
youngguekim
Contributor III


Hi.

i am using Flexcan in MPC5644A

I want to receive Only ID 0x18005225, 0x18008380

So, I set Buffer[2] for Rx

and set RGXMASK to 0x7FF2C5A for filtering

 

But I need to use ID table to receive specific ID exactly

When I set RGXMASK to 0x7FF2C5A, I may receive ID 0x1, 0x4.....etc

 

there is way to use ID table or another tech for Powerful Filtering??? (I can't use RXFIFO in my environment)

 

Thank you.

Labels (1)
0 Kudos
2 Replies

686 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

The MB’s ID is checked against the received one while the filtering/masking is applied.

There are following rules for filtering for different FlexCAN module configuration:

a) When MCR[FEN]=0, no RX FIFO

   MCR[MBFEN]=0: MB0-MB63 use RXGMASK except MB14 uses RX14MASK and MB15 uses RX15MASK

   MCR[MBFEN]=1: MB0-MB63 use RXIMR0-RXIMR63

b) When MCR[FEN]=1, RX FIFO used

   MCR[MBFEN]=0: ID0-ID5 use RXGMASK, ID6 uses RX14MASK, ID7 uses RX15MASK

                               MB8-MB63 use RXGMASK except MB14 uses RX14MASK and MB15 uses RX15MASK

   MCR[MBFEN]=1: ID0-ID7 use RXIMR0-RXIMR7, MB8-MB63 use RXIMR8-RXIMR63

The mask bit in respective mask register have following meaning.

1 = The corresponding bit in the MB’s ID is checked against the one received

0 = the corresponding bit in the MB’s ID is “don’t care”

So how do you set the MB[2] ID?

As you have so different IDs to filter the global mask will not help a lot. You will always have some range of ID that will be accepted, depending of number of don’t care bits.

I can recommend you to use the individual masking scheme and set more MBs for receiving. For example set

MB[2] ID =  0x18005225 and RXIMR2 = 0x1FFFFFFF

MB[3] ID =  0x18008380 and RXIMR3 = 0x1FFFFFFF

BR, Petr

686 Views
youngguekim
Contributor III

Thank you very much

I exactly understand it.

0 Kudos