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.

Struggling to use the freeRTOS SPI slave and master example programs

Part Number: MSP432E401Y
Other Parts Discussed in Thread: SYSCONFIG

Hello all,

I have not edited either example at all. I am attempting to make an MSP432E401Y communicate as a slave via SPI to an MSP432R401. I have downloaded the appropriate example code for each board (spimaster_MSP432P401R_freeRTOS_ccs and spislave_MSP432E401Y_freeRTOS_ccs) but I am unable to get these examples functioning.

The issue that I am having is with the following line:

And then I have the same problem with the corresponding line on the slave side

I am hooking the MSP to one another directly (no extra components, just wires connecting pins) as follows:

MSP432P -> MSP432E

P5.7 -> PM3

P6.0 -> PQ0

P2.5 -> PD3

P2.6 -> PD1

P2.7 -> PD0

P2.3 -> PD2

This is the pinout I have pulled from the sysconfig file in each example.

The while loop just gets completely blown through. I have tested it a number of different ways and this is the best explanation of what I've found.

If I hook up the each of the MSP to one another, the while loop gets blown through.

If I leave one MSP sitting with no connections whatsoever, the while loop gets blown through.

If I am probing the CONFIG_SPI_MASTER_READY or CONFIG_SPI_SLAVE_READY (depending on which board I am testing) AND I do not connect the board I am testing to anything else, it is sitting with no connections whatever, it will wait at the while loop as it should.

As mentioned above, I have not altered the code from the examples provided in the TI Resource Explorer in any way.

This is a very strange problem and I'm completely at a loss as to what may be causing it. I have tested this issue on multiple MSP units and it remains consistent. Any help would be appreciated.

Thank you

  • Hi Robert,

    It seems that the error screenshot you uploaded has a problem and is not displayed. Can you upload it again?

    Best Regards

    Johnson

  • My mistake. First time poster.

    The problematic code master side.

    The problematic code slave side.

    Since my post yesterday I have uncovered something new that I suspect may be the issue. Sometimes when I pause the program while debugging, I get the following dialogue window.

    I don't know what this filepath is, it doesn't match anything on my computer and I do not (to my knowledge) have this GPIOMSP432.c file. It would make sense that missing this file would cause the issues I'm seeing, I think.

    Thank you,

    Robert

  • Typo Alert:

    > while (GPIO_Read (CONFIG_SPI_SLAVE_READY == 0)) {}  // (I hope I typed that right)

    Try:

    > while (GPIO_Read (CONFIG_SPI_SLAVE_READY) == 0) {}  // 

    In my copy of spimaster.c, this is what line 124 looks like.

  • That was my mistake, I had to throw those two lines in. I changed them a bit while trying to debug and had to throw them back in to retake the screenshots. I didn't run the code with that error present

**Attention** This is a public forum