I've encountered and error which I am unable to resolve and was wondering if anyone can shed some light on it.
According to the kernel sources the spi_bcm2835 module supports wire mode https://github.com/raspberrypi/linux/bl ... -bcm2835.c
Code: Select all
#define BCM2835_SPI_MODE_BITS (SPI_CPOL | SPI_CPHA | SPI_CS_HIGH \
| SPI_NO_CS | SPI_3WIRE)Here's my current config - have I missed something obvious?
Code: Select all
fraser@rpi:~/src/ref $ uname -a
Linux rpi 4.1.13-v7+ #826 SMP PREEMPT Fri Nov 13 20:19:03 GMT 2015 armv7l GNU/Linux
fraser@rpi:~/src/ref $ grep spi /boot/config.txt
dtparam=spi=on
fraser@rpi:~/src/ref $ lsmod | grep spi
spi_bcm2835 7216 0
fraser@rpi:~/src/ref $ grep spi /etc/group
spi:x:999:pi,fraser
fraser@rpi:~/src/ref $ ls -l /dev/spi*
crw-rw---- 1 root spi 153, 0 Jan 13 13:11 /dev/spidev0.0
crw-rw---- 1 root spi 153, 1 Jan 13 13:11 /dev/spidev0.1
fraser@rpi:~/src/ref $ ./spidev_test -D /dev/spidev0.0
spi mode: 0
bits per word: 8
max speed: 500000 Hz (500 KHz)
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00
fraser@rpi:~/src/ref $ ./spidev_test -D /dev/spidev0.0 -3
spi mode: 16
bits per word: 8
max speed: 500000 Hz (500 KHz)
can't send spi message: Invalid argument
Aborted