I'm attempting to interface a 'Touch keypad' controller with ESP8266(On a ESP launcher dev board) . The connection between the two is standard SPI (MOSI,MISO,SCK,CS) with couple of additional pins connected to GPIO.
ESP8266 is the master and the controller is the slave, I chose to use HSPI on ESP after reading through couple of materials and forums. The HSPI pin connections are verified enough number of times.
On the ESP side, i'm running FreeRTOS with just one task.
My questions are as follows.
>There are 3 spi libraries provided (SPI overlap.c, SPI.c, and SPIinterface.c), amongst these which one is to be used and why?
>I have to just send 8 bits of data and read 8 bits of data and not use "Command" or "Address" data. Now, I cant seem to find a function that can do just that.
>My MOSI data is correctly sent, however my MISO data is wrong (considering that the slave is factory default and is not erratic). I'm supposed to recieve 0xFF as my data but recieving 0x80 can anybody tell me why?
Regards.
EDIT:
A quick analysis of the waveform of clk and the MOSI and MISO data ,led me to believe the problem resides in the way i'm reading data. Which arises a new problem!!!!
How do i Write data (MOSI) and read data (MISO) simultaneously?