Jetson Nano and SPI CAN Bus

@ShaneCCC
So I got a little further but having an issue booting, I am attaching a full serial boot log. nano_boot_MCP251x.log (19.7 KB)

I have my CAN module connected to GPIO pins outlined in initial post.

So I downloaded today’s latest image. Here is the exact size of the downloaded zip
-rw-rw-r-- 1 oxoocoffee oxoocoffee 6450819553 Nov 16 12:32 jetson-nano-4gb-jp441-sd-card-image.zip

I wrote it to a brand new 32G SD card and booted from it. After accepting the agreement I did not do a system update or any other changes. I did copy three files located in mcp-latest.zip to

$ sudo cp tegra210-p3448-0000-p3449-0000-a02-mcp251x.dtbo /boot
$ sudo cp tegra210-p3448-0000-p3449-0000-a02.dtb /boot/dtb/
$ sudo cp tegra210-p3448-0000-p3449-0000-b00.dtb /boot/dtb/

Next, I did run
sudo /opt/nvidia/jetson-io/jetson-io.py

Selected MCP then save and reboot. This time I did not have a save error. But there is an error when booting. It is booting in the loop. The log file I am providing is where it stops and after some time it reboots itself again. From what I can tell there were others with such issues where they could not fully boot.

Here is my system info (without any updates)

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.5 LTS
Release:	18.04
Codename:	bionic

cat /etc/nv_tegra_release 
# R32 (release), REVISION: 4.4, GCID: 23942405, BOARD: t210ref, EABI: aarch64, DATE: Fri Oct 16 19:44:43 UTC 2020

$ uname -a
Linux ab-sim-master 4.9.140-tegra #1 SMP PREEMPT Fri Oct 16 12:32:46 PDT 2020 aarch64 aarch64 aarch64 GNU/Linux

Do you still recommend running sudo ./flash.sh jetson-nano-qspi-sd sda1 at this point? If so where can I get flesh.sh and jetson-nano-qspi-sd

EDIT: So I found NV_Jetson_Nano_Developer_Kit_User_Guide.pdf. Reading…

Thank you

Those package was gen by the sdkmanager after you install the system image.
You should be able know the patch from the sdkmanager GUI.

Could you run jetson-io.py save without reboot and check the /boot/extlinux/extlinux.conf
Also you can modify the extlinux.conf to create a backup boot entry if you have UART connect to select the backup entry if can’t boot.

@ShaneCCC
When you say Those package are you referring to jetson-nano-4gb-jp441-sd-card-image.zip or mcp-latest.zip? Please be more specific. There are too many “packages” involved.
When you say “install the system image” do you mean create an SD card from ‘jetson-nano-4gb-jp441-sd-card-image.zip’?
“You should be able know the patch from the sdkmanager GUI.” Where can I find it? is it on the Nano SD card I booted from?

Do I have to complete the above steps first before I rerun " jetson-io.py"?
If I missed some step above please be more specific not short generic answers :)

So I did rerun jetson-io.py, selected MCP and saved without reboot

 |                    Configuration saved to file                     |
 |/boot/tegra210-p3448-0000-p3449-0000-b00-mcp251x-can-controller.dtb.|
 |                                                                    |
 |                   Reboot system to reconfigure.                    |
 |                                                                    |
 |                                                                    |
 |                       Press any key to exit                        |

Here is contents of /boot/extlinux/extlinux.conf

TIMEOUT 30
DEFAULT MCP251x CAN Controller

MENU TITLE L4T boot options

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      INITRD /boot/initrd
      APPEND ${cbootargs} quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 

# When testing a custom kernel, it is recommended that you create a backup of
# the original kernel and add a new entry to this file so that the device can
# fallback to the original kernel. To do this:
#
# 1, Make a backup of the original kernel
#      sudo cp /boot/Image /boot/Image.backup
#
# 2, Copy your custom kernel into /boot/Image
#
# 3, Uncomment below menu setting lines for the original kernel
#
# 4, Reboot

# LABEL backup
#    MENU LABEL backup kernel
#    LINUX /boot/Image.backup
#    INITRD /boot/initrd
#    APPEND ${cbootargs}

LABEL MCP251x CAN Controller
	MENU LABEL MCP251x CAN Controller
	LINUX /boot/Image
	FDT /boot/tegra210-p3448-0000-p3449-0000-b00-mcp251x-can-controller.dtb
	INITRD /boot/initrd
	APPEND ${cbootargs} quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0

Also this looks suspicious in log file I attached

## Flattened Device Tree blob at 80000000
   Booting using the fdt blob at 0x80000000
   reserving fdt memory region: addr=80000000 size=20000
   Using Device Tree in place at 0000000080000000, end 000000008003ea94

ERROR: DT property /psci/nvidia,system-lp0-disable missing in source; can't copy

at /dvs/git/dirty/git-master_linux/3rdparty/u-boot/arch/arm/mach-tegra/dt-edit.c:176/fdt_iter_copy_prop()

Thank you

You can download the sdkmanager from below link and run it on host PC.

Below link are how to flash Image to external SSD may be help.

@ShaneCCC
Please note as I pointed earlier that I am NOT using SSD. I am using SD Card. So please do not increase SSD information here. It is already unnecessarily complicated steps to get what I want.
I feel like instead of getting closer I am getting farther from my problem. I provided logs and everything I could to help navigate this issue. All I (and looks like others in other related threads) am getting is “it works for me”. So could you please explain in DETAIL how your system/setup is different based on the information I provided? When you stated “it works for me” did you mean you were able to save on the last step in jetson-io.py? Or were you able to boot? and CAN bus worked?

On a different note. I did try just a few min ago to do a system update (apt full-upgrade).
As some point of upgrade, I got this ERROR

Setting up gir1.2-gdm-1.0 (3.28.3-0ubuntu18.04.6) ...
Setting up gdm3 (3.28.3-0ubuntu18.04.6) ...
Processing triggers for nvidia-l4t-kernel (4.9.140-tegra-32.4.4-20201027211359) ...
Processing triggers for ca-certificates (20201027ubuntu0.18.04.1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Errors were encountered while processing:
 nvidia-l4t-kernel-dtbs
E: Sub-process /usr/bin/dpkg returned an error code (1)

Running again I get issue related to dtb I copied

Do you want to continue? [Y/n] Y
Setting up nvidia-l4t-kernel-dtbs (4.9.140-tegra-32.4.4-20201027211359) ...
Decompile /boot/dtb/tegra210-p3448-0000-p3449-0000-a02.dtb
tegra210-p3448-0000-p3449-0000-b00.dtb failed, quit.
dpkg: error processing package nvidia-l4t-kernel-dtbs (--configure):
 installed nvidia-l4t-kernel-dtbs package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 nvidia-l4t-kernel-dtbs
E: Sub-process /usr/bin/dpkg returned an error code (1)

Do you guys have plans to add MCP to jetson-io.py like two other devices that are there?

Ok, So I just set up a new VM 18.04 with the latest updates. Then I installed the latest SDK manager.
Now, after starting sdkmanager, I signed in and it looks like my Nano be connected.
So I am trying to figure out what is my next step?

  1. Do I connect USB port to VM running sdk manager?
  2. Do I have to enter some DFU mode?

Again. With very partial information I am getting back I feel like I am 10 steps closer to my problem vs one step closer. I understand everyone is busy. I just want to get this done and move on with my tasks.
Is there a paid support I can call and get this resolved in a timely matter? Or set up Zoom? Then I will do a clear write-up for others to enjoy since this looks like a very hard thing to do here.

Thank you

I saw your post linked on this thread.

I had similar issues trying to get this same CAN board up and running. I posted my experience and what I did on the other thread.

@oxoocoffee
I said “it works for me” means I can run jetson-io.py and save reboot without problem with mcp-latest.zip I don’t have CAN bus to verify the CAN function.

Yes, you need to connect the USB and enter force recovery mode for sdk manager install the image.

@ShaneCCC
Please clergy this to me. Since I very recently downloaded latest SD image (last week), and also updated to latest “apt full-upgrade”. Should’t I be on latest already? What will SDK manager do for me? Will it update entire SD card? just boot/? Is SDK manager installed image in recovery mode different then downloaded image? Am I expected to loos data on SD card?

On different topic.
Also would it be possible to add MCP25xx to jetson-io.py by default like other two devices?

When you update the image by sdkmanager it will format the SD card first, So yes the data will be lost.

Hi,
Am I missing something or is there something wrong with my board?
I download the newest Jetson Nano image then flash that to the SD card.
Once flashed I finished the ToS screen and Launch SDK Manager to flash the Nano with newest Image. While In SDK Manager it detect my board as Jetson Nano (Development Kit), does this matter? I have the Standard Jetson Nano with SD card slot.

Once finished, I copied the mcp-lastest.zip file over to my Nano
1)I copied
…-a02.dtb to /boot
…-a02-mcp251…dtbo to /boot
…-b01.dtb to /boot/dtb
2)reboot the machine
3)sudo /opt/nvidia/jetsonio/jetsonio.py - > configured by hardware → select the new CAN module and restart

After Restart. My Nano is now stuck in the Boot LOGO. Did i missed a step or messed up somewhere?

Your board isn’t devkit?

I’m not sure; I am confused on where to find the information for it
My module is P3448 180-13448-DAAA-B01, Is this the same as P3448-0000?
and my carrier board is P3450 180-13449-DAAF-B01

Where did you get it. Could you take a picture for checking.

Here are the pictures of the carrier board and module. My purchasing department got it from Arrow.com.

Beside that, did I missed a step somewhere that caused my board not to boot after setting the overlay?
Or do you think it is a board compatibility issue ?

Looks like it’s devkit.
Can you try if can connect it by ssh then modify the /boot/extlinux/extlinux.conf to apply original dtb to check if can boot.

It boot fine with the original dtb. It stop booting correctly when the files from your link is applied
https://forums.developer.nvidia.com/uploads/short-url/yQPyx7C4JJXnQxWmKbRJA5jNm7e.zip (Pulled from comment above)
Here is the two states that I can achieve with the mcp-latest.zip from link above
1)
If I copy JUST the a02.dtb and a02-mcp2515.dtbo from that link, then Jetson-io.py will say that MCP2515 is not compatible and wouldnt let me enable it.

  1. If I copy a02.dtb and a02-mcp2515.dtbo to /boot/ AS WELL AS b00.dtb into /boot/dtb and enable the MCP2515 through Jetson-io hardware function mode, then the system will stuck at Nvidia Logo on boot.

Do you know why mcp2515.dtbo from the link above is incompatible? I tried to de-compile the dtbo but I get (DUMP ABORTED) message. Could you generate a new Mcp2515 overlay that is compatible with B0x version of the Nano?

Hi will1,

Try this : https://forums.developer.nvidia.com/t/jetson-nano-and-mcp2515-can-module/112271/249?u=tnakyol

Regards,

Thanks @tnakyol , I was following that forums post before coming to this one.
With Andrew’s method, my jetson-io.py would crash as soon as I try to run it.
All I can see is the border of the program then it closes.

Hi will1,

The same happened to me, jetson-io.py would crash, however I had began all the step in the beginning and never crashed again. Careful with the steps.

I created MCP251x.dtbo file without any change in MCP251x.dts.txt .
What I have done step by step:

  1. Delete txt extension in MCP251x.dts.txt.
  2. “make all_jetsonnano” and “sudo make install_jetsonnano”
  3. MCP251x.dtbo generated and I copied the file into /boot/
  4. “sudo /opt/nvidia/jetson-io/jetson-io.py” . I choose MCP251x can controller. Jetson nano reboot itself
  5. Now I can see can0 interface when I type ifconfig.
  6. sudo ip link set can0 up type can bitrate 500000
  7. cansend can0 456#43414e2054657374
  8. "7.th step didn’t give any error but Nothing have seen by PCAN-USB(pcanview).

@tuna.akyol I will try that method one more time. I was able to get the can module (MCP2515) to send data with Raspberry PI and Jetson NX; so atleast I know there is no hardware issue.

for your 7-8 can you verify your can signal with an oscilloscope ?
make sure there is SPI coming out from Nano and Can coming out from MCP2515; Do not connect the PCAN-USB while testing for the can signal because it might generate it own CAN signal which wouldn’t help you verify if the MCP module itself is working or not.