Control Center Serial

SPI Write Command

<spi_write io="io"
           count="count"
           radix="radix">
     message
</spi_write>

Write a stream of bytes to the downstream SPI slave device and read back the full-duplex response when IO mode is standard. Only write a stream of bytes to the downstream SPI slave device when IO mode is either dual or quad.

Parameters

io
SPI IO mode to write a stream of bytes, with the value 0 for standard SPI, 2 for dual, or 4 for quad.
count
The number of bytes to write (maximum 65535).
radix
The base of the number system of the message, with the value being 10 for decimal, or 16 for hexadecimal.
message
The message to transmit as a space separated list of numbers.

Details

If count is 0, no bytes will be written to the slave. However, the slave select line will be dropped for 5-10 microseconds. This can be useful in sending a signal to a downstream SPI slave without actually sending any bytes. For example, if an SPI slave has tied the slave select to an interrupt line and it sees the line is toggled without any bytes sent, it can interpret the action as a command to prepare its firmware for an subsequent reception of bytes.

Please see the Aardvark I2C/SPI Adapter User Manual or the Promira Serial Platform User Manual for more information.