Duet 3 and jetson Nano?
-
@gtj0
Thx, I tried with the b00 however I got the issue again:Duet Control Server v3.2.0 Written by Christian Hammacher for Duet3D Licensed under the terms of the GNU Public License Version 3 [info] Settings loaded [info] Environment initialized [fatal] Could not connect to Duet (Timeout while waiting for transfer ready pin) [debug] System.OperationCanceledException: Timeout while waiting for transfer ready pin at DuetControlServer.SPI.DataTransfer.WaitForTransfer(Boolean inTransfer) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/SPI/DataTransfer.cs:line 1086 at DuetControlServer.SPI.DataTransfer.ExchangeHeader() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/SPI/DataTransfer.cs:line 1148 at DuetControlServer.SPI.DataTransfer.PerformFullTransfer(Boolean connecting) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/SPI/DataTransfer.cs:line 162 at DuetControlServer.SPI.DataTransfer.Init() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/SPI/DataTransfer.cs:line 104 at DuetControlServer.Program.Main(String[] args) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Program.cs:line 113
I have double checked the config, and I think the GPIO group settings rights where sat by DCS now.
-
@hanshogeland What's the output of
gpioinfo
. You may need to install gpiod to get that command.This is partial output of what I get...
line 11: unnamed unused input active-high line 12: "SPI1_MOSI" unused input active-high line 13: "SPI1_MISO" "dcs-trp-13" input active-high [used] line 14: "SPI1_SCK" unused input active-high line 15: "SPI1_CS0" unused input active-high line 16: "SPI0_MOSI" unused input active-high line 17: "SPI0_MISO" unused input active-high line 18: "SPI0_SCK" unused input active-high line 19: "SPI0_CS0" "cs_gpio" output active-high [used] line 20: "SPI0_CS1" unused input active-high line 21: unnamed unused input active-high
-
Thx,
This is part of the Output:
line 11: unnamed unused input active-high line 12: "SPI1_MOSI" unused input active-high line 13: "SPI1_MISO" unused input active-high line 14: "SPI1_SCK" unused input active-high line 15: "SPI1_CS0" unused input active-high line 16: "SPI0_MOSI" unused input active-high line 17: "SPI0_MISO" unused input active-high line 18: "SPI0_SCK" unused input active-high line 19: "SPI0_CS0" "cs_gpio" output active-high [used] line 20: "SPI0_CS1" unused input active-high line 21: unnamed unused input active-high line 22: unnamed unused input active-high
-
@hanshogeland
Did you install the DSF from the packages or do a manual install?How about the output of these commands:
$ ls -al /dev/gpio* $ sudo -iu dsf gpioget 0 13 $ cat /boot/extlinux/extlinux.conf
Also, try using this exact dtb instead of using the dtbo and jetson-io...
-
@gtj0 Thx again,
Yes these are the results, I was not able to run sudo -iu dsf gpioget 0 13
hans@hans-desktop:~$ ls -al /dev/gpio* crw-rw---- 1 root gpio 254, 0 feb 11 11:59 /dev/gpiochip0 crw-rw---- 1 root gpio 254, 1 feb 11 11:59 /dev/gpiochip1 hans@hans-desktop:~$ sudo -iu dsf gpioget 0 13 sudo: /sbin/nologin: command not found hans@hans-desktop:~$ sudo gpioget 0 13 0 s-desktop:~$ cat /boot/extlinux/extlinux.conf TIMEOUT 30 DEFAULT Single SPIDEV 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 Single SPIDEV MENU LABEL Single SPIDEV LINUX /boot/Image FDT /boot/kernel_tegra210-p3448-0000-p3449-0000-b00-single-spidev.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
So I have written down all the steps I have done during the setup
Flash Jetson SD with latest software Once started Add another Sudo user sudo adduser admin Install GIPIOD sudo apt-get update sudo apt-get install -y gpiod sudo groupadd gpiod sudo usermod -a -G gpiod hans Check Pins sudo gpioinfo Check Board info and Jetson IO https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/hw_setup_jetson_io.html Get Board info cat /sys/firmware/devicetree/base/compatible nvidia,p3449-0000-b00+p3448-0000-b00 nvidia,jetson-nano nvidia,tegra210 Download the correct DTBO https://forum.duet3d.com/topic/11777/duet-3-and-jetson-nano/87 Copy to boot sudo cp /home/hans/Downloads/tegra210-p3448-0000-p3449-0000-b00-single-spidev.dtbo /boot/tegra210-p3448-0000-p3449-0000-b00-single-spidev.dtbo Configure PIN sudo /opt/nvidia/jetson-io/jetson-io.py Select the corresponding DTBO - save and exit without reboot Check the boot extlinux has the correct changed DTBO name ReBoot Setup the DSF wget -q https://pkg.duet3d.com/duet3d.gpg wget -q https://pkg.duet3d.com/duet3d.list sudo mv duet3d.gpg /etc/apt/trusted.gpg.d/ sudo mv duet3d.list /etc/apt/sources.list.d/duet3d.list sudo chown root:root /etc/apt/trusted.gpg.d/duet3d.gpg sudo chown root:root /etc/apt/sources.list.d/duet3d.list Create a file /spidev.conf /etc/modprobe.d/spidev.conf options spidev bufsiz=8192 sudo cp /home/hans/Downloads/spidev.conf /etc/modprobe.d/spidev.conf Make sure the duet are connected to the Jetson Nano Install the DSF bundle: sudo apt-get install apt-transport-https sudo apt-get update sudo apt-get install duetsoftwareframework Copy the created config.json to other place and change to pin TramsferReadyPin 13 sudo cp /home/hans/Downloads/config.json /opt/dsf/conf/config.json Debug DSF hans@hans-desktop:~$ sudo /opt/dsf/bin/DuetControlServer -l debug Duet Control Server v3.2.0 Written by Christian Hammacher for Duet3D Licensed under the terms of the GNU Public License Version 3 [info] Settings loaded [info] Environment initialized [fatal] Could not connect to Duet (Timeout while waiting for transfer ready pin) [debug] System.OperationCanceledException: Timeout while waiting for transfer ready pin at DuetControlServer.SPI.DataTransfer.WaitForTransfer(Boolean inTransfer) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/SPI/DataTransfer.cs:line 1086 at DuetControlServer.SPI.DataTransfer.ExchangeHeader() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/SPI/DataTransfer.cs:line 1148 at DuetControlServer.SPI.DataTransfer.PerformFullTransfer(Boolean connecting) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/SPI/DataTransfer.cs:line 162 at DuetControlServer.SPI.DataTransfer.Init() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/SPI/DataTransfer.cs:line 104 at DuetControlServer.Program.Main(String[] args) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Program.cs:line 113
Could you explain a bit more how I can run with the DTB instead?
Thx again for the help -
@hanshogeland It looks like you've done everything right but there are some issues with jetson-io I think.
jetson-io should create the file
/boot/tegra210-p3448-0000-p3449-0000-b00-single-spidev.dtb
from/boot/tegra210-p3448-0000-p3449-0000-b00-single-spidev.dtbo
Double check that there IS a file in boot named
tegra210-p3448-0000-p3449-0000-b00-single-spidev.dtb
In /boot/extlinux/extlinux.conf, the FDT entry should match the file name but it looks like in your conf file there's an extra
kernel_
prepended to the name...
FDT /boot/kernel_tegra210-p3448-0000-p3449-0000-b00-single-spidev.dtb
Thekernel_
should NOT be there. It should be:
FDT /boot/tegra210-p3448-0000-p3449-0000-b00-single-spidev.dtb
The name itself doesn't really matter as long as the FDT entry points to the correct file.
To use the full dtb I attached, just copy it to /boot/ and make sure the FDT entry points to it.
-
@gtj0
Ok, so I tried to remove the kernel_ prexif and I checked that the dtb exist however it will not boot up using that dtb.
So I am thinking what are controlling or setting the name in the second column in the gpioinfo for pin 13 ( "dcs-trp-13" )? Since I cant find that anywhere in any dtb or dtbo.Thx again
//Hans -
This is really bizarre. I just rebooted a b00 unit with that exact dtb file.
Run...
$ md5sum tegra210-p3448-0000-p3449-0000-b00-single-spidev.dtb bee35cc5ec5f1bb5eaafab30f1fbfea4 tegra210-p3448-0000-p3449-0000-b00-single-spidev.dtb
Do you get that same md5 hash?
Try placing the FDT line in the top entry (primary) of extlinux.conf and and remove the whole "Single SPIDEV" at the bottom. Then change the default entry to primary. Your extlinux.conf should now look like this...
TIMEOUT 30 DEFAULT primary MENU TITLE L4T boot options LABEL primary MENU LABEL primary kernel LINUX /boot/Image INITRD /boot/initrd FDT /boot/tegra210-p3448-0000-p3449-0000-b00-single-spidev.dtb 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}
If that doesn't work, the only thing I can suggest as a next step is to connect to the serial console and watch the messages.
" dcs-trp-13" will only get placed there if the DCS can actually open that gpio so that's no big deal.
-
Thx for you effort, yes it was the same hash - so I take the .DTB and just put in the the boot/ dir and changed the exif to match the one you sent. Still it would not boot. Or do I need to flash?
However I tried again with the single DBTO file and I am thinking since I get the line 19: in the GPIOINFO to match the line 19 of yours with [used], it would be the case that the DBTO is actually read in. So are there any additional changes one could make to enable the line 13 like yours? I tried to look into the pinmux spreasheet however I am not there yet to be near to understand the configuration.line 12: "SPI1_MOSI" unused input active-high line 13: "SPI1_MISO" unused input active-high line 14: "SPI1_SCK" unused input active-high line 15: "SPI1_CS0" unused input active-high line 16: "SPI0_MOSI" unused input active-high line 17: "SPI0_MISO" unused input active-high line 18: "SPI0_SCK" unused input active-high line 19: "SPI0_CS0" "cs_gpio" output active-high [used] line 20: "SPI0_CS1" unused input active-high
-
@hanshogeland Sorry! I didn't see your reply until just now.
This is really weird and I do not understand. You do NOT have to flash anything. You'll only get the "dcs-trp-13" and [used] if the duet control server is actually running and successfully opens that pin.
I'm retrying a few things with the latest 32.5.0 release of Linux for Tegra.
-
@hanshogeland OK, try this dtb...
tegra210-p3448-0000-p3449-0000-b00-user-custom.dtb.stl
I've tested it so it should work. Now I have to clean up all my tries and make sure I can reproduce it.
-
@gtj0 thx again! to rule out any Duet board issue I tested with a RPI3B+ and it turns out I get an error there also. So I checked the cable, and that seems to be ok. I have reset and flashed the board with the latest firmware - and there was my verry stupid mistake I had not flashed with the correct BOSSA settings! So I flashed it correct and now Itβs working on the RPI - I will get back for the result about the Jetson. And thx again for your help!
-
@hanshogeland No problem! Let me know how it goes.
-
@gtj0 yes So the Dual did not work, but the Single DTBO worked I did not need to make any additional changes than just using the Jetson IO configuration. Thank you so much!
-
@hanshogeland Excellent! So the one from this post worked?... https://forum.duet3d.com/post/212653
-
@gtj0 yes from this
gtj0 9 Feb 2021, 20:28
tegra210-p3448-0000-p3449-0000-b00-single-spidev.dtbo.stl
tegra210-p3448-0000-p3449-0000-a02-single-spidev.dtbo.stlI just followed my previous described steps
-
@hanshogeland Whew!
-
@gtj0 thx again for you help!
-
@gtj0 I hate to reply to such an old thread but this is the only one i could find that described the set up of the jetson nano as a SBC with the duet 3. My issue is I am following the steps that Hans nicely wrote out in his post here https://forum.duet3d.com/post/212946 . however when i add the single-spidev.dtbo file to /boot/ I cannot get this option to show up in jetson-IO under "configure for compatible hardware". I've also tried manually adding the .DTB file to /boot/ and having the extlinux.conf file point to that .dtb file, but when i run duet control server i still get the waiting for transfer ready timeout error. I've tried both a a02 board as well as a b00 board. any insight would be greatly appreciated, thanks for all the info providing in this thread its been a huge help.
-
@JLM4751 said in Duet 3 and jetson Nano?:
@gtj0 I hate to reply to such an old thread but this is the only one i could find that described the set up of the jetson nano as a SBC with the duet 3.
No worries
First,let's see if the spi device is actually there or not. Try...
# ls -al /dev/spidev* crw-rw---- 1 root gpio 153, 0 Jun 19 14:55 /dev/spidev0.0 crw-rw---- 1 root gpio 153, 1 Jun 19 14:55 /dev/spidev1.0
If you see the devices then the most probable issue is that the /opt/dsf/conf/config.json file is incorrect. The SPI related stuff should look something like this...
... "SpiDevice": "/dev/spidev0.0", "SpiBufferSize": 8192, "SpiTransferMode": 0, "SpiFrequency": 8000000, "SpiConnectTimeout": 500, "SpiTransferTimeout": 500, "SpiConnectionTimeout": 4000, "GpioChipDevice": "/dev/gpiochip0", "TransferReadyPin": 13, "MaxSpiRetries": 3, ...
The
waiting for transfer ready timeout error
is directly related to theGpioChipDevice
and theTransferReadyPin
settings.If you can't get it going, the output of
gpiodetect
might help.