please choosego to mobile | Continue to access the PC version
View: 25293|Reply: 8

SPI usage

[Copy link]

5

threads

23

posts

104

credits

Registered member

Rank: 2

credits
104
Published in 2015-4-21 04:00:53 | Show all floors |Read mode
Is there anybody here who experimented with the SPI from the OPi yet?
Does somebody have a nRF24L01(+) chip and know if the library from http://tmrh20.github.io/RF24/ is fully compatible with the OPi?

(I don't have an OPi yet, but would like to use this library also on the OPi).

9

threads

634

posts

4400

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
4400
Published in 2015-4-21 04:40:53 | Show all floors
I can confirm SPI works. I am using some display with Orange so probably this should work too.

5

threads

23

posts

104

credits

Registered member

Rank: 2

credits
104
 Author| Published in 2015-4-22 03:16:13 | Show all floors
Thanks igorpec for confirming.
I will try this library as soon as I have an OPi.

5

threads

23

posts

104

credits

Registered member

Rank: 2

credits
104
 Author| Published in 2015-5-16 19:19:09 | Show all floors
Hi Igor,

Can you point me to the source code which you are using for the SPI interface?
The RF24 library is using a bcm2835 library, so at the moment this RF24 library can't be used yet.
I was thinking of making an OPi template for this library.

5

threads

23

posts

104

credits

Registered member

Rank: 2

credits
104
 Author| Published in 2015-5-16 22:18:50 | Show all floors
Edited by Johan at 2015-5-16 22:30

I'm using the following pins:
P01 : 3.3V
P25 : GND
P15 : CE
P19 : MOSI
P21 : MISO
P23 : SCLK
P24 : CSN

So I'm currently using:

RF24 radio(SUNXI_GPI(17), SUNXI_GPI(10), "/dev/spidev0.0");

Because I found the following in the OPi manual:

CON3-P15 UART2_CTS PI17
CON3-P24 SPI0_CS0 PI10

Maybe I'm not interpreting the manual correctly.

Edit: I'm using librf24-sunxi at the moment ( git clone https://github.com/mplatov/librf24-sunxi )
I did modprobe spi-sun7i and compiled the library for librf24-sun7i.

0

threads

13

posts

136

credits

Registered member

Rank: 2

credits
136
Published in 2015-11-20 19:57:13 | Show all floors
igorpec replied at 2015-4-21 04:40
I can confirm SPI works. I am using some display with Orange so probably this should work too.

could you give me more details?

9

threads

634

posts

4400

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
4400
Published in 2015-11-21 00:42:05 | Show all floors
http://www.armbian.com/orange-pi/
Just follow the guide.

0

threads

1

posts

10

credits

Novice

Rank: 1

credits
10
Published in 2016-12-5 21:26:33 | Show all floors
Johan replied at 2015-5-16 22:18
I'm using the following pins:
P01 : 3.3V
P25 : GND

Hi!
I have orange pi lite and I am triyng to connect a nRF24l01+ to it.
I followed your pin connections, did "make pingtest" and then runned it... It says i got a response even without an arduino sending it back! Weird!
And when i did "sudo modprobe spi-sun7i" it gives me:

modprobe: FATAL: Module spi-sun7i not found.

I'm running Armbian 3.4.112-sun8i.

Also spidev_test.c doesn't compile:

ricardo@orangepilite:~/Downloads/librf24-sunxi-master/test$ make spidev_test
g++ spidev_test.c -o spidev_test
spidev_test.c: In function ‘void transfer(int)’:
spidev_test.c:55:5: error: ‘struct spi_ioc_transfer’ has no member named ‘interbyte_usecs’
  tr.interbyte_usecs = 10;
     ^
Makefile:13: recipe for target 'spidev_test' failed
make: *** [spidev_test] Error 1

Can you help me?

3

threads

12

posts

160

credits

Registered member

Rank: 2

credits
160
Published in 2017-6-15 20:53:57 | Show all floors
I am interested in too...
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list