Hello there,
I found a few threads on this topic but none of them helped me exactly.
Let me describe my problem:
I modified the EVM kernel to support all my devices. (touch screen is no longer connected on SPI on my board).
I have connected an SPI client on SPI1 of OMAP 3530 (CUS Package).
For absolute clarity, OMAP is the SPI master and my device is the Client/Slave.
When I send any data on SIMO (Master Out - Slave In) , I am able to write to the device, there by configuring certain parameters.
However my SOMI (Slave Out Master In) line does not seem to be working.
The operation I am trying to do involves 8 bit write and 16 bit read from the slave. So, I am using the call spi_w8r16() .
As long as I did not set the MCSPI_CLK as INPUTENABLE in the PADCONF, all my read operations were 0x00. After I set the clock as INPUT ENABLE, all the read operations are returning as 0xFF.
However, using a 2-channel Oscilloscope, I dumped the clock and data, and found that the data as returned by my SPI slave is: 0xB001.
This is the line that was enabling the MCSPI_CLK in pad conf:
OMAP3_MUX(MCSPI1_CLK,OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT| OMAP_PIN_INPUT),
When I try to read , this is my MCSPI register dump:
MCSPI REGISTER DUMP START************************
OMAP2_MCSPI_REVISION : 21
OMAP2_MCSPI_SYSCONFIG : 15
OMAP2_MCSPI_SYSSTATUS : 1
OMAP2_MCSPI_IRQSTATUS : 7
OMAP2_MCSPI_IRQENABLE : 0
OMAP2_MCSPI_WAKEUPENABLE: 1
OMAP2_MCSPI_SYST : 0
OMAP2_MCSPI_MODULCTRL : 1
OMAP2_MCSPI_CHCONF0 : 1103f0
OMAP2_MCSPI_CHSTAT0 : 7
OMAP2_MCSPI_CHCTRL0 : 1
OMAP2_MCSPI_TX0 : 0
OMAP2_MCSPI_RX0 : ff
OMAP2_MCSPI_XFER_LVL : 0
MCSPI REGISTER DUMP END**************************
Well... any suggestions as to what is going wrong here?
Thanks in advance.
Murali