Hi,
When you transfer data you need to write to the PUSHR which looks like this:

It has 2 bytes of command and 2 bytes of data; every time you transfer you need to write completely to this register and when you write your last data you need to set the EOQ bit.
You can check for this bit in the SPIx_SR register and also check for the TFFF flag which indicates that the TX fifo is full. You can implement this with this code:
while(!(SPI0_SR & SPI_SR_TFFF_MASK)) {} //wait till TX fifo not full
while(!(SPI0_SR & SPI_SR_EOQF_MASK)) {} //wait till the las entry has been transmitted
SPI0_SR |= SPI_SR_EOQF_MASK; //clear EOQF flag
SPI0_SR |= SPI_SR_TFFF_MASK; //clear TFFF flag
This when you are transmitting data.
I hope this information can help you.
Regards,
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. It would be nice!
-----------------------------------------------------------------------------------------------------------------------