FlexCAN multiple addressing to single buffer mpc55xx

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

FlexCAN multiple addressing to single buffer mpc55xx

Jump to solution
1,842 Views
r_james14
Contributor I

Hi There,

 

I am programming to the mpc55xx.

 

I have set up the flexcan as follows

 

pCAN_TAG->BUF[1].CS.B.IDE = 0;

pCAN_TAG->BUF[1].ID.B.STD_ID = 0x05;

pCAN_TAG->BUF[1].CS.B.CODE = 4;

 

is it possible to have multiple address go into a single buffer, for example ID 5 and ID 6?

 

Thanks

Labels (1)
Tags (3)
0 Kudos
Reply
1 Solution
1,488 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

Yes, you can use the RX Mask Rregisters for that purpose. These registers are used as acceptance masks for received frame ID. See more in device Reference Manual in chapter “RX Mask Registers”.

However you cannot make an acceptance mask for incoming standard ID=5 and ID=6 only , but you can do it for  ID=5 and ID=4 for example.  In this case the mask register can be following:

RX_MASK = 0x1FF80000;

BR,

Petr

View solution in original post

0 Kudos
Reply
3 Replies
1,489 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

Yes, you can use the RX Mask Rregisters for that purpose. These registers are used as acceptance masks for received frame ID. See more in device Reference Manual in chapter “RX Mask Registers”.

However you cannot make an acceptance mask for incoming standard ID=5 and ID=6 only , but you can do it for  ID=5 and ID=4 for example.  In this case the mask register can be following:

RX_MASK = 0x1FF80000;

BR,

Petr

0 Kudos
Reply
1,488 Views
r_james14
Contributor I

am i correct i can only do this globally so for example i carnt do the following,

buffer 1 = 0x50 + 0x51

buffer 2 = 0x60 + 0x61

buffer 3 = 0x70 + 0x71

i know the number dont make sense but im sure you get what i trying to do,

for each device all PDO SDO so into same buffer,

thanks

0 Kudos
Reply
1,488 Views
PetrS
NXP TechSupport
NXP TechSupport

Well, not sure I get it this time :smileyhappy:

Suppose global masking scheme; RXGMASK, RX14MASK and RX15MASK. In this scheme, MB14 and MB15 have individual masks and the others share the global mask.

So if you set the RXGMASK = 0x1FF80000 (meaning the lowest incoming standard ID bit does not care)

and set message buffers MB1-MB3 for reception with MB1 ID = 0x50, MB2 ID = 0x60 and MB3 ID = 0x70

then

incoming messages with ID 0x50 and 0x51 will match for MB1

incoming messages with ID 0x60 and 0x61 will match for MB2

incoming messages with ID 0x70 and 0x71 will match for MB3

Regards,

Petr

0 Kudos
Reply