Post Go back to editing

Profile AND Frequency hopping

Product Number: ADRV9002
Software Version: 2021R2

Issue1:I want to redifine my baseband signal for my frequency hopping project.I add the config Frequencyhopping in DMA_EXAMPLE.And I use a fuction control the gpio.GPIO control is working,but I found my oscilloscope has no waveform.In my opinion,I want to modify the dma data.but now It doesn't seem to produce a waveform. . I'm not good at changing code so I used Noos DMA_EXAMPLE.I don't know how to properly boot my baseband to frequencyhopping .Have some Frequnecyhopping code to refer to?

issue2:when I genarate profile with TES, it's json  format.But the code need  string like Navassa_CMOS_profile.h.When I use it ,I need modify Navassa_CMOS_profile.h against .json file.Is there an easier way?

Issue3:When I used latest master,I noticed HDL-master named hdl-main,and I use hdl main and no-os master. When I add xsa into no-os project . and make ,CMD  print “The specified path cannot be found”.

Top Replies

  • Hi  ,

    It seems like you are running adrv900x based on no-OS example. There could be many reasons why you're not seeing output waveform.

    Could you please provide a more concrete error message? Or…

  • Hi  ,

    It seems like you are running adrv900x based on no-OS example. There could be many reasons why you're not seeing output waveform.

    Could you please provide a more concrete error message? Or more details about how you run your (eclipse?) project.

    You can configure frequency hopping in TES->Configure->Carriers->Carrier Configuration Mode: Frequency Hopping. 

    In case you don't know, TES can generate C99 sample code from the given profile, which should give you a starting point.

     

    I hope the post below helps with your second question:

    (+) ADRV9002 no-OS converting TES generated .stream file to a firmware - Q&A - Microcontroller no-OS Drivers - EngineerZone (analog.com)

    Building with: make HARDWARE=/path/to/xsa should work after you source /tools/Xilinx/Vitis/settings64.sh

    If possible, try this with tagged branches (e.g. hdl_2022_r2) rather than main/master.

    Best,

    -Stefan

  • Thanks for your help so much . About first issue ,Vitis terminal didn't show any error.Yes ,I refer to C99 (LTE FH EXAMPLE).Could you check my main fuction? than give me some advice.

    /***************************************************************************//**
     *   @file   headless.c
     *   @brief  adrv9002 main project file.
     *   @author Darius Berghe (darius.berghe@analog.com)
    ********************************************************************************
     * Copyright 2020(c) Analog Devices, Inc.
     *
     * All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions are met:
     *  - Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *  - Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in
     *    the documentation and/or other materials provided with the
     *    distribution.
     *  - Neither the name of Analog Devices, Inc. nor the names of its
     *    contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *  - The use of this software may or may not infringe the patent rights
     *    of one or more patent holders.  This license does not release you
     *    from the requirement that you obtain separate licenses from these
     *    patent holders to use this software.
     *  - Use of the software either in source or binary form, must be run
     *    on or directly connected to an Analog Devices Inc. component.
     *
     * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
     * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
     * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     * IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
     * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     * LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
     * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
     * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
     * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    *******************************************************************************/
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    
    #define DMA_EXAMPLE
    #define XILINX_PLATFORM
    
    #ifdef XILINX_PLATFORM
    #include "xil_cache.h"
    
    #endif /* XILINX_PLATFORM */
    #include "xgpiops.h"//includ emio use
    #include <xil_io.h>  // Xilinx IO 函数库
    #include <unistd.h>  // 用于 usleep
    #include "xparameters.h"//xilinx parameter
    #include "no_os_error.h"
    #include "no_os_util.h"
    #include "no_os_spi.h"
    
    #include "axi_adc_core.h"
    #include "axi_dac_core.h"
    #include "axi_dmac.h"
    
    #include "parameters.h"
    
    #ifdef IIO_SUPPORT
    #include "iio_app.h"
    #include "iio_axi_adc.h"
    #include "iio_axi_dac.h"
    #include "xilinx_uart.h"
    #endif
    
    #include "adrv9002.h"
    #include "adi_adrv9001.h"
    #include "adi_adrv9001_arm.h"
    #include "adi_adrv9001_radio.h"
    #include "adi_adrv9001_profileutil.h"
    #include "Navassa_CMOS_profile.h"
    #include "adi_adrv9001_fh.h"
    
    //-------------------------------------define gpio --------------------------------------------------
    #define GPIO_DEVICE_ID  XPAR_XGPIOPS_0_DEVICE_ID
    XGpioPs_Config * ConfigPtr;
    XGpioPs Gpio;
    #define EMIO_DGPIO_0  86 //54+32=86  hop signal
    #define EMIO_DGPIO_1  87 //54+15+3=72
    #define EMIO_TX1_EN  102 //54+48=102
    #define ADI_COMPILED_LOGLEVEL  ADI_LOGLEVEL_TRACE //log set max,or ADI_LOGLEVEL_DEBUG
    
    /* ADC/DAC Buffers */
    #if defined(DMA_EXAMPLE) || defined(IIO_SUPPORT)
    static uint32_t dac_buffers[IIO_DEV_COUNT][DAC_BUFFER_SAMPLES]
    __attribute__((aligned));
    static uint16_t adc_buffers[IIO_DEV_COUNT][ADC_BUFFER_SAMPLES]
    __attribute__((aligned));
    #endif
    
    uint64_t sampling_freq;
    
    int get_sampling_frequency(struct axi_adc *dev, uint32_t chan,
    			   uint64_t *sampling_freq_hz)
    {
    	if (!dev || !sampling_freq_hz)
    		return -EINVAL;
    
    	*sampling_freq_hz = sampling_freq;
    	return 0;
    }
    
    static struct adi_adrv9001_SpiSettings spiSettings = {
    	.msbFirst = 1,
    	.enSpiStreaming = 0,
    	.autoIncAddrUp = 1,
    	.fourWireMode = 1,
    	.cmosPadDrvStrength = ADI_ADRV9001_CMOSPAD_DRV_STRONG,
    };
    
    struct adi_adrv9001_SpiSettings *adrv9002_spi_settings_get(void)
    {
    	return &spiSettings;
    }
    
    enum adi_adrv9001_SsiType adrv9002_ssi_type_detect(struct adrv9002_rf_phy *phy)
    {
    	enum adi_adrv9001_SsiType ssi, ssi2;
    	char *ssi_str[3] = {
    		"[SSI Disabled]",
    		"CMOS",
    		"LVDS"
    	};
    
    	ssi = adrv9002_axi_ssi_type_get(phy);
    
    	ssi2 = phy->curr_profile->rx.rxChannelCfg[0].profile.rxSsiConfig.ssiType;
    	if (ssi != ssi2) {
    		printf("SSI mismatch: detected %s in HDL and %s in profile.\n", ssi_str[ssi],
    		       ssi_str[ssi2]);
    		return ADI_ADRV9001_SSI_TYPE_DISABLE;
    	}
    
    	return ssi;
    }
    
    static struct adi_adrv9001_GainControlCfg agc_defaults = {
    	.peakWaitTime = 4,
    	.maxGainIndex = ADI_ADRV9001_RX_GAIN_INDEX_MAX,
    	.minGainIndex = ADI_ADRV9001_RX_GAIN_INDEX_MIN,
    	.gainUpdateCounter = 11520,
    	.attackDelay_us = 10,
    	.lowThreshPreventGainInc = false,
    	.slowLoopSettlingDelay = 16,
    	.changeGainIfThreshHigh = 3,
    	.agcMode = 1,
    	.resetOnRxon = true,//ture,get gain from fhtable
    	.resetOnRxonGainIndex = ADI_ADRV9001_RX_GAIN_INDEX_MAX,
    	.enableSyncPulseForGainCounter = false,
    	.enableFastRecoveryLoop = false,
    	.power = {
    		.powerEnableMeasurement = true,
    		.underRangeHighPowerThresh = 10,
    		.underRangeLowPowerThresh = 4,
    		.underRangeHighPowerGainStepRecovery = 2,
    		.underRangeLowPowerGainStepRecovery = 4,
    		.powerMeasurementDuration = 10,
    		.powerMeasurementDelay = 2,
    		.rxTddPowerMeasDuration = 0,
    		.rxTddPowerMeasDelay = 0,
    		.overRangeHighPowerThresh = 0,
    		.overRangeLowPowerThresh = 7,
    		.overRangeHighPowerGainStepAttack = 4,
    		.overRangeLowPowerGainStepAttack = 4,
    		.feedback_inner_high_inner_low = ADI_ADRV9001_GPIO_PIN_CRUMB_UNASSIGNED,
    		.feedback_apd_high_apd_low = ADI_ADRV9001_GPIO_PIN_CRUMB_UNASSIGNED,
    	},
    	.peak = {
    		.agcUnderRangeLowInterval = 50,
    		.agcUnderRangeMidInterval = 2,
    		.agcUnderRangeHighInterval = 4,
    		.apdHighThresh = 21,
    		.apdLowThresh = 12,
    		.apdUpperThreshPeakExceededCount = 6,
    		.apdLowerThreshPeakExceededCount = 3,
    		.apdGainStepAttack = 2,
    		.apdGainStepRecovery = 0,
    		.enableHbOverload = true,
    		.hbOverloadDurationCount = 1,
    		.hbOverloadThreshCount = 1,
    		.hbHighThresh = 13044,
    		.hbUnderRangeLowThresh = 5826,
    		.hbUnderRangeMidThresh = 8230,
    		.hbUnderRangeHighThresh = 7335,
    		.hbUpperThreshPeakExceededCount = 6,
    		.hbUnderRangeHighThreshExceededCount = 3,
    		.hbGainStepHighRecovery = 2,
    		.hbGainStepLowRecovery = 6,
    		.hbGainStepMidRecovery = 4,
    		.hbGainStepAttack = 2,
    		.hbOverloadPowerMode = 0,
    		.hbUnderRangeMidThreshExceededCount = 3,
    		.hbUnderRangeLowThreshExceededCount = 3,
    		.feedback_apd_low_hb_low = ADI_ADRV9001_GPIO_PIN_CRUMB_UNASSIGNED,
    		.feedback_apd_high_hb_high = ADI_ADRV9001_GPIO_PIN_CRUMB_UNASSIGNED,
    	},
    };
    
    
    int main(void)
    {
    	int ret;
    	int count = 0;//fh count
        adi_adrv9001_ChannelEnableMode_e ctrmode;
    	struct adi_common_ApiVersion api_version;
    	struct adi_adrv9001_ArmVersion arm_version;
    	struct adi_adrv9001_SiliconVersion silicon_version;
    	struct adi_adrv9001_Device adrv9001_device = {0};//for initial
    //	struct adrv9002_chip_info chip = {0};
    	struct adrv9002_rf_phy phy = {0};
    	u32  value;
    	ConfigPtr = XGpioPs_LookupConfig(GPIO_DEVICE_ID);
    	XGpioPs_CfgInitialize(&Gpio, ConfigPtr,ConfigPtr->BaseAddr);
        printf("initial gpio ok\n");
    //	XGpioPs_SetDirectionPin(&Gpio,EMIO_DGPIO_2,1);//0=in;1=out
    //	XGpioPs_SetOutputEnablePin(&Gpio,EMIO_DGPIO_2,1); //1 enable
    	struct adrv9002_gpio fh_gpios[2] = { //to config gpio in phy  for init and gpio config--------------------CONFIG UNKNOW
    		{	.gpio = {
    			.pin = ADI_ADRV9001_GPIO_DIGITAL_02,
    			.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,
    			.master = ADI_ADRV9001_GPIO_MASTER_BBIC
    			},
    			.signal = 1
    		}, //master is BBIC OR 9002,DONT KNOW --------------------CONFIG UNKNOW
    		{	.gpio = {
    			.pin = ADI_ADRV9001_GPIO_DIGITAL_03,
    			.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,
    			.master = ADI_ADRV9001_GPIO_MASTER_BBIC
    			},
    			.signal = 2
    		}
    
    	};
    	adi_adrv9001_FhHopTable_e tableId_A = ADI_ADRV9001_FHHOPTABLE_A;
    	const int sizeoftable = 10;
    
    //	adi_adrv9001_FhHopFrame_t hopTable_A[10] = {0};
    
    	unsigned int c;
    
    	struct axi_adc_init rx1_adc_init = {
    		.name = "axi-adrv9002-rx-lpc",
    		.base = RX1_ADC_BASEADDR,
    		.num_channels = ADRV9001_I_Q_CHANNELS,
    	};
    
    	struct axi_dac_channel  tx1_dac_channels[2];
    	tx1_dac_channels[0].sel = AXI_DAC_DATA_SEL_DMA;
    	tx1_dac_channels[1].sel = AXI_DAC_DATA_SEL_DMA;
    
    	struct axi_dac_init tx1_dac_init = {
    		.name = "axi-adrv9002-tx-lpc",
    		.base = TX1_DAC_BASEADDR,
    		.num_channels = ADRV9001_I_Q_CHANNELS,
    		.channels = tx1_dac_channels,
    	};
    
    #ifndef ADRV9002_RX2TX2
    	struct axi_adc_init rx2_adc_init = {
    		.name = "axi-adrv9002-rx2-lpc",
    		.base = RX2_ADC_BASEADDR,
    		.num_channels = ADRV9001_I_Q_CHANNELS,
    	};
    
    	struct axi_dac_channel  tx2_dac_channels[2];
    	tx2_dac_channels[0].sel = AXI_DAC_DATA_SEL_DMA;
    	tx2_dac_channels[1].sel = AXI_DAC_DATA_SEL_DMA;
    
    	struct axi_dac_init tx2_dac_init = {
    		.name = "axi-adrv9002-tx2-lpc",
    		.base = TX2_DAC_BASEADDR,
    		.num_channels = ADRV9001_I_Q_CHANNELS,
    		.channels = tx2_dac_channels,
    	};
    #endif
    	struct axi_dmac_init rx1_dmac_init = {
    		"rx_dmac",
    		RX1_DMA_BASEADDR,
    		IRQ_DISABLED
    	};
    
    	struct axi_dmac_init tx1_dmac_init = {
    		"tx_dmac",
    		TX1_DMA_BASEADDR,
    		IRQ_DISABLED
    	};
    
    #ifndef ADRV9002_RX2TX2
    	struct axi_dmac_init rx2_dmac_init = {
    		"rx_dmac",
    		RX2_DMA_BASEADDR,
    		IRQ_DISABLED
    	};
    
    	struct axi_dmac_init tx2_dmac_init = {
    		"tx_dmac",
    		TX2_DMA_BASEADDR,
    		IRQ_DISABLED
    	};
    #endif
    
    #ifdef XILINX_PLATFORM
    	Xil_ICacheEnable();
    	Xil_DCacheEnable();
    #endif /* XILINX_PLATFORM */
    
    	printf("Hello\n");
    
    #if defined(ADRV9002_RX2TX2)
    	phy.rx2tx2 = true;
    #endif
    
    	phy.adrv9001 = &adrv9001_device;
    
    	/* ADRV9002
    	chip.cmos_profile = "Navassa_CMOS_profile.json";
    	chip.lvd_profile = "Navassa_LVDS_profile.json";
    	chip.name = "adrv9002-phy";
    	chip.n_tx = ADRV9002_CHANN_MAX;
    
    	phy.chip = &chip;*/
    	/*read json to init ,This function need #define in profileutil.c.*/
    	ret = adi_adrv9001_profileutil_Parse(phy.adrv9001, &phy.profile,
    					     (char *)json_profile, strlen(json_profile));
    	if (ret)
    		goto error;
    
    	phy.curr_profile = &phy.profile;
    //	phy.fh = fh_config;//add confit into phy
    	phy.adrv9002_gpios = fh_gpios;
    	phy.ngpios = 2;
    	sampling_freq = phy.curr_profile->rx.rxChannelCfg[0].profile.rxOutputRate_Hz;
    
    	/* Initialize the ADC/DAC cores */
    	ret = axi_adc_init_begin(&phy.rx1_adc, &rx1_adc_init);
    	if (ret) {
    		printf("axi_adc_init_begin() failed with status %d\n", ret);
    		goto error;
    	}
    
    	ret = axi_dac_init_begin(&phy.tx1_dac, &tx1_dac_init);
    	if (ret) {
    		printf("axi_dac_init_begin() failed with status %d\n", ret);
    		goto error;
    	}
    #ifndef ADRV9002_RX2TX2
    	ret = axi_adc_init_begin(&phy.rx2_adc, &rx2_adc_init);
    	if (ret) {
    		printf("axi_adc_init_begin() failed with status %d\n", ret);
    		goto error;
    	}
    
    	ret = axi_dac_init_begin(&phy.tx2_dac, &tx2_dac_init);
    	if (ret) {
    		printf("axi_dac_init_begin() failed with status %d\n", ret);
    		goto error;
    	}
    #endif
    
    	phy.ssi_type = adrv9002_ssi_type_detect(&phy);
    	if (phy.ssi_type == ADI_ADRV9001_SSI_TYPE_DISABLE)
    		goto error;
    
    	/* Initialize AGC */
    	for (c = 0; c < ADRV9002_CHANN_MAX; c++) {
    		phy.rx_channels[c].agc = agc_defaults;
    	}
    
    //-----------------------------------initial---------------------------------------------------
    
    	ret = adrv9002_setup(&phy);
    	if (ret)
    		return ret;
    	printf("adrv9002 set up done\n");
    
    //---------------------------------start config  fh---------------------------------------------------
    
    	adi_adrv9001_FhCfg_t fh_config = {
    		.mode = ADI_ADRV9001_FHMODE_LO_MUX_REALTIME_PROCESS,//MUX and pre load ,tip:2t2r must realtime
    		.rxPortHopSignals = { ADI_ADRV9001_FH_HOP_SIGNAL_1, ADI_ADRV9001_FH_HOP_SIGNAL_1  },
    		.txPortHopSignals = { ADI_ADRV9001_FH_HOP_SIGNAL_1, ADI_ADRV9001_FH_HOP_SIGNAL_1  },
    		.rxZeroIfEnable = true,
    		.hopSignalGpioConfig = {
    			{
    				.pin = ADI_ADRV9001_GPIO_DIGITAL_00,//,if dont use ,select ADI_ADRV9001_GPIO_UNASSIGNED
    				.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,//Polarity,normak or inverted
    				.master = ADI_ADRV9001_GPIO_MASTER_BBIC//BBIC or 9001 CONTROL this pin  --------------------CONFIG UNKONW
    			},
    			{
    				.pin = ADI_ADRV9001_GPIO_UNASSIGNED,//its same as dgpio2 in usersguide
    				.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,//Polarity,
    				.master = ADI_ADRV9001_GPIO_MASTER_BBIC
    			}
    		},
    		.hopTableSelectConfig = {
    		.hopTableSelectMode = ADI_ADRV9001_FHHOPTABLESELECTMODE_INDEPENDENT,
    		.hopTableSelectGpioConfig = { {
    		.pin = ADI_ADRV9001_GPIO_UNASSIGNED,
    		.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,
    		.master = ADI_ADRV9001_GPIO_MASTER_BBIC}, {
    		.pin = ADI_ADRV9001_GPIO_UNASSIGNED,
    		.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,
    		.master = ADI_ADRV9001_GPIO_MASTER_BBIC}  }},//table select------------------undefined
    		//.hopTableSelectConfig.hopTableSelectGpioConfig  //fhtable select gpio ,low is A ,high is B ------------------undefined
    		.tableIndexCtrl = ADI_ADRV9001_TABLEINDEXCTRL_AUTO_PING_PONG,//select pingpang mode,no need for gpio control table index,its auto
    
    		.minRxGainIndex = 255,
    		.maxRxGainIndex = 255,
    		.minTxAtten_mdB = 0,
    		.maxTxAtten_mdB = 0,
    
    		.minOperatingFrequency_Hz = 30000000, //30M-250M Used for calibration .user guide page 111
    		.maxOperatingFrequency_Hz = 250000000,
    		.minFrameDuration_us = 360,
    		.txAnalogPowerOnFrameDelay = 0,//if hop very fast 锛宖aster than propagation锛宻et it     ------------------undefined
    		.numTableIndexPins = 0,//automatic increment
    		.tableIndexGpioConfig = { {
    		.pin = ADI_ADRV9001_GPIO_UNASSIGNED,
    		.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,
    		.master = ADI_ADRV9001_GPIO_MASTER_BBIC}, {
    		.pin = ADI_ADRV9001_GPIO_UNASSIGNED,
    		.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,
    		.master = ADI_ADRV9001_GPIO_MASTER_BBIC}, {
    		.pin = ADI_ADRV9001_GPIO_UNASSIGNED,
    		.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,
    		.master = ADI_ADRV9001_GPIO_MASTER_BBIC}, {
    		.pin = ADI_ADRV9001_GPIO_UNASSIGNED,
    		.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,
    		.master = ADI_ADRV9001_GPIO_MASTER_BBIC}, {
    		.pin = ADI_ADRV9001_GPIO_UNASSIGNED,
    		.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,
    		.master = ADI_ADRV9001_GPIO_MASTER_BBIC}, {
    		.pin = ADI_ADRV9001_GPIO_UNASSIGNED,
    		.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,
    		.master = ADI_ADRV9001_GPIO_MASTER_BBIC}  },//ingore it if auto                      ------------------undefined
    		.gainSetupByPinConfig = { {
    		.numRxGainTableEntries = 0,
    		.rxGainTable = { 0, 0, 0, 0, 0, 0, 0, 0  },
    		.numTxAttenTableEntries = 0,
    		.txAttenTable = { 0, 0, 0, 0, 0, 0, 0, 0  },
    		.numGainCtrlPins = 0,
    		.gainSelectGpioConfig = { {
    		.pin = ADI_ADRV9001_GPIO_UNASSIGNED,
    		.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,
    		.master = ADI_ADRV9001_GPIO_MASTER_BBIC}, {
    		.pin = ADI_ADRV9001_GPIO_UNASSIGNED,
    		.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,
    		.master = ADI_ADRV9001_GPIO_MASTER_BBIC}, {
    		.pin = ADI_ADRV9001_GPIO_UNASSIGNED,
    		.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,
    		.master = ADI_ADRV9001_GPIO_MASTER_BBIC}  }}, {
    		.numRxGainTableEntries = 0,
    		.rxGainTable = { 0, 0, 0, 0, 0, 0, 0, 0  },
    		.numTxAttenTableEntries = 0,
    		.txAttenTable = { 0, 0, 0, 0, 0, 0, 0, 0  },
    		.numGainCtrlPins = 0,
    		.gainSelectGpioConfig = { {
    		.pin = ADI_ADRV9001_GPIO_UNASSIGNED,
    		.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,
    		.master = ADI_ADRV9001_GPIO_MASTER_BBIC}, {
    		.pin = ADI_ADRV9001_GPIO_UNASSIGNED,
    		.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,
    		.master = ADI_ADRV9001_GPIO_MASTER_BBIC}, {
    		.pin = ADI_ADRV9001_GPIO_UNASSIGNED,
    		.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,
    		.master = ADI_ADRV9001_GPIO_MASTER_BBIC}  }}  },
    		.enableAGCGainIndexSeeding = false};//USE AGC gain in a level ,level in another structure
    	//fill this Strcture for hop
    	ret = adi_adrv9001_Radio_ChannelEnableMode_Set(phy.adrv9001, 1, 0x1, ADI_ADRV9001_PIN_MODE);
    		if(ret){
    				printf("Failed to set channel enable mode. Error code: %d\n", ret);
    		} else {
    				printf("wait:\n");
    	    }
    ret = adi_adrv9001_fh_Configure(phy.adrv9001, &fh_config);
    	if (ret)
    		return ret;
    	printf("fh config done\n");
    	ret = adi_adrv9001_Radio_ChannelEnableMode_Get(phy.adrv9001, 1, 0x1, &ctrmode);
    		if(ret){
    				printf("Failed to read channel enable mode. Error code: %d\n", ret);
    		} else {
    				printf("Channel Enable Mode: %d\n", ctrmode);
    	    }
    //----------------------------------------hop table A --------------------------------------------------
    	adi_adrv9001_FhHopFrame_t hopTable_A[] = {//rxoffset,attenuation(0-209,/0.2),gain(0-255),hop(Hz)
    		{.rx1OffsetFrequencyHz = 0,
    		.rx2OffsetFrequencyHz = 0,
    		.tx1Attenuation_fifthdB = 0,
    		.tx2Attenuation_fifthdB = 0,
    		.rx1GainIndex = 255,
    		.rx1GainIndex = 255,
    		.hopFrequencyHz =40000000},//f1
    		{.rx1OffsetFrequencyHz = 0,
    		.rx2OffsetFrequencyHz = 0,
    		.tx1Attenuation_fifthdB = 0,
    		.tx2Attenuation_fifthdB = 0,
    		.rx1GainIndex = 255,
    		.rx1GainIndex = 255,
    		.hopFrequencyHz =45000000},//f2
    		{.rx1OffsetFrequencyHz = 0,
    		.rx2OffsetFrequencyHz = 0,
    		.tx1Attenuation_fifthdB = 0,
    		.tx2Attenuation_fifthdB = 0,
    		.rx1GainIndex = 255,
    		.rx1GainIndex = 255,
    		.hopFrequencyHz =50000000},//f3
    		{.rx1OffsetFrequencyHz = 0,
    		.rx2OffsetFrequencyHz = 0,
    		.tx1Attenuation_fifthdB = 0,
    		.tx2Attenuation_fifthdB = 0,
    		.rx1GainIndex = 255,
    		.rx1GainIndex = 255,
    		.hopFrequencyHz =55000000},//f4
    		{.rx1OffsetFrequencyHz = 0,
    		.rx2OffsetFrequencyHz = 0,
    		.tx1Attenuation_fifthdB = 0,
    		.tx2Attenuation_fifthdB = 0,
    		.rx1GainIndex = 255,
    		.rx1GainIndex = 255,
    		.hopFrequencyHz =60000000},//f5
    		{.rx1OffsetFrequencyHz = 0,
    		.rx2OffsetFrequencyHz = 0,
    		.tx1Attenuation_fifthdB = 0,
    		.tx2Attenuation_fifthdB = 0,
    		.rx1GainIndex = 255,
    		.rx1GainIndex = 255,
    		.hopFrequencyHz =65000000},//f6
    		{.rx1OffsetFrequencyHz = 0,
    		.rx2OffsetFrequencyHz = 0,
    		.tx1Attenuation_fifthdB = 0,
    		.tx2Attenuation_fifthdB = 0,
    		.rx1GainIndex = 255,
    		.rx1GainIndex = 255,
    		.hopFrequencyHz =70000000},//f7
    		{.rx1OffsetFrequencyHz = 0,
    		.rx2OffsetFrequencyHz = 0,
    		.tx1Attenuation_fifthdB = 0,
    		.tx2Attenuation_fifthdB = 0,
    		.rx1GainIndex = 255,
    		.rx1GainIndex = 255,
    		.hopFrequencyHz =75000000},//f8
    		{.rx1OffsetFrequencyHz = 0,
    		.rx2OffsetFrequencyHz = 0,
    		.tx1Attenuation_fifthdB = 0,
    		.tx2Attenuation_fifthdB = 0,
    		.rx1GainIndex = 255,
    		.rx1GainIndex = 255,
    		.hopFrequencyHz =80000000},//f9
    		{.rx1OffsetFrequencyHz = 0,
    		.rx2OffsetFrequencyHz = 0,
    		.tx1Attenuation_fifthdB = 0,
    		.tx2Attenuation_fifthdB = 0,
    		.rx1GainIndex = 255,
    		.rx1GainIndex = 255,
    		.hopFrequencyHz =85000000},//f1
    		};
    //-------------------------------load hoptableA to ARM--------------------------------------------
    	ret = adi_adrv9001_fh_HopTable_Static_Configure(phy.adrv9001, ADI_ADRV9001_FHMODE_LO_MUX_REALTIME_PROCESS, ADI_ADRV9001_FH_HOP_SIGNAL_1, ADI_ADRV9001_FHHOPTABLE_A, hopTable_A, 10);
    	if (ret)
    		return ret;
    	printf("fh hoptable A into arm done\n");
    //----------------------------------------hop tableB --------------------------------------------------
    	adi_adrv9001_FhHopFrame_t hopTable_B[] = {//rxoffset,attenuation(0-209,/0.2),gain(0-255),hop(Hz)
    		{.rx1OffsetFrequencyHz = 0,
    		.rx2OffsetFrequencyHz = 0,
    		.tx1Attenuation_fifthdB = 0,
    		.tx2Attenuation_fifthdB = 0,
    		.rx1GainIndex = 255,
    		.rx1GainIndex = 255,
    		.hopFrequencyHz =90000000},//f1
    		{.rx1OffsetFrequencyHz = 0,
    		.rx2OffsetFrequencyHz = 0,
    		.tx1Attenuation_fifthdB = 0,
    		.tx2Attenuation_fifthdB = 0,
    		.rx1GainIndex = 255,
    		.rx1GainIndex = 255,
    		.hopFrequencyHz =95000000},//f2
    		{.rx1OffsetFrequencyHz = 0,
    		.rx2OffsetFrequencyHz = 0,
    		.tx1Attenuation_fifthdB = 0,
    		.tx2Attenuation_fifthdB = 0,
    		.rx1GainIndex = 255,
    		.rx1GainIndex = 255,
    		.hopFrequencyHz =100000000},//f3
    		{.rx1OffsetFrequencyHz = 0,
    		.rx2OffsetFrequencyHz = 0,
    		.tx1Attenuation_fifthdB = 0,
    		.tx2Attenuation_fifthdB = 0,
    		.rx1GainIndex = 255,
    		.rx1GainIndex = 255,
    		.hopFrequencyHz =105000000},//f4
    		{.rx1OffsetFrequencyHz = 0,
    		.rx2OffsetFrequencyHz = 0,
    		.tx1Attenuation_fifthdB = 0,
    		.tx2Attenuation_fifthdB = 0,
    		.rx1GainIndex = 255,
    		.rx1GainIndex = 255,
    		.hopFrequencyHz =110000000},//f5
    		{.rx1OffsetFrequencyHz = 0,
    		.rx2OffsetFrequencyHz = 0,
    		.tx1Attenuation_fifthdB = 0,
    		.tx2Attenuation_fifthdB = 0,
    		.rx1GainIndex = 255,
    		.rx1GainIndex = 255,
    		.hopFrequencyHz =115000000},//f6
    		{.rx1OffsetFrequencyHz = 0,
    		.rx2OffsetFrequencyHz = 0,
    		.tx1Attenuation_fifthdB = 0,
    		.tx2Attenuation_fifthdB = 0,
    		.rx1GainIndex = 255,
    		.rx1GainIndex = 255,
    		.hopFrequencyHz =120000000},//f7
    		{.rx1OffsetFrequencyHz = 0,
    		.rx2OffsetFrequencyHz = 0,
    		.tx1Attenuation_fifthdB = 0,
    		.tx2Attenuation_fifthdB = 0,
    		.rx1GainIndex = 255,
    		.rx1GainIndex = 255,
    		.hopFrequencyHz =125000000},//f8
    		{.rx1OffsetFrequencyHz = 0,
    		.rx2OffsetFrequencyHz = 0,
    		.tx1Attenuation_fifthdB = 0,
    		.tx2Attenuation_fifthdB = 0,
    		.rx1GainIndex = 255,
    		.rx1GainIndex = 255,
    		.hopFrequencyHz =130000000},//f9
    		{.rx1OffsetFrequencyHz = 0,
    		.rx2OffsetFrequencyHz = 0,
    		.tx1Attenuation_fifthdB = 0,
    		.tx2Attenuation_fifthdB = 0,
    		.rx1GainIndex = 255,
    		.rx1GainIndex = 255,
    		.hopFrequencyHz =135000000},//f10
    		};
    //-------------------------------load hoptableB to ARM--------------------------------------------
    	ret = adi_adrv9001_fh_HopTable_Static_Configure(phy.adrv9001, ADI_ADRV9001_FHMODE_LO_MUX_REALTIME_PROCESS, ADI_ADRV9001_FH_HOP_SIGNAL_1, ADI_ADRV9001_FHHOPTABLE_B, hopTable_B, 10);
    	if (ret)
    		return ret;
    	printf("fh hoptable B into arm done .\n");
    	printf("initialize done. start calibrate\n");
    
    	ret = adi_adrv9001_Radio_ChannelEnableMode_Get(phy.adrv9001, 1, 0x1, &ctrmode);
    		if(ret){
    				printf("Failed to read channel enable mode. Error code: %d\n", ret);
    		} else {
    				printf("Channel Enable Mode: %d\n", ctrmode);
    	    }
    //---------------------------------set GPIO direction---------------------------------------------
    
    	XGpioPs_SetDirectionPin(&Gpio,EMIO_DGPIO_0,1);//0=in;1=out used for hop
    	XGpioPs_SetOutputEnablePin(&Gpio,EMIO_DGPIO_0,1); //1 enable
    
    	XGpioPs_SetDirectionPin(&Gpio,EMIO_TX1_EN,1);//0=in;1=out used for tx_setup
    	XGpioPs_SetOutputEnablePin(&Gpio,EMIO_TX1_EN,1); //1 enable
    //---------------------------------print version---------------------------------------------------
    	adi_adrv9001_ApiVersion_Get(phy.adrv9001, &api_version);
    	adi_adrv9001_arm_Version(phy.adrv9001, &arm_version);
    	adi_adrv9001_SiliconVersion_Get(phy.adrv9001, &silicon_version);
    
    	printf("%s Rev %d.%d, Firmware %u.%u.%u.%u API version: %u.%u.%u successfully initialized\n",
    	       "ADRV9002", silicon_version.major, silicon_version.minor,
    	       arm_version.majorVer, arm_version.minorVer,
    	       arm_version.maintVer, arm_version.rcVer, api_version.major,
    	       api_version.minor, api_version.patch);
    
    
    
    		/* Post AXI DAC/ADC setup, digital interface tuning */
    	ret = adrv9002_post_setup(&phy);
    	if (ret) {
    		printf("adrv9002_post_setup() failed with status %d\n", ret);
    		goto error;
    	}
    
    	/* Finalize the ADC/DAC cores initialization */
    	ret = axi_adc_init_finish(phy.rx1_adc);
    	if (ret) {
    		printf("axi_adc_init_finish() failed with status %d\n", ret);
    		goto error;
    	}
    
    	ret = axi_dac_init_finish(phy.tx1_dac);
    	if (ret) {
    		printf("axi_dac_init_finish() failed with status %d\n", ret);
    		goto error;
    	}
    	phy.tx1_dac->clock_hz = phy.curr_profile->tx.txProfile[0].txInputRate_Hz;
    #ifndef ADRV9002_RX2TX2
    	ret = axi_adc_init_finish(phy.rx2_adc);
    	if (ret) {
    		printf("axi_adc_init_finish() failed with status %d\n", ret);
    		goto error;
    	}
    
    	ret = axi_dac_init_finish(phy.tx2_dac);
    	if (ret) {
    		printf("axi_dac_init_finish() failed with status %d\n", ret);
    		goto error;
    	}
    	phy.tx2_dac->clock_hz = phy.curr_profile->tx.txProfile[1].txInputRate_Hz;
    #endif
    
    	/* Initialize the AXI DMA Controller cores */
    	ret = axi_dmac_init(&phy.tx1_dmac, &tx1_dmac_init);
    	if (ret) {
    		printf("axi_dmac_init() failed with status %d\n", ret);
    		goto error;
    	}
    
    	ret = axi_dmac_init(&phy.rx1_dmac, &rx1_dmac_init);
    	if (ret) {
    		printf("axi_dmac_init() failed with status %d\n", ret);
    		goto error;
    	}
    #ifndef ADRV9002_RX2TX2
    	ret = axi_dmac_init(&phy.tx2_dmac, &tx2_dmac_init);
    	if (ret) {
    		printf("axi_dmac_init() failed with status %d\n", ret);
    		goto error;
    	}
    
    	ret = axi_dmac_init(&phy.rx2_dmac, &rx2_dmac_init);
    	if (ret) {
    		printf("axi_dmac_init() failed with status %d\n", ret);
    		goto error;
    	}
    #endif
    
    #ifdef DMA_EXAMPLE
    	axi_dac_load_custom_data(phy.tx1_dac, sine_lut_iq,
    				 NO_OS_ARRAY_SIZE(sine_lut_iq),
    				 (uintptr_t)dac_buffers[0]);
    #ifndef ADRV9002_RX2TX2
    	axi_dac_load_custom_data(phy.tx2_dac, sine_lut_iq,
    				 NO_OS_ARRAY_SIZE(sine_lut_iq),
    				 (uintptr_t)dac_buffers[1]);
    #endif
    #ifdef XILINX_PLATFORM
    	Xil_DCacheFlush();
    #endif /* XILINX_PLATFORM */
    
    	struct axi_dma_transfer transfer1 = {
    		// Number of bytes to write/read
    		.size = sizeof(sine_lut_iq),
    		// Transfer done flag
    		.transfer_done = 0,
    		// Signal transfer mode
    		.cyclic = CYCLIC,
    		// Address of data source
    		.src_addr = (uintptr_t)dac_buffers[0],
    		// Address of data destination
    		.dest_addr = 0
    	};
    	axi_dmac_transfer_start(phy.tx1_dmac, &transfer1);
    #ifndef ADRV9002_RX2TX2
    	struct axi_dma_transfer transfer2 = {
    		// Number of bytes to write/read
    		.size = sizeof(sine_lut_iq),
    		// Transfer done flag
    		.transfer_done = 0,
    		// Signal transfer mode
    		.cyclic = CYCLIC,
    		// Address of data source
    		.src_addr = (uintptr_t)dac_buffers[1],
    		// Address of data destination
    		.dest_addr = 0
    	};
    	axi_dmac_transfer_start(phy.tx2_dmac, &transfer2);
    #endif
    
    #ifdef XILINX_PLATFORM
    	Xil_DCacheInvalidateRange((uintptr_t)adc_buffers[0], sizeof(sine_lut_iq));
    #ifndef ADRV9002_RX2TX2
    	Xil_DCacheInvalidateRange((uintptr_t)adc_buffers[1], sizeof(sine_lut_iq));
    #endif
    #endif /* XILINX_PLATFORM */
    
    	no_os_mdelay(1000);
    
    	struct axi_dma_transfer read_transfer1 = {
    		// Number of bytes to write/read
    		.size = ADC_BUFFER_SAMPLES * ADRV9001_I_Q_CHANNELS * 2, /* nr of samples * rx1 i/q, rx2 i/q * bytes per sample */
    		// Transfer done flag
    		.transfer_done = 0,
    		// Signal transfer mode
    		.cyclic = NO,
    		// Address of data source
    		.src_addr = 0,
    		// Address of data destination
    		.dest_addr = (uintptr_t)adc_buffers[0]
    	};
    	/* Transfer ADC_BUFFER_SAMPLES samples from ADC to MEM */
    #ifdef ADRV9002_RX2TX2
    	axi_adc_update_active_channels(phy.rx1_adc, 0xf);
    #else
    	axi_adc_update_active_channels(phy.rx1_adc, 0x3);
    #endif
    	axi_dmac_transfer_start(phy.rx1_dmac, &read_transfer1);
    	ret = axi_dmac_transfer_wait_completion(phy.rx1_dmac, 500);
    	if(ret)
    		return ret;
    #ifdef XILINX_PLATFORM
    	Xil_DCacheInvalidateRange((uintptr_t)adc_buffers[0],
    				  ADC_BUFFER_SAMPLES * /* nr of samples */
    				  ADRV9001_I_Q_CHANNELS * /* rx1 i/q, rx2 i/q*/
    				  2 /* bytes per sample */);
    #endif /* XILINX_PLATFORM */
    #ifndef ADRV9002_RX2TX2
    	struct axi_dma_transfer read_transfer2 = {
    		// Number of bytes to write/read
    		.size = ADC_BUFFER_SAMPLES * ADRV9001_I_Q_CHANNELS * 2, /* nr of samples * rx1 i/q, rx2 i/q * bytes per sample */
    		// Transfer done flag
    		.transfer_done = 0,
    		// Signal transfer mode
    		.cyclic = NO,
    		// Address of data source
    		.src_addr = 0,
    		// Address of data destination
    		.dest_addr = (uintptr_t)adc_buffers[1]
    	};
    	axi_adc_update_active_channels(phy.rx2_adc, 0x3);
    	axi_dmac_transfer_start(phy.rx2_dmac,&read_transfer2);
    	ret = axi_dmac_transfer_wait_completion(phy.rx2_dmac, 500);
    	if(ret)
    		return ret;
    #ifdef XILINX_PLATFORM
    	Xil_DCacheInvalidateRange((uintptr_t)adc_buffers[1],
    				  ADC_BUFFER_SAMPLES * /* nr of samples */
    				  ADRV9001_I_Q_CHANNELS * /* nr of channels */
    				  2 /* bytes per sample */);
    #endif /* XILINX_PLATFORM */
    	printf("DMA_EXAMPLE: address=%#lx samples=%lu channels=%u bits=%lu\n",
    	       (uintptr_t)adc_buffers[1], ADC_BUFFER_SAMPLES * rx2_adc_init.num_channels,
    	       rx2_adc_init.num_channels, 8 * sizeof(adc_buffers[1][0]));
    #endif
    	printf("DMA_EXAMPLE: address=%#lx samples=%lu channels=%u bits=%lu\n",
    	       (uintptr_t)adc_buffers[0], ADC_BUFFER_SAMPLES * rx1_adc_init.num_channels,
    	       rx1_adc_init.num_channels, 8 * sizeof(adc_buffers[0][0]));
    #endif
    
    //ret = adi_adrv9001_fh_HopTable_Static_Configure(phy,
    //                                                phy.fh.mode,
    //                                                phy.fh.hopSignalGpioConfig->pin,//杩欎釜鍙傛暟杩橀渶瑕佹�濊�冩�庝箞璁剧疆
    //                                                tableId_A,
    //                                                hopTable_A[sizeoftable],
    //                                                sizeoftable);
    //Loop dgpio2
    	printf("config done,start hop\n");
    //
    //	ret = adi_adrv9001_Radio_ChannelEnableMode_Get(phy.adrv9001, 1, 0x1, &ctrmode);
    //		if(ret){
    //				printf("Channel Enable Mode: %d\n", ctrmode);
    //		} else {
    //				printf("Failed to read channel enable mode. Error code: %d\n", ret);
    //	    }
    //-----------------------------------fh signal control------------------------------------------------------------
    usleep(20000);
    // initial signal          EMIO_DGPIO_0=hop1         EMIO_TX1_EN = tx1setup
    	    	XGpioPs_WritePin(&Gpio,EMIO_DGPIO_0, 0);//control hop
    	        value = XGpioPs_ReadPin(&Gpio,EMIO_DGPIO_0);//read hop
    	        printf("hopsignal1 = %d\n",value);
    			XGpioPs_WritePin(&Gpio,EMIO_TX1_EN, 0);//control tx_setup
    	        value = XGpioPs_ReadPin(&Gpio,EMIO_TX1_EN);//read hop
    	        printf("Tx1setup = %d\n",value);
    			printf("frequency hopping start\n");
    	    while (count < 10) {
    
    			//start hop
    			XGpioPs_WritePin(&Gpio,EMIO_TX1_EN, 1);//control tx_setup----------txsetup1
    	        value = XGpioPs_ReadPin(&Gpio,EMIO_TX1_EN);//read hop
    	        printf("Tx1setup = %d\n",value);
    			usleep(770); // delay-----------------------------------------
    	    	XGpioPs_WritePin(&Gpio,EMIO_DGPIO_0, 1);//control hop--------------hop1
    	        value = XGpioPs_ReadPin(&Gpio,EMIO_DGPIO_0);//read hop
    	        printf("hopsignal1 = %d\n",value);
    			usleep(230);
    			XGpioPs_WritePin(&Gpio,EMIO_TX1_EN, 0);//control tx_setup----------txsetup0
    	        value = XGpioPs_ReadPin(&Gpio,EMIO_TX1_EN);//read hop
    	        printf("Tx1setup = %d\n",value);
    			usleep(1000);//us1 + us2 = tx frame
    			XGpioPs_WritePin(&Gpio,EMIO_TX1_EN, 1);//control tx_setup----------txsetup1
    	        value = XGpioPs_ReadPin(&Gpio,EMIO_TX1_EN);//read hop
    	        printf("Tx1setup = %d\n",value);
    			usleep(770);
    	    	XGpioPs_WritePin(&Gpio,EMIO_DGPIO_0, 0);//control hop--------------hop0
    	        value = XGpioPs_ReadPin(&Gpio,EMIO_DGPIO_0);//read hop
    	        printf("hopsignal1 = %d\n",value);
    			usleep(230);
    			XGpioPs_WritePin(&Gpio,EMIO_TX1_EN, 0);//control tx_setup----------txsetup1
    	        value = XGpioPs_ReadPin(&Gpio,EMIO_TX1_EN);//read hop
    	        printf("Tx1setup = %d\n",value);
    			usleep(1000);
    	        count++;
    	    }
    		
    //ret = adi_adrv9001_fh_HopTable_Set //hop table manual switch
    
    
    error:
    	adi_adrv9001_HwClose(phy.adrv9001);
    	axi_adc_remove(phy.rx1_adc);
    	axi_dac_remove(phy.tx1_dac);
    	axi_adc_remove(phy.rx2_adc);
    	axi_dac_remove(phy.tx2_dac);
    	axi_dmac_remove(phy.rx1_dmac);
    	axi_dmac_remove(phy.tx1_dmac);
    	axi_dmac_remove(phy.rx2_dmac);
    	axi_dmac_remove(phy.tx2_dmac);
    	return ret;
    }
    

    And I notice in your second answer ,I never notice Navassa_EvaluationFw.h and Navassa_Stream.h.I think this a big mistake for me.I actually know stream,But EvaluationFw.h I never heard that.I will figure that.