I'm trying to communicate between the ADS7870 and the ST microcontroller STM32F4 Discovery evaluation board. I'm using IAR and at the moment I'm just trying to read register 31 from the ADC (which should return a 1) but with no luck.
I'm setting the SPI on the microcontrontroller as follows: data transmitted as MSB first, clock low in idle state, data is captured on rising edge, data size is 8 bits, and full duplex transmission.
In main.c I do:
And in ads7870_driver.c I have:
I'm attaching a screenshot of what I see on the scope. (yellow: sclk, blue: read command register 31, purple: output from ADC).
MOSI transmits properly to the ADS7870 (the din pin receives read command), but there is no response coming from the ADC dout pin.
I would really appreciate any help on this.