2

I followed all steps on SPI module on Raspberry Pi 2, without success, no way to make this work on a Pi2...

On /boot/config/txt there is:

dtparam=spi=on
dtoverlay=spi-bcm2835

On /etc/modules:

spi-bcm2835

Blacklist file is empty. lsmod returns

spi_bcm2835             7216  0 

ls /dev/spi* returns:

/dev/spidev0.0  /dev/spidev0.1

But still I get no electric activity on any SPI pin. Connected a scope on SCK pin (pin #23, GPIO11/SPI_CLK) and nothing. Tryed :

echo -ne "\x01\x02\x03" > /dev/spidev0.0

and also run the spi_test application (returns all zeroes).

Any hint on what I am doing wrong?

The Pi is running latest version of raspbian

  • Could you post a link to the 'other SPI module post' you mention in your first sentence? – goobering Feb 29 '16 at 14:21
  • Does it work without the /etc/modules entry? I thought the DT was an alternative way to load modules. – PaulF8080 Apr 1 '16 at 13:57
  • Yes, it is, but unfortunately I'm not quite familiar with DT syntax and wasn't able to make it work that way. – Luiz Cressoni Apr 4 '16 at 14:51
2

Just adding the pi user to the spi group solved the problem:

sudo adduser pi spi

Running the spi_test program after that all went OK.

  • Are the pin outs different on version 1 and 2 of the pi ? – Robin Dec 17 '18 at 16:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.