Skip to content

spec spi set clock rate

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

SPI Set Clock Frequency

Set the clock frequency for the specified SPI channel.

Command Packet

SPI Set Clock Frequency Command
Description Set the clock frequency for the specified SPI channel.
Size 12 Bytes
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 : 0x0C PACKET NUM CMD : 0x0102 CHANNEL TARGET FREQ 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 Open Command.
CHANNEL SPI channel to configure.
TARGET FREQ U32 target frequency in Hz (MSB first). Note, due to hardware limitations not all frequencies are achievable. Examine the response of this packet to see the actual achieved frequency.
CHECKSUM Checksum. Computed by adding all of the bytes in the packet in U8 form ignoring rollover.

LINX Target 6

Response Packet

SPI Set Clock Frequency Response
Description LINX device's response to SPI Set Clock Frequency command
Size 10 Bytes
Format 0 1 2 3 4 5 6 7 8 9
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 : 0x0A PACKET NUM STATUS ACTUAL FREQ 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.
ACTUAL FREQ U32 actual SPI clock frequency achieved.
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