Read AD5790 control registers with STM32F407

I am trying to read AD5790 control registers using STM32F407 through SPI. I developed my program based on the provided generic and RL78G13 driver for AD5790 on the Analog Device Wiki. I only got zero value which is obviously incorrect. This confused me because I do not know whether the zero value is caused by the malfunction of the AD5790 evaluation board or the program I wrote. I have checked the timing diagram and all looks like fine.

Does the configuration on the AD5790 evaluation board matters? I changed LK1 to option B because I need to use external power source and other links remain unchanged. I applied +5V on VCC, -10V on VSS, 10V on VDD. Output is around 0.28V on power on state.

Can anyone figure out the problem? Thanks a lot.

By the way, I cannot see correct output when I am trying to send value to it and this is why I tried to read the control register to ensure the evaluation board still works.

  • 0
    •  Analog Employees 
    on Jan 6, 2014 3:06 PM

    Hi Michael_Fang,

    The evaluation board needs to be configured depending on the user requirements. I will go through the main points to take into account so you can confirm the configuration of the board.

    From the information provided, Vcc, Vdd and Vss are well powered.

    • LK9 should be IN to obtain the reference voltages from the ADR4550, or +5V supplied to the Vref connector if the reference on-board is not used.
    • LK1 - B (External source of the digital power supply)
    • LK2 - B (On-board generated +10V reference voltage source)
    • LK8 - C (On-board generated -10V reference voltage source)

    The next step is to initialize the part by writting to the control register.

    • Set DACTRI = 0 and OPGND = 0 to place the DAC in normal operating mode and remove the DAC output clamp to ground, respectively.

    After initializing the DAC, the part should respond as expected for any write or read to its registers.

    Can you communicate with the part?

    Regards,

    Estibaliz Sanz

  • Hi Estibaliz Sanz,

    I am glad to hear your response. The configuration I used is just the one you recommended. I have tried to clear the DACTRI and OPGND bit and then communicating with the part, it still fails to response.

    I didn't use the recommended function AD5790_EnableOutput(1) in the driver because I cannot guarantee the register to be successfully read back. In stead, I directly wrote AD5790_SetRegisterValue(AD5790_REG_CTRL, 0x00002, 3) in which I clear the DACTRI and OPGND bit while setting the RBUF bit high, as stated in page 4 of the evaluation board user guide. The RBUF bit should be high when LK3 is in position A and LK4 is removed.

    Meanwhile, I tried to send value to the DAC, the output is still not the desired one.

    I have checked SPI output with oscilloscope and it should worked well (clock is high when idle, data sampled at the first edge of the clock)

    Thanks for your help.

    Regards,

    Michael Fang

  • 0
    •  Analog Employees 
    on Jan 6, 2014 4:37 PM

    Hi Michael Fang,

    Before going into the software side of your application.

    Just a quick check, when you say that the DAC output doesn't show the desired voltage I assume that you see it changing value, is that right?

    What coding is being used binary/twos complement (default)?

    Regards,

    Estibaliz

  • Hi Estibaliz,

    I can only observe 2 different values. One is 3.55V with a variation of 0.5V after I supply power to DAC while the other one is from 0.270V to 0.273V and again cannot hold steady after I initialize it. The output will remain at 0.270V to 0.273V no matter what value I send.

    The coding is the same as default.

    Regards,

    Michael

  • 0
    •  Analog Employees 
    on Mar 6, 2014 5:57 AM

    Hi Michael,

    I have just found that this thread was moved to Microcontroller no-OS Drivers community. Do you still need help?

    Thanks,

    Dragos

  • 0
    •  Analog Employees 
    on Aug 2, 2018 2:32 PM
    This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

    Thank you,
    EZ Admin