Jetson nano and mcp2515 can module

Ok i am really struggling with this. I need the CAN to control motors but i am not getting anywhere. Can you guys help me? You seem to have it working already. This Thread is already pretty long and i am kinda lost on the steps so i want to explain what i figured out and where i am in the process. Here is what i managed to understand from this thread and other guides:

The most important bit of information is this one: There are old ways and guides that don’t work anymore and are the first google results. Evade those.

You need to be able to flash the Jetson. For this i installed Ubuntu 18.04 with the SDK_Manager tools from nvidia. I have successfully flashed the Jetson this way.

In the SDK manager you can click on the folder icon next to ‘Jetson OS image’. A folder will open with all files used to flash the Jetson. (There is one called ‘Drivers for Jetson’ and one called ‘File System and OS’ but they both open the same folder).

Just for sanity here is the Folder and its structure. All relative paths i mention will be from this Folder:

dev@ubu:~/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra$ tree . -L 2
├── bootloader
│ ├── badpage.bin
│ ├── bmp.blob
│ ├── boot.img
│ ├──
│ ├──
│ ├── cboot.bin
│ ├── chkbdinfo
│ ├── cvm.bin
│ ├── eks.img
│ ├── extlinux.conf
│ ├── flashcmd.txt
│ ├── flash_parameters.txt
│ ├── flash_win.bat
│ ├── flash.xml
│ ├──
│ ├── initrd
│ ├── l4t_bup_gen.func
│ ├── l4t_initrd.img
│ ├── LICENSE.chkbdinfo
│ ├── LICENSE.mkbctpart
│ ├── LICENSE.mkbootimg
│ ├── LICENSE.mkgpt
│ ├── LICENSE.mksparse
│ ├── LICENSE.tos-mon-only.img.arm-trusted-firmware
│ ├── LICENSE.u-boot
│ ├── mkbctpart
│ ├── mkbootimg
│ ├── mkgpt
│ ├── mksparse
│ ├── nv_boot_control.conf
│ ├── nvidia-l4t-bootloader_32.4.3-20200625213809_arm64.deb
│ ├── NVIDIA_Trademark_License_Addendum_SW.pdf
│ ├── nvtboot.bin
│ ├── nvtboot_cpu.bin
│ ├── nvtboot_recovery.bin
│ ├── nvtboot_recovery_cpu.bin
│ ├── P3448_A00_4GB_Micron_4GB_lpddr4_204Mhz_P987.cfg
│ ├── qspi_bootblob_ver.txt
│ ├── rp4.blob
│ ├── sc7entry-firmware.bin
│ ├── system.img
│ ├── system.img.raw
│ ├── t210ref
│ ├── tegra210-p3448-0000-p3449-0000-b00.dtb
│ ├──
│ ├── tegrabct
│ ├── tegradevflash
│ ├──
│ ├── tegraflash_internal.pyc
│ ├──
│ ├── tegrahost
│ ├── tegraparser
│ ├── tegrarcm
│ ├── tegrasign
│ ├── tos.img → tos-mon-only.img
│ ├── tos-mon-only.img
│ └── warmboot.bin
├── jetson-nano-devkit.conf → p3449-0000+p3448-0000-qspi-sd.conf
├── jetson-nano-devkit-emmc.conf → p3449-0000+p3448-0002.conf
├── jetson-nano-emmc.conf → p3449-0000+p3448-0002.conf
├── jetson-nano-qspi.conf → p3449-0000+p3448-0000-qspi.conf
├── jetson-nano-qspi-sd.conf → p3449-0000+p3448-0000-qspi-sd.conf
├── jetson-tx1.conf → p2597-0000+p2180-1000.conf
├── jetson-tx1-devkit.conf → p2597-0000+p2180-1000.conf
├── kernel
│ ├── dtb
│ ├── dtc
│ ├── Image
│ ├── kernel_headers.tbz2
│ ├── kernel_supplements.tbz2
│ ├── LICENSE.dtc
│ ├──
│ ├── nvidia-l4t-kernel_4.9.140-tegra-32.4.3-20200625213809_arm64.deb
│ ├── nvidia-l4t-kernel-dtbs_4.9.140-tegra-32.4.3-20200625213809_arm64.deb
│ └── nvidia-l4t-kernel-headers_4.9.140-tegra-32.4.3-20200625213809_arm64.deb
├── nv_tegra
│ ├── bsp_version
│ ├── config.tbz2
│ ├── graphics_demos.tbz2
│ ├── l4t_deb_packages
│ ├── l4t-usb-device-mode-filesystem.img
│ ├── LICENSE.brcm_patchram_plus
│ ├── LICENSE.l4t-usb-device-mode-filesystem.img
│ ├── LICENSE.libnvargus
│ ├── LICENSE.libnvcam_imageencoder
│ ├── LICENSE.libnveventlib
│ ├── LICENSE.libnvscf
│ ├── LICENSE.libnvtracebuf
│ ├── LICENSE.libtegrav4l2
│ ├── LICENSE.minigbm
│ ├── LICENSE.wayland-ivi-extension
│ ├── LICENSE.weston
│ ├── LICENSE.weston-data
│ ├──
│ ├── nvidia_drivers.tbz2
│ ├── nv_sample_apps
│ ├── nv_tools.tbz2
│ └── weston.tbz2
├── p2371.conf → p2597-0000+p2180-1000.conf
├── p2597-0000+p2180-1000-24x7.conf
├── p2597-0000+p2180-1000.conf
├── p3448-0000.conf.common
├── p3448-0000-max-spi.conf
├── p3448-0000-max-spi-sd.conf
├── p3449-0000+p3448-0000-qspi.conf
├── p3449-0000+p3448-0000-qspi-sd.conf
├── p3449-0000+p3448-0002.conf
├── p3450.conf → p3449-0000+p3448-0000-qspi.conf
├── README_Massflash.txt
├── rootfs
│ ├── bin
│ ├── boot
│ ├── dev
│ ├── etc
│ ├── home
│ ├── lib
│ ├── media
│ ├── mnt
│ ├── opt
│ ├── proc
│ ├── README.txt
│ ├── root
│ ├── run
│ ├── sbin
│ ├── snap
│ ├── srv
│ ├── sys
│ ├── tmp
│ ├── usr
│ └── var
├── source
│ └──
├── sources
│ ├── hardware
│ ├── kernel
│ └── u-boot
├── tools
│ ├── bmp-splash
│ ├──
│ ├── jetson-gpio-common_2.0.8_arm64.deb
│ ├──
│ ├── python3-jetson-gpio_2.0.8_arm64.deb
│ └── python-jetson-gpio_2.0.8_arm64.deb
└── TX1_boot-firmware-redundancy.txt

34 directories, 120 files

Now i think i need to make changes to these folders and then flash the Jetson with the changes so that i can have my MCP2515 running as a CAN socket.

The solution is we need to change the device tree. However i don’t know where i should do the changes.

I booted my Jetson Nano and used the following command to find out which dtb file is actually used by my jetson. This command has to be done on the jetson and not on your Ubuntu host machine:

developer@nano:~$ dmesg | grep .dts
[ 0.207848] DTS File Name: /dvs/git/dirty/git-master_linux/kernel/kernel-4.9/arch/arm64/boot/dts/…/…/…/…/…/…/hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-p3448-0000-p3449-0000-b00.dts
[ 0.416319] DTS File Name: /dvs/git/dirty/git-master_linux/kernel/kernel-4.9/arch/arm64/boot/dts/…/…/…/…/…/…/hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-p3448-0000-p3449-0000-b00.dts
[ 0.442907] tegra-pmc 7000e400.pmc: scratch reg offset dts data not present

from the output i figured i have to work with this file:


its the only one mentioned by dmesg. I found the file here(on the ubuntu machine with the sdk installed):

dev@ubu:~/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/kernel/dtb$ ls

I cannot simply open the file with a text editor. I needed to download ‘dtc’. To do this, use this command:

$ sudo apt install device-tree-compiler

using the compiler i could open the read with:

$ dtc tegra210-p3448-0000-p3449-0000-b00.dtb

However it is rather long and i will not post its output here. I used the following command to get the output into a copy and pasteable format:

$ dtc tegra210-p3448-0000-p3449-0000-b00.dtb >> dtb_outfile

I have it uploaded on a pastebin site if anyone wants to see it:

dtb file - Pastebin

I tried to use dtc to see the contents of ‘tegra210-p3448-0000-p3449-0000-a02-mcp251x.dtbo’ but i get the same error as jake. He mentioned he could open it when he build the latest dtc from git resources but i am getting errors on that one too. So i can’t open the ‘tegra210-p3448-0000-p3449-0000-a02-mcp251x.dtbo’ to see whats inside. Can anyone help me generate the file for the b00?

On the jetson i turned on SPI:

developer@nano:~$ sudo /opt/nvidia/jetson-io/

there i saw that no SPI was set on the GPIOs so i choose the option to configure the 40pin header and selected the spi1. saved changes and rebooted. Now jetson-io gives me this output:

 |                        3.3V ( 1)  ( 2) 5V                          |
 |                        i2c2 ( 3)  ( 4) 5V                          |
 |                        i2c2 ( 5)  ( 6) GND                         |
 |                      unused ( 7)  ( 8) uartb                       |
 |                         GND ( 9)  (10) uartb                       |
 |                      unused (11)  (12) unused                      |
 |                      unused (13)  (14) GND                         |
 |                      unused (15)  (16) unused                      |
 |                        3.3V (17)  (18) unused                      |
 |                        spi1 (19)  (20) GND                         |
 |                        spi1 (21)  (22) unused                      |
 |                        spi1 (23)  (24) spi1                        |
 |                         GND (25)  (26) spi1                        |
 |                        i2c1 (27)  (28) i2c1                        |
 |                      unused (29)  (30) GND                         |
 |                      unused (31)  (32) unused                      |
 |                      unused (33)  (34) GND                         |
 |                      unused (35)  (36) unused                      |
 |                      unused (37)  (38) unused                      |
 |                         GND (39)  (40) unused                      |

I connected my mcp2515 according to the pinout from . It powers up just fine. But i think i am missing steps because the MPC module does not show up at all in my dmesg:

developer@nano:~$ dmesg | grep can
[ 0.000000] OF: fdt:memory scan node memory@80000000, reg size 32,
[ 0.964001] tegra-pwm 7000a000.pwm: PWM clk cannot sleep in ops

developer@nano:~$ dmesg | grep spi
[ 0.437858] iommu: Adding device 7000d400.spi to group 7
[ 0.438129] iommu: Adding device 7000d600.spi to group 8
[ 0.438424] iommu: Adding device 70410000.spi to group 9
[ 1.613235] tegra-qspi 70410000.spi: Prod settings list not found
[ 1.614364] qspi_mtd spi32766.0: MX25U3235F (4096 Kbytes)
[ 1.614375] qspi_mtd spi32766.0: mtd .name = spi32766.0, .size = 0x400000 (4MiB) .erasesize = 0x00001000 (4KiB) .numeraseregions = 0

Does this mean i need to first configure the DTB files?

Where do i go from here? I downloaded the newest ‘’ from this thread but its made for the a02 and not the b00. I used diff to compare the two and they are vastly different. How did you guys made the changes to fit your b00?

Am i right in the assumption that i can just change the files in kernel/dtb and then flash the jetson and it should work? Or do i have to rebuild the kernel somehow? I am really lost here. I wanted to use the CAN mcp modul to work with motors and have a deadline. I am desperate for help.

1 Like

I am really sorry to check this thread in a long time being busy in other prior tasks.
You don’t need to make any changes in MCP Driver for now.

I will attach A02 and B00 files
These are the latest steps for A02 to follow after flashing J4.4 and device boots, you can follow the same for B00, just use B00 files (NOTE: mcp dtbo is same for A02 and B00 thus provided file with a02 name only) (91.6 KB) :

  1. Connect first MCP251x chip to SPI1 on 40-pin, use CS0 pin, connect INT on Pin 31 (GPIO Z.0)
  2. Connect second MCP251x chip to SPI2 on 40-pin, use CS0 pin, connect INT on Pin 32 (GPIO V.0)
  3. Copy attached tegra210-p3448-0000-p3449-0000-a02-mcp251x.dtbo under /boot/
  4. Copy attached tegra210-p3448-0000-p3449-0000-a02.dtb under /boot/dtb/
  5. Run /opt/nvidia/jetson-io/
  6. Select Configure Jetson for compatible hardware
  7. Select MCP251x CAN Controller
  8. Save and reboot
  9. Make CAN0 and CAN1 inerface up on network:
    $ip link set can0 up type can bitrate 500000
    $ip link set can1 up type can bitrate 500000

I am not sure the data in dtbs will work for you as it is, as many replied saying communication issue which I could not get time to resolve . Also I do not have MCP setup with me. But I do have some pointers to mention depending on the further issues faced.
So, please try above steps and let me know how it goes.
Also, with Jetpack 4.5, you will find these dtbs already present on the device and with the steps to use MCP in CAN documentation.

Thanks & Regards,

Thank you for your reply!

Here is what i have done and the results:

I only have one MCP2515 module that i can connect to my motor. So i will only be able to do can0.

I connected the MCP2515 to my jetson. Here is what i connected with what:

mpc - jetson
int - pin31
sck - pin23
si - pin19
so - pin21
cs - pin24
gnd - gnd
vcc1 - pin5v
vcc - pin3.3v

i copied the provided files to my jetson via a usb stick. I tried to use dtc to look into the mcp251x.dtbo but dtc is crashing, can you upload the non compiled version via pastebin?

I copied the provided files into the /boot/ and /boot/dtb of my running jetson:

developer@nano:~/mcp-latest$ ls
developer@nano:~/mcp-latest$ sudo cp tegra210-p3448-0000-p3449-0000-a02-mcp251x.dtbo /boot/
developer@nano:~/mcp-latest$ sudo cp tegra210-p3448-0000-p3449-0000-a02.dtb /boot/dtb/
developer@nano:~/mcp-latest$ sudo cp tegra210-p3448-0000-p3449-0000-b00.dtb /boot/dtb/

i ran the jetson io:

developer@nano:~/mcp-latest$ sudo /opt/nvidia/jetson-io/

selected the mcp can controller.

Selected to ‘save and reboot’.

the jetson io gave me this output:

| Configuration saved to file
| Press any key to reboot the system now or Ctrl-C to abort

The jetson-io closed and the jetson rebooted. I waited a bit and tried joining again via an ssh session over usb:

dev@ubu:~/Downloads/mcp-latest$ ssh developer@
ssh: connect to host port 22: Network is unreachable

However even waiting 5 minutes didn’t change anything. Can’t ping either:

dev@ubu:~/Downloads/mcp-latest$ ping
PING ( 56(84) bytes of data.
From icmp_seq=1 Destination Net Unreachable
From icmp_seq=2 Destination Net Unreachable
From icmp_seq=3 Destination Net Unreachable
— ping statistics —
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2000ms

Unplugged usb stick and the can module. Still the same.

Tried different usb cable. Nothing.

How can i check if my jetson is bricked?

I have it running with the barrel jack and the usb is connected to my host machine.

i put the jumper on FC REC and then the SDK could recognize it. Now i am reflashing it via the sdk manager.

OK i reflashed the Nano.

then i renamed




i had two a02 files and two b00 files. I only copied the b00 files this time.

I did the jetson io again. rebooted again.

Couldn’t ssh into the jetson anymore again.

Tried to plug into a hmdi screen to see what is even happening but the tv just tells me: ‘No Signal’

When does the JETPACK 4.5 is going to be released? is there a way to use a snapshot or something like that?

At the end i want to use the TX2 Jetson. I know it already comes with CAN bus pins but on my custom carrier board they are not available. So i am forced to use the MCP2515 with the TX2 also. Will i face the same issues with the TX2? Will the JETPACK4.5 also work with the TX2?

Currently, it’s only for Nano.
I copied same dtbs to my Nano and it boots fine after choosing MCP on jetson-io tool.
I need to know where exactly it stucks on boot.
How do you get boot logs? via minicom UART communication

@shgarg Can I please get the source code changes to your driver?

Hi jake,
There is no driver changes now. It should work with default driver present in kernel.


Ok. Thank you!

Hey jake, did you manage to decompile the tegra210-p3448-0000-p3449-0000-a02-mcp251x.dtbo?

Can you post the content? When i try to do so my dtc crashes. However i couldn update to the newest version like you did.

1 Like

@schirmcharmemelone I had made changes to it for the MCP25xxFD module, but I can compile it w/o changes. I’ll do so in the next day or two and post the .dto

@schirmcharmemelone Are you working with the MCP2517FD? If so a working driver can be found here: Question regarding the can hat and the jetson nano · Issue #6 · Seeed-Studio/seeed-linux-dtoverlays · GitHub

thank you for your reply!

but i am working with the mcp2515

@schirmcharmemelone Here is the dts: tegra210-p3448-0000-p3449-0000-a02-mcp251x.dts.txt (3.6 KB)

These warnings were raised during the decompile. I have no idea whether or not they’re important.

tegra210-p3448-0000-p3449-0000-a02.dts: Warning (reg_format): /fragment@1/overlay/spi@0:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
tegra210-p3448-0000-p3449-0000-a02.dts: Warning (reg_format): /fragment@2/overlay/spi@0:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
tegra210-p3448-0000-p3449-0000-a02.dts: Warning (unit_address_vs_reg): /local_fixups/fragment@1/overlay/spi@0: node has a unit name, but no reg or ranges property
tegra210-p3448-0000-p3449-0000-a02.dts: Warning (unit_address_vs_reg): /local_fixups/fragment@2/overlay/spi@0: node has a unit name, but no reg or ranges property
tegra210-p3448-0000-p3449-0000-a02.dts: Warning (pci_device_reg): Failed prerequisite ‘reg_format’
tegra210-p3448-0000-p3449-0000-a02.dts: Warning (pci_device_bus_num): Failed prerequisite ‘reg_format’
tegra210-p3448-0000-p3449-0000-a02.dts: Warning (simple_bus_reg): Failed prerequisite ‘reg_format’
tegra210-p3448-0000-p3449-0000-a02.dts: Warning (i2c_bus_reg): Failed prerequisite ‘reg_format’
tegra210-p3448-0000-p3449-0000-a02.dts: Warning (spi_bus_bridge): /fragment@1/overlay/spi@0: incorrect #address-cells for SPI bus
tegra210-p3448-0000-p3449-0000-a02.dts: Warning (spi_bus_bridge): /fragment@1/overlay/spi@0: incorrect #size-cells for SPI bus
tegra210-p3448-0000-p3449-0000-a02.dts: Warning (spi_bus_bridge): /fragment@2/overlay/spi@0: incorrect #address-cells for SPI bus
tegra210-p3448-0000-p3449-0000-a02.dts: Warning (spi_bus_bridge): /fragment@2/overlay/spi@0: incorrect #size-cells for SPI bus
tegra210-p3448-0000-p3449-0000-a02.dts: Warning (spi_bus_reg): Failed prerequisite ‘reg_format’
tegra210-p3448-0000-p3449-0000-a02.dts: Warning (spi_bus_reg): Failed prerequisite ‘spi_bus_bridge’
tegra210-p3448-0000-p3449-0000-a02.dts: Warning (avoid_default_addr_size): /fragment@1/overlay/spi@0: Relying on default #address-cells value
tegra210-p3448-0000-p3449-0000-a02.dts: Warning (avoid_default_addr_size): /fragment@1/overlay/spi@0: Relying on default #size-cells value
tegra210-p3448-0000-p3449-0000-a02.dts: Warning (avoid_default_addr_size): /fragment@2/overlay/spi@0: Relying on default #address-cells value
tegra210-p3448-0000-p3449-0000-a02.dts: Warning (avoid_default_addr_size): /fragment@2/overlay/spi@0: Relying on default #size-cells value
tegra210-p3448-0000-p3449-0000-a02.dts: Warning (avoid_unnecessary_addr_size): Failed prerequisite ‘avoid_default_addr_size’
tegra210-p3448-0000-p3449-0000-a02.dts: Warning (unique_unit_address): Failed prerequisite ‘avoid_default_addr_size’
tegra210-p3448-0000-p3449-0000-a02.dts: Warning (gpios_property): /fixups:gpio: property size (86) is invalid, expected multiple of 4
tegra210-p3448-0000-p3449-0000-a02.dts: Warning (interrupts_property): /fragment@1/overlay/spi@0: Missing interrupt-parent
tegra210-p3448-0000-p3449-0000-a02.dts: Warning (interrupts_property): /fragment@2/overlay/spi@0: Missing interrupt-parent[tegra210-p3448-0000-p3449-0000-a02.dts.txt|attachment]

<rant> Frankly whoever designed the dts format should be forever banned from designing declarative languages. </rant>

just starting to learn things with nano but got 2-Channel Isolated CAN Bus Expansion HAT for Raspberry Pi, MCP2515 + SN65HVD230 Dual Chips Solution, Multi Onboard Protection Circuits for playing around with can buses but having some major problems to get it working with the nano SPI, can anyone give beginner manual for adding this hat to nano.
I think this message thread answers might be quite near but the pin configuration seem a bit different that is needed for this board when connecting directly to SPI Connector? Or am i totally off =)

Hi @shgarg,

I have the same issue as @schirmcharmemelone described in #230.
Here you have the boot log: mcp2515-boot-loop.log (60.4 KB)
The Jetson Nano is stuck in a boot loop while showing the nvidia logo.

hi shgrag
somethong wrong,dtbo->dtsi;dtc:
livetree.c:521: get_node_by_phandle: Assertion `(phandle != 0) && (phandle != -1)’ failed.
Aborted (core dumped)
Can you provide an original document of dtsi,i make cs1 for 2 mcp2515, idon‘n how to make cs?

@juha.kauppi I haven’t worked with that specific hat, but waveshare used to sell one based on the mcp2517fd. Seeedstudio sells a 2 channel mcp2518fd based can hat and they also have an excellent driver for the nano, which also happens to work with the waveshare mcp2517fd hat. I suggest switching to the seeedstudio canfd hat if you can. The driver builds and installs and just works. I have two of them and they work perfectly with both the nano and raspi. Or use the waveshare canfd hat if you can find one, with the seedstudio driver.

CANFD is the latest version of the CAN spec. It is much faster and supports larger packets. However the mcp251xfd chips from microchip are fully backward compatible, so if you actually need classic can, these will work nicely there too.

Hi @shgarg,

I have a Jetson Nano version b01. Do I need to rename the dtbo name

tegra210-p3448-0000-p3449-0000-a02-mcp251x.dtbo under /boot/


tegra210-p3448-0000-p3449-0000-b00-mcp251x.dtbo under /boot/ in 3rd step?

In 4th step, Should I copy b00 version instead of a02 ?
After I have done all steps , jetson won’t boot again. Nvidia Logo doesn’t even show up.

Is there a date to jetpack 4.5 comes up ?


I am also having same issue. I created new thread so I will link it here for others Jetson Nano and SPI CAN Bus - #7 by oxoocoffee
Is there anyone in recent times who was able to get one CAN bus working?