Skip to content
Ken Sharp edited this page Dec 8, 2023 · 1 revision

SPI Configure

Configure the specified SPI channel.

If the LINX device has a single SPI master it is channel 0. If the LINX device has more than one SPI master the logical first SPI master is channel 0, the next is channel 1, etc.

Clock Frequency specifies the desired SPI clock frequency. Since supported clock frequencies vary by device, the highest supported frequency that is less than or equal to the specified frequency is used. The actual frequency used is returned.
Bit Order specifies the order that the bits are shifted out. LSb for least significant bit first, MSb for most significant bit first.
SPI Modespecifies the SPI mode which set the clock phase and polarity.

SPI Mode: Chose the SPI mode to determine the clock idle value and sampling edge as follows:
Mode 0 - Clock idle low; data sampled on rising edge.
Mode 1 - Clock idle low; data sampled on faling edge.
Mode 2 - Clock idle high; data sampled on faling edge.
Mode 3 - Clock idle high; data sampled on rising edge.

spi-configure.png

Inputs

SPI Channel (0)

Specifies the SPI channel to configure. If the LINX device has a single SPI master it is channel 0. If the LINX device has more than one SPI master the logical first SPI master is channel 0, the next is channel 1, etc.

LINX Resource

Contains LINX connection resources.

SPI Configuration

Specifies the SPI master configuration.

*Clock Frequency specifies the desired SPI clock frequency. Since supported clock frequencies vary by device, the highest supported frequency that is less than or equal to the specified frequency is used. The actual frequency used is returned.

*Bit Order specifies the order that the bits are shifted out. LSb for least significant bit first, MSb for most significant bit first.

*SPI Mode specifies the SPI mode which set the clock phase and polarity.

Error In

Describes error conditions that occur before this node runs. This input provides standard error in functionality.

Outputs

LINX Resource

Contains LINX connection resources.

Actual Clock Frequency

Returns the actual SPI clock frequency used (the supported clock frequencies between LINX devices).

Error Out

Contains error information. This output provides standard error out functionality.

Related Links

spi-open

spi-write-read-1-frame

spi-write-read-n-frames

VI Reference

Clone this wiki locally