Main Content

Serial Peripheral Interface

Communicate with Raspberry Pi® hardware using Serial Peripheral Interface

Leverage the capabilities of serial peripheral interface (SPI) for serial synchronous communication between Raspberry Pi hardware and sensors, memory modules, and other peripherals.

Blocks

SPI Controller TransferWrite data to and read data from SPI peripheral device
SPI Register ReadRead data from SPI peripheral device register
SPI Register WriteWrite data to registers of an SPI peripheral device

Objects

spidevConnection to SPI device on Raspberry Pi hardware

Functions

writeReadWrite data to and read data from SPI device

Model Settings

expand all

SPI0 CE0 Bus Speed (kHz)Select a value from the list of bus speeds (KHz) for SPI0 channel 0
SPI0 CE1 Bus Speed (kHz)Select a value from the list of bus speeds (KHz) for SPI0 channel 1
SPI1 CE0 Bus Speed (kHz)Select a value from the list of bus speeds (KHz) for SPI1 channel (Since R2024a)
SPI1 CE1 Bus Speed (kHz)Select a value from the list of bus speeds (KHz) for SPI1 channel 1 (Since R2024a)
SPI1 CE2 Bus Speed (kHz)Select a value from the list of bus speeds (KHz) for SPI1 channel 2 (Since R2024a)

Apps

Raspberry Pi Resource Monitor AppMonitor and manage Raspberry Pi resources

Topics

Featured Examples