This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP432E401Y: SPI Slave Example Stuck in sem_wait(&slave_spi) - data not being received?

Part Number: MSP432E401Y

Hello,

CCS version 10.1, SDK 4.20.00.12, MSP432E401Y launchpad

My code get's to the sem_wait function on line 193 in spislave.c of the freeRTOS example for SPI slave and then it get's stuck, even though I have another MSPP401R sending data to the SPI lines. I am having trouble following through the code once it gets in this function to see what is going wrong. I am thinking nothing is being placed in the FIFO buffer input and that is why it doesn't say the transaction is complete and finish spi_transfer with the cal back function to end the sem. I have read about the Freescale SPI in the manual and REAM ME.html for this example but am still unsure what is going on behind the scenes here. 

I only need the code to be able to receive information from the master. Does anyone know how to modify this code so it only waits for the master to send bytes? Possibly this change is in the spi_transfer function when the transaction is passed in. Still, I don;t know if there is something I am missing for why the data on the MOSI line is not being received. I have also tried all polarity and phase combinations. 

Thank you for any help!

  • Hi Taylor,

    Have you confirmed that the Master is actually sending data on the MOSI pin? 

    If you have already confirmed that it is sending, have you confirmed that from a timing perspective, that the Master is sending it AFTER this slave device is ready to receive?

    Srinivas

**Attention** This is a public forum