Read data from SPI slave device register
Simulink Coder Support Package for BeagleBone Blue Hardware / Communication
The SPI Register Read block initiates an SPI read operation from an SPI slave register. You can specify the data type and data length to get data from the slave registers. To open the pin map of the BeagleBone® board, click the View pin map button.
Port_1— Output port to read data
This port is the output port to read data from an SPI slave register.
Mode (Clock polarity and phase)— Mode of SPI communication
Select the mode of SPI communication.
Register address— Register address to read the data
Enter the SPI slave register address to read the data.
Output data type— Data type for output
Select the data type for SPI communication.
Output data length— Data length for SPI communication
Enter the output data length of the selected data type to read from the SPI slave register.
SPI Select— Pin connected to the SPI slave device
Select the pin number on the BeagleBone Blue board to which the SPI slave device is connected.
Sample time— Frequency to read data from the SPI slave device
Specify how often the block reads data from the SPI slave device. When you specify
this parameter as
-1,Simulink® determines the best sample time for the block based on the block context
within the model.