It seems like you are using the SPI Transmit block in *_non-blocking_* mode. In this mode, the input data is copied into the SPI FIFO transmit buffer until the buffer is full. Since copying happens in one flow, if there are bytes that could not find a place in the FIFO buffer (FIFO full), those bytes get discarded. This seems to be the cause for the behavior you observed. Moreover, this is typical to non-blocking mode wherein the SPI Transmit block does not wait for the FIFO buffer to open up an empty space to hold the additional byte (5th byte)
That being said, as a workaround, I would suggest using the SPI Transmit block in _*blocking mode*_. In blocking mode, data transfer is blocked until a free slot is available in the FIFO buffer. Therefore, as soon as the FIFO buffer becomes empty, the remaining bytes that are blocked get copied into the buffer and get transmitted.
Please note that the depth of the FIFO buffer for F28069 is only 4 bytes (word lengths).Therefore, when transmitting data greater than 4 bytes, the FIFO buffer gets filled up with data and in *_non-blocking _*mode, the remaining bytes get discarded. Therefore, the workaround would be to use the SPI Transmit block in _*blocking *_mode.
Best Answer