Enabling The SPI Port

Via the desktop GUI

In the desktop GUI select the Start button > Preferences > Raspberry Pi Configuration

Select the interfaces tab and then select the relevant option.

Via the config file

Use the sudo raspi-config

config tool:

sudo raspi-config

Select ‘Interface Options’ and then select the relevant option.

Test the SPI Port

Test the SPI port is working by typing:


ls /dev/spidev*

You should see the following:


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

There are 2 spidev devices shown.  The first number refers to the SPI peripheral which in both cases is 0 (the RPi only has 1 SPI port), the second number represents the chip select pins CS0 and CS1 .

USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.

Comments

  1. ralfiii

    4 years ago

    What’s the reason for those services to be disabled? As far as I see I can still use the SPI-GPIO pins any way, or am I wrong?

    1. Adam

      4 years ago

      They are just standard IO pins until their SPI function is enabled.

Comments

Your email address will not be published. Required fields are marked *