Post Go back to editing

CLGC Sequence for ADRV9205

Category: Software
Product Number: ADRV9029

Hi , 

We did the changes for CLGC in the radio script, we followed the CLGC sequence mentioned in the document for ADRD9025, and all APIs are running properly without any error but when we read the CLGC status, i am getting always zeros in CLGC status structure, as follows 

cd vyapiv3p1_AD9545+ADRV9025_Init_v0r0p1/
root@Vyapi:~/vyapiv3p1_AD9545+ADRV9025_Init_v0r0p1# clear
root@Vyapi:~/vyapiv3p1_AD9545+ADRV9025_Init_v0r0p1#
root@Vyapi:~/vyapiv3p1_AD9545+ADRV9025_Init_v0r0p1# cp radiolib_Clgc.so /lib/
root@Vyapi:~/vyapiv3p1_AD9545+ADRV9025_Init_v0r0p1# chmod 777 EnableClgcMay3nd
root@Vyapi:~/vyapiv3p1_AD9545+ADRV9025_Init_v0r0p1# ./EnableClgcMay3nd
Rx lo Frequency in Hz : 880000000
Tx lo Frequency in Hz : 925000000
Orx lo Frequency in Hz : 925000000
Tx attenuation : 10 dB
Rx gain : 10 dB
ORx gain : 25 dB
Radio Pin control Mode :0(FDD)
Powering Off the on board PAs and LNAs
Devices reset is done
Executing the adi_daughterboard_Discover
Executing the adi_daughterboard_Create
Executing the BoardDispatch Executing the adi_adrv9025Board_Dispatch
if (actionFlags == TRX_BOARD_ACTION_DEVICE_ALLOC)
Executing the adi_adrv9025Board_Dispatch
Transceiver Vendor Id_0: 56
Transceiver Vendor Id_1: 4
Executing motherboard->daughterboards[0]->BoardProgram(motherboard->daughterboards[0])
Executing the adi_adrv9025Board_Dispatch
Resetting JESD
JESD reset is done
EXEC adrv9025_ClocksSet
EXEC adrv9025_ClocksSet
EXEC adrv9025_ClocksSet
EXEC adrv9025_ClocksSet
EXEC adrv9025_ClocksSet
Loading stream image ...
Stream Image firmware loaded successfully
Loading ARM image ...
ARM Image firmware loaded successfully
Executing the adi_adrv9025Board_Dispatch
Setting up the attenuation before doing calibration
Setting up the gain before doing calibration
ADI_NULL_DEVICE_PTR_RETURN
ADI_FUNCTION_ENTRY_LOG
ADI_NULL_PTR_RETURN
adrv9025_InitCalStructureCheck = 0

adi_adrv9025_CpuMemWrite = 0

adi_adrv9025_CpuCmdWrite = 0

ADI_NULL_DEVICE_PTR_RETURN
ADI_FUNCTION_ENTRY_LOG
ADI_NULL_PTR_RETURN
adrv9025_InitCalStructureCheck = 0

adi_adrv9025_CpuMemWrite = 0

adi_adrv9025_CpuCmdWrite = 0

adi_board_adrv9025_JesdBringup completed
The Tx channel status :f
The Rx channel status :f
Setting up the attenuation
TX 1 Minimum Attenuation : 10000mdB
TX 2 Minimum Attenuation : 10000mdB
TX 3 Minimum Attenuation : 10000mdB
TX 4 Minimum Attenuation : 10000mdB
Orx 1 Minimum Gain : 25dB
Orx 2 Minimum Gain : 25dB
Orx 3 Minimum Gain : 25dB
Orx 4 Minimum Gain : 25dB
JESD reset is done
Deframer 0 status : 87
Framer 0 status : a
Tx Lo Frequency :925000000
Rx Lo Frequency :880000000
TX2ORX mapping is successfulg=0
adi_adrv9025_RxGainSet is successfulg=0
Powering on the on board PAs and LNAs
ADI_NULL_DEVICE_PTR_RETURN
ADI_FUNCTION_ENTRY_LOG
ADI_NULL_PTR_RETURN
adrv9025_InitCalStructureCheck = 0

adi_adrv9025_CpuMemWrite = 0

adi_adrv9025_CpuCmdWrite = 0

ADI_ADRV9025_EXTERNAL_PATH_DELAY is successfulg=0
External path delay calibiration in CLGC Done = 0
External path delay init cals Wait in CLGC Done = 0
RUNNING LEAKAGE CALIB CLGC ADI_NULL_DEVICE_PTR_RETURN
ADI_FUNCTION_ENTRY_LOG
ADI_NULL_PTR_RETURN
adrv9025_InitCalStructureCheck = 0

adi_adrv9025_CpuMemWrite = 0

adi_adrv9025_CpuCmdWrite = 0

External path delay calibiration in CLGC Done = 0
CLGC initial Calibirations are done
ADI_NULL_DEVICE_PTR_RETURN
ADI_FUNCTION_ENTRY_LOG
ADI_NULL_PTR_RETURN
adrv9025_InitCalStructureCheck = 0

adi_adrv9025_CpuMemWrite = 0

adi_adrv9025_CpuCmdWrite = 0

CFR Parameters Readback:
Tx Channel Mask:1
cfrMode:0
cfrTxDelay: 511
cfrPeakThreshold:0.400000
cfrEngine1PeakThresholdScaler:0.980000
cfrEngine2PeakThresholdScaler:0.985000
cfrEngine3PeakThresholdScaler:0.990000
cfrCorrectionThresholdScaler:0.980000
cfrInterpolationFactor:2
cfrEngine1MaxNumOfPeaks:1
cfrEngine2MaxNumOfPeaks:1
cfrEngine3MaxNumOfPeaks:1

CFR Enable Read:
tx Channel Mask:1
cfr Engine1 Enable:1
cfr Engine1 Bypass Enable:0
cfr Engine2 Enable:1
cfr Engine2 Bypass Enable:0
cfr Engine3 Enable:1
cfr Engine3 Bypass Enable :0
CFR HardClipper Readback:
Tx Channel Mask:1
CFR Hard Clipper Enable:1
CFR Hard Clipper Threshold:0.399994
CFR Status Readback:
CFR_Error_Code:0
cfr Engine1 Peaks Detected:15280
cfr Engine1 Peaks Skipped: 4348
cfr Engine2 Peaks Detected: 7741
cfr Engine2 Peaks Skipped: 1613
cfr Engine3 Peaks Detected: 4203
cfr Engine3 Peaks Skipped: 721
cfr NumSamples Clipped: 6693
DPD programming is started
adi_adrv9025_DpdModelConfigSet Done = 0
resteDPDLutRestore Done = 0
resteDPDFull Done = 0
adi_adrv9025_DpdTrackingConfigSet Done = 0
ADI_NULL_DEVICE_PTR_RETURN
ADI_FUNCTION_ENTRY_LOG
ADI_NULL_PTR_RETURN
adrv9025_InitCalStructureCheck = 0

adi_adrv9025_CpuMemWrite = 0

adi_adrv9025_CpuCmdWrite = 0

DPD adi_adrv9025_InitCalsRun Done = 0
DPD adi_adrv9025_InitCalsWait Done = 0
Setup DPD fault conditions and recovery actions(optional)
Get the CLG STATUS
CLGC status Read Successful
adi_adrv9025_ClgcConfigSet Successful
CLGC adi_adrv9025_TrackingCalsEnableSet successful
DPD adi_adrv9025_InitCalsWait Done = 0
CLGC DPP Tracking Calibiration is Successful = 0
CLGC Enable CLGC tracking suuccessful
dpdErrorCode :0x0
dpdPercentComplete :0
dpdPerformanceMetric :0
dpdIterCount :8
dpdUpdateCount :7
dpdSyncStatus :4
dpdModelTable :0
dpdMeanTuPower :-13.531085
dpdPeakTuPower :-7.596758
dpdMeanTxPower :-13.536119
dpdPeakTxPower :-7.602159
dpdMeanOrxPower :-13.730960
dpdPeakOrxPower :-7.766534
dpdDirectEvm :0.008892
dpdIndirectEvm :0.009472
dpdSelectError :0.004946
dpdIndirectError :0.004832
dpdErrorStatus0 (metrics:actions): X:X :0:1
dpdErrorStatus1 (metrics:actions) :0:0
dpdPersistentErrorStatus0 (metrics:actions) :0:0
dpdPersistentErrorStatus1 (metrics:actions) :0:0
reservedPM :40240960
reservedTP :42137458
reservedPR :42137458
***************************************
Monitor DPD tracking calibration status Successful

adi_adrv9025_ClgcConfigGet SUCCESS
clgc_configFg_st.txChannelMask = 1
clgc_configFg_st.clgcEnableGainControl = 1
clgc_configFg_st.clgcMeasurementBatchTime_us = 10
clgc_configFg_st.clgcMaxSampleBatchesPerClgcRun = 0
clgc_configFg_st.clgcExpectedLoopGain_dB = -9.000000
clgc_configFg_st.clgcExpectedLoopGainRipple_dB = 0.050000
clgc_configFg_st.clgcTxQualifyingThreshold_dBFS = -70.000000
clgc_configFg_st.clgcOrxQualifyingThreshold_dBFS = -70.000000
clgc_configFg_st.clgcOrxMinimumSnr_dB = 0.000000
clgc_configFg_st.clgcMaxGainAdjustmentStepSize_dB = 3.000000
clgc_configFg_st.clgcDampingParam = 0.100000
clgc_configFg_st.clgcMinTxAttenAdjust_dB = 5.000000
clgc_configFg_st.clgcMaxTxAttenAdjust_dB = 30.000000
Getting the CLGC status for the ADI_ADRV9025_TX1 = 0
CLGC Status = 0
clgc_coinfig_status[0].clgcLoopGain = 0.000000
clgc_coinfig_status[0].clgcTxRmsPower = 0.000000
clgc_coinfig_status[0].clgcOrxRmsPower = 0.000000
clgc_coinfig_status[0].activeTxAttenIndex = 0
clgc_coinfig_status[0].activeOrxGainIndex = 0
clgc_coinfig_status[0].clgcCaptureStatus = 0
clgc_coinfig_status[0].clgcSyncStatus = 0
clgc_coinfig_status[0].clgcState = 0
Executing the adi_adrv9025Board_Dispatch
Radio initialized successfully.

Can you please check and let me know if anything we need to take care further. 

Regards,

R D Nadaf 

Thread Notes

  • I believe i have already shared the CLGC python script in a different thread. Please check if you are missing anything.

     C code Sequence for enabling the CFR , CLGC and DPD 

    Hope the 3 below conditions are met?

    From the CLGC statistics, i don't see error code, Iter count and update count being printed. Can you add that as well in the code and share?

    Usually if you see all zeros in the statistics, it means tracking cal is not enabled. Please check this part.

  • HI Ramarao, 

            Thanks for the reply, i have taken care all 3 pre-requisites for enabling the CLGC tracking algorithm. I will check one more time and get back.

    Regards,

    R D Nadaf 

  • Hi Ramrao, 

            I have checked the programming sequence it is exactly same as in the document (even CFR and DPD ) and added the prints as you suggested  ( , Iter count and update count ) but that are also coming zeros,

    adi_adrv9025_ClgcConfigGet SUCCESS
    clgc_configFg_st.txChannelMask = 1
    clgc_configFg_st.clgcEnableGainControl = 1
    clgc_configFg_st.clgcMeasurementBatchTime_us = 10
    clgc_configFg_st.clgcMaxSampleBatchesPerClgcRun = 0
    clgc_configFg_st.clgcExpectedLoopGain_dB = 3.000000
    clgc_configFg_st.clgcExpectedLoopGainRipple_dB = 0.050000
    clgc_configFg_st.clgcTxQualifyingThreshold_dBFS = -90.000000
    clgc_configFg_st.clgcOrxQualifyingThreshold_dBFS = -90.000000
    clgc_configFg_st.clgcOrxMinimumSnr_dB = 0.000000
    clgc_configFg_st.clgcMaxGainAdjustmentStepSize_dB = 3.000000
    clgc_configFg_st.clgcDampingParam = 0.100000
    clgc_configFg_st.clgcMinTxAttenAdjust_dB = 5.000000
    clgc_configFg_st.clgcMaxTxAttenAdjust_dB = 30.000000
    Getting the CLGC status for the ADI_ADRV9025_TX1 = 0
    CLGC Status = 0
    clgc_coinfig_status[0].clgcLoopGain = 0.000000
    clgc_coinfig_status[0].clgcTxRmsPower = 0.000000
    clgc_coinfig_status[0].clgcOrxRmsPower = 0.000000
    clgc_coinfig_status[0].activeTxAttenIndex = 0
    clgc_coinfig_status[0].activeOrxGainIndex = 0
    clgc_coinfig_status[0].clgcCaptureStatus = 0
    clgc_coinfig_status[0].clgcSyncStatus = 0
    clgc_coinfig_status[0].clgcState = 0
    clgc_coinfig_status[0].clgcTrackingCalStatus.errorCode = 0
    clgc_coinfig_status[0].clgcTrackingCalStatus.percentComplete = 0
    clgc_coinfig_status[0].clgcTrackingCalStatus.varianceMetric = 0
    clgc_coinfig_status[0].clgcTrackingCalStatus.iterCount = 0
    clgc_coinfig_status[0].clgcTrackingCalStatus.updateCount = 0
    Executing the adi_adrv9025Board_Dispatch
    Radio initialized successfully

    Regards,

    R D Nadaf 

  • Are you enabling the CLGC tracking cal using TrackingCalsEnableSet?

    It looks like the CLGC tracking cal is not enabled at all. For eg, see below that we have in Python script.

     link.platform.board.Adrv9010Device.Cals.TrackingCalsEnableSet(int(Types.adi_adrv9010_TrackingCalibrations_e.ADI_ADRV9010_TRACK_TX1_CLGC), Types.adi_adrv9010_TrackingCalEnableDisable_e.ADI_ADRV9010_TRACKING_CAL_ENABLE)

  • Hi Ramarao , 

       Yes, we are enabling the CLGC tracking cal  TrackingCalsEnableSet, the sequence for enabling the CLGC is as follows, 

    // Enable CLGC tracking
    clgcTrackingMask = ADI_ADRV9025_TRACK_TX1_CLGC | ADI_ADRV9025_TRACK_TX2_CLGC | ADI_ADRV9025_TRACK_TX3_CLGC | ADI_ADRV9025_TRACK_TX4_CLGC;

    recoveryAction = adi_adrv9025_TrackingCalsEnableSet (device , clgcTrackingMask , ADI_ADRV9025_TRACKING_CAL_ENABLE );

    if(recoveryAction != ADI_COMMON_ACT_NO_ACTION)
    {
    printf("Failed to Enable CLGC trackin = %d \n", recoveryAction);
    printf("ERROR: Error number %d, Recovery action %d. In file %s, in function %s, in line %d, variable name %s. Error message %s.\n",
    device->common.error.errCode,
    device->common.error.newAction,
    device->common.error.errFile,
    device->common.error.errFunc,
    device->common.error.errLine,
    device->common.error.varName,
    device->common.error.errormessage);
    /* Call action handler */
    return RADIO_INIT_FAILED;
    } else {
    printf ( "CLGC Enable CLGC tracking suuccessful \n");

    }

    Regards,

    R   D   Nadaf 

  • Are you able to see the output power level being maintained at the same level after you enable CLGC? I was just thinking if its just a read back issue and issue with your code.

    I hope Tx to ORX mapping is configured as per the physical connection as well? Since DPD is running well, i don't think this is an issue again.

    I'm not sure what is missing here. Check the sequence thoroughly and code implementation part.

  • Hi Ramarao, 

         Thanks for the response, i will check and get back to you. 

  • Hi Ramarao , 

    I have checked the output power, and it is varying and i am getting the CLGC status also , i have added some delay after the below API 

    // Enable CLGC tracking
    clgcTrackingMask = ADI_ADRV9025_TRACK_TX1_CLGC | ADI_ADRV9025_TRACK_TX2_CLGC | ADI_ADRV9025_TRACK_TX3_CLGC | ADI_ADRV9025_TRACK_TX4_CLGC;

    recoveryAction = adi_adrv9025_TrackingCalsEnableSet (device , clgcTrackingMask , ADI_ADRV9025_TRACKING_CAL_ENABLE );
    sleep ( 10 ) ;

    ecoveryAction =  adi_adrv9025_ClgcStatusGet(device,  ADI_ADRV9025_TX1,  &clgc_coinfig_status[0]);

    After this CLGC status showing all values. 

    adi_adrv9025_ClgcConfigGet SUCCESS
    clgc_configFg_st.txChannelMask = 1
    clgc_configFg_st.clgcEnableGainControl = 1
    clgc_configFg_st.clgcMeasurementBatchTime_us = 71
    clgc_configFg_st.clgcMaxSampleBatchesPerClgcRun = 0
    clgc_configFg_st.clgcExpectedLoopGain_dB = -12.000000
    clgc_configFg_st.clgcExpectedLoopGainRipple_dB = 0.050000
    clgc_configFg_st.clgcTxQualifyingThreshold_dBFS = -70.000000
    clgc_configFg_st.clgcOrxQualifyingThreshold_dBFS = -70.000000
    clgc_configFg_st.clgcOrxMinimumSnr_dB = 0.000000
    clgc_configFg_st.clgcMaxGainAdjustmentStepSize_dB = 1.000000
    clgc_configFg_st.clgcDampingParam = 0.100000
    clgc_configFg_st.clgcMinTxAttenAdjust_dB = 10.000000
    clgc_configFg_st.clgcMaxTxAttenAdjust_dB = 30.000000
    CLGC status after 60 second to verify the CLGC status after 60 seconds
    adi_adrv9025_ClgcStatusGet , ADI_ADRV9025_TX1: selected
    adi_adrv9025_CpuCmdWrite is done
    ADI_ERROR_RETURN CLGC STATUS
    adi_adrv9025_CpuMemRead CLGC 2740 line
    No Error is seen before the return
    Returning from the CLGC STATUS Function
    Getting the CLGC status for the ADI_ADRV9025_TX1 = 0
    CLGC Status = 0
    clgc_coinfig_status[0].clgcLoopGain = 0.250351
    clgc_coinfig_status[0].clgcTxRmsPower = 13303.122070
    clgc_coinfig_status[0].clgcOrxRmsPower = 3330.451660
    clgc_coinfig_status[0].activeTxAttenIndex = 403
    clgc_coinfig_status[0].activeOrxGainIndex = 245
    clgc_coinfig_status[0].clgcCaptureStatus = 0
    clgc_coinfig_status[0].clgcSyncStatus = 1
    clgc_coinfig_status[0].clgcState = 1
    clgc_coinfig_status[0].clgcTrackingCalStatus.errorCode = 0
    clgc_coinfig_status[0].clgcTrackingCalStatus.percentComplete = 0
    clgc_coinfig_status[0].clgcTrackingCalStatus.varianceMetric = 0
    clgc_coinfig_status[0].clgcTrackingCalStatus.iterCount = 60
    clgc_coinfig_status[0].clgcTrackingCalStatus.updateCount = 60
    Executing the adi_adrv9025Board_Dispatch
    Radio initialized successfully.

    Thank you so much for support. 

    Regards,

    R D Nadaf