Cross posting from seeed forums, no responses there.
If anyone has had any success whatsoever using spi0 on a beagle bone green wireless, would love to hear about it.
tldr: clocking in data on spi0 looks cattywompus, spi1 ok
Was noticing an issue with some custom hardware/software that utilizes both spi channels, was working on beaglebone black prior. Wanted to make it easily reproducible so flashed a bbgw and used adafruit bbio library as an example.
steps:
1.) flash BBGW with latest production image 4.4.15-ti-r37 (tested on 4.1 kernel, and some other images that I forgot to document as well)
2.) prevent sound drivers from loading, as they conflict with spi1:
cd /lib/modules/4.4.15-ti-r37/kernel/sound/core
mv snd.ko snd.ko.bkp
3.) install adafruit library from source (need latest greatest, pip upgrade didn't work)
cd ~
git clone https://github.com/adafruit/adafruit-beaglebone-io-python.git
cd adafruit-beaglebone-io-python
python setup.py install
cd ..
4.) use wires to loopback MOSI to MISO, both channels
short P9.18 and P9.21 with a piece of wire (SPI0)
short P9.29 and P9.30 with a piece of wire (SPI1)
5.) put the following into a file and run it
from Adafruit_BBIO.SPI import SPI
def run(x,y):print 'running spi {} {}'.format(x,y)
spi = SPI(x,y)
spi.mode=2
spi.msh=4000000
bytes2send = range(20)
print 'sending {}'.format(bytes2send)
print spi.xfer2(bytes2send)
spi.close()run(0,0)
run(1,0)