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.
  • hi srimoyi,

    AD9371_OF_PROP("adi,obs-settings-obs-rx-channels-enable", &phy->mykDevice->obsRx->obsRxChannelsEnable, MYK_ORX2);

        AD9371_OF_PROP("adi,obs-settings-obs-rx-lo-source", &phy->mykDevice->obsRx->obsRxLoSource, 0);
        AD9371_OF_PROP("adi,obs-settings-sniffer-pll-lo-frequency_hz", &phy->mykDevice->obsRx->snifferPllLoFrequency_Hz, 2600000000U);
        AD9371_OF_PROP("adi,obs-settings-real-if-data", &phy->mykDevice->obsRx->realIfData, 0);
        AD9371_OF_PROP("adi,obs-settings-default-obs-rx-channel", &phy->mykDevice->obsRx->defaultObsRxChannel, OBS_RX2_TXLO);

    These are already set in ad9371.c file. Please tell if i have to set any other parameter.

    "If you disable the external TX LOL cal  and then run the init, are you able to pass the initialization with TX1 and ORX2 enabled? " - I will check

    Can you check on Eval board TX LO External calibration with ORX2 ?

    Thanks
    Mahima

  • Just to confirm, in the tx obsselect, as you have given a zero input, have you pulled the   gpio 0 pin to low which indicates to the ARM that the TX1 pin is routed.

  • I did not understand your question completely.

    Are you talking about useTx2EnablePin ?

  • 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.

Reply
  • 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.

Children