SPI Master Transfer

Write data to and read data from SPI slave device

  • Library:
  • Simulink Support Package for Raspberry Pi Hardware

Description

Write data to and read data from an SPI slave device. To open the pin map of the Raspberry Pi board, click the View pin map button.

For more information on SPI communication refer to Support SPI Communication and The Raspberry Pi SPI Interface (MATLAB Support Package for Raspberry Pi Hardware)

Ports

Input

expand all

The input port through which the block accepts a single dimensional array of values to write to the slave device.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32

Output

expand all

Output port from which the block receives data from SPI slave device.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32

Parameters

expand all

Select the specific board that you are using. Changing the board updates the pin choices that you get.

Select the pin number on the Raspberry Pi™ board to which the SPI slave device is connected.

Select the mode for SPI communication.

For more information on mode, refer to SPI Transfer Modes

Introduced in R2017a