Interfacing to AD7927

I interfaced a Blackfin to the AD7927, the AD7927 says it is SPI compatible which is good as I only had a SPI port left to use but the timing in the AD7927 datasheet (fig 26 on page 22, it appears to sample DIN and change DOUT on falling edge) appears to be a little off from normal SPI when compared to the SPI timing diagram for the Blackfin (Figs 13-6 and 7 on page 13-13 in the ADSP-BF59X Hardware Reference where MOSI and MISO both sample or change on the same edge). I've got them tied together on my board and have the AD7927 set to sequence all 8 channels and the AD7927 seems to be doing that but the data read by the Blackfin appears inconsistent (have CPOL=1 and CPHA=0 in SPI1 config register). Is there an example of the best settings to use or should I change settings after setting up the AD7927 to better align the DOUT data for the Blackfin?

Parents
  • Tried with CPOL = 1 and CPHA = 1 and data reading works properly now but it fails to write properly to the AD7927 to set config register in it. It seems I will need to set up the AD7927 with CPHA = 0 then change to CPHA = 1 to read which is a pain but I may be able to make that work. So two questions:

    1. As CPHA=1 requires s/w control of the SPISEL pin is there any issues to letting the s/w control happen even with CPHA = 0? Basically can I have one routine that executes a transfer or will I need two different ones, one for CPHA=0 and another for CPHA=1?

    2. Can you find who at ADI wrote in nice bold letters "High speed serial interface SPI-, QSPITm-, MICROWIRETm-, DSP-compatible" on the front of the AD7927 datasheet and explain to them it is NOT SPI compatible, at least as far as using it with a Blackfin is concerned?

    To answer your questions, the schematic is across multiple pages so not so easy to post a single image. I'm using SPI1 so I have SPI1_MOSI connected to DIN, SPI1_MISO connected to DOUT, SPI1_SCK connected to SCLK and /SPI1_SSEL5 connected to /CS. I can see the half-clock difference between DIN and DOUT in a logic analyzer

Reply
  • Tried with CPOL = 1 and CPHA = 1 and data reading works properly now but it fails to write properly to the AD7927 to set config register in it. It seems I will need to set up the AD7927 with CPHA = 0 then change to CPHA = 1 to read which is a pain but I may be able to make that work. So two questions:

    1. As CPHA=1 requires s/w control of the SPISEL pin is there any issues to letting the s/w control happen even with CPHA = 0? Basically can I have one routine that executes a transfer or will I need two different ones, one for CPHA=0 and another for CPHA=1?

    2. Can you find who at ADI wrote in nice bold letters "High speed serial interface SPI-, QSPITm-, MICROWIRETm-, DSP-compatible" on the front of the AD7927 datasheet and explain to them it is NOT SPI compatible, at least as far as using it with a Blackfin is concerned?

    To answer your questions, the schematic is across multiple pages so not so easy to post a single image. I'm using SPI1 so I have SPI1_MOSI connected to DIN, SPI1_MISO connected to DOUT, SPI1_SCK connected to SCLK and /SPI1_SSEL5 connected to /CS. I can see the half-clock difference between DIN and DOUT in a logic analyzer

Children
No Data