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
Solved! Go to Solution.
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
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
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
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