SPI loopback test

Hello all, I am new to the world of the BBB and have been trying to get the SPI on the BBB to run a basic loopback test (connecting D1 and D0) but only retrieve 255’s instead of the data I am sending out. I was relatively sure that everything needed to run SPI was correctly installed on the BBB and that the program I have in place (which I found online) should work to do what I think. Below is a copy of the code. Thank you for your time!

from Adafruit_BBIO.SPI import SPI

spi = SPI(0,0)


print spi.xfer2([32, 11, 110, 22, 220])

I'm the maintainer of Adafruit_BBIO. Please open an issue regarding this:

I'll need to know more about the system software on your BeagleBone so
please paste the output of:

uname -a
cat /etc/dogtag
cat /etc/debian_version
cat /sys/devices/platform/bone_capemgr/slots


I wanted to share my results from loopback test with SPI0:

Please do open an issue if you do still have a problem.


adafruit_bbio_spi_test.md (1.38 KB)

Sorry for the late reply, it appears to be working now!

Hi Gator

I am having the same problem and symptoms on my SPI setup. I am using the latest image on the BB site ( Debian 9.2 2017-10-10 4GB SD IoT ) that cames with the kernel version 4.4.91-ti-r133.

The result of the spi-test.py is an array of 255… I also have compiled the spi-test.c and also no electrical activity on the SPI0 pins and (of course) no data received and displayed as output.

What have you done to make it work? what is missing?


Nuno F.

sexta-feira, 6 de Janeiro de 2017 às 14:41:25 UTC, Gator Guy escreveu: