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.

TMS320F2800157-Q1: (SPI) Configuring a GPIO to Emulate SPISTE

Part Number: TMS320F2800157-Q1


Hello ,

I am wokring on implementing SPI Driver for C2000 F2800157 MCU and I would like to emulate having multiple CS/slaves via GPIOs

I have checked the reference manual but I don't really understand this part. 

Is there any example code for this use case please?

  

Thanks for your help!

  • Hi Hashad,

    There are unfortunately no specific examples to showcase this setup, but I will also try to explain this section of the TRM differently to clarify: 

    Typically, a dedicated SPISTE pin ("SPI Slave Transmit-Enable" pin)- also called a CS pin ("Chip Select" pin)- is used to select which slave is 'active' at a certain time. A specific slave is considered 'active' when its SPISTE pin is pulled low, which allows for the slave to receive data. There are limited dedicated SPISTE signals/pins available on devices. Thus, if you would like to emulate more slaves then you can use other GPIOs to act as SPISTE pins (one GPIO/SPISTE per slave). To do this, you have to set the configuration of each GPIO signal to be an 'output' from the SPI module that way the digital signal output from the GPIO module can be used to select active slaves. So before any data can be sent to the slave, you would have the master (as we are in master mode) pull the specific slave's GPIO (SPISTE) output low to allow that slave to receive data. 

    Hope this helps, and please let me know if you need further clarification on this.

    Regards,

    Allison