spi_bcm2835 & 3wire mode support - Raspberry Pi Forums


hi,

i've encountered , error unable resolve , wondering if can shed light on it.

according kernel sources 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)
can set flag without error actual transfer fails errno 0x16 'invalid parameter'.

here's current config - have missed 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 

spi_cs_high , spi_no_cs sound incompatible flags. sure it's complaining 3-wire mode?

see nothing specifying number of bytes sent before switching 3-wire receive. how interface work?


raspberrypi



Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code