AnsweredAssumed Answered

Fast AGC does not unlock on energy lost with decimating FIR

Question asked by andrew_senior on Nov 29, 2016
Latest reply on Dec 22, 2016 by andrew_senior

I'm using the Avnet PicoZed SDR (AES-Z7PZ-SDR2-G) on the FMC carrier board (AES-PZSDRCC-FMC-G), running the standard ADI 2015_R2-2016_07_26 Linux image. I'm finding some puzzling behaviour with the AD9361 fast-attack AGC which seems to occur only when I have a decimating FIR loaded in the receiver.


I have TX1A connected to RX2A via 40 dB of attenuation (RX1A will also work; I've just been using RX2A recently). Starting with a clean set-up (no .osc_profile.ini and no changes to the device tree), I start IIO Oscilloscope and set things up as follows:


a. Rx and Tx frequencies 1392 MHz (just happens to be convenient for other tests)
b. Gain Control Modes to fast_attack (both channels)
c. DDS Tx 1 to “One CW Tone”, frequency 0.08 MHz, scale 0 dBFS
d. DDS Tx 2 to Disable
e. Set TX1 attenuation to 0 dB


I then start a time domain plot of voltage2 and voltage3 and see an amplitude of ~500, RX2 RSSI ~53.50 dB and RX2 gain ~29 dB. If I then set the TX1 attenuation to 50 dB (i.e. reduce the input to the receiver by 50 dB), the plot amplitude changes to ~20, RSSI to ~99 dB and gain to ~44 dB. This is what I'd expect since, according to the default settings, the AGC should unlock on the "energy lost" condition and go to optimised gain. Further gain increase is limited by the AGCLL. The 15 dB increase is not quite what I'd expect from the settings, but that's for another question perhaps.


However, if I now load the LTE1p4_MHz filter and enable it and repeat the same test, I find that on reducing the transmitter power by 50 dB, the receiver gain does not change. The same behaviour occurs with the LTE5_MHz and LTE20_MHz filters (I have not tried others). It does not occur with a custom "null" filter (just a single non-zero tap) with the decimation factor set to 1.


Further investigation has shown that with a decimating FIR loaded, if I use the "Debug" tab in IIO Oscilloscope to clear bit 6 of register 0x15C ("Use HB1 Out for Dec Pwr Meas") then the gain does change as expected. (It seems to be necessary to close and re-open IIO Oscilloscope for this register change to have an effect). Setting this bit again (restarting IIO Oscilloscope is not necessary) results in the gain failing to change again.


It seems as if for some reason, unless 0x15C[D6] is clear, the AGC does not unlock on the "energy lost" condition when a receiver FIR with a decimation factor > 1 is used.


Are there in fact some other AGC-related settings that I should be changing when using the FIR that might explain why this issue occurs?