Part Number: MSP432P401R
Hi,
I am using the MSP432 to send data using SPI. My code runs on tirtos and I am using SPI_transfer(slaveSpi, &transaction) to send the data. The data size I am sending is 1000 bytes.
I set up the SPI in blocking mode
spiParams.frameFormat = SPI_POL0_PHA0; // SPI_POL0_PHA1;
spiParams.transferMode = SPI_MODE_BLOCKING;
spiParams.mode = SPI_SLAVE;
spiParams.transferCallbackFxn = transferCompleteFxn;
spiParams.bitRate = 12;
spiParams.dataSize = 8;
When I send the data, the master receives the block of data correctly.
The problem is that the SPI_transfer function never returns and no other data is sent. On some occasions, the first packet is sent, but the 2 second hangs. The 2 data packets are received by the master.
I have also tried the SPI_MODE_CALLBACK, but the callback doesn't get called and the code hangs on the semaphore.
My question is what conditions would prevent the SPI_transfer() function from returning?
Thanks for your help.
Malcolm