Post Go back to editing

AD7293: Sporadic unplausible values (0x7FF / -256) in Result Registers when Closed-Loop is enabled on Channel 0

Thread Summary

The user experiences sporadic, incorrect readings from the AD7293 Evaluation Board when Closed-Loop mode is enabled, specifically with VIN1 and the temperature sensor. The Analog Devices support engineer recommends using background conversions instead of command readouts in Closed-Loop mode to avoid these issues. The user confirms that background mode provides consistent readings even with Closed-Loop enabled.
AI Generated Content
Category: Datasheet/Specs
Product Number: AD7293

Hardware Setup:

  • Device: AD7293 Evaluation Board.
  • Controller: Main-processor connected via SPI.
  • Driver: Using the Analog Devices no-os driver integrated in Main-processor

What works:
I have verified that basic SPI communication is stable. The following operations work perfectly in Open-Loop mode:

  1. Chip-ID: Always returns the correct ID without errors.
  2. Temperature: Reading the temperature sensor returns valid values.
  3. I can perform a voltage ramp by controlling VOUT1 and reading VIN1; the values are consistent and accurate.

Issue:
The problem starts to occur when Closed-Loop mode is enabled. Once enabled, I experience sporadic, unplausible readings:

  • VIN1 Readings: Occasionally returns 0x7FF (max 12-bit value). When re-requesting the read i see the correct value again.
  • Temperature Sensor: Occasionally returns corrupted values (e.g., -256°C ).

Observations & Debugging performed:

  • Since the Chip-ID remains perfectly readable, the SPI bus itself and the CS/SCLK timing appear to be ok.
  • I have verified on an oscilloscope that CS goes High immediately after the SPI transfer ends

From the datasheet i found this note:

  
-> do i somehow observe the issue because ADc beeing busy because a background action is currently ongoing? But shouldnt i than just read the old value?
-> or do i need to take care on something in addtion when enabling the closed loop?

  • Hi  ,

    I will be happy to support your query related to AD7293.

    To better understand your setup could you please clarify to me, if you are using any ADI controller boards or it is different MCU board. (When you refer to Main-processor.)

    Can you be specific, when it comes to your channel configurations, perhaps providing the Entire register map readout. (This should help me to identify or replicate the challenge.)  

    Regards,

    Arnost

  • Hello,

    i have following setup

    AD7293-Eval | --- SPI -------- | Zynq-Ultrascale (other CPU/Board)
                          | --- VDrive ---- | 
                          | --- GND------- |
    I dont use the SDP / ahve it available. So i cant use the GUI-Tool from AD.


    What i do in Main-CPU SW:

    init
    - call ad7293_init (from no-os ad7293-driver)

    - update AD7293_REG_GENERAL to use ADCREF from internal

    AD7293 functiontest:
    - read chip-ID

    - test ADC and DAC (ad7293_ch_read_raw reads the value in contonous mode)


    uint16_t dac_vals[] = {0x000,0x029,0x052,...};

    for(int i = 0; i < (sizeof(dac_vals) / sizeof (dac_vals[0])); i++)
    {
    ret = ad7293_dac_write_raw(device_handle, 2, dac_vals[i]);
    ret = ad7293_ch_read_raw(device_handle, AD7293_ADC_VINX, 2, &adc_raw);
    xil_printf("DAC: %d --- AD7293_ADC_VINX_chreadraw: %d\n", dac_vals[i], adc_raw);

    }

    - read temperature:


    ret == ad7293_ch_read_raw(device_handle, AD7293_ADC_TSENSE, 0, &temp_val))
    xil_printf("TSENSE_INT: [°]: %d\n",(int) AD7293_TSENSE_TO_CELSIUS(temp_val));

    All works well, i get every time reasonable values returned from ad-chip. 

    But after i enable closed-loop for channel 0, same code from above sporadically leads to returning incorrect temperature /VINx-values.

    => today observed, that wenn i read VINx, Tsense, Isense in background mode, i always get reasonable values even when i enable closed loop on channel 0.

    So my suspect is that contonous mode + closed-loop might require some special constraints to be taken care?

  • Hi ,
    thank you for your clarification on the setup. I would have to investigate the case, I will be able to give you update by end of the next week.

    Regards,

    Arnost

  • Hi  ,

    I have been looking into this issue and experimenting with the ADC readouts.

    Certainly behaviour you are seeing is related to the Closed-loop mode of operation.

    Closed-Loop operation requires Isense conversion to run in the background, irrespective of CS. 

    It would be recommended to not combine the "command" readout approach in conjunction with the background conversion  in closed-loop. I would suggest you would use "background conversions" while in closed-loop operation. 

    Regards,

    Arnost

  • Hey, 

    Okay, thanks for the clarification and effort spend!

    Greetings 

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.