Is there any option to control the second SPI interface of Raspberry Pi 2 B with SpiDev?


Pin 19, 21, 23 are SPI0 and Pin 35, 38, 40 are SPI1.

SPI0 works perfect, but if I try to open SPI1 an IOError raises:

IOError: [Errno 2] No such file or directory

My code to open:

spi = spidev.SpiDev()
spi.open(1,2) #for SPI1 CS2
spi.open(0,0) #for SPI0 CS0

In /dev/ there are also only 2 SPI files


But is there any option to use the second SPI interface?

1 Answer 1


Edit /boot/config.txt, add the following line, and reboot.


You should then have the following devices.

$ ls /dev/sp*
/dev/spidev0.0  /dev/spidev0.1  /dev/spidev1.0  /dev/spidev1.1  /dev/spidev1.2

Then try the Python spidev module.

  • Thank you, this is working. I only found answers which say that the second SPI interface is not usable.
    – jhns
    Commented Jul 8, 2016 at 11:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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