Hi all,
first of all, I'm new to this forum even if I've been using Armbian on my Olimex Lime2 since lot of time and I find it a great project; thanks and keep up the good work!
Now: I would like to use the Lime2 SPI #2 on pins "b" in master mode to communicate with a single slave device.
What I did was:
1) downloaded Armbian v5.31 (latest available release at the time I write)
2) following the guide at https://docs.armbian.com/User-Guide_Allwinner_overlays/ I modified /boot/armbianEnv.txt to contain:
verbosity=1
logo=disabled
console=both
disp_mode=1920x1080p60
overlay_prefix=sun7i-a20
rootdev=UUID=8cf9ed72-8225-4db8-a3a2-a242d648d644
rootfstype=ext4
overlays=spi-spidev
param_spidev_spi_bus=2
param_spi2_bus_pins=b
and rebooted.
3) at reboot I found that a device /dev/spidev32766.0 does actually exist now (good!); it was not there before.
PROBLEM: I tried to use different example code found online to use that SPI device but the oscilloscope reveals that the clock line (pin PB15 when using SPI2 on pins b ) never show any activity (always low) as all other lines (CS0 and MOSI). So I guess I must be doing something wrong... any ideas or suggestions? Is there some message or log where I can check that what I activated is indeed the SPI #2 and not another SPI ? Or maybe the "bus_pins" setting is not working properly and the SPI is activated on pins "a" ?
Btw to send data on the SPI I tried
- the Python library provided by Olimex, https://pypi.python.org/pypi/pyA20Lime
- spidev_test utility, http://elixir.free-electrons.com/linux/v4.0/source/Documentation/spi/spidev_test.c
I tried sending data in an infinite loop and inspected the pins with an oscilloscope... but as I said: nothing, all lines seem to be always low (0V)
Thanks!
Francesco