Jump to content

Orange Pi Plus 2E - SPI problem


albsef

Recommended Posts

Armbianmonitor:

Hi everyone,

I am using Armbian. SPI overlay and "spidev" are already loaded

"[    2.614185] spi spi0.1: spi_setup / gpio_is_valid(21) ... doing gpio_request ...
[    2.614213] spi spi0.1: spi_setup / gpio_direction_output(21) done !
[    7.256451] spidev spi0.1: probing from DT
"

Did someone succesfully used SPI on this board using WiringPi, WiringPISPI?

I have an application that returns me "Unable to open SPI device: No such file or directory".

I do have ls /dev/spidev0.1

I tried different libraries for WiringPi but no success.

It seems that the library tries to load another module instead "spidev" that is already loaded in linux.

Do you need another information? I am ready to provide whatever you might need.

Thank you

Link to comment
Share on other sites

  • albsef changed the title to Orange Pi Plus 2E - SPI problem

In case anyone has the same problem, I found this solution:

 

git clone https://github.com/zhaolei/WiringOP.git -b h3

 

then go to WiringOP/wiringPI/

and edit file wiringPiSPI.c

 

These are the lines that I modified 

static const char       *spiDev0  = "/dev/spidev0.0" ;

static const char       *spiDev1  = "/dev/spidev0.1" ;

 

into this:

static const char       *spiDev0  = "/dev/spidev0.1" ;

static const char       *spiDev1  = "/dev/spidev1.0" ;

 

after this, build wiringpi. Error is gone now

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines