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.

SPI Communication

I am trying to communicate over SPI to a touchscreen controller in WINCE platform.

I have configured the pads(CLK,SIMO,SOMI and CS).Using the driver fns of SPI (provided by TI) I am able to write on the line. The data,clock and CS are observed at the input of the touchscreen controller.

My problem is that I am observing data on the SOMI line in the same cycle and it is the same as the data on the SIMO. And the voltage level is also dipping on the SOMI line.The data is observed on SOMI line even when there is no slave connected. 

Please suggest me a solution to this problem.

 

 

 

  • Srinivas Pratapa said:

    I am trying to communicate over SPI to a touchscreen controller in WINCE platform.

    I have configured the pads(CLK,SIMO,SOMI and CS).Using the driver fns of SPI (provided by TI) I am able to write on the line. The data,clock and CS are observed at the input of the touchscreen controller.

    My problem is that I am observing data on the SOMI line in the same cycle and it is the same as the data on the SIMO.

    Srinivas

    SPI works that way. If setup for transmit & receive then one word will be received for every word transmitted (there are some exceptions).

    Checkout the the Wikipedia page at http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus

    Srinivas Pratapa said:

    And the voltage level is also dipping on the SOMI line.The data is observed on SOMI line even when there is no slave connected. 

    Please suggest me a solution to this problem.

    You will need to provide more detailed information. 
    When no slave connected, is the data observerd on the SOMI line the same as the SIMO line?  
    Is the voltage dip observerd with the slave connected, not connected, or both?
    How big is the dip? Could it be contention?
    Does the MCSPI_CHxCONF:DPE0 [16] == 0x0?

      Paul

     

     

  • Srivivas

    Re-reading your post, it looks very likely that the MCSPI_CHxCONF:DPE0 [16] == 0x0 which sets up the SIMO line to transmit data. This would explane why you are seeing the same data on both lines and why you see data when no slave is connected.

      Paul

  • When no slave connected, is the data observerd on the SOMI line the same as the SIMO line?  

    Yes the data observed on the SOMI is same as the data on SIMO when no slave is connected.


    Is the voltage dip observerd with the slave connected, not connected, or both?

    The dip is observed only when the slave is connected.

    How big is the dip? Could it be contention?

    We are operating at 1.8v and the voltage dips to 0.8v.


    Does the MCSPI_CHxCONF:DPE0 [16] == 0x0?

    yes it is 0x0 only.

  • Srinivas

    With DPE0 == 0x0 the SOMI line is selected for transmission. Set this field to 0x1 to disable the transmissions.

    The dip in voltage with the slave connected is most likey because of contention on the SOMI line due to the master SOMI signal set as a transmitter as mentioned above. Once the DPE0 field is changed then the voltage dip should not occur.

      Paul