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.
Hello,
I have seen 4 driverlib example of spi, but information I requreid is stil missing.
I am having problem in crating bydirection communication between SPI Master & SPI SLAVE
Here I have some question as below,
Thanks
Piyush Verma
Hi Piyush,
Is there any example for SPI SLAVE to receive and transmit interrupt based data with detection CS pin status to detect first byte.
We only have an example that sets up a SPI module as the master (transmits data) and another module which is the SPI slave (receives data).
C:\ti\c2000\C2000Ware_version\driverlib\f2837xd\examples\cpu1\spi\spi_ex3_external_loopback_fifo_interrupts.c
How to detect CS pin low, as CS is not used as GPIO, it's part of SPI_STEB ?
The SPI module will automatically handle the SPISTE signal. It is driven low by the master before transmitting data to the slave and is taken high after the transmission is complete. However, you can also use a GPIO if you prefer or have multiple SPI slaves.
Please take a look at the 'Special Considerations' section of the 'SPI Module Signals' within the Technical Reference Manual
If I enable INT_SPIB_TX Iinterrupt then it's called again and again even when Master is not sending data
Is SPI B your master or slave device? Do you have FIFOs enabled?
Should I enable INT_SPIB_TX when CS pin low and disable wiht CS_PIN Hight ?
In slave mode, data written to SPITXBUF is transmitted to the network when appropriate edges of the SPICLK signal are received from the network master. The TALK bit can also be checked to know whether the SPI module is able to transmit data.
Best Regards,
Marlyn
Regards
Piyush
Hi Piyush,
But in case of c2000 SPI Slave STEB must be connected to IO Pin so I can't use as GPIO
The SPISTE pin does not need to be used. You can change the mux settings to make this pin a GPIO and drive it yourself with the implementation that you choose.
Best Regards,
Marlyn