FLEXCAN Message Reception

cancel
Showing results for 
Search instead for 
Did you mean: 

FLEXCAN Message Reception

388 Views
ad_sabir86
Contributor I

Hi

Can we receive multiple CAN ID messages using single Message Buffer (MB).

e.g there are many standard CAN ID messages on CAN bus with IDs from 1800 to 1900 .

How to configure any MB to receive all these messages.

As far as i can only be able to receive One ID message using single MB (e.g MB4)

0 Kudos
1 Reply

350 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

The Accepance mask registers are used to filter incoming ID. ID ranges can be used if mask register is set desirably. There is bit2bit correspondence between received ID, mask and programmed MB ID (or RXFIFO ID filter elements). The mask says if corresponding incoming ID bit is compared with programmed ID bit.

If mask bit is cleared the incoming ID bit is not compared, it is don’t care. If mask bit is set, then there must be exact match between incoming ID bit and programmed ID bit. To receive a message into a MB/RXFIFO all relevant bits with mask bit set must be equal to programmed one.

So assuming you are using individual masking scheme ( MCR[IRMQ] =1), then with setting

MB4.ID = 0x1800;

RXIMR4 = 0x1FFFFF00;

you will receive 0x1800-0x18FF IDs into MB4

BR, Petr

0 Kudos