Is there any way to establish SPI communnication between Raspberry Pi 3B + and Arduino Due. Both only support master mode.

I tried to google but mostly answers from 2013 come up. Has there any recent progress?

  • Note that questions about how to set up the Arduino's SPI to slave mode (or using software bit banging) should be posted at arduino.stackexchange.com which is one option here. I would rather not migrate that question since it has already attracted answers concerning the Pi.
    – Ghanima
    May 11, 2019 at 15:12
  • It's probably easier if you let them communicate using UART or even USB.
    – PMF
    Feb 8, 2021 at 16:37

2 Answers 2


I do not know about the Arduino.

The Pi only supports being the SPI master. If you want to use the Pi as a SPI slave you will have to bit bang the interface in software. Of course this will only work for low bit rates as you need to ensure you can react to the clock in a timely fashion.

The Pi does have a peripheral which is documented to support a SPI slave mode. No one (including me) has managed to get it to work.

If you want to try to get the peripheral working in slave mode see BCM2835 ARM peripherals chapter 11 page 160 SPI/BSC slave.



Can two SPI masters communicate?


I googled and found the following 2013 Microchip forum discussion conclusive. Therefore no newer discussions arise afterwards.

SPI between 2 Masters Discussion - MicroShip 2013jun05

I very much agree with the following points and conclusion:

This is a generic intrinsic limitation, not just related to Rpi or Arduino. Two masters cannot talk to each other, because the hardware design only supports the one master protocol. On the other hand, I2C is designed to be multi master (the pull down architecture enables and device to try to become a start by pulling down the data line, other devices addressed can respond, thus becoming a slave, ...) therefore two masters can talk to each other, with either one acts as master, the other slave.

To conclude, two SPI masters without any extra hardware signal lines cannot talk to each other.

Your Answer

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

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