Hi,
I copy the part from the reference manual of K65.
Obviously, when the SPI is set up in master mode and you use the DMA to transfer 8 bits or 16 bits data to the 32 bits SPIx_PUSHR, the High 16 bits of SPIx_PUSHR keep the last value instead of zero.
after you initialize the SPI and DMA module, write a 32 bits data to the SPIx_PUSHR by software, which include the command in the high 16 bits, when the transfer is over, it will trigger DMA to transfer data from buffer to the SPIx_PUSHR register, the DMA can write 8 bits or 16 bits data to SPIx_PUSHR register, the High 16 bits of SPIx_PUSHR will remain the last value.
Hope it can help you.
BR
XiangJun Rong
57.1.11 Writing SPI Transmit FIFO
The SPI supports 8-bit or 16-bit writes to the PUSH TX FIFO, allowing a single write to
the command word followed by multiple writes to the transmit word. The TX FIFO will
save the last command word written, and convert a 8-bit/16-bit write to the transmit word
into a 32-bit write that pushes both the command word and transmit word into the TX
FIFO (PUSH TX FIFO Register In Master Mode)
A 32-bit write to the SPI_PUSH register will push all 32-bits to the TX FIFO. An 8-bit or
16-bit write to the 16-bit transmit data field will push the data together with the last
written command word. An 8-bit or 16-bit write to the command word does not push data
onto the FIFO, but that command word is pushed to the TX FIFO on all subsequent 8-bit
or 16-bit writes to the transmit data field. This allows a single 16-bit write to the
command word to be used for all subsequent 8-bit or 16-bit writes to the transmit data
word. Writing a different 16-bit command word will cause all subsequent 8-bit or 16-bit
writes to the transmit data word to be pushed to the TX FIFO with the new command
word.