Hi all,
I am trying to use SPI to communicate with SPI sensors. I have installed pyA20Lime2 python module. I am guessing A20 has 4 SPI devices and SPI0 is used for sdcard.
How can I enable SPI1, SPI2 and SPI3?
What configuration magic is needed to enable SPI devices?
Can one use two chip-selects for each SPI device?
On which pins to connect CLK, CS, MOSI, MISO? This is what i found in docs:
SPI0
CS0 PI10 PC23 GPIO-2 pin 29 PI10, GPIO-1 pin 40 PC23
CS1 PI14 GPIO-2 pin 37 PI14
CLK PI11 PC2 GPIO-2 pin 31 PI11
MOSI PI12 PC0 GPIO-2 pin 33 PI12
MISO PI13 PC1 GPIO-2 pin 35 PI13
SPI1
CS0 PA0 PI16 GPIO-2 pin 40 PI16
CS1 PA4 PI15 GPIO-2 pin 39 PI15
CLK PA1 PI17 GPIO-2 pin 38 PI17
MOSI PA2 PI18 GPIO-2 pin 36 PI18
MISO PA3 PI19 GPIO-2 pin 34 PI19
SPI2
CS0 PB14 PC19 GPIO-1 pin 33 PC19
CS1 PB13 GPIO-3 pin 24 PB13
CLK PB15 PC20 GPIO-1 pin 35 PC20
MOSI PB16 PC21 GPIO-1 pin 37 PC21
MISO PB17 PC22 GPIO-1 pin 39 PC22
SPI3
CS1 PA9 GPIO-4 pin 12 PA9
CS0 PA5 ?
CLK PA6 ?
MOSI PA7 ?
MISO PA8 ?
OS: Linux Debian 8.1
Image: a20-lime2_debian_3.4.103_Jessie_2G_release_3.img
Kernel: Linux 3.4.103-00033-g9a1cd03-dirty
Online resources are scarce, please help.
On every post you need to put basic info: OS, version, etc.
John
Hi JohnS,
My apologies, updating question with OS details.
Hi Alex,
Sorry about the lateness of this reply, I was running into the same problem you are, and I found a helpful little tutorial.
It involves the setup of SPI using Python, assuming you're using the Debian distro as your OS.
The link is: https://pypi.python.org/pypi/pyA20Lime2
I hope this helps, even just a little.
-SM