FlexCAN multiple addressing to single buffer mpc55xx

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FlexCAN multiple addressing to single buffer mpc55xx

ソリューションへジャンプ
2,555件の閲覧回数
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

ラベル(1)
タグ(3)
0 件の賞賛
返信
1 解決策
2,201件の閲覧回数
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 件の賞賛
返信
3 返答(返信)
2,202件の閲覧回数
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 件の賞賛
返信
2,201件の閲覧回数
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 件の賞賛
返信
2,201件の閲覧回数
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 件の賞賛
返信