Target Category: Cortex M3, Delfino, F280x, F281X, MSP430, Piccolo, STM32
Target Sub-Category: SPI
Description: The SPI Write block is a serial peripheral interface block for transmitting data to certain hardware chips, like analog I/O chips. The SPI queue is interrupt driven. You may write as many bytes as are free in the transmit queue and the interrupt handler will send the bytes out automatically. You can query the current transmit queue length using the SPI Read block.
Use SPI Config to configure the hardware settings.
Additional information: Using SPI slave to communicate between two Launchpads.
Data Bits to Insert to Tx Word: Specifies the number of data bits to insert into the transmitted word. Normally this is the same size as the transmitted word; however, it can be smaller if the data field is smaller than the transmitted bits. The transmitted word size is set in the SPI Config block. For instance, if you are sending 12 bits of DAC data, in a 16-bit word, set this value to 12, and choose an LSB offset if the 12 data bits are left shifted.
Input Type: Specifies the input data type.
LSB of Inserted Data: Sets the least significant bit of data, allowing you to position the data in the transmitted word.
Radix Point: Sets the radix point.
Transmitted Bits: Sets the number of bits to be transmitted.
Unit: Specifies the unit number.
Use Enable Pin: Adds an enable input pin to the block. If the value on the pin is 0, block operation will be suppressed.
Value ORed to Tx Word: Provides a value that will be logically OR’ed to the transmitted word. This can be useful to set control bits outside of the data bits in the transmitted word. If left to 0, this will have no effect.
Word Size: Specifies the word size.