The MBa8Xx has three SPI interfaces. They are available on the extension headers and can be tested with a loopback test.
In order to determine the correct SPI interface name, the following command can be used:
ls /dev | grep spi
| Interface | Linux filesystem |
|---|---|
| SPI1 | spidev0.0 |
| SPI2 | spidev1.0 |
| SPI3 | spidev2.0 |
For the loopback test, SPI_MOSI and SPI_MISO need to be bridged:
On MBa8Xx the corresponding pins are pins 9 and 11 on X5 (spidev0), pins 21 and 23 on X5 (spidev1), as well as pins 35 and 37 on X4 (spidev2).
echo -n -e "\x01\x0F" | spi-pipe -d <spi interface> -s 10000000 | hexdump (e.g. echo -n -e "\x01\x0F" | spi-pipe -d /dev/spidev0.0 -s 10000000 | hexdump)