I have a problem with ads7843. I saw in internet that the spi settings are CPHA=0, CPOL=0. I set them, SPI psc=256(fpclk/256, fpclk=72MHz). And in result I get from SPI only zeroes. I read X in such way:
k=WriteSPI(SPI1, 0xDC);
msb= WriteSPI(SPI1, 0x00);
lsb=WrieSPI(SPI1,0x00);
And I get Y in the same way, but send 0x9C.
When I set CPHA=1, CPOL=0, and SPI psc=2, then I get data from spi. But what is the output data format? In different forums I saw
1) result=(msb<<8)| lsb;
2)result=((msb<<8) | lsb)>>4;
3)result=(((msb&0x7f)<<8)| lsb)>>3
what variant (1, 2, 3 ) is correct or the other one?
I use stm32f107 as a master. TFT is wf43btibedotp(evaluation board sk-wf43btibedotp ).