Hello Andre,
In fact, SPI module's functionality allows user to control SS automatically or manual, if you select automatic control on Slave Select, SS output feature automatically drives the SS pin low during transmission to select external devices and drives the SS pin high during idle to deselect external devices, it is to say, that if you are sending 8 (or 16) bits, once they have transfered, SS will go to idle state. (This is practical by a single communication scheme). On the other hand, if you want to send more than 8 bits (or 16 bits if you are using 16 bit extension) in the same transaction, you will need to use manual control, otherwise, SPI module will act as if these bits are different transactions. So it is not a Driver issue, it is SPI's module functionality.
So for your current transaction scheme, you can use manual control and also, replace the delay for next instructions:
error = SPI_DRV_MasterTransfer(SPI_MASTER_INSTANCE, NULL, spi_buffer, NULL, sizeof(spi_buffer)/sizeof(spi_buffer[0]));
if (kStatus_SPI_Success != error) {
#ifdef DEBUG
PRINTF("Error on SPI_DRV_MasterTransfer\r\n");
#endif
}
while(kStatus_SPI_Success != SPI_DRV_MasterGetTransferStatus(SPI_MASTER_INSTANCE, NULL));
The SPI_DRV_MasterGetTransferStatus function returns kstatus_SPI_Success when all data have been transfered, this way, you won't need delay function in order to finish the transaction.
I hope this can help you!
Best Regards,
Isaac Avila
----------------------------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
----------------------------------------------------------------------------------------------------------------------------------------