Sending more bits of data than configured using SPIM Component in PSoC Creator

Question: Can I transfer 16 bit data when the SPI master is configured for 8 data bits in PSoC Creator?

 

Answer:

Yes, this can be done. If the API, "SPIM_WriteTxData()" is called again before the transfer of the previous byte then the next byte will be appended to the transfer with no delay between the byte transfers i.e. the slave select pin does not go high until the transmit FIFO is empty.


Note that when SPIM_WriteTxData is called, the data to be transferred is put into the internal FIFO. If the FIFO is full, an overrun conditon will occur. Check the status of the transmit FIFO using SPIM_1_ReadTxStatus() API before calling SPIM_WriteTxData().