Main Content

SPI Register Read

Read data from SPI peripheral device register

Add-On Required: This feature requires the Simulink Support Package for Raspberry Pi Hardware add-on.

  • SPI Register Read block

Libraries:
Simulink Support Package for Raspberry Pi Hardware / Communication

Description

The SPI Register Read block initiates an SPI read operation from an SPI peripheral register. You can specify the data type and data length to get data from the peripheral registers. 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 Raspberry Pi SPI Interface

Ports

Output

expand all

This port is the output port to read data from an SPI peripheral register.

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 peripheral device is connected.

Select the mode of SPI communication.

Enter the SPI peripheral register address to read the data.

Select the data type for SPI communication.

Enter the output data length of the selected data type to read from the SPI peripheral register.

Specify how often this block reads the data from the SPI peripheral device, in seconds. When you set this parameter to -1, Simulink® determines the best sample time for the block based on the block context within the model.

Version History

Introduced in R2017a