AnsweredAssumed Answered

Configuring the AD9371 RX Gain

Question asked by Billy7411 on Jul 12, 2018
Latest reply on Jul 13, 2018 by gverma

Hi everyone,


I have been trying to change the RX Gain of the AD9371 using a C script. I had trouble updating the values in the script, so I then tried to adjust and verify them using shell commands:


root@analog:/sys/bus/iio/devices/iio:device3# echo 20 > in_voltage0_hardwaregain

root@analog:/sys/bus/iio/devices/iio:device3# cat in_voltage0_hardwaregain

30.000000 dB


I am currently running in manual gain control mode, which I verified using the following commands:


root@analog:/sys/bus/iio/devices/iio:device3# cat in_voltage0_gain_control_mode



The IIO Oscilloscope GUI confirms that the gain control mode is set to manual. Any attempts to change the gain value in the GUI also do not work.


I have also encountered several error messages when trying to set these values:


ERROR: 40: Invalid ObsRx channel in setObxRxManualGain()

ERROR: 257: ARM Command Error in MYKONOS_setObsRxPathSource()

ERROR: 364: MYKONOS_waitArmCmdStatus() exitd due to ARM error for the desired ARM opcode

WARNING: 45: Cannot read ObsRx gain index. ObsRx Channel is disabled.


I have attached the output of dmesg as additional reference.


Any help towards solving this problem would be appreciated.