Duet 3 duetpi with odroid xu4 ?
-
@joeko You could probably connect a logic level shifter to get from 1.8V to 3.3V but it may be easier to use another board. AFAIK some users have Jetson Nano boards connected to their Duet 3.
-
do i need only one level shifter or for every pin ?
-
@chrishamm said in Duet 3 duetpi with odroid xu4 ?:
If there is a Debian (or Armbian) image for the ODroid XU4, you should be able to install DSF. Just be aware that you will probably need some Linux experience to set up the SPI device and to figure out the GPIO chip pin number which needs to be adjusted in
/opt/dsf/conf/config.json
.hallo,
this mean that i can or have to reconbfigure the gpio pin numbers on the sbc ? the gpio pins on the duet are fix ?why is this not seriel possible like repetier server ?
-
most likely you need level shifting for all the spi pins + the trf_ready pins. 1.8v is below the high threshold for 3.3v logic if i'm not mistaken.
why not serial; well spi is serial - as in serial peripheral interface, but even if you ignore the usb issues using uart and handshaking could do the same job as the chosen spi bus, but not as fast as spi can.
-
@bearer said in Duet 3 duetpi with odroid xu4 ?:
most likely you need level shifting for all the spi pins + the trf_ready pins. 1.8v is below the high threshold for 3.3v logic if i'm not mistaken.
why not serial; well spi is serial - as in serial peripheral interface, but even if you ignore the usb issues using uart and handshaking could do the same job as the chosen spi bus, but not as fast as spi can.
yes, after i wrote this i found the info about spi...sorry
i will read more about sbc and duet. but maybe in the future duet support more sbc out of the box -
i have looked in /opt/dsf/conf/config.json for the pin setting. here is what i found
{
"LogLevel": "info",
"SocketDirectory": "/var/run/dsf",
"SocketFile": "dcs.sock",
"Backlog": 4,
"SocketPollInterval": 2000,
"BaseDirectory": "/opt/dsf/sd",
"NoTerminateOnReset": false,
"HostUpdateInterval": 4000,
"MaxMessageAge": 60,
"SpiDevice": "/dev/spidev0.0",
"SpiFrequency": 8000000,
"SpiTransferTimeout": 500,
"MaxSpiRetries": 3,
"SpiPollDelay": 25,
"GpioChipDevice": "/dev/gpiochip0",
"TransferReadyPin": 25,
"BufferedPrintCodes": 32,
"BufferedMacroCodes": 16,
"MaxBufferSpacePerChannel": 1536,
"ModelUpdateInterval": 250,
"MaxMachineModelLockTime": -1,
"FileBufferSize": 8192,
"FileInfoReadLimitHeader": 12288,
"FileInfoReadLimitFooter": 262144,
"MaxLayerHeight": 0.9,
"LayerHeightFilters": [
{
"Pattern": "^\slayer_height\D+(?<mm>(\d+\.?\d))",
"Options": 17
},
{
"Pattern": "Layer height\D+(?<mm>(\d+\.?\d*))",
"Options": 17
},
{
"Pattern": "layerHeight\D+(?<mm>(\d+\.?\d*))",
"Options": 17
},i see only one pin number
"TransferReadyPin": 25,to modify the setting to my board i only have to change the number to the gpio number the cable is connected on the sbc ?
-
@joeko Yes, and you'll probably have to change the wires that go to the SPI pins. I think you'll need a custom cable anyway. The required pins are labelled on the bottom side of the Duet. Make sure the SPI + TrfRdy + GND are correctly connected to your other board.
-
@chrishamm said in Duet 3 duetpi with odroid xu4 ?:
@joeko ... Make sure the SPI + TrfRdy + GND are correctly connected to your other board.
hmm, spi+trfrdy+gnd are 3 pins.
gnd and trfrdy are clear but spi pin ? is the trfrdy pin not the spi pin ?
here on the pinout from the duet 3 i see that pin 22 on the board is the trfrdy pin (gpiopin 25 on raspberry board)this is board i will buy
https://wiki.odroid.com/odroid-c4/application_note/gpio/enhancement_gpio#tab__odroid-c4on this layout is the connected cable than GPIOX.2 (#478)
if i right than i only have to change the trfrdy pin to pin #478 or not. than i dont have to change cable or so -
@joeko Not quite right, the SPI bus consists of 4 pins (CS, MOSI, MISO, CLK), so you need to connect 6 pins total. Also note that DSF uses the
gpiochip
driver and not thesysfs
interface because we can achieve better performance withgpiochip
. The pin numbers may vary, so it's a good idea to test the corresponding pin once via the tools from thelibgpio
package. -
@chrishamm said in Duet 3 duetpi with odroid xu4 ?:
@joeko Not quite right, the SPI bus consists of 4 pins (CS, MOSI, MISO, CLK), so you need to connect 6 pins total. Also note that DSF uses the
gpiochip
driver and not thesysfs
interface because we can achieve better performance withgpiochip
. The pin numbers may vary, so it's a good idea to test the corresponding pin once via the tools from thelibgpio
package.cs, mosi, miso,clk, voltage and gnd are ok. only tfrdy modify. no problem i think. but what mean gpiochip driver and not sysfs interace ? what i have to do that it works ?
-
@joeko See https://wiki.odroid.com/odroid-c4/application_note/gpio/enhancement_gpio#easy_to_use. I believe what this note says is that e.g. gpio478 equals GPIO number 2 (which has to be set in config.json). For further information see here under libgpiod. It's a good idea to check with a multimeter if you can toggle the GPIO pin manually using the gpioset utility before you change the DCS config. If the pin number is incorrect or not connected, you'll get an error message saying "Timeout while waiting for transfer ready pin" when you try to start DCS.
-
@joeko said in Duet 3 duetpi with odroid xu4 ?:
@chrishamm said in Duet 3 duetpi with odroid xu4 ?:
@joeko Not quite right, the SPI bus consists of 4 pins (CS, MOSI, MISO, CLK), so you need to connect 6 pins total. Also note that DSF uses the
gpiochip
driver and not thesysfs
interface because we can achieve better performance withgpiochip
. The pin numbers may vary, so it's a good idea to test the corresponding pin once via the tools from thelibgpio
package.6 pins total ?
cs, mosi, miso and clk are 4 pins plus tfrdy and gnd are the 6 pins, right ?
CS is CS1 or CS0 ? -
@joeko said in Duet 3 duetpi with odroid xu4 ?:
CS is CS1 or CS0 ?
if it assigns device nodes from dts like the pi does, then /dev/spi0.0 is cs0 and /dev/spi0.1 is cs1
hth
-
@bearer said in Duet 3 duetpi with odroid xu4 ?:
@joeko said in Duet 3 duetpi with odroid xu4 ?:
CS is CS1 or CS0 ?
if it assigns device nodes from dts like the pi does, then /dev/spi0.0 is cs0 and /dev/spi0.1 is cs1
hth
ok, but chrishamm wrote "SPI bus consists of 4 pins (CS, MOSI, MISO, CLK), so you need to connect 6 pins total."
4 pins in the list are clear but if cs is cs0 + cs1 than the spi pins are instead 5 and not 4. if cs is cs1 only than are 2 pin open in my list. number 5 is trfrdy and gnd ist number 6 ?
-
SPI is designed for many devices on the bus, each sharing MISO, MOSI and CLK. Each slave has their own CS (chip select) signal, and the host have one CS signal for each slave.
So in your case the Duet is the slave and only cares about a CS signal, while you need to specify which to use on the host.
I.e. you choose to use CS0 for the Duet's CS signal, and run a wire from CS0 on the Odroid to CS on the Duet. Three more wires for MISO, MOSI and CLK pluss the sort of interrupt like pin TRF_RDY. Add ground and you're at 6 wires in total.
-
ahh, i see
thank you for your help