How to set Filter and Mask in Controller Area Network (CAN bus) protocol?

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

How to set Filter and Mask in Controller Area Network (CAN bus) protocol?

3,067 Views
mehdializadeh
Contributor II

Hi
I use IC mc9s08dz96. I want to use a mask and filter to receive CAN IDs. For this purpose, I have used the example in the  image . As it is known, The Transmitted ID is 01110101010(0x3AA), The Mask ID is 10100111000(0x538) and The filter ID is 00111101011(0x1EB). I use The CodeWarrior IDE, in CAN Properties, In Acceptance code 1 and Acceptance code 2,I set 000001EB, In Acceptance Mask 1 , Acceptance Mask 2, I set 00000538. Then I send the 0x3AA from pc to MCU, But this ID is rejected.
When I send 0x00, It is accepted. Does anyone know where the problem is with my implementation?

I followed this example:

CAN1.png

 This is my CAN properties:

FilterMaskSetting.PNG

And this is my transmitted ID:

transmitCAN.PNG

 

0 Kudos
1 Reply

3,042 Views
vicentegomez
NXP TechSupport
NXP TechSupport

 Sorry normally I do not use processor expert for CAN communication, I use the samples code under the 

msCAN Driver for S08

 

 

Also you can use the help on component for PE

Regards

0 Kudos