Post Go back to editing

AD9951 Unresponsive to SPI communication.

Category: Hardware
Product Number: AD9951

I am trying to confirm that my AD9951 is receiving SPI communication. I have not received any response to my commands (nothing coming back on the SPI line) and also cannot seem to make the chip do anything.

The simplest test I can think of is to reset the device, initialize, then enable the CrystalOut pin to see the clock being passed through. So far the chip is not responsive.

I initialize it, confirm the refclock in, write the CFR2 register, then see if the crystal out pin has anything coming out.

Hardware: Raspberry Pico running MicroPython

Schematic for ADD9951 Interface:

* NOTE: One change not reflected on the schematic is that the PWRDWNCTRL pin is now controlled by the pico instead of always pulled high.

Refclock in:

Initialization Code (MicroPython):

 def __init__
# Set device pins default conditions
            self._chipSelectDisable() #active low
            self.reset_pin.low()
            self.io_sync_pin.low()
            self.io_update_pin.low()

            # Device is active low for powerdown ctrl pin
            self.pwrdwnctrl_pin.low()
            utime.sleep_us(1)
           
            # Reset Device
            self._reset()
            self._ioSync()
            utime.sleep_us(10)

            # Verify device initialized
            err = self._checkDeviceResponse()  
def _reset(self):
        """Resets Device
        try:
            self.reset_pin.high()
            utime.sleep_us(10)
            self.reset_pin.low()
        except Exception as e:
            print("ERROR : "+str(e))
def _checkDeviceResponse(self):
        self.cfr2.raw = 0 # default reg val
        self.cfr2.refclk_mult = 5 # 24Mhz refclock x 5  = 120 MHz sys clock
        self.cfr2.vco_range = 0   # 100-250
        self.cfr2.xtal_out_ena = 1
       
        try:
            error = self._writeRegister24Bit(REG_CFR2, self.cfr2.raw)
        except Exception as e:
            print("ERROR : "+str(e))

def _writeRegister24Bit(self, reg : int, data : int):
       
        error = ERR_NONE

        tx_buf_1 = bytearray(1)

        try:
            # Instruction format
            cmd = AD9954_instruction_t()
            cmd.read_ena = 0 # Write command
            cmd.reg_addr = reg & AD9954_REGADDR_MASK
           
            #  Send read command with register address
            tx_buf_1[0] = cmd.raw
            tx_buf_3 = bytearray(3)

            # MSB First
            tx_buf_3[0] = AD9954_BYTE(data, 2) # (data >> 16u & 0xFFu);
            tx_buf_3[1] = AD9954_BYTE(data, 1) # (data >> 8u  & 0xFFu);
            tx_buf_3[2] = AD9954_BYTE(data, 0) # (data >> 0u  & 0xFFu);

            self._chipSelectEnable()
            self.spi_h.write(bytes(tx_buf_1))
            self.spi_h.write(bytes(tx_buf_3))
            self._chipSelectDisable()
            self._ioUpdate() # store the data in the registers
       
        except Exception as e:
            print("ERROR WRITE REG 24BIT: "+str(e))
        return error

SPI Settings: 100khz, CPOL/CPHA = 1

SPI Trace

Parents
  • Hi  ,

    Have you tried checking out this guide on the things to be checked when using DDS evaluation board via external control? This might help you in this issue. 

    All the best,

    Jules

  • Hello ,

    It looks like "guide" is supposed to be a link, but when I click on it nothing happens. I would be interested in the guide! Can you redo the link or include the full path?

  • Hi  ,

    Sorry about that. Here's the link.

    All the best,

    Jules

  • Hi  ,

    From the listed guide, here are the things I have checked.

    This is the set-up in which the evaluation board is 100% to be controlled externally. The basic things to be checked are the following:

    • Most of the DDS evaluation boards have logic buffers between the USB interface and the DDS. There are jumpers that enable/disable these logic buffers. Locate for these jumpers and set to disable to tri-state the ICs on the evaluation board. The user may refer to the evaluation board schematic to easily identify these jumpers.
      • I'm not using an eval board.
    • Connect ALL the required input pins to the external circuitry via interface cable to control the DUT. Some critical inputs are the main_Reset and the external power down pins.
      • I'm controlling all input pins except for Loop Filter, which is not connected to anything. Sync_In is grounded.
    • Selecting the profile mode can be done two ways: hardwire each profile pin to logic 1 or 0, or connect interface cable from these pins to control it externally.
      • AD9951 doesn't have profile pins.
    • Set the Function Pins (applicable only to AD9914/AD9915) to the desired parallel-port configuration.
      • N/A for AD9951
    • Apply power, reference clock and control ALL digital inputs. When controlling the digital inputs, make sure that there is a defined logic state for each input. The external power down must be set to logic 0 to ensure the DDS is not in power-down mode. 
      • Confirmed
    • Send main Reset to the DUT. This places the DDS to a known state.
      • Confirmed - See SPI Trace
    • Program the registers to the desired configuration.
      • Confirmed - See SPI Trace

    I'm still seeing the same behavior. Any other ideas?

Reply
  • Hi  ,

    From the listed guide, here are the things I have checked.

    This is the set-up in which the evaluation board is 100% to be controlled externally. The basic things to be checked are the following:

    • Most of the DDS evaluation boards have logic buffers between the USB interface and the DDS. There are jumpers that enable/disable these logic buffers. Locate for these jumpers and set to disable to tri-state the ICs on the evaluation board. The user may refer to the evaluation board schematic to easily identify these jumpers.
      • I'm not using an eval board.
    • Connect ALL the required input pins to the external circuitry via interface cable to control the DUT. Some critical inputs are the main_Reset and the external power down pins.
      • I'm controlling all input pins except for Loop Filter, which is not connected to anything. Sync_In is grounded.
    • Selecting the profile mode can be done two ways: hardwire each profile pin to logic 1 or 0, or connect interface cable from these pins to control it externally.
      • AD9951 doesn't have profile pins.
    • Set the Function Pins (applicable only to AD9914/AD9915) to the desired parallel-port configuration.
      • N/A for AD9951
    • Apply power, reference clock and control ALL digital inputs. When controlling the digital inputs, make sure that there is a defined logic state for each input. The external power down must be set to logic 0 to ensure the DDS is not in power-down mode. 
      • Confirmed
    • Send main Reset to the DUT. This places the DDS to a known state.
      • Confirmed - See SPI Trace
    • Program the registers to the desired configuration.
      • Confirmed - See SPI Trace

    I'm still seeing the same behavior. Any other ideas?

Children