-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to open SPI device: No such file or directory #28
Comments
Orange Pi Zero's CS is CS1, not CS0. Add the following two lines to /boot/armbianEnv.txt and reboot
Clone latest and build.
|
There are several WiringPi libraries that can be used with ZERO, and the allocation of GPIO is different for each. This is the WiringPi library I'm using. It's probably not the same as you are using. You can check the GPIO number of your library using GPIO command and LED Blinking.
|
probably neither You should investigate the GPIO pinmap. Does the following command blink the LED connected to pin number 8?
On my WiringPi this will flash pin number 8.
It is very difficult to use WiringPi Library in the OrangePi series. |
I download this library https://github.com/xpertsavenue/WiringOP-Zero and it works correct with LED. then I change in ili9340.c pins for wPi
recompiled demo, but nothing changed... |
I need to downgrade kernel to 5.10. Is I correctly understood? |
You are correct, but there is no mention of OPI-ZERO anywhere. OPI-ZERO is SPI1, so there may be other issues. |
then, may be it’s possible to change spi in library code? |
I can’t understand your mention. The WiringPi library is provided in source, so you can modify it as you like. And since this project is also provided in source, you can modify it to your liking. |
I mean: in your library used /dev/spi0, and in Opi Zero used /dev/spi1. Can I change spi0 to spi1 in code? |
Use compile flag. |
yes. I compiled with this flag, as you wrote some posts earlier. It’s runs correctly but nothing shows on display |
Using the latest repo, I have verified that it works fine on OrangePiPC.
RES-->Pin#5
Try latest, and with -DSPI1. |
I really can not understand what is wrong... I reinstall Armbial for early version:
edit /boot/armbianEnv.txt
gpio readall return: Try to blink LED:
all work correctly - led was blink check connection: TFT OPI download new repo, make
but the display is white... |
change and try It will blink pin#3
It will blink pin#5
param_spidev_spi_bus=0 ---> param_spidev_spi_bus=1 DC --------> PA12 (gpio 12 - wPi 0 - pin 3) --> #define D_C 0 // wPi IO0=Pin#3 RESET --------> PA11 (gpio 11 - wPi 1 - pin 5) --> #define RES 1 // wPi IO1=Pin#5 cc -o demo demo.c fontx.c ili9340.c -lwiringPi -lm -pthread -DWPI -DSPI1 |
I tried this and it doesn't work.
|
Hardware SPI doesn't work properly on ZERO. So we supported software SPI. I used this library. https://github.com/xpertsavenue/WiringOP-Zero
|
Try to use it on Orange Pi Zero with WiringPi.
I connect TFT to OPI zero, to SPI 1
make
cc -o demo demo.c fontx.c ili9340.c -lwiringPi -lm -DWPI
in /boot/orangepiEnv.txt add:
run ./demo and get:
Please, help: what I did wrong? Thanks!
The text was updated successfully, but these errors were encountered: