Hi,
I am having trouble getting the CAN bus working on a Colibri IMX6S on the evaluation board. I’ve built and installed the angstrom-lxde-image on the board. It appears that the MCP2515 driver is installed fine and linked to CAN0 appropriately, and the can0 interface can be brought up without error, but it never shows any bytes received. I can send CAN data into the plug on the eval board and the TX/RX lights blink like the 2515 is receiving data, but the interface never shows any bytes received.
ifconfig output (after sending some data into X2)
root@colibri-imx6:/home# ifconfig -a
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:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
ip statistics output (after sending some data into X2)
root@colibri-imx6:/home# ip -details -statistics link show can0
2: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10
link/can promiscuity 0
can state ERROR-PASSIVE restart-ms 0
bitrate 125000 sample-point 0.875
tq 500 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
mcp251x: tseg1 3..16 tseg2 2..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 2 2 0 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
MCP241X config
root@colibri-imx6:/home# zcat /proc/config.gz | grep CONFIG_CAN_MCP
CONFIG_CAN_MCP251X=y
can0 device
root@colibri-imx6:/# ls -l /sys/class/net/can0/device
lrwxrwxrwx 1 root root 0 Jun 11 14:30 /sys/class/net/can0/device -> ../../../spi3.0