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.

EK-TM4C123GXL: Slave program help....Connection with raspberry pi 3

Part Number: EK-TM4C123GXL

I need help trying to set up an SPI communication between a tiva microcontroller and a Raspberry pi 3.  The tiva needs to be the slave.  Where can i look to start with this, I dont have any code to start with.

thanks

  • Might you have a, "Partner in crime" right here - and right now?
    e2e.ti.com/.../584720

    Slave SPI IS Demanding - rarely (i.e. never) do poster's justify their, "Choice of the difficult" (Slave SPI) "over the easy!" (UART)

  • First I suggest you look at this post, and answer the same questions that I asked your classmate:
    e2e.ti.com/.../584720
    Once you have determined the character length, phase and polarity settings, you can look at one of the SPI master examples to see how to configure the pins. The one thing that is not obvious is that you may need to call SSIDataPutNonBlocking() with dummy data to make the slave ready to receive from the master. Then call SSIDataGet() to read what is sent from the master. Do your calculations and then return your answer with another call to SSIDataPutNonBlocking(). On the SSI each transfer has both transmit and receive data. Sometimes if you only needed communication one way, you transmit dummy data or discard unneeded received data.
  • how would i go about using UART?
  • If your, "teacher/boss/group" allows it - your read of the MCU's manual reveals "great" UART detail.   Multiple code examples abound under UART - and your forum "Search" (atop this forum) will yield (easily) hundreds of users enjoying SUCCESS w/UART.    

    Not so much w/"Slave SPI" - clearly "nightmare in the making!"   (We note (even) vendor expert's, "MAY NEED to call" - fails to radiate confidence!)    And can this "Slave SPI over-reach" (ever) be rated as, "suitable for beginners' (likely) first task?"    

    I suggest UART - as I wrote to the other (w/near identical (unstated/unjustified) desire) as it vastly simplifies & speeds the exchange of data between your two boards.   (and - w/proper line drivers - those boards may be separated by hundreds of feet - SPI in harsh contrast - requires "desktop" closeness)

    Without clear justification - choosing Slave SPI over a UART - (remains) impossible to explain/justify!   (someone had to note this!)