Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: micropad on July 07, 2015, 04:56:58 PM

Title: linux, spi slave mode and gpio pin.. not working
Post by: micropad on July 07, 2015, 04:56:58 PM
Hi, I need to set SPI in slave mode to connect an A20-lime2 to a rfid reader, but i don't understand how can I make it to work, i have checked with oscilloscope when i type in terminal

echo "test" > /dev/spidev2.0,  but i get nothing..

i don't have find the pin neither clk or mosi.. which is the correct GPIO
to use?

I have tried with pyA20Lime2 version 0.2.1 without success

can anyone have make the spi to work?

thanks.
Title: Re: linux, spi slave mode and gpio pin.. not working
Post by: micropad on July 09, 2015, 01:08:32 PM
ok, i can use the spi in master mode, and when i typed echo "test" > /dev/spidev2.0, i can seen it with oscilloscope :)

now, where i can find information for set the spi in userspace or slave mode? i have read in
http://linux-sunxi.org/SPIdev and seems it is possibile, but how i can set up it?
Title: Re: linux, spi slave mode and gpio pin.. not working
Post by: vinifr on July 10, 2015, 04:16:04 PM
It is not possible run slave mode under Linux: "Linux has no slave side
programming interface
" from: https://www.kernel.org/doc/Documentation/spi/spi-summary (https://www.kernel.org/doc/Documentation/spi/spi-summary)

But should not be your RFID device slave?
Title: Re: linux, spi slave mode and gpio pin.. not working
Post by: micropad on July 13, 2015, 11:38:39 AM
No, my RFID device is a master.. i use it with custom embedded board.

Thanks :)