MCP2515 Issue, thouroughly followed all existing threads, can't get it to work

I initially purchased a Jetson Nano 4GB, eMMC that didn’t work with the built in jetson-io.py tool, couldn’t get the mcp2515 to work on that so i purchased another Jetson Nano , B01 with the SD card. Now the jetson-io.py tool works.

I’ve scoured the entire nvidia forum for all existing threads regarding the MCP2515. Heres what I’ve done so far:

Both tried with RS485 CAN Expansion Board Designed For Jetson Nano, Digital Isolation, Built-In Protection Circuit
and a https://www.electrokit.com/en/product/can-bus-modul-mcp2515-tja1050-spi/

Both of these have a crystal of 8Mhz so in all the mcp251x.dts file I’ve changed the clock frequency to clock-frequency = <8000000>;

In the shield provided by waveshare the interrupt was on pin 29 so i changed that aswell but as i didn’t get that to work at all i just tried to follow GitHub - Thor-x86/seeed-linux-dtoverlays: Device Tree Overlays for Seeed boards

By using the https://www.electrokit.com/en/product/can-bus-modul-mcp2515-tja1050-spi/ driven by 3.3v directly using jumpers. And following all the pin setup in the readme.

I just flashed with 4.6.3 and at bootup did exactly as those instructions.

Heres dmesg

~/Downloads/seeed-linux-dtoverlays$ dmesg | grep mcp
[    6.769976] mcp251x spi0.0: MCP251x didn't enter in conf mode after reset
[    6.776911] mcp251x spi0.0: Probe failed, err=16
[    6.782929] mcp251x: probe of spi0.0 failed with error -16
[    7.804838] mcp251x spi1.0: MCP251x didn't enter in conf mode after reset
[    7.811706] mcp251x spi1.0: Probe failed, err=16
[    7.816374] mcp251x: probe of spi1.0 failed with error -16
~/Downloads/seeed-linux-dtoverlays$ ls /dev/spidev*
/dev/spidev0.1  /dev/spidev1.1
~/Downloads/seeed-linux-dtoverlays$ find /proc/device-tree/ | grep spi | grep compatible
/proc/device-tree/spi@70410000/compatible
/proc/device-tree/spi@70410000/spiflash@0/compatible
/proc/device-tree/spi@7000d600/compatible
/proc/device-tree/spi@7000d600/spi@1/compatible
/proc/device-tree/spi@7000d600/spi@0/compatible
/proc/device-tree/spi@7000da00/compatible
/proc/device-tree/spi@7000da00/spi-touch14x8@0/compatible
/proc/device-tree/spi@7000da00/spi-touch25x16@0/compatible
/proc/device-tree/spi@7000da00/spi-touch19x12@0/compatible
/proc/device-tree/spi@7000d800/compatible
/proc/device-tree/spi@7000d400/compatible
/proc/device-tree/spi@7000d400/spi@1/compatible
/proc/device-tree/spi@7000d400/spi@0/compatible

Ip link

~/Downloads/seeed-linux-dtoverlays$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 3a:ba:f9:1b:c6:9c brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 48:b0:2d:d3:e4:33 brd ff:ff:ff:ff:ff:ff
4: l4tbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether aa:0d:96:f6:c7:e9 brd ff:ff:ff:ff:ff:ff
5: rndis0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master l4tbr0 state UP mode DEFAULT group default qlen 1000
    link/ether aa:0d:96:f6:c7:e9 brd ff:ff:ff:ff:ff:ff
6: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master l4tbr0 state UP mode DEFAULT group default qlen 1000
    link/ether aa:0d:96:f6:c7:eb brd ff:ff:ff:ff:ff:ff
7: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:a7:a1:89:40 brd ff:ff:ff:ff:ff:ff

By trying

$ modprobe can_dev
$ modprobe can
$ modprobe can_raw
$ sudo ip link set can0 type can bitrate 500000
$ sudo ip link set up can0

Gives:

~/Downloads/seeed-linux-dtoverlays$ sudo ip link set can0 type can bitrate 500000
Cannot find device "can0"

I’ve done contuinity readings with a multimeter and there is contact between all pins.

I’m really stuck and can’t get this to work at all, I’ve tried for almost 2 weeks now by buying more components and other Jetson Nano’s… Any help is greatly appreciated.

I modified the original A02-MCP251x.dtbo file to use 8mhz instead -
clock-frequency = <0xf42400>;

Its attached to header pin 29 as the interrupt, how do i change the MCP251x.dtbo to use this pin?
interrupt-parent = <0xffffffff>;|
interrupts = <0xc8 0x01>;|

is the default, not quite sure what needs to change.

After further testing with all the mcp251x. files from here on the forum i had to follow Mcp2515 on jetson nano to even get the .dtbo to show up after running /opt/nvidia/jetson-io/jetson-io.py. I also removed the expansion shield and switched interrupt pin to different ones like 31, 22 etc as other users here have tried with no success…

Still stuck at:


dmesg | grep mcp
[    6.794007] mcp251x spi0.0: MCP251x didn't enter in conf mode after reset
[    6.801718] mcp251x spi0.0: Probe failed, err=16
[    6.806616] mcp251x: probe of spi0.0 failed with error -16
[    7.834014] mcp251x spi1.0: MCP251x didn't enter in conf mode after reset
[    7.840900] mcp251x spi1.0: Probe failed, err=16
[    7.845637] mcp251x: probe of spi1.0 failed with error -16

Update. 4.6.3 doesn’t work with MCP2515 at all, tried with multiple jetson nano and multiple MCP2515. 4.6.1 does work however.

Whats the difference between 4.6.1 and 4.6.3 with the mcp2515? I really need to use 4.6.3 and i can’t make it work…

@JerryChang @WayneWWW what could be the problem here in L4T 32.7.3?

The same problem with you, hope someone could give the solution T.T