KE06Z CAN_LDD filter

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,910件の閲覧回数
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.

タグ(3)
0 件の賞賛
返信
1 解決策
1,548件の閲覧回数
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 件の賞賛
返信
3 返答(返信)
1,548件の閲覧回数
tommyb90
Contributor III

Yes, it helps me a lot!

Thanks!

0 件の賞賛
返信
1,549件の閲覧回数
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 件の賞賛
返信
1,548件の閲覧回数
tommyb90
Contributor III

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

0 件の賞賛
返信