AnsweredAssumed Answered

FlexCAN Filtering Mechanism

Question asked by Syed Ahmed on Feb 20, 2018
Latest reply on Feb 21, 2018 by igorpadykov

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

Outcomes