KE06Z CAN_LDD filter

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

KE06Z CAN_LDD filter

Jump to solution
1,046 Views
tommyb90
Contributor III

Hi to everyone,

I am trying to configure individual acceptance mask filter on a  FRDM-KE06Z dev-board.

Until now I accepted every frame and checked later if the frame was correct and everything was working properly. Now with multiple nodes in my system

I am using a Standard ID and I set the Individual acceptance mask to 0xFFFFFFC0 as I need only the last 6 bits to be compared (by default the mask is 0xFFFFFFFF that means all IDs can be valid).

The ID Filter Table is set to 0x00000029, the global mask cannot be enabled.

In this configuration I sent 0x28 and 0x29 as IDs, but both IDs were received.

I tried using the SetAcceptanceMaskTable and SetRxIDFilterTable methods and also tried with the 0xFF03FFFF mask (bits 29 to 18).

Can anyone post me where to find the correct bit configuration (assuming that I'm clearing the wrong bits in the acceptance mask)?

Thanks in advance.

0 Kudos
1 Solution
684 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Tommaso,

   Please read the KE06 reference manual carefully about the MSCAN filter.

http://www.nxp.com/files/microcontrollers/doc/ref_manual/MKE06P80M48SF0RM.pdf?fasp=1&WT_TYPE=Referen... 

  page 638, take 32bit maskable identifier as an example:

pastedImage_2.png

pastedImage_3.png

pastedImage_4.png

   Standard ID is 11bit, it is from IDAR1 bit 5 to bit7, and IDAR0 bit0-bit7.

So, if you want to just receive the standard ID 0X29, you need to configure it like this:

CAN_IDAR0  : 0x29<<21  

IDAR0

IDAR1

IDAR2

IDAR3

7

6

5

4

3

2

1

0

7

6

5

4

3

2

1

0

7

6

5

4

3

2

1

0

7

6

5

4

3

2

1

0

0

0

0

0

0

1

0

1

0

0

1

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

 

CAN_IDMR0 : 0X001FFFFF

IDMR0

IDMR1

IDMR2

IDMR3

7

6

5

4

3

2

1

0

7

6

5

4

3

2

1

0

7

6

5

4

3

2

1

0

7

6

5

4

3

2

1

0

0

0

0

0

0

0

0

0

0

0

0

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

Besides, take care,

pastedImage_5.png

  1, is igore in filter register

0, is checking.

So, if you want to just get 0X29 standard ID, you must check every standard ID bit.

ID  :  0x29<<21 =0X05200000

FILTER  :    0X001FFFFF

Wish it helps you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
3 Replies
684 Views
tommyb90
Contributor III

Yes, it helps me a lot!

Thanks!

0 Kudos
685 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Tommaso,

   Please read the KE06 reference manual carefully about the MSCAN filter.

http://www.nxp.com/files/microcontrollers/doc/ref_manual/MKE06P80M48SF0RM.pdf?fasp=1&WT_TYPE=Referen... 

  page 638, take 32bit maskable identifier as an example:

pastedImage_2.png

pastedImage_3.png

pastedImage_4.png

   Standard ID is 11bit, it is from IDAR1 bit 5 to bit7, and IDAR0 bit0-bit7.

So, if you want to just receive the standard ID 0X29, you need to configure it like this:

CAN_IDAR0  : 0x29<<21  

IDAR0

IDAR1

IDAR2

IDAR3

7

6

5

4

3

2

1

0

7

6

5

4

3

2

1

0

7

6

5

4

3

2

1

0

7

6

5

4

3

2

1

0

0

0

0

0

0

1

0

1

0

0

1

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

 

CAN_IDMR0 : 0X001FFFFF

IDMR0

IDMR1

IDMR2

IDMR3

7

6

5

4

3

2

1

0

7

6

5

4

3

2

1

0

7

6

5

4

3

2

1

0

7

6

5

4

3

2

1

0

0

0

0

0

0

0

0

0

0

0

0

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

Besides, take care,

pastedImage_5.png

  1, is igore in filter register

0, is checking.

So, if you want to just get 0X29 standard ID, you must check every standard ID bit.

ID  :  0x29<<21 =0X05200000

FILTER  :    0X001FFFFF

Wish it helps you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
684 Views
tommyb90
Contributor III

P.S. I am using Kinetis Design Studio 3.0.0 with Processor Expert

0 Kudos