Post Go back to editing

Rx LPF gain not working in split gain table mode for AD9363

Category: Software
Product Number: AD9363

We are working with the split gain table mode for the AD9363 in order to get more control over the Rx analog gain settings.  We have been able to successfully control the LMT gains (LNA, TIA, and Mixer gains) and we see appropriate gains taking effect on our test input signals.  For some reason, we are not able to successfully control the LPF gain settings (we think we are setting them, we confirmed the settings by reading back the registers, but don't see it taking effect with a test signal).  No matter what we set the LPF gain value to, it has no effect on the signal.   I have included the steps we took.  Can anyone who has experience with this see anything wrong with our process?

Thanks in advance.

  1. We load a custom split gain table with the command “cat CustomSplitGainTable.txt > /sys/bus/iio/devices/iio:device0/gain_table_config”.  This is a modified version of the AD9361 standard gain table file but only contains the split table portion of the file.
  2. We enable manual gain mode with the command “echo manual > /sys/bus/iio/devices/iio:device0/in_voltage0_gain_control_mode”.
  3. We enable split table mode with the command “echo 1 > /sys/kernel/debug/iio/iio:device0/adi,split-gain-table-mode-enable”.
  4. We set the desired RX gain with the command “echo $SET_LMT_GAIN > /sys/bus/iio/devices/iio:device0/in_voltage0_hardwaregain”.
  5. We enable the digital gain with the command “iio_reg ad9361-phy 0xfb 0x04”.
  6. We set the digital gain to our desired value with the command “iio_reg ad9361-phy 0x10b $SET_DIGITAL_GAIN”.
  7. We set the LPF gain to our desired value with the command “iio_reg ad9361-phy 0x10a $SET_LPF_GAIN”.
  8. Both before and after the above steps, we dump the RX1 gain info with the command “cat /sys/kernel/debug/iio/iio:device0/gaininfo_rx1”.  The after value returned appears to show that both the LPF and Digital gain values were set.
  • We will test and get back on this

  • Sorry for the delay in response.

    We tested that on our eval board and were not able to reproduce the issue with the same split gain table that you had shared.

    Below is the script  that we have run for testing RX2.

    echo 1 > /sys/kernel/debug/iio/iio:device1/adi,split-gain-table-mode-enable
    cat /home/analog/gain\ table_custom.txt > /sys/bus/iio/devices/iio:device1/gain_table_config
    cat /sys/bus/iio/devices/iio:device1/gain_table_config
    echo manual > /sys/bus/iio/devices/iio:device1/in_voltage1_gain_control_mode
    echo 12 > /sys/bus/iio/devices/iio:device1/in_voltage1_hardwaregain
    cat /sys/bus/iio/devices/iio:device1/in_voltage1_hardwaregain
    echo 1 > /sys/kernel/debug/iio/iio\:device1/adi,gc-dig-gain-enable
    cd /sys/kernel/debug/iio/iio\:device1
    echo 0x10D 0x02 > direct_reg_access ##writing lpf gain for RX2
    echo "LPF gain read"
    cat direct_reg_access

    When the LPF Gain is 2, the signal level of CW tone at RX output is -11dBFs.

    When the LPF gain is increased by 1dB  to value of 3dB, the signal level increased to -10dBFs.

    In the above test, input of the RX is kept constant at -15dBm. 

    Hope the input to your RX is not very high to cause saturation in the RX path.

    Likewise, for each dB increase /decrease in LPF gain the signal level changes accordingly.

    Same goes true for LMT gain as well.