How to config DPD on AD9375?

Hi,

I use default DPDconfig to configure DPD on my custom board:

static mykonosDpdConfig_t dpdConfig =
{
    10,              /* 1/2^(damping + 8) fraction of power `forgotten' per sample (default: `1/8192' = 5, valid 0 to 15), 0 = infinite damping*/
    1,              /* number of weights to use for int8_cpx weights weights member of this structure (default = 1)*/
    2,              /* DPD model version: one of four different generalized polynomial models: 0 = same as R0 silicon, 1-3 are new and the best one depends on the PA (default: 2)*/
    1,              /* 1 = Update saved model whenever peak Tx digital RMS is within 1dB of historical peak Tx RMS*/
    20,             /* Determines how much weight the loaded prior model has on DPD modeling (Valid 0 - 32, default 20)*/
    0,              /* Default off = 0, 1=enables automatic outlier removal during DPD modeling */
    512,            /* Number of samples to capture (default: 512, valid 64-32768)*/
    4096,           /* threshold for sample in AM-AM plot outside of 1:1 line to be thrown out. (default: 50% = 8192/2, valid 8192 to 1)*/
    0,              /* 16th of an ORx sample (16=1sample), (default 0, valid -64 to 64)*/
    255,            /* Default 255 (-30dBFs=(20Log10(value/8192)), (valid range  1 to 8191)*/
    {{64,0},{0,0},{0,0}}/* DPD model error weighting (real/imag valid from -128 to 127)*/
};

My system have multi mode BPSK, QPSK, QUAM16,QUAM64 with bandwidth 5MHz, 10MHz, 20Mhz. 

I have feedback Tx2 signal into ORX2 with power -24dbm and configure dpd follow ug992. But i don't see any different between have setup DPD and no have DPD.

Here is status that I read using MYKONOS_getDpdStatus:

 dpdStatus.dpdErrorStatus = 0,

dpdStatus.dpdExtPathDelay = 0x73B ,

dpdStatus.dpdIterCount = 0,

dpdStatus.dpdMaxAdaptation = 0,

dpdStatus.dpdModelErrorPercent = 1000,

dpdStatus.dpdTrackCount = 0

Can you suggest for me how to solve? Thanks. This is my output from tx:



dpdStatus.dpdErrorStatus = 0, dpdStatus.dpdExtPathDelay = 0x73B , dpdStatus.dpdIterCount = 0, dpdStatus.dpdMaxAdaptation = 0, dpdStatus.dpdModelErrorPercent = 1000, dpdStatus.dpdTrackCount = 0
[edited by: sonminh at 2:00 AM (GMT 0) on 24 Apr 2020]

Top Replies

    •  Analog Employees 
    Jun 17, 2020 in reply to sonminh +1 verified
    BUT I don't understand why system no have dpd run better than system have DPD.

    What do you mean by run better here ? 

  • 0
    •  Analog Employees 
    on Apr 23, 2020 10:40 AM
  • HI ,

    I have mistake once post this question in to that forum, then I received this answer:

    "Moving to No-Os forum for comments on the DPD configuration"

    Because I don't know delete that question, I have post again in this forum.

    Thanks

  • 0
    •  Analog Employees 
    on Apr 24, 2020 5:02 AM in reply to sonminh

    Can you please share your complete configuration file? Are you using a profile that supports DPD?

    Please check that you are enabling the DPD init and tracking calibration.

    Please make sure that you are enabling the required DPD parameters.

    typedef struct
    {
    mykonosDacDiv_t dacDiv; /*!< The divider used to generate the DAC clock (ENUM Values)*/
    mykonosFir_t *txFir; /*!< Pointer to Tx FIR filter structure */
    uint8_t txFirInterpolation; /*!< The TX digital FIR filter interpolation (1,2,4) */
    uint8_t thb1Interpolation; /*!< Tx Halfband1 (HB1) filter interpolation (1,2) */
    uint8_t thb2Interpolation; /*!< Tx Halfband2 (HB2) filter interpolation (1,2) */
    uint8_t txInputHbInterpolation; /*!< Interpolation of half band filter before the programmable FIR (valid 1,2,4) */
    uint32_t iqRate_kHz; /*!< Tx IQ data rate in kHz */
    uint32_t primarySigBandwidth_Hz; /*!< Tx primary signal BW */
    uint32_t rfBandwidth_Hz; /*!< Tx RF passband bandwidth for the profile */
    uint32_t txDac3dBCorner_kHz; /*!< DAC filter 3dB corner in kHz */
    uint32_t txBbf3dBCorner_kHz; /*!< Tx BBF 3dB corner in kHz */
    uint8_t enableDpdDataPath; /*!< Enable Tx Dynamic pre distortion - only valid for a DPD-enabled transceiver */
    } mykonosTxProfile_t;

  • Hi ,

    Thanks for your help, I had configure DPD done . But  the result of using DPD in different frequency is different. Here is result once use DPD:

    In 4,5G:

    In 4.6G:

    In 4.8G:

    Here is dpd config:

    static mykonosDpdConfig_t dpdConfig =

        5,              /* 1/2^(damping + 8) fraction of power `forgotten' per sample (default: `1/8192' = 5, valid 0 to 15), 0 = infinite damping*/
        1,              /* number of weights to use for int8_cpx weights weights member of this structure (default = 1)*/
        2,              /* DPD model version: one of four different generalized polynomial models: 0 = same as R0 silicon, 1-3 are new and the best one depends on the PA (default: 2)*/
        1,              /* 1 = Update saved model whenever peak Tx digital RMS is within 1dB of historical peak Tx RMS*/
        20,             /* Determines how much weight the loaded prior model has on DPD modeling (Valid 0 - 32, default 20)*/
        0,              /* Default off = 0, 1=enables automatic outlier removal during DPD modeling */
        16384,            /* Number of samples to capture (default: 512, valid 64-32768)*/
        4096,           /* threshold for sample in AM-AM plot outside of 1:1 line to be thrown out. (default: 50% = 8192/2, valid 8192 to 1)*/
        0,              /* 16th of an ORx sample (16=1sample), (default 0, valid -64 to 64)*/
        255,            /* Default 255 (-30dBFs=(20Log10(value/8192)), (valid range  1 to 8191)*/
        {{64,0},{0,0},{0,0}}/* DPD model error weighting (real/imag valid from -128 to 127)*/

    static mykonosObsRxSettings_t obsRxSettings =
    {
        &orxProfile,    /* ORx datapath profile, 3dB corner frequencies, and digital filter enables*/
        &orxGainControl,/* ObsRx gain control settings structure*/
        &obsRxAgcConfig,/* ORx AGC control settings structure*/
        &snifferProfile,/* Sniffer datapath profile, 3dB corner frequencies, and digital filter enables*/
        &snifferGainControl,/* SnRx gain control settings structure*/
        &obsRxFramer,   /* ObsRx JESD204b framer configuration structure */
        MYK_ORX2,
    //    (MYK_ORX1_ORX2 | MYK_SNRXA_B_C),/* obsRxChannel */
        OBSLO_TX_PLL,   /* (obsRxLoSource) The Obs Rx mixer can use the Tx Synth(TX_PLL) or Sniffer Synth (SNIFFER_PLL) */
        4467000000U,     /* SnRx PLL LO frequency in Hz */
        0,              /* Flag to choose if complex baseband or real IF data are selected for Rx and ObsRx paths. Where if > 0 = real IF data, '0' = complex data*/
        NULL,           /* Custom Loopback ADC profile to set the bandwidth of the ADC response */
        OBS_RXOFF       /* Default ObsRx channel to enter when radioOn called */
    };

    And here is section that configure DPD:

    dpd_configure.txt
    	ad9528Device_t 		*clockAD9528_device = &clockAD9528_;
    	mykonosDpdStatus_t  dpdStatus;
    	mykonosErr_t		mykError;
    	const char			*errorString;
    	uint8_t				pllLockStatus;
    	uint8_t				mcsStatus;
    	uint8_t				arm_major;
    	uint8_t				arm_minor;
    	uint8_t				arm_release;
    	mykonosGpioErr_t	mykGpioErr;
    	uint32_t			initCalMask = TX_BB_FILTER | ADC_TUNER | TIA_3DB_CORNER | DC_OFFSET |
    									  TX_ATTENUATION_DELAY | RX_GAIN_DELAY | FLASH_CAL |
    									  PATH_DELAY | TX_LO_LEAKAGE_INTERNAL | TX_QEC_INIT |
    									  LOOPBACK_RX_LO_DELAY | LOOPBACK_RX_RX_QEC_INIT |
    									  RX_LO_DELAY | RX_QEC_INIT ;
    
    
    	uint8_t				errorFlag = 0;
    	uint8_t				errorCode = 0;
    	uint32_t			initCalsCompleted;
    	uint8_t				framerStatus;
    	uint8_t				obsFramerStatus;
    	uint8_t				deframerStatus;
    	uint32_t			trackingCalMask = TRACK_ORX1_QEC | TRACK_ORX2_QEC | TRACK_RX1_QEC |
    										  TRACK_RX2_QEC | TRACK_TX1_QEC | TRACK_TX2_QEC | TRACK_TX1_LOL | TRACK_TX2_LOL;
    
    	/* Allocating memory for the errorString */
    	errorString = (const char*) malloc(sizeof(char) * 200);
    
    	/*************************************************************************/
    	/*****                Mykonos Initialization Sequence                *****/
    	/*************************************************************************/
    	mykDevice.tx->txChannels = u8TxID;
    	mykDevice.rx->rxChannels = u8RxID;
    
    	/* Perform a hard reset on the MYKONOS DUT (Toggle RESETB pin on device) */
    	if ((mykError = MYKONOS_resetDevice(&mykDevice)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    
    	if ((mykError = MYKONOS_initialize(&mykDevice)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    
    	/*************************************************************************/
    	/*****                Mykonos CLKPLL Status Check                    *****/
    	/*************************************************************************/
    
    	if ((mykError = MYKONOS_checkPllsLockStatus(&mykDevice, &pllLockStatus)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    
    	/*************************************************************************/
    	/*****                Mykonos Perform MultiChip Sync                 *****/
    	/*************************************************************************/
    
    	if ((mykError = MYKONOS_enableMultichipSync(&mykDevice, 1, &mcsStatus)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    
    	/* Minimum 3 SYSREF pulses from Clock Device has to be produced for MulticChip Sync */
    	AD9528_requestSysref(clockAD9528_device, 1);
    	mdelay(1);
    	AD9528_requestSysref(clockAD9528_device, 1);
    	mdelay(1);
    	AD9528_requestSysref(clockAD9528_device, 1);
    	mdelay(1);
    	AD9528_requestSysref(clockAD9528_device, 1);
    	mdelay(1);
    
    	/*************************************************************************/
    	/*****                Mykonos Verify MultiChip Sync                 *****/
    	/*************************************************************************/
    
    	if ((mykError = MYKONOS_enableMultichipSync(&mykDevice, 0, &mcsStatus)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    
    	if ((mcsStatus & 0x0B) == 0x0B)
    		xil_printf("\r\nMCS successful");
    	else
    		xil_printf("\r\nMCS failed\n");
    
    	/*************************************************************************/
    	/*****                Mykonos Load ARM file                          *****/
    	/*************************************************************************/
    
    	if (pllLockStatus & 0x01) {
    		xil_printf("\r\nCLKPLL locked");
    		if ((mykError = MYKONOS_initArm(&mykDevice)) != MYKONOS_ERR_OK) {
    			errorString = getMykonosErrorMessage(mykError);
    //			goto error;
    		}
    
    		if ((mykError = MYKONOS_loadArmFromBinary(&mykDevice, &firmware_Mykonos_M3_bin[0], firmware_Mykonos_M3_bin_len)) != MYKONOS_ERR_OK) {
    			errorString = getMykonosErrorMessage(mykError);
    //			goto error;
    		}
    	} else {
    		xil_printf("\r\nCLKPLL not locked (0x%x)", pllLockStatus);
    		return;
    	}
    
    //	/* Read back the version of the ARM binary loaded into the Mykonos ARM memory */
    //	if ((mykError = MYKONOS_getArmVersion(&mykDevice, &arm_major, &arm_minor, &arm_release, NULL)) == MYKONOS_ERR_OK)
    //		xil_printf("\r\nAD9371 ARM version %d.%d.%d", arm_major, arm_minor, arm_release);
    
    	/*************************************************************************/
    	/*****                Mykonos Set RF PLL Frequencies                 *****/
    	/*************************************************************************/
    	xil_printf("\r\nmykDevice.rx->rxPllLoFrequency_Hz = %ld", mykDevice.rx->rxPllLoFrequency_Hz);
    //	getchar();
    	if ((mykError = MYKONOS_setRfPllFrequency(&mykDevice, RX_PLL, mykDevice.rx->rxPllLoFrequency_Hz)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    	xil_printf("\r\nmykDevice.tx->txPllLoFrequency_Hz = %ld", mykDevice.tx->txPllLoFrequency_Hz);
    //	getchar();
    	if ((mykError = MYKONOS_setRfPllFrequency(&mykDevice, TX_PLL, mykDevice.tx->txPllLoFrequency_Hz)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    	xil_printf("\r\nmykDevice.obsRx->snifferPllLoFrequency_Hz = %ld", mykDevice.obsRx->snifferPllLoFrequency_Hz);
    //	getchar();
    	if ((mykError = MYKONOS_setRfPllFrequency(&mykDevice, SNIFFER_PLL, mykDevice.obsRx->snifferPllLoFrequency_Hz)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    
    	sleep(1);
    
    	if ((mykError = MYKONOS_checkPllsLockStatus(&mykDevice, &pllLockStatus)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    	}
    
    	if ((pllLockStatus & 0x0F) == 0x0F)
    		xil_printf("\r\nPLLs locked");
    	else {
    		xil_printf("\r\nPLLs not locked (0x%x)", pllLockStatus);
    		return;
    	}
    
    #if DPD_ENABLE
    
    	mykError = MYKONOS_configDpd(&mykDevice);
    	if (mykError != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error_11;
    	}
    
    	mykError = MYKONOS_configClgc(&mykDevice);
    	if (mykError != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error_11;
    	}
    
    	mykError = MYKONOS_configVswr(&mykDevice);
    	if (mykError != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error_11;
    	}
    
    #endif
    
    	/*************************************************************************/
    	/*****                Mykonos Set GPIOs                              *****/
    	/*************************************************************************/
    
    	if ((mykGpioErr = MYKONOS_setRx1GainCtrlPin(&mykDevice, 0, 0, 0, 0, 0)) != MYKONOS_ERR_GPIO_OK) {
    		errorString = getGpioMykonosErrorMessage(mykGpioErr);
    //		goto error;
    	}
    
    	if ((mykGpioErr = MYKONOS_setRx2GainCtrlPin(&mykDevice, 0, 0, 0, 0, 0)) != MYKONOS_ERR_GPIO_OK) {
    		errorString = getGpioMykonosErrorMessage(mykGpioErr);
    //		goto error;
    	}
    //	xil_printf("\r\n setTx2AttenCtrlPin");
    //	getchar();
    	if ((mykGpioErr = MYKONOS_setTx1AttenCtrlPin(&mykDevice, 0, 0, 0, 0, 0)) != MYKONOS_ERR_GPIO_OK) {
    		errorString = getGpioMykonosErrorMessage(mykGpioErr);
    //		goto error;
    	}
    //	xil_printf("\r\n setTx2AttenCtrlPin");
    //	getchar();
    	if ((mykGpioErr = MYKONOS_setTx2AttenCtrlPin(&mykDevice, 0, 0, 0, 0)) != MYKONOS_ERR_GPIO_OK) {
    		errorString = getGpioMykonosErrorMessage(mykGpioErr);
    //		goto error;
    	}
    //	xil_printf("\r\n setupGpio");
    //	getchar();
    	if ((mykGpioErr = MYKONOS_setupGpio(&mykDevice)) != MYKONOS_ERR_GPIO_OK) {
    		errorString = getGpioMykonosErrorMessage(mykGpioErr);
    //		goto error;
    	}
    
    	/*************************************************************************/
    	/*****                Mykonos Set manual gains values                *****/
    	/*************************************************************************/
    
    	if ((mykError = MYKONOS_setRx1ManualGain(&mykDevice, 255)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    
    	if ((mykError = MYKONOS_setRx2ManualGain(&mykDevice, 255)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    
    	if ((mykError = MYKONOS_setObsRxManualGain(&mykDevice, OBS_RX1_TXLO, 255)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    
    	if ((mykError = MYKONOS_setObsRxManualGain(&mykDevice, OBS_RX2_TXLO, 255)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    
    	if ((mykError = MYKONOS_setObsRxManualGain(&mykDevice, OBS_SNIFFER_A, 255)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    
    	if ((mykError = MYKONOS_setObsRxManualGain(&mykDevice, OBS_SNIFFER_B, 255)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    
    	if ((mykError = MYKONOS_setObsRxManualGain(&mykDevice, OBS_SNIFFER_C, 255)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    
    	/*************************************************************************/
    	/*****                Mykonos Initialize attenuations                *****/
    	/*************************************************************************/
    //	xil_printf("\r\n setTx1Attenuation");
    //	getchar();
    	if ((mykError = MYKONOS_setTx1Attenuation(&mykDevice, 0)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    //	xil_printf("\r\n setTx2Attenuation");
    //	getchar();
    	if ((mykError = MYKONOS_setTx2Attenuation(&mykDevice, 0)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    
    	/*************************************************************************/
    	/*****           Mykonos ARM Initialization Calibrations             *****/
    	/*************************************************************************/
    
        if ((mykError = MYKONOS_runInitCals(&mykDevice, (initCalMask & ~TX_LO_LEAKAGE_EXTERNAL))) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    
    	if ((mykError = MYKONOS_waitInitCals(&mykDevice, 60000, &errorFlag, &errorCode)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    
    	if ((errorFlag != 0) || (errorCode != 0)) {
    		/*** < Info: abort init cals > ***/
    		if ((mykError = MYKONOS_abortInitCals(&mykDevice, &initCalsCompleted)) != MYKONOS_ERR_OK) {
    			errorString = getMykonosErrorMessage(mykError);
    //			goto error;
    		}
    		if (initCalsCompleted)
    			xil_printf("\r\nCompleted calibrations: %x", (unsigned int)initCalsCompleted);
    	}
    	else
    		xil_printf("\r\nCalibrations completed successfully\n");
    
    	/*************************************************************************/
    	/*****  Mykonos ARM Initialization External LOL Calibrations with PA *****/
    	/*************************************************************************/
    
    	/* Please ensure PA is enabled operational at this time */
    	if (initCalMask & TX_LO_LEAKAGE_EXTERNAL) {
    		if ((mykError = MYKONOS_runInitCals(&mykDevice, TX_LO_LEAKAGE_EXTERNAL)) != MYKONOS_ERR_OK) {
    			errorString = getMykonosErrorMessage(mykError);
    //			goto error;
    		}
    
    		if ((mykError = MYKONOS_waitInitCals(&mykDevice, 60000, &errorFlag, &errorCode)) != MYKONOS_ERR_OK) {
    			errorString = getMykonosErrorMessage(mykError);
    //			goto error;
    		}
    
    		if ((errorFlag != 0) || (errorCode != 0)) {
    			/*** < Info: abort init cals > ***/
    			if ((mykError = MYKONOS_abortInitCals(&mykDevice, &initCalsCompleted)) != MYKONOS_ERR_OK) {
    				errorString = getMykonosErrorMessage(mykError);
    //				goto error;
    			}
    		} else
    			xil_printf("External LOL Calibrations completed successfully\n");
    	}
    
    	/*************************************************************************/
    	/*****             SYSTEM JESD bring up procedure                    *****/
    	/*************************************************************************/
    
    	if ((mykError = MYKONOS_enableSysrefToRxFramer(&mykDevice, 1)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    	/*** < Info: Mykonos is waiting for sysref in order to start
    	 * transmitting CGS from the RxFramer> ***/
    
    	if ((mykError = MYKONOS_enableSysrefToObsRxFramer(&mykDevice, 1)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    	/*** < Info: Mykonos is waiting for sysref in order to start
    	 * transmitting CGS from the ObsRxFramer> ***/
    
    	if ((mykError = MYKONOS_enableSysrefToDeframer(&mykDevice, 0)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    
    	if ((mykError = MYKONOS_resetDeframer(&mykDevice)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    
    
    	if ((mykError = MYKONOS_enableSysrefToDeframer(&mykDevice, 1)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    
    	/*************************************************************************/
    	/*****            Enable SYSREF to Mykonos and BBIC                  *****/
    	/*************************************************************************/
    
    	/* Request a SYSREF from the AD9528 */
    	AD9528_requestSysref(clockAD9528_device, 1);
    	mdelay(1);
    
    	/*** < Info: Mykonos is actively transmitting CGS from the RxFramer> ***/
    
    	/*** < Info: Mykonos is actively transmitting CGS from the ObsRxFramer> ***/
    
    	/* Request two SYSREFs from the AD9528 */
    	AD9528_requestSysref(clockAD9528_device, 1);
    	mdelay(1);
    	AD9528_requestSysref(clockAD9528_device, 1);
    	mdelay(5);
    
    	/*************************************************************************/
    	/*****               Check Mykonos Framer Status                     *****/
    	/*************************************************************************/
    
    	if ((mykError = MYKONOS_readRxFramerStatus(&mykDevice, &framerStatus)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	} else
    		if (framerStatus != 0x3E)
    			xil_printf("\r\nRxFramerStatus = 0x%x", framerStatus);
    
    	if ((mykError = MYKONOS_readOrxFramerStatus(&mykDevice, &obsFramerStatus)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	} else
    		if (obsFramerStatus != 0x3E)
    			xil_printf("\r\nOrxFramerStatus = 0x%x", obsFramerStatus);
    
    	/*************************************************************************/
    	/*****               Check Mykonos Deframer Status                   *****/
    	/*************************************************************************/
    
    	if ((mykError = MYKONOS_readDeframerStatus(&mykDevice, &deframerStatus)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	} else
    		if (deframerStatus != 0x68)
    			xil_printf("\r\nDeframerStatus = 0x%x", deframerStatus);
    
    	/*************************************************************************/
    	/*****           Mykonos enable tracking calibrations                *****/
    	/*************************************************************************/
    
    	if ((mykError = MYKONOS_enableTrackingCals(&mykDevice, trackingCalMask)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    
    	/*** < Info: Allow Rx1/2 QEC tracking and Tx1/2 QEC tracking to run when in the radioOn state
    	     *  Tx calibrations will only run if radioOn and the obsRx path is set to OBS_INTERNAL_CALS > ***/
    
    	/*** < Info: Function to turn radio on, Enables transmitters and receivers
    	 * that were setup during MYKONOS_initialize() > ***/
    	if ((mykError = MYKONOS_radioOn(&mykDevice)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    
    #if DPD_ENABLE
    	/*************************************************************************/
    	/*****            Enable DPD calibrations                            *****/
    	/*************************************************************************/
    	uint32_t initCalMaskDpd = initCalMask | DPD_INIT | CLGC_INIT | VSWR_INIT;
    
    	if ((mykError = MYKONOS_radioOff(&mykDevice)) != MYKONOS_ERR_OK)
    	{
    		/*** < Info: errorString will contain log error string in order to debug why radioOn failed > ***/
    		//errorString = getMykonosErrorMessage(mykError);
    		puts(getMykonosErrorMessage(mykError));
    
    	}
    	// Make sure PA is ON
    	if((mykError = MYKONOS_abortInitCals(&mykDevice, &initCalsCompleted)) != MYKONOS_ERR_OK)
    	{
    		/*** < Info: errorString will contain log error string in order to debug why failed > ***/
    		//errorString = getMykonosErrorMessage(mykError);
    		puts("abortInitCals failed");
    		fflush(stdout);
    		puts(getMykonosErrorMessage(mykError));
    	}
    
    	xil_printf("Mykonos ARM Initialization Calibrations for DPD");
    
    	if ((mykError = MYKONOS_runInitCals(&mykDevice, (initCalMaskDpd & ~TX_LO_LEAKAGE_EXTERNAL))) != MYKONOS_ERR_OK)
    	{
    		/*** < Info: errorString will contain log error string in order to debug why failed > ***/
    		//errorString = getMykonosErrorMessage(mykError);
    		puts("MYKONOS_runInitCals");
    		fflush(stdout);
    		puts(getMykonosErrorMessage(mykError));
    
    	}
    
    	if ((mykError = MYKONOS_waitInitCals(&mykDevice, 60000, &errorFlag, &errorCode)) != MYKONOS_ERR_OK)
    	{
    		/*** < Info: errorString will contain log error string in order to debug why failed > ***/
    		//errorString = getMykonosErrorMessage(mykError);
    		puts("MYKONOS_waitInitCals");
    		fflush(stdout);
    		puts(getMykonosErrorMessage(mykError));
    	 }
    
    	if ((mykError = MYKONOS_getEnabledTrackingCals(&mykDevice, &trackingCalMask)) != MYKONOS_ERR_OK)
    	{
    		/*** < Info: errorString will contain log error string in order to debug why failed > ***/
    		//errorString = getMykonosErrorMessage(mykError);
    		puts("MYKONOS_getEnabledTrackingCals");
    		fflush(stdout);
    		puts(getMykonosErrorMessage(mykError));
    
    	}
    
    	trackingCalMask |= TRACK_TX1_DPD | TRACK_TX2_DPD | TRACK_TX1_CLGC | TRACK_TX2_CLGC | TRACK_TX1_VSWR | TRACK_TX2_VSWR;
    
    	if ((mykError = MYKONOS_enableTrackingCals(&mykDevice, trackingCalMask)) != MYKONOS_ERR_OK)
    	{
    		/*** < Info: errorString will contain log error string in order to debug why enableTrackingCals failed > ***/
    		//errorString = getMykonosErrorMessage(mykError);
    		puts(getMykonosErrorMessage(mykError));
    
    	}
    
    	if ((mykError = MYKONOS_radioOn(&mykDevice)) != MYKONOS_ERR_OK)
    	{
    		/*** < Info: errorString will contain log error string in order to debug why radioOn failed > ***/
    		//errorString = getMykonosErrorMessage(mykError);
    		puts(getMykonosErrorMessage(mykError));
    
    	}
    
    #endif
    
    
    
    	/*** < Info: Allow TxQEC to run when User: is not actively using ORx receive path > ***/
    	if ((mykError = MYKONOS_setObsRxPathSource(&mykDevice, OBS_RXOFF)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    	if ((mykError = MYKONOS_setObsRxPathSource(&mykDevice, OBS_INTERNALCALS)) != MYKONOS_ERR_OK) {
    		errorString = getMykonosErrorMessage(mykError);
    //		goto error;
    	}
    
    	xil_printf("\r\nDone");
    	{
    		uint16_t u16ChannelPw = 100;
    		uint16_t powerThreshold = 50;
    
    		MYKONOS_setupPaProtection(&mykDevice, powerThreshold, 5, 5, 1, 1);
    
    		MYKONOS_enablePaProtection(&mykDevice, 1);
    
    		MYKONOS_getDacPower(&mykDevice, TX2, &u16ChannelPw);
    
    		xil_printf("\r\nu16ChannelPw: %d", u16ChannelPw);
    	}
    
        if ((mykError = MYKONOS_getDpdStatus(&mykDevice, mykDevice.tx->txChannels, &dpdStatus)) != MYKONOS_ERR_OK)
        {
        	   puts(getMykonosErrorMessage(mykError));
        }
        else
        {
        	 LREP("\r\nDPDStatus: %d 0x%x 0x%x 0x%x 0x%x 0x%x", dpdStatus.dpdErrorStatus, dpdStatus.dpdExtPathDelay, dpdStatus.dpdIterCount, dpdStatus.dpdMaxAdaptation, dpdStatus.dpdModelErrorPercent, dpdStatus.dpdTrackCount);
        }
    
    	SetTxFreq(mykDevice,  mykDevice.tx->txPllLoFrequency_Hz);
    	usleep(100);
    	SetRxFreq(mykDevice,  mykDevice.rx->rxPllLoFrequency_Hz);
    	usleep(100);
    
    	free((char*)errorString);
    

    Can you suggest to me solution improve DPD run better and result is the same in different frequency? My system operate from 4.4G to 5G

    Thanks and brgs.

  • 0
    •  Analog Employees 
    on Apr 27, 2020 10:53 AM in reply to sonminh

    Can you please share the DPD status for all the frequencies? 

    Did you verify your PA performance across frequency?

    What is the PA you are using?