SPI0 CLK [frequency]
SPI0 CLK ?
frequency
parameter can be set to any frequency from 500000 Hz to 12000000 Hz in 1000 Hz steps.SPI0 ORDER [bitorder]
SPI0 ORDER ?
bitorder
parameter shall be set as follows:LSB
or LSBFIRST
MSB
or MSBFIRST
SPI0 MODE [spiMode]
SPI0 MODE ?
spiMode
parameter shall be set to 0, 1, 2, or 3 based on the desired clock polarity and phase settings:SPI0 CPOL [polarity]
SPI0 CPOL ?
polarity
parameter shall be set as follows:0
.1
.SPI0 CPHA [phase]
SPI0 CPHA ?
phase
parameter shall be set as follows:0
.1
.SPI0 TXBITS [bitcount]
SPI0 TXBITS ?
bitcount
parameter shall be set as follows:8
.16
SPI0 BEGIN
SPI0 TXRX BUF[n] [count]
SPI0 TXTX [data]
count
is the number of bytes to transfer from 1 to 256.[data]
is the 8-bit or 16-bit payload to transfer. The size of data depends on the TXBITS
setting.SPI0 END
SPI0 WHR [writeOnlyFlag] [byteCount] [hexPayload]
writeOnlyFlag
parameter indicates if the transfer is a write-only operation. If the writeOnlyFlag is set, Nova will not return any data that may be transferred back from the SPI peripheral device. This value can be either0
or 1
.byteCount
parameter indicates the number of bytes to transfer on the SPI bus. This value can be from 0
to 1024
and must match the length of the hexPayload
parameter.hexPayload
parameter is the data that will be written to the SPI bus. This parameter should be entered as a string of hex values without a leading "0x" and no spaces. The length must match the byteCount parameter.OK
or NG
when the WHR command is used only to write data (writeOnlyFlag = 1) to the SPI bus. When the WHR command is used to perform a read operation (writeOnlyFlag = 0), the response will contain the requested number of data bytes read from the bus, or NG
indicating that command failed to execute successfully.