EVAL-AD5761R: SPI Communication/Board Power

Hello,

We have a build that is going to be using the AD5761R DAC and the EVAL-ADICUP3029 board, our company decided to try and evaluate it using the EVAL-AD5761R board. We will be communicating with it over the SPI PMOD connector of the 3029 board connected to the SPI PMOD connector of the 5761R board. The cable that was made to communicate with the boards takes the CS, MOSI, MISO, CLK, 2 DGNDs, GPIO12, and GPIO 16 of the 3029 board PMOD connector and connects them to the SYNC, SDIN, SDO, SCLK, 2 DGNDs, RESET, and LDAC respectively.

The 5761R board is being powered by our lab power supply at 5 v into the PVIN connector. Jumpers LK2, and  LK14 are removed and jumpers LK7 and LK8 are inserted. Jumpers LK_AVDD, LK_AVSS, LK_DVCC, LK_REF are inserted at the A position while the LK_VOUT+ and LK_VOUT- are inserted at the B position. The 3029 board is being powered via the usb connection to a laptop connected into a wall outlet.

We didn't find the NO-OS drivers for the 5761R until after making our own drivers for it. These were improvised from the CN0414 example. 

In the datasheet for the 5761R it states that the data is loaded in at the SCLK falling edge, so SPI mode 1 was assumed and the following initialization code was used.

ad5761r_ini.spi_init.chip_select = 0xFF;                   // sets chip select to be the default
ad5761r_ini.spi_init.id = 1;                                        // need to change from 0 - 2 to change SPI type
ad5761r_ini.spi_init.max_speed_hz = 4000000;      // not sure if this needs to be changed
ad5761r_ini.spi_init.mode = SPI_MODE_1;             // required for SPI communication on AD5761R
ad5761r_ini.spi_init.type = SPI_PMOD;                   // aligned with SPI id, PMOD is id 1
ad5761r_ini.regs = ad5761r_regs;                           // initialization values of AD5761R registers
ad5761r_ini.num_regs = 10;

When setting up the 5761R and attempting to write to the control register it seems as though this is unsuccessful. In the data sheet it states that the ALERT pin is:

"asserted low when the die temperature exceeds approximately 150°C, or when an output short circuit or a brownout occurs. This pin is also asserted low during power-up, a full software reset, or a hardware reset, for which a write to the control register asserts the pin high."

I can assume that the die temperature is not exceeding 150°C, or that there is not a short circuit nor a brownout. This is the power-up condition but even when I attempt to write to the control register the pin is still low and the ALERT led found on the 5761R board stays on.

 

/***************************************************************************//**
* @brief Initializes both AD5761R.
*
* @param device - The device structure.
* @param init_param - The structure that contains the device initial
* parameters.
*
* @return Returns 0 for success or negative error code.
*******************************************************************************/
int32_t AD5761R_Init(ad5761r_dev **device,
ad5761r_init_param init_param)
{
ad5761r_dev *dev;
int32_t ret;
ad5761r_st_reg *preg;

dev = (ad5761r_dev *)malloc(sizeof(*dev));
if (!dev)
return -1;

dev->regs = init_param.regs;
dev->num_regs = init_param.num_regs;

/* Initialize the SPI communication. */
ret = spi_init(&dev->spi_desc, &init_param.spi_init);
if (ret < 0)
return ret;

/* Initialize Control register. */
ret = AD5761R_WriteRegister(dev, AD5761R_WRT_CTRL_REG);
if(ret < 0)
return ret;

/* Initialize Disable Daisy-Chain register. */
ret = AD5761R_WriteRegister(dev, AD5761R_DDC_FNC_REG);
if(ret < 0)
return ret;


*device = dev;

return ret;
}

When probing with an oscilloscope and investigating the data coming in it appears as though the correct register and data is coming in over the course of the 24 clock pulses.

  • Am I initializing the SPI for this board correctly?
  • Am I powering the AD5761R board correctly?
  • Am I communicating to the 5761R correctly?
  • Any other help or advice would be appreciated.

Thanks,

Aleks



Removed question mark.
[edited by: Aleks89 at 5:48 PM (GMT -4) on 26 May 2021]
  • +1
    •  Analog Employees 
    •  Super User 
    on May 26, 2021 3:22 AM

    Hi Aleks,

    Based on your Oscilloscope shots, I'm assuming your SPI is operating at 3.3V? Based on your hardware setup, it seems that your DVcc is at 5V? can you confirm it by probing onto TP12. If that's the case, then the SPI comms will surely fail, since the digital pins' operation is dependent on the DVcc as stated in Table 1. Logic Inputs section.

    Your SPI mode should be fine. 

    The /ALERT pin is asserted low on power-up, a software full reset, or a hardware reset asserts the pin high. I suggest doing the software full reset command before you write to the control register. the ALERT led turning off is one assurance that your SPI comms went smoothly.

    Best regards,

    Ian

  • Hello Ian,

    Thank you! I didn't think to check the range of the digital input voltage levels for the 5761R. 

    Since we don't know any way to change the digital voltage of the 3029 board SPI to 5V nor a way to provide the AD5761R board with 3.3V with it's own power solution we circumvented this problem by removing the LK_DVCC jumper and changing the lab power supply to 3.3V while providing both the PVIN and TP12 with the same 3.3V.

    At first I was doing a full reset after initializing the SPI but removed it while trying to debug our issue. I added it back in and ran my code again and the ALERT LED went away on a write to the control register and SPI communication is successful as we are getting good Vout voltages.

    Thank you Ian,

    Aleks