Main Content

SPI Register Write

Write data to registers of an SPI peripheral device

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

  • SPI Register Write block

Libraries:
Simulink Support Package for Raspberry Pi Hardware / Communication

Description

The SPI Register Write block writes the block input data to specified register address. 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

Input

expand all

The input port to accept data to write the data to the SPI peripheral register.

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

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.

To enable the secondary SPI bus on your Raspberry Pi® hardware, follow the steps as mentioned in Enable Secondary SPI Bus of Raspberry Pi Hardware.

Select the SPI communication mode.

Enter the peripheral register address to write the data.