Hello!
I use ADS7835 with STM32F405 and have one problem. If SPI prescaler is 128 (that mean 625 kHz at SCK pin) everything is OK. But if prescaler is 64 or 32 (1.31 MHz and 2.62 Mz) have wrong output code (that bigger 256, 512). That is my code:
ADS7835_CONV_PORT->BSRRH = ADS7835_CONV_PIN; //set CONV pin to 0
SPI_I2S_SendData(ADS7835_SPI,0x0000); //send 16 periods to SCK pin
while(SPI_I2S_GetFlagStatus(ADS7835_SPI, SPI_I2S_FLAG_TXE) == RESET){} // wait while transmit complete
result = SPI_I2S_ReceiveData(ADS7835_SPI)&4095; // read data from SPI
ADS7835_CONV_PORT->BSRRL = ADS7835_CONV_PIN; // set CONV pin to 1.
So what I do wrong and how I can use ADS7835 at higher speeds