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.

Compiler: SPI

Other Parts Discussed in Thread: C2000WARE

Tool/software: TI C/C++ Compiler

I am new to SPI and been trying to interface SPI on TMS320F2812 microcontroller with sample code provided with FIFO mode internal loopback and interrupt based. I have configured it without loop-back(Echo-back mode). Master is transmitting but not receiving and so with the slave. No bidirectional communication is happening.

Please help me out of this and also tell me how it can be done without FIFO or 

If anyone can tell me about How FIFO mode interrupts are generating with Flow chart and its method of operation

I want to transmit instruction code one after another to write into winbond IC at particular address but how I come to know whether the first byte has been transmitted so as to transmit next byte and thereafter read the same address using read bufferSPI_Screenshot.docx

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 I am able to transmit one byte properly looking for an exhaustive and descriptive solution to understand every details of SPI 

 

Bundle of Thanks in Advance 

 

 

 

 

 

 

  • Hi there. I am sorry that you are having issues getting started with the SPI.

    The SPI is actually a very basic module. its a programmable shift register with external connections.

    Have you looked through the SPI user Guide (SPRU059)?Section 1.4 explains the Interrupts. For non-FIFO mode, there is a single interrupt - SPIINT (SPIRXINT) which will be triggered when the SPI receives a complete word. In Non-fifo mode, you can poll on this bit if you do not want an interrupt. When the SPI has received a word completely, it also means that the transmitter has sent the last bit of the previous word. so you know that it is safe to read from SPIRXBUF, and Write to SPITXBUF.

    Also, our latest device, F28004x has a slightly improved SPI module. Within the examples is a non-fifo example. Please download c2000Ware. The example is located here: "C:\ti\c2000\C2000Ware_1_00_02_00\device_support\f28004x\examples\spi\spi_ex1_loopback.c"

    You can take the SPI code from the example and there may be some small changes with respect to a feature or two, but generally the flow of the program will give you a good base to start from.

    Thanks,
    Mark