Using SPI on the wandboard quad

Discussion of your EDM baseboard, your add-on boards or other peripherals for your wandboard.

Using SPI on the wandboard quad

Postby gab1213 » Fri May 27, 2016 8:14 pm

Hi, I have a wandboard quad and I would like to use SPI to transmit data to a microcontroller. I'm using ubuntu 14.04 (this one : http://www.wandboard.org/images/downloa ... 150511.zip). However, I've never used linux before and I don't know how to acess the bus. I've searched on this forum and I know it has something to do with configuring the kernel, but I don't know how to do that.

Thank you for your help.
gab1213
 
Posts: 1
Joined: Fri May 27, 2016 8:04 pm

Re: Using SPI on the wandboard quad

Postby Tapani » Mon May 30, 2016 2:30 pm

Yes, you are right, that you usually have to modify your kernel to add SPI devices.

Unlike USB, SPI is not a hot-plug or plug-and-play type of bus. Every device on an SPI bus needs to be hard-coded into the kernel, and have a dedicated chip select to them.
(And yes, this can be frustrating .. in fact .. even if you have an SPI device on a bus there is no guaranteed way to detect that it is even there).

What I would suggest (for a start) is that you to enable the spidev driver (which actually might be enabled for you), and then you might be able to talk to your spi mcu from userspace.
I.e. if you do not have a /dev/spidevX.Y you probably have to do some device tree hacking, kernel configuriong and a kernel recompile .
Tapani
Site Admin
 
Posts: 685
Joined: Tue Aug 27, 2013 8:32 am


Return to Hardware and peripherals

Who is online

Users browsing this forum: No registered users and 2 guests