I want to read ADC data from AD7771 via DOUT0 line - all 8 channels in 1 line.
What I did:
I am in SPI control mode:
- Set PowerMode to LP
- Set decimation rate (I want ODR = 1 kHz) => 1024/1 = 1024 = 0x400 - to the rigister SRC_N_MSB I wrote 0x04 and to SRC_N_LSB I wrote 0, then I update it via register 0x64 (SRC_UPDATE)
- Set Output format and DCLK via reg. 0x14 (DOUT_FORMAT) => DOUT_FORMAT = 0b11100100 (1 DOUTx line,CRC header,reserved,MCLK/4,Reserved).
- Set reference to internal via reg. 0x15 (ADC_MUX_CONFIG) => ADC_MUX_CONFIG = 0b01000000
After that I can see:
- DRDY pin has period of 1 khz - perfect!
- On the scope I can see 8x32 bits packets - looks OK to me.
- Is OK when after all 8x32 bits packet the CLK still generates cloks even if the data are already sent?
- Where does the data start (CRC header for channel 0)?:
Finally I tried to read this data by STM32 via SAI interface, but I am not succesful. The discussion is here without answer: RE: Any advice on reading the AD7779 DOUT0 using an STM32 SAI input?
Thank you for any advice.