Difference between revisions of "HANcoder/STM32/Blocks/SPI Master Transfer"

From OpenMBD
< HANcoder‎ | STM32‎ | Blocks
Jump to: navigation, search
Line 28: Line 28:
 
| Select the edge of the SPI clock signal at which time a bit should be sampled.
 
| Select the edge of the SPI clock signal at which time a bit should be sampled.
 
|}
 
|}
 +
 +
== Inputs (inports) ==
 +
Data (byte) to send to the slave device.[uint8]
 +
Note: To send multiple bytes use mutliple Master Transfer blocks
 +
 +
== Outputs (outports) ==
 +
Data (byte) received from the slave device. [uint8]
  
 
== Examples ==
 
== Examples ==

Revision as of 11:58, 27 April 2017

Supported Targets: Olimexino, E407, P405

General information about SPI Master Transfer

The 'SPI Master Transfer' block performs a byte transfer via SPI.

Block

SPIMasterTransferBlock.png

Mask

SPIMasterTransferMask.png

Block parameters

Parameter Description
Channel Select the SPI channel to use.
Communication speed Select the frequency of the SPI clock signal.
Polarity Select the polarity of the SPI clock signal during idle.
Phase Select the edge of the SPI clock signal at which time a bit should be sampled.

Inputs (inports)

Data (byte) to send to the slave device.[uint8] Note: To send multiple bytes use mutliple Master Transfer blocks

Outputs (outports)

Data (byte) received from the slave device. [uint8]

Examples

MPU6500

See Also

SPI master init