ygoe Posted August 20, 2021 Posted August 20, 2021 Armbianmonitor: https://pastebin.com/Cwb6mVuD (Finally this forum lets me enter a new topic. It's failing most of the time, making it really hard to solve my actual problem if the infrastructure also fails.) I'm using an Orange Pi Zero board and try to make it talk to a radio module via SPI. The whole thing already works on a Raspberry Pi so the module and cabling is correct. But the module doesn't respond to requests on the Orange Pi. Since this doesn't do anything, I searched for issues like this and along the way found an SPI loopback tool. I tried it and it returned all zeros. The tool readme suggests that the MOSI and MISO pins are not connected, but they are. I checked and resoldered those pins and connected both with a jumper. The hardware is 100% correct. It must be the software that doesn't understand the SPI interface here. The same tool shows a correct echo on the RasPi. I also found another topic here about the Allwinnder H6 chip where a patch in Armbian was necessary to resolve the same issue. I couldn't respond there due to a permanent forum outage and then lost the link. So I believe that the same error is in the Orange Pi Zero image. I didn't understand what was changed there, something deep within the system. The armbianmonitor -u command failed with an internal server error response, so I uploaded the logs elsewhere. The Google form in front of this bug report recommended paste.debian.net but that service is unsuitable because its length limit of 150 kB is not sufficient. 0 Quote
Werner Posted August 21, 2021 Posted August 21, 2021 About forum operational status:https://status.armbian.com/785767245 No idea where your issues come from. About SPI: Maybe you need to set additional parameters:https://docs.armbian.com/User-Guide_Armbian_overlays/#notes-regarding-spi-and-i2s-overlays 0 Quote
ygoe Posted August 21, 2021 Author Posted August 21, 2021 I guess you mean the param_spidev_spi_bus parameter? Sorry, I've pasted the complete file in the other response that never made it to the forum. Here is the file /boot/armbianEnv.txt: verbosity=1 logo=disabled console=serial disp_mode=1920x1080p60 overlay_prefix=sun8i-h3 overlays=spi-spidev usbhost2 usbhost3 param_spidev_spi_bus=0 rootdev=UUID=4a65461e-d8ac-4d8f-94c0-05ecd12f6d58 rootfstype=ext4 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u I used armbian-config to enable SPI and also read that I need to manually add this parameter to the file. That's where I am now. I followed the pinout from this image (and many others which look the same): I have now also verified that the pins work correctly as GPIO with the spi overlay disabled. So it's not a hardware failure. The software just isn't sending any SPI signal. SCLK, MOSI and CS0 remain low at all times when sending to SPI. 0 Quote
Solution ygoe Posted August 21, 2021 Author Solution Posted August 21, 2021 I have found the solution. The bus number must be 1, not 0 as explained everywhere. This will create the device /dev/spidev1.0 instead of spidev0.0 and applications must be adapted. But with this modification I can access the SPI device. So here's the relevant overlay configuration in /boot/armbianEnv.txt: overlays=spi-spidev param_spidev_spi_bus=1 And the SPI interface can be used only under this path: /dev/spidev1.0 Who knows where that bus number 0 leads to... 1 Quote
Werner Posted August 22, 2021 Posted August 22, 2021 Glad you could figure it out. I have added a note regarding this to the documentation: https://github.com/armbian/documentation/commit/6b9bceedb28ff3b3d0590b21e9ca4a52487bb22b 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.