We need to communicate with the AD7609 using the native SPI peripheral and possibly use DMA and interrupt services.
The AD7609 datasheet does not explicitly state how the SPI bus must be configured on the master (i.e. our STM32F429 micro-controller) with regard to SPI clock phase and polarity. The possible options are:
- phase 0, polarity 0
- phase 0, polarity 1
- phase 1, polarity 0
- phase 1, polarity 1
These ultimately determine when the bit on the MISO line is valid and when the master expects the slave (AD7609) to shift the next bit.
We are unable to figure out which combination of clock polarity and phase is the correct one; the readings are nonsensical. I believe that this is due to our microcontroller (STM32F429) releasing the clock prematurely, which we should be able to fix with pull up and pull down resistor(s).
Is something else specific to the AD7609?, ie - read one more byte and shift the received data somehow before interpreting the values, or maybe the read must be 9 instead of 8 bits?
If more detail is required:
- we have CONVSTART_A and CONVSTART_B tied together
- we wait for the BUSY pin to clear before reading.
- we are reading all 8 channels on pin OUT_A
- our SPI bus speed is 10 MHz
- we have a proper reset sequence on power on, since bit-banging works...
Any help would be MUCH appreciated.