Hi,
I am not sure if you are using interrupt service or not, anyway please check the attached document in the typical usage section to see how the SPI_Master component is used.
Basically you need to write the following:
SM1_ReceiveBlock(MySPIPtr, InpData, BLOCK_SIZE); /* Request data block reception this is used to tell the driver how many bytes will be received and where they will be stored*/
SM1_SendBlock(MySPIPtr, OutData, BLOCK_SIZE); /*To provide clock for slave, master sends anything that is as long as
expected answer from slave. length(msgDummy) = length(msgSlave) Outdata can be 0x00 or 0xFF commonly */
/* Master waits for data from slave */
while (SM1_GetBlockReceivedStatus(masterDevData) == FALSE) ;
Hope this information can help you
Best Regards,
Adrian Sanchez Cano
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------