GPIO and SPI
#1
Hi,

I need to use SPI interface to access GPIO pins.

It is possible to enable the interface on the PINE64+ ? There is no spidev in /dev directory.
Or this feature is not available on this board ?

Thanks Smile
  Reply
#2
(08-25-2016, 03:52 AM)SamR1 Wrote: It is possible to enable the interface on the PINE64+ ? There is no spidev in /dev directory.
Or this feature is not available on this board ?

The hardware supports SPI; however, the kernel drivers (for gnu+linux) nor the libraries for SPI have been built as yet. SPI is planned for the RPi.GPIO-PineA64 package on github; however, it has not been implemented as yet. 

... having said that, if you want to use the RPi.GPIO-PineA64 to access SPI, you can of course bit bang it yourself !

You might also look into the wiringpi port on pine64.pro/   i have not checked lately, but they may have some SPI working there for the PI bus.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#3
(08-25-2016, 04:01 AM)MarkHaysHarris777 Wrote: You might also look into the wiringpi port on pine64.pro/   i have not checked lately, but they may have some SPI working there for the PI bus.

Hi Marcus,

Thanks for your answer Smile

I thought using the wiringpi, SPI seems working with this library on Raspberry Pi, according to the documentation (http://wiringpi.com).
But if there are no kernel drivers for the PINE64 yet, I have to find another solution.

Sam
  Reply
#4
(08-25-2016, 04:18 AM)SamR1 Wrote:
(08-25-2016, 04:01 AM)MarkHaysHarris777 Wrote: You might also look into the wiringpi port on pine64.pro/   i have not checked lately, but they may have some SPI working there for the PI bus.

I thought using the wiringpi, SPI seems working with this library on Raspberry Pi, according to the documentation (http://wiringpi.com).
But if there are no kernel drivers for the PINE64 yet, I have to find another solution.

Check wiringpi... don't think it needs kernel drivers... works with the GPIO directly... via /dev/mem  or /dev/gpiomem
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#5
(08-25-2016, 04:27 AM)MarkHaysHarris777 Wrote: Check wiringpi... don't think it needs kernel drivers... works with the GPIO directly... via /dev/mem  or /dev/gpiomem

Ok, thanks, I'll check that Smile

The Python application, I use, needs to access SPI by /etc/spidev (via a C program), so maybe even wiringpi is not suitable.

Sam
  Reply
#6
(08-25-2016, 04:01 AM)MarkHaysHarris777 Wrote: You might also look into the wiringpi port on pine64.pro/   i have not checked lately, but they may have some SPI working there for the PI bus.

With regards to the wiringPi port on the pine64.pro site... have you or lenny had a chance to try it yet? As it appears that it doesn't actually work yet, and when talking with KB3VGW who was working on the port, he hasn't finished porting the code over yet. I installed the packages from the pine64.pro site, and a simple blink program gets me:


Code:
piBoardRev: Unable to determine board revision from /proc/cpuinfo
 -> No "Revision" line
 ->  You may want to check:
 ->  http://www.raspberrypi.org/phpBB3/viewtopic.php?p=184410#p184410

Running gpio -v displays the same error. 

Just checking I'm not missing something, otherwise Lenny should probably take down the download for the "GPIO Utilities For Linux" (wiringPi deb files), as they don't actually work yet!
  Reply
#7
(08-26-2016, 09:41 PM)pfeerick Wrote:
(08-25-2016, 04:01 AM)MarkHaysHarris777 Wrote: You might also look into the wiringpi port on pine64.pro/   i have not checked lately, but they may have some SPI working there for the PI bus.

With regards to the wiringPi port on the pine64.pro site... have you or lenny had a chance to try it yet? As it appears that it doesn't actually work yet, and when talking with KB3VGW who was working on the port, he hasn't finished porting the code over yet. I installed the packages from the pine64.pro site, and a simple blink program gets me:
... holy buckets.   um, thanks for bringing that to my attention. This is a real concern. I was in the process of porting it and KB3VGW passed his stuff on to lennryraposo , and led me to believe the port was complete... and guess what-- I stopped working on it !

lennyraposo posted it to his site; so, several of us are under the false impression that the wiringpi port is complete. Well, rats, as i'm so fond of saying. 
Obviously lennyraposo needs to pull the wiringpi stuff off his site and we support staff need to stop telling folks its there. Believe it or not, I had planned to pull it and play with it today because so many people were complaining about it, but lennyraposo's site went seriously down due to a back-hoe incident in his neighborhood and I did not get to play with it today either;  so, thanks for bringing this to my attention.  Tongue  

And, I suppose I better get started working on it again.   I had lined up Gordon Drogon, the original author to help with the port ( TL Lim said he would send him a board if Gordon was willing to work on it).  But, I called that off too when KB3VGW posted his stuff with lennyraposo.  What a zoo.
Thanks again;  nice revelation for late Friday night !

edit: PS I'll put a bug in lennyraposo's ear as soon as I am able... this weekend... and please feel free (please) to follow up with him too. Obviously we need to talk with KB3VGW... he is in the process of a relocation atm, but as soon as I have a chance to speak with him again, we'll find out how far he got and what the snags were.

(edit above)
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#8
(08-26-2016, 10:32 PM)MarkHaysHarris777 Wrote: ... but lennyraposo's site went seriously down due to a back-hoe incident in his neighborhood and I did not get to play with it today either;  so, thanks for bringing this to my attention...

rotflol... Doesn't live in Australia by any chance does he... sounds exactly like what would happen around here... dig first, ask questions later! Big Grin And here I was thinking we'd gone and crashed his pine64 cluster... (which lenny will have some explaining to do if it isn't running the pine64.pro site  Tongue )

No worries. Don and I were trying to get it working the other day, even to the point of where I was self-compiling, and then realised there was issues in the code. Thankfully KB3VGW was quick to reply, and said it was wasn't ready yet, and due to work commitments hadn't had a chance to work on the code any further. I patched up the bits stopping it from compiling, but it still didn't work for me, so chalked it up to being still early stages. Please let me know if there is anything I can do to help on that front... I won't have much time to be able to commit to it, but am happy to test it and debug it where possible. Assuming no local changes were made, you can see the current state of the codebase on the github repo.
  Reply
#9
Will do... and thanks again man !   I really appreciate it.

Big Grin
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#10
(08-25-2016, 04:01 AM)MarkHaysHarris777 Wrote: And, I suppose I better get started working on it again.   I had lined up Gordon Drogon, the original author to help with the port ( TL Lim said he would send him a board if Gordon was willing to work on it).  But, I called that off too when KB3VGW posted his stuff with lennyraposo.  What a zoo.
Thanks again;  nice revelation for late Friday night !

edit:  PS   I'll put a bug in lennyraposo's ear as soon as I am able... this weekend... and please feel free (please) to follow up with him too.  Obviously we need to talk with KB3VGW... he is in the process of a relocation atm, but as soon as I have a chance to speak with him again, we'll find out how far he got and what the snags were.

(edit above)

As pfeerick mentioned, I was all revved up to use wiringpi on the Pine, and quickly discovered it was still a work in progress.

Marcus, I'm curious if you've had that conversation with Gordon re helping with wiringPi for the Pine, or not as yet. Sounds like you did, and he was interested. Reason i ask is, awhile back, month or so, I pinged him and inquired about wiring pi for the Pine, and got a very direct "not interested..", but may have just caught him on a bad day, or he just needs the right person to ask. And it very well could be a non-issue if Richard is able to complete his project.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  RPi.GPIO python module for Pine A64/A64+ aquilegia 98 129,294 12-15-2022, 08:40 PM
Last Post: Fadazo
  fm transmitter with gpio weasel18 2 4,730 09-10-2019, 04:28 AM
Last Post: desai_amogh
  How to use dts or other setup to declare gpio pin Interrupt (e.g. a button)? dkebler 1 3,531 06-12-2019, 10:37 AM
Last Post: dkebler
Lightbulb Sample GPIO codes highlighting RPi.GPIO-PineA64 and the PI bus MarkHaysHarris777 6 10,918 06-07-2019, 12:37 AM
Last Post: tllim
Star GPIO, SPI and I2C C++ Lib databit 7 11,010 02-04-2019, 05:45 AM
Last Post: Jeff R
Information Howto: Controlling Pine64 GPIO via the filesystem (sysfs) on linux pfeerick 4 11,733 01-24-2019, 03:36 AM
Last Post: Fifth
Question GPIO shockr 7 14,521 03-11-2018, 01:52 AM
Last Post: jomoengineer
  Read GPIO problem shworker 14 20,818 08-17-2017, 01:21 PM
Last Post: martinayotte
  GPIO fiq capability joseph 3 5,987 11-10-2016, 06:07 PM
Last Post: joseph
  RPI2-GPIO mus1c 6 8,935 09-22-2016, 05:28 AM
Last Post: mus1c

Forum Jump:


Users browsing this thread: 1 Guest(s)