FlexCAN Filtering Mechanism

cancel
Showing results for 
Search instead for 
Did you mean: 

FlexCAN Filtering Mechanism

Jump to solution
582 Views
m_syed_ahmed
Contributor III

Hi All,

We are working on FlexCAN and we needs to implement filtering mechanism. Below is the log we got in terminal. It seems to be filtering packets and candump is not showing any data. But, when we put ifconfig, it shows can1 has received all 5 packets. What does CAN filter does and how it will work? and one more thing, can0 and can1 has been connected in loopback mode. CAN0_H with CAN1_H and CAN0_L with CAN1_L.

root@imx6qdlsolo:~# candump can1,100~700 &
[1] 683
root@imx6qdlsolo: cansend can0 -i0x10 11 22 33 44
can1 010 [4] 0B 16 21 2C
root@imx6qdlsolo: cansend can0 -i0x100 11 22 33 44
root@imx6qdlsolo: cansend can0 -i0x101 11 22 33 44
root@imx6qdlsolo: cansend can0 -i0x701 11 22 33 44
can1 701 [4] 0B 16 21 2C
root@imx6qdlsolo: cansend can0 -i0x99 11 22 33 44
can1 099 [4] 0B 16 21 2C
root@imx6qdlsolo:~# ifconfig can0
can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:20 (20.0 B)
Interrupt:28

root@imx6qdlsolo:~# ifconfig can1
can1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:20 (20.0 B) TX bytes:0 (0.0 B)
Interrupt:29

Labels (1)
Tags (2)
0 Kudos
1 Solution
98 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Syed

FlexCAN filtering mechanism is described in sect.26.5 Rx FIFO Structure
Table 26-7. Rx FIFO Structure, Table 26-21. Rx FIFO Filters
i.MX6DQ Reference Manual, sect.37.1.4 Linux Menu Configuration Options
attached Linux Manual.
http://www.nxp.com/docs/en/reference-manual/IMX6DQRM.pdf

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

View solution in original post

0 Kudos
1 Reply
99 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Syed

FlexCAN filtering mechanism is described in sect.26.5 Rx FIFO Structure
Table 26-7. Rx FIFO Structure, Table 26-21. Rx FIFO Filters
i.MX6DQ Reference Manual, sect.37.1.4 Linux Menu Configuration Options
attached Linux Manual.
http://www.nxp.com/docs/en/reference-manual/IMX6DQRM.pdf

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

View solution in original post

0 Kudos