I've been trying talk to a MCP3008 ADC from the Raspbeery Pi B+. There are loads of examples of this working out there but I don't seem to be able to configure the port.
I've followed the various posts out there and enabled SPI (using raspi-config), un-blacklisted it, etc
/boot/config.txt has this at the end
device_tree=
dtparam=spi=on
lsmod shows the driver spi_bcm2708 and
ls /dev/ shows both spidev0.0 and spidev0.1
The permissions are as follows;
pi@raspberrypi ~ $ ls -l /dev/spi*
crw-rw---T 1 root spi 153, 0 Jan 1 1970 /dev/spidev0.0
crw-rw---T 1 root spi 153, 1 Jan 1 1970 /dev/spidev0.1
I'm running the latest image and started from a fresh download
uname -a
Linux raspberrypi 3.18.7+ #755 PREEMPT Thu Feb 12 17:14:31 GMT 2015 armv6l GNU/Linux
I've installed wiringPi and downloaded spidev_test.c and compiled both but either get nothing or an error for the driver.
When trying to do a loopback test with MSIO and MSOI shorted I get this from spidev_test (I've modified the code to use spidev0.0).
pi@raspberrypi ~/mcp3008 $ ./spidev_test -l
can't set spi mode: Invalid argument
Aborted
Worth noting that I had to use the spidev_test.c from kernel version 3.14 and not from the version I'm actually running 3.18 (some QUAD mode issue)
Has anyone got the B+ running with 3.18 and a working SPI setup?