Hi, we have a few issues with the AFE7903 regarding LNA Bypass,ALC and Floatmode
Issue 1: The ALC does not compensate lna gain when bypass is enabled. This leads to a signal level jump when lna is bypassed.
Is the ALC able to completly compensate the lna gain when bypassed such that the rx gain stays constant?
Issue 2: The AGC behavioral with lna bypass is counter intuitive and the lnagain0 does not have any influence on the release time.
The expected behavior of the AGC when the LNA is bypassed is to reduce the DSA attenuation to a point near the decay threshold. We can achieve this by setting lnaGainMargin to a value of lnagain - margin in our case 27-4 dB.
The formula in the data sheets "current_dsa_gain < lnagain - lnagainmargin" seems to be wrong.
What would be the correct way to achieve this behaviour?
Attached are two documents.
The first "agc_only_measurement" shows six figures of a spectrum analyzer in zero span mode and the afe configured with an integer jesd interface and only agc activated. The general latte parameters are given below.
We performed six level jumps from -inf to the specified value in the figure reference. The AGC increases the DSA attenuation to bring the level below the attack threshold of -10 dBm.
With a high enough jump to -15 dBm input power (the lna gain is 27 dB) the agc bypasses the lna (see figure 4) and reduces the DSA attenuation in the next eight release phases until the decay threshold of -20 dBm is reached. ( Figure 4,5,6)
This results in a steady state gain difference of 10 dB.
When we turn on the ALC as well and repeat the measurements from before, we would expect a 10 dB level jump above an input power of -15 dB of 10 dB.
With regards to the attachment "alc_measurement_report" we see the correct output level in figures 1-2. In figures 3 - 5 the expected output power is -25 dBm and -10 dBm, and we measure -43 dBm and -27 dBm. This jump corresponds to the lna gain and not the margin difference. Thus we conclude that the ALC infact does not apply the lnagain to the signal when the lna is bypassed.
Can you help us here?
Our goal is to have a constant rx gain!
Latte Configuration
if enableAGC:
for i in range(4):
## Internal AGC mode
#### RXA/B config
sysParams.agcParams[i].agcMode = 1 # Internal AGC mode
sysParams.agcParams[i].rfdeten = 0 # RF analog detector is enabled.
sysParams.agcParams[i].atken = [1,1,0] # attack peak detector is enabled with big step.
sysParams.agcParams[i].decayen = [1,1,0] # decay power detector is enabled.
sysParams.agcParams[i].atkthreshold = [-8,-10,-25] # This value is the applied threshold of attack detector
sysParams.agcParams[i].decaythreshold = [-14-8,-12-8,-28] # This value is the applied threshold of decay detector
sysParams.agcParams[i].atkwinlength = [60000,40000000] # Attack detector Time Constant in absolute time in ns. Max is 40ms
sysParams.agcParams[i].decaywinlength = 40000000 # Decay detector Time Constant in absolute time in ns. Max is 40ms
#sysParams.agcParams[i].atkNumHitsAbs = [200,200] # Absolute Number of times signal crosses threshold.
#sysParams.agcParams[i].deacyNumHitsAbs = [200,200] # Absolute Number of times signal crosses threshold.
sysParams.agcParams[i].atkNumHitsRel = [75,2]
sysParams.agcParams[i].decayNumHitsRel = [90,80]
sysParams.agcParams[i].custRfMode = 1 # Use RF analog detector as very big step attack in internal AGC.
sysParams.agcParams[i].atksize = [6,1] # Whenever detector triggers the DSA change 0.5dB* value, i.e.big step 2dB, small step& power detector 0.5 dB
sysParams.agcParams[i].decaysize = [4,1] # Whenever detector triggers the DSA change 0.5dB* value, i.e. big step 2 dB, small step& power detector 0.5 dB
sysParams.agcParams[i].minDsaAttn = 0 # Minimum DSA attenuation used by AGC, 0.5dB* value
sysParams.agcParams[i].maxDsaAttn = 50 # Maximal DSA attenuation used by AGC, 0.5dB* value
sysParams.agcParams[i].totalGainRange = 52 # Total gain range used by ALC for gain compensation, 1dB * value. 64 dB is maximal. Rounded internaly to multiples of 2 -> n*6.02dB
# LNA + max DSA => 52 dB -> rounded to 54.182 dB. This is the digital ADC gain.
sysParams.agcParams[i].rfdetnumhits = 10 # Absolute Number of times signal crosses threshold.
sysParams.agcParams[i].rfdetstepsize = 50 # Whenever RF detector triggers the DSA change 0.5dB* value, i.e.25 dB.
sysParams.agcParams[i].rfdetThreshold = -4 #or 3?
# # external LNA control
sysParams.agcParams[i].lnaEn = True # Enternal RXA LNA control
sysParams.agcParams[i].extLnaTempModel = 0 # Use a temperature model for the lna gain
sysParams.agcParams[i].singleDualBandMode = 0 # RXA is single band
sysParams.agcParams[i].lnagain0 = 27 # The gain of external RXA LNA for AGC to compensate, the resolution is 0.03125 dB 864 or 27.0?
sysParams.agcParams[i].lnaphase0 = 0 # The phase of external RXA LNA for AGC to compensate in Band0
sysParams.agcParams[i].lnaGainMargin = 46 # hysteresis value when to turn on lna [0.5 dB per unit]
sysParams.agcParams[i].blank_time_extcomp = 2550 # number of clocks of FadcRx/8 max 65535
if enableALC:
for i in range(4):
# ALC and floating point mode
sysParams.agcParams[i].alcEn = True # RXA ALC enabled
sysParams.agcParams[i].alcMode = 0 # RXA Floating point mode 0 float
sysParams.agcParams[i].fltPtMode = 1 # RXA Always send MSB of mantissa in floating point mode
sysParams.agcParams[i].fltPtFmt = 2 # RXA 4 bit exponent, 11 bit mantissa and 1 bit sign



