Post Go back to editing

ABOUT ADRV9009 SOFTWARE

Category: Software
Product Number: ADRV9009

Hello! I use adrv9009 + zcu706 of ADI company. I use tes provided on the official website to generate matlab script, and use matlab script to control the evaluation version and adrv9009, but the MATLAB script will report an error (2020b used by Matlab). The error is as follows:

Can you help analyze and solve this problem? Thank you.

  • Are you able to program  the board successfully using TES GUI? Are you seeing the same error code while programming with TES GUI?

    Are you able to ping to the board successfully?

  • Are you able to program  the board successfully using TES GUI?   yes

    Are you seeing the same error code while programming with TES GUI?   yes ,Now we use TES to generate matlab script and report errors

    Are you able to ping to the board successfully? yes

  • First you need to make the DLL visible to Matlab. Only then you would be able to run the scripts. Are you able to import the AdiCmdServerClient.dll successfully?

    Can you share the full script that you are using?

  • %Make DLL visible to matlab
    NET.addAssembly('D:\ADRV9009\ADRV9009 Transceiver Evaluation Software\AdiCmdServerClient.dll');            
                
    Link = AdiCmdServerClient.AdiCommandServerClient.Instance;
    status = Link.hw.Connect('192.168.1.10', 55555);
    if status == 1
        fprintf('Connected to Zync\n');
    else
        fprintf('Unable to connect to Zync platform\n');
    end
    
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % % GUI Version: 3.6.0.6		DLL Version: 3.6.0.6	FPGA Version: 4E00021A	ArmVersion: unknown	StreamVersion: unknown
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    Link.FpgaTalise.StopTxData();
    Link.Ad9528.InitDeviceDataStructure(122880000, 30720000, 122880000);
    Link.Ad9528.ResetDevice();
    Link.Ad9528.Initialize();
    pause(0.5);
    arePllsLocked = Link.Ad9528.WaitForPllLock();
    fprintf('Ad9528 arePllsLocked = %d\n', arePllsLocked);
    
    Link.Ad9528.EnableClockOutputs(hex2dec('300A'));
    Link.SetSpiChannel(1);
    Link.FpgaTalise.ResetFpgaRegisters();
    Link.FpgaTalise.ResetFpgaIp(AdiCmdServerClient.FpgaResets.ClearAllRst);
    
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % Init Structures
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    Link.Talise.InitClearProfiles();
    Link.Talise.InitClocks(1, 122880, 9830400, 2, AdiCmdServerClient.HsDiv.HsDiv2p5);
    Link.Talise.InitRfPllUseExternalLo(1, 0);
    Link.Talise.InitRxProfiles(1, 2, 4, 1, 245760, 200000000, 200000, [182, 142, 173, 90, 1280, 982, 1335, 96, 1369, 48, 1012, 18, 48, 48, 37, 208, 0, 0, 0, 0, 52, 0, 7, 6, 42, 0, 7, 6, 42, 0, 25, 27, 0, 0, 25, 27, 0, 0, 165, 44, 31, 905],AdiCmdServerClient.RxDdcMode.RxDdcBypass);
    Link.Talise.InitFirFilters(1, AdiCmdServerClient.FilterName.Rx, 'D:\ADRV9009\ADRV9009 Transceiver Evaluation Software\Resources\DigitalFilters\RxPFIRApp215_BW200_ADC1966p08_OR245p76.ftr');
    Link.Talise.InitRxSettings(1, AdiCmdServerClient.RxChannel.Rx1, AdiCmdServerClient.FramerSelect.FramerA);
    Link.Talise.InitTxProfiles(1, 1, 1, 2, 2, 2, 1, 245760, 100000000, 225000000, 225000, 113000, [212, 140, 175, 90, 1280, 699, 1304, 59, 1343, 33, 913, 27, 48, 48, 34, 192, 0, 0, 0, 0, 48, 0, 7, 6, 42, 0, 7, 6, 42, 0, 25, 27, 0, 0, 25, 27, 0, 0, 165, 44, 31, 905]);
    Link.Talise.InitFirFilters(1, AdiCmdServerClient.FilterName.Tx, 'D:\ADRV9009\ADRV9009 Transceiver Evaluation Software\Resources\DigitalFilters\TxPFIRApp110_IR245p76_BW225_PriSigBW100.ftr');
    Link.Talise.InitTxSettings(1, AdiCmdServerClient.TxAttenStepSize.TxAtten0P05DB, AdiCmdServerClient.TxChannel.Tx1, 0, 0, AdiCmdServerClient.DeframerSelect.DeframerA, AdiCmdServerClient.TxDataIfPllUnlock.TxRampedDownToZero);
    Link.Talise.InitObsProfiles(1, 1, 4, 2, 245760, 200000000, 225000, [185, 141, 172, 90, 1280, 942, 1332, 90, 1368, 46, 1016, 19, 48, 48, 37, 208, 0, 0, 0, 0, 52, 0, 7, 6, 42, 0, 7, 6, 42, 0, 25, 27, 0, 0, 25, 27, 0, 0, 165, 44, 31, 905],[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],AdiCmdServerClient.OrxDdcMode.OrxDdcDisabled, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
    Link.Talise.InitFirFilters(1, AdiCmdServerClient.FilterName.ORx, 'D:\ADRV9009\ADRV9009 Transceiver Evaluation Software\Resources\DigitalFilters\ORxPFIRApp307_BW200_ADC1966p08_OR245p76.ftr');
    Link.Talise.InitObsRxSettings(1, AdiCmdServerClient.ObsRxChannel.ObsRxOff, AdiCmdServerClient.ObsRxLoSource.RfPll, AdiCmdServerClient.FramerSelect.FramerB);
    Link.Talise.InitRfPllEnablePhaseSync(1, AdiCmdServerClient.RfPllMcs.NoSync);
    Link.Talise.InitRxNcoShiftCfg(1, 0, 0, 0, 0, 0, 0, 0, 0);
    
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % Init Jesd
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    Link.Talise.InitJesd204bFramer(1, AdiCmdServerClient.FramerSelect.FramerA, 1, 0, 0, 2, 32, 4, 16, 1, 1, 2, 228, 31, 0, 0, 0, 1, 0, 0);
    Link.Talise.InitJesd204bFramer(1, AdiCmdServerClient.FramerSelect.FramerB, 0, 0, 0, 2, 32, 4, 16, 1, 1, 1, 228, 31, 0, 1, 0, 1, 0, 0);
    Link.FpgaTalise.SetupTxConvXbar(AdiCmdServerClient.FpgaFramerSelect.FramerA, hex2dec('E4'));
    Link.FpgaTalise.SetupTxConvXbar(AdiCmdServerClient.FpgaFramerSelect.FramerB, hex2dec('E4'));
    Link.GetPcbDescript();
    Link.Talise.InitJesd204bDeframer(1, AdiCmdServerClient.DeframerSelect.DeframerA, 0, 0, 0, 2, 32, 1, 1, 1, 228, 17, 0, 0, 16, 1, 0, 0, 0, 0);
    Link.FpgaTalise.ResetFpgaIp(AdiCmdServerClient.FpgaResets.TxJesdRst);
    pause(0.5);
    Link.FpgaTalise.ResetFpgaIp(AdiCmdServerClient.FpgaResets.ClearAllRst);
    Link.FpgaTalise.SetupJesd204(122880, 245760, 2, 2, 32, 1, 1, 16, 245760, 2, 1, 32, 1, 16, 245760, 0, 0, 32, 1, 1, 16, AdiCmdServerClient.FpgaFramerSelect.FramerA, AdiCmdServerClient.FpgaDeframerSelect.DeframerA, AdiCmdServerClient.FpgaDeframerSelect.DeframerB, false);
    
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % Program Talise
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    Link.Talise.ResetDevice();
    Link.Talise.Initialize();
    Link.Talise.SetDacFullScale(AdiCmdServerClient.DacFullScale.DacFs0dB);
    pllStatus = Link.Talise.GetPllsLockStatus();
    fprintf('Talise pllStatus = %d\n', pllStatus);
    Link.Talise.EnableMultichipSync(hex2dec('1'), hex2dec('0'));
    Link.Ad9528.RequestSysref(1);
    Link.Ad9528.RequestSysref(1);
    Link.Ad9528.RequestSysref(1);
    pause(0.1);
    mcsStatus = Link.Talise.EnableMultichipSync(hex2dec('0'), hex2dec('0'));
    fprintf('MCS Status = %d\n', mcsStatus);
    
    Link.FpgaTalise.SetupJesd204bOversampler(AdiCmdServerClient.FpgaDeframerSelect.DeframerB, AdiCmdServerClient.FpgaSampleDecimation.DecimateBy1);
    Link.SetLogLevel(0);
    if pllStatus && 1
    	Link.Talise.InitArm();
    	Link.Talise.LoadStreamProcessor('C:\Users\zhao\AppData\Local\Temp\TaliseStream.bin');
    	Link.Talise.LoadArm('D:\ADRV9009\ADRV9009 Transceiver Evaluation Software\Resources\arm_firmware\TaliseTDDArmFirmware.bin');
    	isArmGood = Link.Talise.VerifyArmChecksum();
    	fprintf('isArmGood = %d\n', isArmGood);
    	if isArmGood && 1
    		fprintf('ARM Loaded Successfully\n');
    	else
    		fprintf('ARM File not loaded correctly\n');
    	end
    else
    	fprintf('ARM File not loaded correctly\n');
    end
    Link.Talise.GetArmVersion();
    Link.SetLogLevel(63);
    Link.Talise.SetPllLoopFilter(AdiCmdServerClient.PllName.RfPll, 300, 3);
    Link.Talise.SetRfPllFrequency(AdiCmdServerClient.PllName.RfPll, 4000000000);
    pllStatus = Link.Talise.GetPllsLockStatus();
    fprintf('Talise pllStatus = %d\n', pllStatus);
    
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % InitCals
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    Link.Talise.AbortInitCals(0);
    %initCalMask = 0
    %initCalMask |= int(Link.Talise.CalMask.TxBaseBandFilter);
    %initCalMask |= int(Link.Talise.CalMask.AdcTuner);
    %initCalMask |= int(Link.Talise.CalMask.Tia3dBCorner);
    %initCalMask |= int(Link.Talise.CalMask.DcOffset);
    %initCalMask |= int(Link.Talise.CalMask.RxGainDelay);
    %initCalMask |= int(Link.Talise.CalMask.FlashCal);
    %initCalMask |= int(Link.Talise.CalMask.PathDelay);
    %initCalMask |= int(Link.Talise.CalMask.TxLoLeakageInternal);
    %initCalMask |= int(Link.Talise.CalMask.TxQecInit);
    %initCalMask |= int(Link.Talise.CalMask.LoopbackRxLoDelay);
    %initCalMask |= int(Link.Talise.CalMask.LoopbackRxRxQecInit);
    %initCalMask |= int(Link.Talise.CalMask.RxQecInit);
    %initCalMask |= int(Link.Talise.CalMask.ORxQecInit);
    %initCalMask |= int(Link.Talise.CalMask.TxDac);
    Link.Talise.RunInitCals(hex2dec('65DEF'));
    Link.Talise.WaitInitCals(60000, 0);
    
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % Framer/Deframer
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    Link.FpgaTalise.EnableJesd204bFramer(AdiCmdServerClient.FpgaFramerSelect.DisableAll);
    Link.FpgaTalise.ResetFpgaIp(AdiCmdServerClient.FpgaResets.TxJesdRst);
    Link.FpgaTalise.ResetFpgaIp(AdiCmdServerClient.FpgaResets.ClearAllRst);
    Link.FpgaTalise.EnableJesd204bFramer(AdiCmdServerClient.FpgaFramerSelect.FramerA);
    Link.Talise.EnableDeframerLink(AdiCmdServerClient.DeframerSelect.DeframerA, 0);
    Link.Talise.EnableDeframerLink(AdiCmdServerClient.DeframerSelect.DeframerA, 1);
    Link.Talise.EnableSysrefToDeframer(AdiCmdServerClient.DeframerSelect.DeframerA, 1);
    Link.FpgaTalise.EnableJesd204bDeframer(AdiCmdServerClient.FpgaDeframerSelect.DisableAll);
    Link.Talise.EnableFramerTestData(AdiCmdServerClient.FramerSelect.FramerA, AdiCmdServerClient.FramerDataSource.FtdAdcData, AdiCmdServerClient.FramerInjectPoint.FtdFramerInput);
    Link.Talise.EnableFramerTestData(AdiCmdServerClient.FramerSelect.FramerB, AdiCmdServerClient.FramerDataSource.FtdAdcData, AdiCmdServerClient.FramerInjectPoint.FtdFramerInput);
    Link.FpgaTalise.ResetFpgaIp(AdiCmdServerClient.FpgaResets.ClearAllRst);
    Link.FpgaTalise.ResetFpgaIp(AdiCmdServerClient.FpgaResets.RxJesdRst);
    Link.FpgaTalise.ResetFpgaIp(AdiCmdServerClient.FpgaResets.ClearAllRst);
    Link.FpgaTalise.EnableJesd204bDeframer(AdiCmdServerClient.FpgaDeframerSelect.DeframerA);
    Link.Talise.EnableFramerLink(AdiCmdServerClient.FramerSelect.FramerA, 0);
    Link.Talise.EnableFramerLink(AdiCmdServerClient.FramerSelect.FramerA, 1);
    Link.Talise.EnableSysrefToFramer(AdiCmdServerClient.FramerSelect.FramerA, 1);
    Link.Ad9528.RequestSysref(1);
    Link.Talise.ReadFramerStatus(AdiCmdServerClient.FramerSelect.FramerA);
    Link.Talise.ReadDeframerStatus(AdiCmdServerClient.DeframerSelect.DeframerA);
    
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % Tracking Cals
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    pause(1);
    %trackingCalMask = 0
    Link.Talise.EnableTrackingCals(0);
    
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % GainWithFloatingPoint or GainWithNoCompensation
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %Ensure Stream File has been set to receive Floating Point Data
    rxDataFormatter = AdiCmdServerClient.TaliseRxDataFormat;
    rxDataFormatter.FormatSelect = (AdiCmdServerClient.RxDataFormatModes.GainCompensationDisabled);
    rxDataFormatter.FpNumExpBits = (AdiCmdServerClient.FpExponentModes.TwoExponentBits);
    rxDataFormatter.FpRoundMode = (AdiCmdServerClient.FpRoundingModes.RoundToEven);
    rxDataFormatter.FpRx1Atten = (AdiCmdServerClient.FpAttenSteps.FpAtten0dB);
    rxDataFormatter.FpRx2Atten = (AdiCmdServerClient.FpAttenSteps.FpAtten0dB);
    rxDataFormatter.FpHideLeadingOne = (1);
    rxDataFormatter.IntEmbeddedBits = (AdiCmdServerClient.EmbeddedBits.Embed1SlicerBitAtLsb);
    rxDataFormatter.IntSampleResolution = (rxDataFormatter.IntSampleRes.Integer12Bit2sComp);
    Link.Talise.SetRxDataFormat(rxDataFormatter);
    %Link.Talise.SetRxDataFormat(TaliseRxDataFormat.0,0,0,0,0,1,0,0,2,0,0,3,3,0,0);
    
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % Set Gain & Attenuation
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    Link.Talise.SetRxManualGain(AdiCmdServerClient.RxChannel.Rx1, 255);
    Link.Talise.SetRxManualGain(AdiCmdServerClient.RxChannel.Rx2, 255);
    Link.Talise.SetObsRxManualGain(AdiCmdServerClient.ObsRxChannel.ObsRx1, 255);
    Link.Talise.SetObsRxManualGain(AdiCmdServerClient.ObsRxChannel.ObsRx2, 255);
    Link.Talise.SetTxAttenuation(AdiCmdServerClient.TxChannel.Tx1, 0);
    Link.Talise.SetTxAttenuation(AdiCmdServerClient.TxChannel.Tx2, 0);
    
    Link.hw.Disconnect();

  • Adicmdserverclient DLL has been successfully imported. The above is my complete script. Please help analyze the reason. Thank you

  • For connecting using Matlab, you need to use the below SD card image for botting the board:

     https://wiki.analog.com/resources/tools-software/linux-software/embedded_arm_images 

  • Thank you very much,I will go to learn it.