Post Go back to editing

AD9371: LO Leakage Calibration through ORX2

Hello all,

I have AD9371 IC with Zynq ultrascale plus MPSoC on the custom board.

I want to enable TX LO Leakage external calibration through ORX2 ( ORX1 is not connected ).

Kindly tell me how can i do it.

Thanks

Mahima

Parents
  • I have updated the "Mykonos ARM Initialization Calibrations" section in ad9371.c file.

        /*****************************************************/
        /*** Mykonos ARM Initialization Calibrations       ***/
        /*****************************************************/
        
        
        ret = ad9371_init_cal(phy, initCalMask);
        dev_err(&phy->spi->dev, "initCalMask :  (%x)", initCalMask);
        if (ret != MYKONOS_ERR_OK) {
            dev_err(&phy->spi->dev, "ad9371_init_cal error:  %s (%d)",
                getMykonosErrorMessage(ret), ret);
            ret = -EFAULT;
            goto out;
        }
        
        ret = ad9371_set_radio_state(phy, RADIO_ON);
        if (ret) {
            dev_err(&phy->spi->dev, "%s (%d)",
                getMykonosErrorMessage(ret), ret);
            //goto out_disable_obs_rx_clk;
        }

        ret = MYKONOS_setObsRxPathSource(mykDevice, OBS_RX2_TXLO);    
        dev_err(&phy->spi->dev, "MYKONOS_setObsRxPathSource setting to OBS_RX2_TXLO and function return value is :  (%d)", ret);       
        if (ret) {
            dev_err(&phy->spi->dev, "%s (%d)",
                getMykonosErrorMessage(ret), ret);
            ret = -EFAULT;
        }
        
        CMB_wait_ms(500);

        //ad9371_init_cal(phy, TX_LO_LEAKAGE_EXTERNAL);
        ret = ad9371_init_cal(phy, TX_LO_LEAKAGE_EXTERNAL);
        if (ret != MYKONOS_ERR_OK) {
            dev_err(&phy->spi->dev, "ad9371 TX_LO_LEAKAGE_EXTERNAL return value error:  %s (%d)",
                getMykonosErrorMessage(ret), ret);
            ret = -EFAULT;
            goto out;
        }
        
        ret = ad9371_set_radio_state(phy, RADIO_OFF);
        if (ret) {
            dev_err(&phy->spi->dev, "%s (%d)",
                getMykonosErrorMessage(ret), ret);
            //goto out_disable_obs_rx_clk;
        }
        
        ret = MYKONOS_getTxLolStatus(phy->mykDevice, TX1, &phy->txLolStatus[1]);
        dev_err(&phy->spi->dev, "Checking MYKONOS_getTxLolStatus ret value : (%d)",ret);
        if (ret) {
            dev_err(&phy->spi->dev, "Checking MYKONOS_getTxLolStatus %s: %s (%d)", __func__,
                getMykonosErrorMessage(ret), ret);
            return ret;
        }

        if (&phy->txLolStatus[1].errorCode)
            dev_err(&phy->spi->dev, "%s: error code (%d)\n", __func__, &phy->txLolStatus[1].errorCode);
        if (&phy->txLolStatus[1].percentComplete)
            dev_err(&phy->spi->dev, "%s: percentComplete (%d)\n", __func__, &phy->txLolStatus[1].percentComplete);
        if (&phy->txLolStatus[1].performanceMetric)
            dev_err(&phy->spi->dev, "%s: performanceMetric (%d)\n", __func__, &phy->txLolStatus[1].performanceMetric);
        if (&phy->txLolStatus[1].iterCount)
            dev_err(&phy->spi->dev, "%s: iterCount (%d)\n", __func__, &phy->txLolStatus[1].iterCount);
        if (&phy->txLolStatus[1].updateCount)
            dev_err(&phy->spi->dev, "%s: updateCount (%d)\n", __func__, &phy->txLolStatus[1].updateCount);

        
        ret = MYKONOS_getTxLolStatus(phy->mykDevice, TX1, &phy->txLolStatus[2]);
        dev_err(&phy->spi->dev, "Checking MYKONOS_getTxLolStatus ret value : (%d)",ret);
        if (ret) {
            dev_err(&phy->spi->dev, "Checking MYKONOS_getTxLolStatus %s: %s (%d)", __func__,
                getMykonosErrorMessage(ret), ret);
            return ret;
        }

        if (&phy->txLolStatus[2].errorCode)
            dev_err(&phy->spi->dev, "%s: error code (%d)\n", __func__, &phy->txLolStatus[2].errorCode);
        if (&phy->txLolStatus[2].percentComplete)
            dev_err(&phy->spi->dev, "%s: percentComplete (%d)\n", __func__, &phy->txLolStatus[2].percentComplete);
        if (&phy->txLolStatus[2].performanceMetric)
            dev_err(&phy->spi->dev, "%s: performanceMetric (%d)\n", __func__, &phy->txLolStatus[2].performanceMetric);
        if (&phy->txLolStatus[2].iterCount)
            dev_err(&phy->spi->dev, "%s: iterCount (%d)\n", __func__, &phy->txLolStatus[2].iterCount);
        if (&phy->txLolStatus[2].updateCount)
            dev_err(&phy->spi->dev, "%s: updateCount (%d)\n", __func__, &phy->txLolStatus[2].updateCount);

    Log details are:

    [  128.495192] ad9371 spi1.0: initCalMask :  (7dff)
    [  128.535615] ad9371 spi1.0: MYKONOS_setObsRxPathSource setting to OBS_RX2_TXLO and 
    function return value is :  (0)
    [  129.063806] ERROR: 364: MYKONOS_waitArmCmdStatus() exited due to ARM error for 
    the desired ARM opcode
    [  129.073024] ERROR: 283: MYKONOS_waitInitCals() returned an ARM error
    [  129.088077] ad9371 spi1.0: calsDoneLifetime 0x5DFF, calsDoneLastRun 0x5DFF, 
    calsMinimum 0x4F, initErrCal 0x0, initErrCode 0x0
    [  129.131846] ad9371 spi1.0: initCalsCompleted 0x5DFF
    [  129.136903] ad9371 spi1.0: errorWord 0x2, statusWord 0x0
    [  129.142248] ad9371 spi1.0: ArmCmdStatusByte 0x4
    [  129.156600] ad9371 spi1.0: TX_LO_LEAKAGE_EXTERNAL :  (200)
    [  129.184231] ad9371 spi1.0: Checking MYKONOS_getTxLolStatus ret value : (0)
    [  129.191102] ad9371 spi1.0: ad9371_setup_cal_ms: error code (2063315820)
    [  129.197720] ad9371 spi1.0: ad9371_setup_cal_ms: percentComplete (2063315824)
    [  129.204761] ad9371 spi1.0: ad9371_setup_cal_ms: performanceMetric (2063315828)
    [  129.211975] ad9371 spi1.0: ad9371_setup_cal_ms: iterCount (2063315832)
    [  129.218494] ad9371 spi1.0: ad9371_setup_cal_ms: updateCount (2063315836)
    [  129.236232] ad9371 spi1.0: Checking MYKONOS_getTxLolStatus ret value : (0)
    [  129.243100] ad9371 spi1.0: ad9371_setup_cal_ms: error code (2063315840)
    [  129.249714] ad9371 spi1.0: ad9371_setup_cal_ms: percentComplete (2063315844)
    [  129.256759] ad9371 spi1.0: ad9371_setup_cal_ms: performanceMetric (2063315848)
    [  129.263973] ad9371 spi1.0: ad9371_setup_cal_ms: iterCount (2063315852)
    [  129.270492] ad9371 spi1.0: ad9371_setup_cal_ms: updateCount (2063315856)
    [  129.286606] ad9371 spi1.0: deframerStatus (0x68)
    
    >From the above logs, initErrCal is coming as 0x0. This means " Tx baseband filter calibartion " error.
    
     
    
    initErrCode is coming as 0x0. This means " No error".
    
     
    While running TX_LO_LEAKAGE_EXTERNAL calibration, I am getting above error. Please reply.
  • No. GPIO 0  should be pulled to low so that the routing of the TX1 path for calibration is informed to the BBP.

  • Hello, Thanks for the reply.

    txObsSelect is already pulled to zero.

    I am still not able to calibrate. Can you try on Eval board?

  • Hello,

    I have tried on Eval board TRX 1 LOL External Calibration with ORX1.

    It is working. But everytime whenever i am checking TX lol status, percentcomplete is showing 64 percent and iterCount is incrementing by 3.

    Do i have to enable bist tone for callibration ?

    Please suggest.

  • Hope you have connected the external path from TX1 to ORX1. What is the signal level and the LOl level that you are getting at the ORX output after running this cal?

    Are you operating the chip in FDD mode?

  • Yes i have connected the external path from trx1 to orx1. Observation power is 12dbfs. Yes the chip is operating in FDD mode.

  • After running calibration . lo leakage is -85dbm at 1842.5MHz.

  • Please share with us the full log including iteration count , update count and percent complete. LOL update interval is 6sec, so please wait for some time before capturing the log.

    Can you check the LOL levels before and after running the external LOL tracking cals. Then compare the levels between the two, to ensure if the tracking is running successfully.

  • Please check the below log:

    ad9371_init_cal:574 initCalMask 200
    [ 91.950033] ad9371_init_cal:578 Run mykError 0
    [ 92.325376] ad9371_init_cal:583 Wait mykError 0
    [ 92.341741] ad9371_init_cal:587 initCalStatus 200
    [ 102.425863] ad9371 spi1.1: Checking MYKONOS_getTxLolStatus ret value : (0)
    [ 102.432736] ad9371 spi1.1: ad9371_tx_lol_status: error code (0)
    [ 102.438648] ad9371 spi1.1: ad9371_tx_lol_status: percentComplete (64)
    [ 102.445079] ad9371 spi1.1: ad9371_tx_lol_status: performanceMetric (0)
    [ 102.451601] ad9371 spi1.1: ad9371_tx_lol_status: iterCount (38)
    [ 102.457518] ad9371 spi1.1: ad9371_tx_lol_status: updateCount (38)

    [ 102.511627] ad9371 spi1.1: Checking Observation Power value : (2BF2)

    "Can you check the LOL levels before and after running the external LOL tracking cals. "

    - Earlier level was -82dBc and after calibration, level is around -85 and -86 dBc.

  • You can ignore percentage complete. That is status of current update and it varies as per what time we print the status. Iter count and update count are same means its working fine. LOL levels are as well good.

     We don’t see an issue here.

  • Thanks

    I have to test same calibration on our custom board with ORX2.

    Is there any function to calculate ORX2 power level?

Reply Children