How to configure and enable the AGC automatic gain control function of ADRV9026? Is the activation of AGC automatic gain control on ADRV9020 chip the same as on ADRV9026? Do you have any sample programs available?
ADRV9026
Recommended for New Designs
The ADRV9026 is a highly integrated, radio frequency (RF) agile transceiver offering four independently controlled transmitters, dedicated observation...
Datasheet
ADRV9026 on Analog.com
How to configure and enable the AGC automatic gain control function of ADRV9026? Is the activation of AGC automatic gain control on ADRV9020 chip the same as on ADRV9026? Do you have any sample programs available?
Dorant - Moved from RF and Microwave to Design Support ADRV9026/ADRV9029. Post date updated from Tuesday, October 29, 2024 8:47 AM UTC to Thursday, October 31, 2024 2:46 PM UTC to reflect the move.
Please see attached for an example script for configuring AGC. It should be same for ADRV9020 as well.
################################################################################# #GUI Version: 0.0.0.891 #DLL Version: 0.0.0.813 #Cmd Server Version: 0.0.0.813 #FPGA Version: 0xD9000007 #ARM Version: 0.0.0.471(ADI_ADRV9025_ARMBUILD_TESTOBJ) #StreamVersion: 0.0.0.71 ################################################################################# #Import Reference to the DLL import System import clr import time from System import Array clr.AddReferenceToFileAndPath("C:\\Program Files\\Analog Devices\\ADRV9025 Transceiver Evaluation Software_x64_FULL\\adrvtrx_dll.dll") from adrv9010_dll import AdiEvaluationSystem from adrv9010_dll import Types from adrv9010_dll import Ad9528Types def spiRead(address): data = adrv9010.Hal.SpiByteRead(address, 0) print "SPI Read Address " + hex(address) + ": " + hex(data[1]) def spiWrite(address, data): adrv9010.Hal.SpiByteWrite(address, data) print "SPI Write Address " + hex(address) + ": " + hex(data) #Create an Instance of the Class link = AdiEvaluationSystem.Instance connect = False if (link.IsConnected() == False): connect = True link.platform.board.Client.Connect("192.168.1.10", 55556) print "Connecting" if (link.IsConnected()): adrv9010 = link.Adrv9010Get(1) print "Connected" ##### YOUR CODE GOES HERE ##### # Create an instance of the rxGainMode , agcConfig classes rxGainMode = Types.adi_adrv9010_RxAgcMode_t() agcConfig = Types.adi_adrv9010_AgcCfg_t() # General Rx Gain Mode Configuration rxGainMode.rxChannelMask = 0xF rxGainMode.agcMode = Types.adi_adrv9010_RxAgcMode_e.ADI_ADRV9010_AGCSLOW # General AGC Configuration agcConfig.rxChannelMask = 0xF agcConfig.agcPeakWaitTime = 4 agcConfig.agcRxMaxGainIndex = 255 agcConfig.agcRxMinGainIndex = 195 agcConfig.agcGainUpdateCounter = 921600 agcConfig.agcRxAttackDelay = 10 agcConfig.agcSlowLoopSettlingDelay = 16 agcConfig.agcLowThreshPreventGainInc = 1 agcConfig.agcChangeGainIfThreshHigh = 1 agcConfig.agcPeakThreshGainControlMode= 1 agcConfig.agcResetOnRxon = 0 agcConfig.agcEnableSyncPulseForGainCounter = 0 agcConfig.agcEnableFastRecoveryLoop = 0 #adi_adrv9025_AgcPeak_t agcPeak; agcConfig.agcPeak.agcUnderRangeLowInterval = 205000 / 245; agcConfig.agcPeak.agcUnderRangeMidInterval = 2; agcConfig.agcPeak.agcUnderRangeHighInterval = 4; agcConfig.agcPeak.apdHighThresh = 38; agcConfig.agcPeak.apdLowThresh = 25; agcConfig.agcPeak.apdUpperThreshPeakExceededCnt = 10; agcConfig.agcPeak.apdLowerThreshPeakExceededCnt = 3; agcConfig.agcPeak.enableHb2Overload = 1; agcConfig.agcPeak.hb2OverloadDurationCnt = 1; agcConfig.agcPeak.hb2OverloadThreshCnt = 1; agcConfig.agcPeak.hb2HighThresh = 11598; #-3dBFS agcConfig.agcPeak.hb2UnderRangeLowThresh = 8211; agcConfig.agcPeak.hb2UnderRangeMidThresh = 5813; agcConfig.agcPeak.hb2UnderRangeHighThresh = 2913; agcConfig.agcPeak.hb2UpperThreshPeakExceededCnt = 10; agcConfig.agcPeak.hb2UnderRangeHighThreshExceededCnt = 3; agcConfig.agcPeak.hb2UnderRangeMidThreshExceededCnt = 3; agcConfig.agcPeak.hb2UnderRangeLowThreshExceededCnt = 3; agcConfig.agcPeak.hb2OverloadPowerMode = 0; agcConfig.agcPeak.hb2ThreshConfig = 3; agcConfig.agcPeak.apdGainStepAttack = 4; agcConfig.agcPeak.apdGainStepRecovery = 2; agcConfig.agcPeak.hb2GainStepAttack = 4; agcConfig.agcPeak.hb2GainStepHighRecovery =2; agcConfig.agcPeak.hb2GainStepMidRecovery = 4; agcConfig.agcPeak.hb2GainStepLowRecovery = 8; #adi_adrv9025_AgcPower_t agcPower; agcConfig.agcPower.powerEnableMeasurement = 0; agcConfig.agcPower.powerInputSelect = 0; agcConfig.agcPower.underRangeHighPowerThresh = 9; agcConfig.agcPower.underRangeLowPowerThresh = 2; agcConfig.agcPower.underRangeHighPowerGainStepRecovery = 0; agcConfig.agcPower.underRangeLowPowerGainStepRecovery = 0; agcConfig.agcPower.powerMeasurementDuration = 5; agcConfig.agcPower.rxTddPowerMeasDuration = 5; agcConfig.agcPower.rxTddPowerMeasDelay = 1; agcConfig.agcPower.overRangeHighPowerThresh = 2; agcConfig.agcPower.overRangeLowPowerThresh = 0; agcConfig.agcPower.powerLogShift = 1; # Force to 1 agcConfig.agcPower.overRangeHighPowerGainStepAttack = 0; agcConfig.agcPower.overRangeLowPowerGainStepAttack = 0; # Make agcConfig and rxGainMode into array types (necessary for syntax reasons) agcConfigArr = Array[Types.adi_adrv9010_AgcCfg_t]([agcConfig]) rxGainModeArr = Array[Types.adi_adrv9010_RxAgcMode_t]([rxGainMode]) # Write settings to device adrv9010.Agc.AgcCfgSet(agcConfigArr, 1) # Enable AGC Mode link.platform.board.Adrv9010Device.Rx.RxGainCtrlModeSet(rxGainModeArr, 1) link.platform.board.Adrv9010Device.Rx.RxGainCtrlModeGet(Types.adi_adrv9010_RxChannels_e.ADI_ADRV9010_RX1,rxGainMode) print " AGC Gain Mode_channel mask", rxGainMode.rxChannelMask print " AGC Gain Mode", rxGainMode.agcMode agcConfig_get = Types.adi_adrv9010_AgcCfg_t() link.platform.board.Adrv9010Device.Agc.AgcCfgGet(Types.adi_adrv9010_RxChannels_e.ADI_ADRV9010_RX1, agcConfig_get) # Print General AGC Configuration print "agcConfig.rxChannelMask", agcConfig.rxChannelMask print "agcConfig.agcPeakWaitTime", agcConfig.agcPeakWaitTime print "agcConfig.agcRxMaxGainIndex", agcConfig.agcRxMaxGainIndex print "agcConfig.agcRxMinGainIndex", agcConfig.agcRxMinGainIndex print "agcConfig.agcGainUpdateCounter", agcConfig.agcGainUpdateCounter print "agcConfig.agcRxAttackDelay", agcConfig.agcRxAttackDelay print "agcConfig.agcSlowLoopSettlingDelay", agcConfig.agcSlowLoopSettlingDelay print "agcConfig.agcLowThreshPreventGainInc", agcConfig.agcLowThreshPreventGainInc print "agcConfig.agcChangeGainIfThreshHigh", agcConfig.agcChangeGainIfThreshHigh print "agcConfig.agcPeakThreshGainControlMode", agcConfig.agcPeakThreshGainControlMode print "agcConfig.agcResetOnRxon", agcConfig.agcResetOnRxon print "agcConfig.agcEnableSyncPulseForGainCounter", agcConfig.agcEnableSyncPulseForGainCounter print "agcConfig.agcEnableFastRecoveryLoop", agcConfig.agcEnableFastRecoveryLoop # print adi_adrv9025_AgcPeak_t agcPeak; print "agcConfig.agcPeak.agcUnderRangeLowInterval ", agcConfig.agcPeak.agcUnderRangeLowInterval print "agcConfig.agcPeak.agcUnderRangeMidInterval", agcConfig.agcPeak.agcUnderRangeMidInterval print "agcConfig.agcPeak.agcUnderRangeHighInterval", agcConfig.agcPeak.agcUnderRangeHighInterval print "agcConfig.agcPeak.apdHighThresh", agcConfig.agcPeak.apdHighThresh print "agcConfig.agcPeak.apdLowThresh", agcConfig.agcPeak.apdLowThresh print "agcConfig.agcPeak.apdUpperThreshPeakExceededCnt", agcConfig.agcPeak.apdUpperThreshPeakExceededCnt print "agcConfig.agcPeak.apdLowerThreshPeakExceededCnt", agcConfig.agcPeak.apdLowerThreshPeakExceededCnt print "agcConfig.agcPeak.enableHb2Overload", agcConfig.agcPeak.enableHb2Overload print "agcConfig.agcPeak.hb2OverloadDurationCnt", agcConfig.agcPeak.hb2OverloadDurationCnt print "agcConfig.agcPeak.hb2OverloadThreshCnt", agcConfig.agcPeak.hb2OverloadThreshCnt print "agcConfig.agcPeak.hb2HighThresh", agcConfig.agcPeak.hb2HighThresh print "agcConfig.agcPeak.hb2UnderRangeLowThresh", agcConfig.agcPeak.hb2UnderRangeLowThresh print "agcConfig.agcPeak.hb2UnderRangeMidThresh", agcConfig.agcPeak.hb2UnderRangeMidThresh print "agcConfig.agcPeak.hb2UnderRangeHighThresh", agcConfig.agcPeak.hb2UnderRangeHighThresh print "agcConfig.agcPeak.hb2UpperThreshPeakExceededCnt", agcConfig.agcPeak.hb2UpperThreshPeakExceededCnt print "agcConfig.agcPeak.hb2UnderRangeHighThreshExceededCnt", agcConfig.agcPeak.hb2UnderRangeHighThreshExceededCnt print "agcConfig.agcPeak.hb2UnderRangeMidThreshExceededCnt", agcConfig.agcPeak.hb2UnderRangeMidThreshExceededCnt print "agcConfig.agcPeak.hb2UnderRangeLowThreshExceededCnt", agcConfig.agcPeak.hb2UnderRangeLowThreshExceededCnt print "agcConfig.agcPeak.hb2OverloadPowerMode", agcConfig.agcPeak.hb2OverloadPowerMode print "agcConfig.agcPeak.hb2ThreshConfig ", agcConfig.agcPeak.hb2ThreshConfig print "agcConfig.agcPeak.apdGainStepAttack", agcConfig.agcPeak.apdGainStepAttack print "agcConfig.agcPeak.apdGainStepRecovery", agcConfig.agcPeak.apdGainStepRecovery print "agcConfig.agcPeak.hb2GainStepAttack", agcConfig.agcPeak.hb2GainStepAttack print "agcConfig.agcPeak.hb2GainStepHighRecovery", agcConfig.agcPeak.hb2GainStepHighRecovery print "agcConfig.agcPeak.hb2GainStepMidRecovery", agcConfig.agcPeak.hb2GainStepMidRecovery print "agcConfig.agcPeak.hb2GainStepLowRecovery", agcConfig.agcPeak.hb2GainStepLowRecovery #print adi_adrv9025_AgcPower_t agcPower; print "agcConfig.agcPower.powerEnableMeasurement", agcConfig.agcPower.powerEnableMeasurement print "agcConfig.agcPower.powerInputSelect", agcConfig.agcPower.powerInputSelect print "agcConfig.agcPower.underRangeHighPowerThresh", agcConfig.agcPower.underRangeHighPowerThresh print "agcConfig.agcPower.underRangeLowPowerThresh", agcConfig.agcPower.underRangeLowPowerThresh print "agcConfig.agcPower.underRangeHighPowerGainStepRecovery", agcConfig.agcPower.underRangeHighPowerGainStepRecovery print "agcConfig.agcPower.underRangeLowPowerGainStepRecovery", agcConfig.agcPower.underRangeLowPowerGainStepRecovery print "agcConfig.agcPower.powerMeasurementDuration", agcConfig.agcPower.powerMeasurementDuration print "agcConfig.agcPower.rxTddPowerMeasDuration", agcConfig.agcPower.rxTddPowerMeasDuration print "agcConfig.agcPower.rxTddPowerMeasDelay", agcConfig.agcPower.rxTddPowerMeasDelay print "agcConfig.agcPower.overRangeHighPowerThresh", agcConfig.agcPower.overRangeHighPowerThresh print "agcConfig.agcPower.overRangeLowPowerThresh", agcConfig.agcPower.overRangeLowPowerThresh print "agcConfig.agcPower.powerLogShift", agcConfig.agcPower.powerLogShift print "agcConfig.agcPower.overRangeHighPowerGainStepAttack", agcConfig.agcPower.overRangeHighPowerGainStepAttack print "agcConfig.agcPower.overRangeLowPowerGainStepAttack", agcConfig.agcPower.overRangeLowPowerGainStepAttack print "Finished Programming Device" else: print "Not Connected" if (connect): link.platform.board.Client.Disconnect() print "Disconnected"
Hello,Do you have any suggestions for adjusting the RX input when testing the effectiveness of AGC? What parameters of AGC function will dynamically change when adjusting RX input to reflect the effectiveness of AGC function?
You can readback the Gain Index by varying the input power to check the AGC functionality.