Standard fame mask setting (MPC5644C)

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

Standard fame mask setting (MPC5644C)

820 Views
WUXIE
Contributor I

How to set the Standard frame mask When CAN initializatiion?I Set the Registers,But MASK Not work !

0 Kudos
6 Replies

803 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

how did you set registers and what is not working? Do you use global or individual mask scheme? 
Mask registers can only be written in Freeze mode. The 11bit std mask is left shifted by 18bits in mask register.

BR, Petr

0 Kudos

760 Views
WUXIE
Contributor I

Hello,

I use Individual mask,and setting in Freeze mode。

For example,Can Type registers Set as 0( Standard Frame ), MB ID set as 0x7FF,mask set as 0xFFFF。after Can initialization,The MCU not only Can receive 0x7FF Standard Frame,But also Can Receive Other Standard Frame( 0x 500); So the mask Not Works。

0 Kudos

751 Views
PetrS
NXP TechSupport
NXP TechSupport

can you share your code?

BR, Petr

0 Kudos

715 Views
WUXIE
Contributor I

Hello ! Can You show me The Correct Codes,Thanks。

can1_map.BUF[i].CS.B.IDE = 0;
can1_map.BUF[i].ID.R = 0x7FF;
can1_map.RXIMR[i].R = 0xFFFF;

0 Kudos

707 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

note standard ID and mask are left-shifted by 18bits in MB's ID word and mask register, so correct setting is

can1_map.BUF[i].CS.B.IDE = 0;
can1_map.BUF[i].ID.R = 0x7FF<<18;
can1_map.RXIMR[i].R = 0x7FF<<18;

BR, Petr

0 Kudos

479 Views
WUXIE
Contributor I

thanks  a lot , Petr 

0 Kudos