Skip to content

spec spi write read

Ken Sharp edited this page Dec 10, 2025 · 2 revisions

SPI Write/Read

Write/Read the specified SPI channel.

LabVIEW

Command Packet

SPI Write/Read Command
Description Write/Read the specified SPI channel.
Size Variable
Format 0 1 2 3 4 5 6 7 8 9 10 11
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
SoF : 0xFF PACKET SIZE PACKET NUM CMD : 0x0107 CHANNEL FRAME SIZE CS Pin CS LL DATA CHECKSUM
SoF Start of Frame. Always 0xFF.
PACKET SIZE Packet Size In Bytes
PACKET NUM The Current Packet Number. This value increments with each new packet.
CMD SPI Write/Read Command.
CHANNEL SPI channel to Write/Read.
FRAME SIZE Frame size. The number of bytes to shift out between CS toggles. A value of 0 indicates all bytes in this packet make up a single frame.
CS Pin DO pin to use for chip select.
CS LL Chip Select Logic Level. 0 = Active Low, 1 = Active High.
DATA Variable length. Data to write to the SPI channel.
CHECKSUM Checksum. Computed by adding all of the bytes in the packet in U8 form ignoring rollover.

LINX Target

Response Packet

SPI Open Response
Description LINX device's response to SPI Open command
Size 6 Bytes
Format 0 1 2 3 4 5 6
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
SoF : 0xFF PACKET SIZE PACKET NUM STATUS DATA CHECKSUM
SoF Start of Frame. Always 0xFF.
PACKET SIZE Total packet size in bytes.
PACKET NUM The packet number of the packet that generated the response.
STATUS See Return Status section below.
DATA Variable Length. Data read from the SPI channel.
CHECKSUM Checksum. Computed by adding all of the bytes in the packet in U8 form ignoring rollover.

Return Status

No function specific statuses. See Return Status for universal return statuses.

Related Links

LINX

Clone this wiki locally