AD9257 SPI issue

Hi,

I have troubles with SPI communication between AD9257 demo board and a zybo board.

For example, I try to read the register 0x01(the chip ID) with this command, but as you can see the ADC doesn't answer...

We check timing spec, and it is OK.

Is there something I missing?

Green ->CLK (around 200kHz)

yellow -> Data (SDO and SDI are connected together )

Blue -> CS

When I disconnect the CS pin, sometimes the ADC answers correctly (like 1 time every 20 requests)

(here, I have removed the CS pin from ADC)

Any idea?

Thank you

  • 0
    •  Analog Employees 
    on Mar 19, 2021 3:09 AM

    Hi ArnoD,

    You mentioned that "SDO and SDI are connected together" but AD9257 has 3-wire SPI interface.
    Please send us a copy of your schematic so we can check how the device is connected to your controller board.

    Here are some application notes you may refer to:
    AN-877
    AN-812

    Regards,
    Shine

  • 0
    •  Analog Employees 
    on Mar 19, 2021 6:54 AM

    Hi,

    Thanks for reaching out. As addition to Shine's reply:

    What instruction data (first 16 clock cycles) are you sending to the SDIO? It looks like you're unknowingly reading register 0x00 based on the second probe shot... in which you're reading 0x18 which is expected. 

    Kindly refer to the instruction header found on AN-877. To read a register, set the MSB to logic 1 followed by W1=W0=0, and then the address of the register you want to read from. Also keep in mind that framing of data starts on the first rising edge of SCLK once CSB is tied low.

    For reading 0x01, set CSB to low then set R/W bit to 1, then all zeros except for A0. Keep CSB low for 8 clock cycles to get the data for register 0x01.

    Regards,

    Mark

  • Yes, because on your eval board, SDI and SDO are separated. So I've merged the USB_SDI pin & USB_SDO pin.

    This way, I can talk to the ADC with a SPI 3-wire IP

  • In the first shot, I tried to read the 0x01 register. I expected a 0x92 response, but it replied a 0x00.

    In the second shot, I tried to read the 0x00. It was successfull, because I received a 0x18, as expected. However, the answer was correct only one time every 20 shots aroundly. Please note that the CSB pin was not connected to the ADC. The CSB pin was tied to ground.

    OK, I will check the AN-877 to see if something is wrong.

    Thank you

    Regards,

    Arnaud

  • 0
    •  Analog Employees 
    on Mar 25, 2021 3:56 AM in reply to ArnoD

    Hi ArnoD,

    Where are USB_SDO and USB_SDI connected? Are they directly connected to a microcontroller I/O? Or are they connected to separate I/Os and you are using a multiplexer such that only one of the I/Os is connected to AD9257 SDIO at one time?