I'm looking at a Raspberry Pi and I am a bit new to Serial Peripheral Interface. I see the Rasperry Pi has two SPI interfaces on the GPIO pins. Can one SPI interface be programmed to connect to multiple SPI devices such as multiple can bus controllers? Are there any tradeoffs if possible?

  • What have you researched yourself? What is the relevance of CAN? – domen Dec 4 '18 at 9:15
  • Welcome to RaspberryPi stackexchange. It is fine to use many devices on one SPI, you just need separate Chip Select pin (one CS pin per device). You can use well developed bcm2835 library (for easy programming) link – smajli Dec 4 '18 at 15:36

Yes. SPI is designed to support multiple devices. There is a per-device chip select.

Downside is that you are sharing a bus. This possibly complicates code (switching clock speeds) and may introduce lag (can't interact with device B, if device A transfer is still in progress). Some devices might not play well with others, but that would be an exception.

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.