2

I'm trying to do the loopback test for the SPI interface on my raspberrypi model 2 B V1.1, by following the intruction on this website : https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/README.md

The output of this:

./spidev_test -D /dev/spidev0.0

is:

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/dev/spidev0.0

I am able to locate the spidev0.0 : /dev/spidev0.0

And I have properly connected the MISO to MOSI:

enter image description here

I really don't know why I'm not able to read anything. I have used the SPI interface lately and it was working well. Recently I have been seeing the thunderbolt symbol appearing on my PI, but I don't know if that would affect the SPI interface.

I also sometimes get a mmc0: hardware timeout error, and sometime it goes away, but again I don't know if that would affect the SPI interface.

  • Try the following commands. sudo pigpiod then pigs spio 0 50000 0 then pigs spix 0 10 11 12 13 14 15 Is the returned value 6 10 11 12 13 14 15? – joan Feb 11 at 18:54
  • No, the returned value is 6 0 0 0 0 0 0 – George Feb 11 at 20:23
  • @joan Sorry forgot to tag you – George Feb 11 at 20:24
  • 1
    I changed my Pi and it worked. Very strange. – George Feb 11 at 20:33
  • Perhaps the GPIO are bust on the first Pi. See elinux.org/R-Pi_Troubleshooting#Testing – joan Feb 11 at 20:46

Your Answer

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

Browse other questions tagged or ask your own question.