The BeagleBone Black SPI Interface

Serial Peripheral Interface (SPI) is a full-duplex serial protocol for communicating with high-speed peripherals. The figure shows the standard presentation.

The SPI Master on BeagleBone Black hardware can drive two SPI peripheral devices. The SPI Master has four pins:

  • P9_22 (SPI0_SCLK => SCLK) outputs a serial clock signal to synchronize communications.

  • P9_18 (SPI0_D1 => MOSI) outputs data to the SPI peripheral device.

  • P9_21 (SPIO_DO => MISO) receives data from the SPI peripheral device.

  • P9_17 (SPI0_CSO => CE0) enables one SPI peripheral device.

You can connect two SPI devices, such as displays, sensors, and flash storage, to the SPI pins on the BeagleBone Black hardware. Connect both devices to the SCLK, D1, and DO pins. Connect each device to one of the CE pins.

SPI on BeagleBone Black hardware supports:

  • Modes 0, 1, 2, or 3

  • 8 bits per word

  • Data speeds (Hz): 500000, 1000000, 2000000, 4000000, 8000000, 16000000, 32000000

For more information, see: