Other Parts Discussed in Thread: TSC2006, OMAP3530
I am writing a driver for TSC2006 touch screen controller and testing it using the OMAP EVM3530. I do not use the touch screen controller on the EVM, which uses SPI1.
My touch screen controller is on an expansion board connected to the expansion connector of the EVM. SPI2 is used for communication between the OMAP and TSC2006. I verify with the oscilloscope and see that everything is correct on the SPI bus. However, the data read from the RX register is always 0. I have spent sometime and could not figure out why. I did the following steps:
- Set up the SPI2 mux pins for SPI transmission in the Xloader.
- Enable FCLK and ICLK for SPI2 in the Xloader
- Open the SPI2 port
- Configure the SPI2 port Channel 0 with the
config value = MCSPI_PHA_ODD_EDGES | MCSPI_POL_ACTIVEHIGH | MCSPI_CHCONF_CLKD(2) | MCSPI_CSPOLARITY_ACTIVELOW | MCSPI_CHCONF_WL(16) | MCSPI_CHCONF_TRM_TXRX | MCSPI_CHCONF_DPE0;
- Call SPI_WriteRead().
Please let me know if you see anything that I am doing wrong or you have any idea about the problem.
Thanks,
Luan