Problems running examples in matlab by adrv9009

Hi, I am working with the adrv9009 + zcu102 boards. I'm trying to use the examples they provide (ADRV9009_DDS_Example.m) but I keep having compilation problems. I have installed everything requested at https://wiki.analog.com/resources/tools-software/transceiver-toolbox. I am using matlab R2020a with the more stable AnalogDevicesTransceiverToolbox_v20.1.2 toolbox already compiled. When booting I had the following problems:

1.-
Error using adi.ADRV9009.Tx
Method 'releaseChanBuffers' in class 'adi.common.RxTx' uses different access permissions than its superclass 'matlabshared.libiio.base'. Set 'releaseChanBuffers' access to 'protected' to match
superclass.

Error in ADRV9009_DDS_Example (line 5)
tx = adi.ADRV9009.Tx ('uri', uri);

I solved this by changing:

methods (Hidden, Access = {? matlabshared.libiio.base,?
matlab.unittest.TestCase})

to

methods (Hidden, Access = protected)


2.-
Error using matlabshared.libiio / base / setupDataType
Too many input arguments.

Error in adi.common.RxTx / setupImpl (line 116)
obj.setupDataType (obj.dataTypeStr);

Error in adi.common.Tx / setupImpl (line 23)
setupImpl@adi.common.RxTx (obj);

Error in ADRV9009_DDS_Example (line 13)
tx ();

I solved this by commenting on the following line (I did this because I saw in one of its branches that it is not set)

function setupImpl (obj)
% Call the superclass method
obj.Count (1, obj);
obj.setupDataType (obj.dataTypeStr);
setupImpl@matlabshared.libiio.base (obj);
end

to

function setupImpl (obj)
% Call the superclass method
obj.Count (1, obj);
% obj.setupDataType (obj.dataTypeStr);
setupImpl@matlabshared.libiio.base (obj);
end

3.- After these changes I keep jumping errors. I am considering that the toolbox is wrong or I don't know.

Thanks, Leandro

Top Replies

  • 0
    •  Analog Employees 
    on Apr 12, 2021 4:12 PM

    Sorry for the confusion. Can you download the updated 20.1.2 .mltbx file from here - https://github.com/analogdevicesinc/TransceiverToolbox/releases/tag/v20.1.2

    It might take a little while for it to get updated on MATLAB's Add-On Explorer. The errors you are seeing should go away. A newer version of a dependency was getting used in creating the .mltbx file for the older release. This is causing the errors.  

    - Srikanth 

  • Hi, load the toolbox version that I mentioned and it works partially.

    The error I have now is:

    Error using matlabshared.libiio.base/cstatus
    Attribute write failed for : profile_config with value <profile Talise version=1 name=Tx_BW200_IR245p76_Rx_BW200_OR245p76_ORx_BW200_OR245p76_ADRV9009>
     <clocks>
      <deviceClock_kHz=65536>
      <clkPllVcoFreq_kHz=9830400>
      <clkPllHsDiv=2.5>
     </clocks>
    
     <rx name=Rx 200.00MHz, OutputRate 245.76MHz, TotalDecimation 8>
      <rxChannels=TAL_RX1RX2>
      <rxFirDecimation=2>
      <rxDec5Decimation=4>
      <rhb1Decimation=1>
      <rxOutputRate_kHz=245760>
      <rfBandwidth_Hz=200000000>
      <rxBbf3dBCorner_kHz=200000>
      <rxDdcMode=0>
    
      <rxNcoShifterCfg>
       <bandAInputBandWidth_kHz=0>
       <bandAInputCenterFreq_kHz=0>
       <bandANco1Freq_kHz=0>
       <bandANco2Freq_kHz=0>
       <bandBInputBandWidth_kHz=0>
       <bandBInputCenterFreq_kHz=0>
       <bandBNco1Freq_kHz=0>
       <bandBNco2Freq_kHz=0>
      </rxNcoShifterCfg>
    
      <filter FIR gain_dB=-6 numFirCoefs=48>
      -7
      -23
      33
      50
      -70
      -110
      144
      205
      -259
      -356
      437
      581
      -698
      -916
      1082
      1415
      -1655
      -2209
      2567
      3615
      -4351
      -7169
      9329
      31129
      31129
      9329
      -7169
      -4351
      3615
      2567
      -2209
      -1655
      1415
      1082
      -916
      -698
      581
      437
      -356
      -259
      205
      144
      -110
      -70
      50
      33
      -23
      -7
      </filter>
    
      <rxAdcProfile num=42>
      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
      </rxAdcProfile>
     </rx>
    
     <obsRx name=Rx 200.00MHz, OutputRate 245.76MHz, TotalDecimation 8>
      <obsRxChannelsEnable=TAL_ORX1ORX2>
      <enAdcStitching=0>
      <rxFirDecimation=2>
      <rxDec5Decimation=4>
      <rhb1Decimation=1>
      <orxOutputRate_kHz=245760>
      <rfBandwidth_Hz=200000000>
      <rxBbf3dBCorner_kHz=225000>
      <orxDdcMode=0>
    
      <filter FIR gain_dB=-6 numFirCoefs=48>
      -7
      -21
      31
      48
      -67
      -106
      124
      164
      -275
      -334
      440
      552
      -694
      -872
      1069
      1351
      -1633
      -2111
      2541
      3477
      -4295
      -6877
      9433
      30825
      30825
      9433
      -6877
      -4295
      3477
      2541
      -2111
      -1633
      1351
      1069
      -872
      -694
      552
      440
      -334
      -275
      164
      124
      -106
      -67
      48
      31
      -21
      -7
      </filter>
    
      <orxLowPassAdcProfile num=42>
      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
      </orxLowPassAdcProfile>
    
      <orxBandPassAdcProfile num=42>
      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
      </orxBandPassAdcProfile>
    
     </obsRx>
    
     <lpbk>
      <rxFirDecimation=2>
      <rhb1Decimation=1>
      <outputRate_kHz=245760>
      <rfBandwidth_Hz=75000000>
      <rxBbf3dBCorner_kHz=225000>
    
      <filter FIR gain_dB=-6 num=48>
      -7
      -21
      31
      48
      -67
      -106
      124
      164
      -275
      -334
      440
      552
      -694
      -872
      1069
      1351
      -1633
      -2111
      2541
      3477
      -4295
      -6877
      9433
      30825
      30825
      9433
      -6877
      -4295
      3477
      2541
      -2111
      -1633
      1351
      1069
      -872
      -694
      552
      440
      -334
      -275
      164
      124
      -106
      -67
      48
      31
      -21
      -7
      </filter>
    
      <lpbkAdcProfile num=42>
      243
      143
      181
      90
      1280
      485
      1275
      37
      1317
      23
      797
      35
      48
      48
      30
      174
      0
      0
      0
      0
      44
      0
      7
      6
      42
      0
      7
      6
      42
      0
      25
      27
      0
      0
      25
      27
      0
      0
      165
      44
      31
      905
      </lpbkAdcProfile>
     </lpbk>
    
     <tx name=Tx 200.00MHz, InputRate 245.76MHz, TotalInterpolation 8>
      <txChannels=TAL_TX1TX2>
      <dacDiv=1>
      <txFirInterpolation=1>
      <thb1Interpolation=2>
      <thb2Interpolation=2>
      <thb3Interpolation=2>
      <txInt5Interpolation=1>
      <txInputRate_kHz=245760>
      <primarySigBandwidth_Hz=75000000>
      <rfBandwidth_Hz=200000000>
      <txDac3dBCorner_kHz=200000>
      <txBbf3dBCorner_kHz=100000>
    
      <filter FIR gain_dB=0 numFirCoefs=20>
      33
      -77
      123
      -158
      171
      -112
      -155
      1040
      -3011
      20121
      -3011
      1040
      -155
      -112
      171
      -158
      123
      -77
      33
      0
      </filter>
     </tx>
    </profile>
    
    
    Error in adi.common.Attribute/setDeviceAttributeRAW (line 135)
                    cstatus(obj,status,['Attribute write failed for : ' attr ' with value ' value]);
    
    Error in adi.ADRV9009.Base/writeProfileFile (line 112)
                    obj.setDeviceAttributeRAW('profile_config',profle_data_str);
    
    Error in adi.ADRV9009.Tx/setupInit (line 183)
                    writeProfileFile(obj);
    
    Error in adi.common.RxTx/configureChanBuffers (line 214)
                setupInit(obj);
    
    Error in matlabshared.libiio.base/setupImpl
    
    Error in adi.common.RxTx/setupImpl (line 116)
                setupImpl@matlabshared.libiio.base(obj);
    
    Error in adi.common.Tx/setupImpl (line 23)
                setupImpl@adi.common.RxTx(obj);
    
    Error in adrv9009 (line 20)
    tx(y);
     

    Thank you, Leandro Jalil

  • Hello, there I solved it by changing the profile. Place the Tx_BW200_IR245p76_Rx_BW100_OR122p88_ORx_BW200_OR245p76_DC245p76.txt and followed suit. I wonder why I couldn't use the other profile that changes some parameters like the frequency of the device.

    I also created my own profile with the Talise_Configuration_wizard tool but when loading it the same thing happened to me as in the error message mentioned above.

    I leave below the profile that I want to upload. It should be noted that I want to inject a 125MHz external "ref_clk" signal and disable the PPL1 so that it does not take the VCXO which has an inconsistent oscillator for a 125MHz sample rate.

    <profile Talise version=1 name=Tx_BW20_IR125_Rx_BW50_OR125_ORx_BW5_OR125>
     <clocks>
      <deviceClock_kHz=125000>
      <clkPllVcoFreq_kHz=10000000>
      <clkPllHsDiv=2.5>
     </clocks>
    
     <rx name=Rx 50.00MHz, OutputRate 125.00MHz, TotalDecimation 16>
      <rxChannels=TAL_RX1RX2>
      <rxFirDecimation=2>
      <rxDec5Decimation=4>
      <rhb1Decimation=2>
      <rxOutputRate_kHz=125000>
      <rfBandwidth_Hz=50000000>
      <rxBbf3dBCorner_kHz=50000>
      <rxDdcMode=0>
    
      <rxNcoShifterCfg>
       <bandAInputBandWidth_kHz=0>
       <bandAInputCenterFreq_kHz=0>
       <bandANco1Freq_kHz=0>
       <bandANco2Freq_kHz=0>
       <bandBInputBandWidth_kHz=0>
       <bandBInputCenterFreq_kHz=0>
       <bandBNco1Freq_kHz=0>
       <bandBNco2Freq_kHz=0>
      </rxNcoShifterCfg>
    
      <filter FIR gain_dB=-6 numFirCoefs=72>
      -16
      59
      37
      30
      -30
      -85
      -113
      -56
      60
      191
      225
      116
      -124
      -354
      -417
      -203
      216
      620
      715
      351
      -364
      -1034
      -1198
      -594
      589
      1727
      2039
      1057
      -997
      -3135
      -3976
      -2397
      1818
      7709
      13413
      16914
      16914
      13413
      7709
      1818
      -2397
      -3976
      -3135
      -997
      1057
      2039
      1727
      589
      -594
      -1198
      -1034
      -364
      351
      715
      620
      216
      -203
      -417
      -354
      -124
      116
      225
      191
      60
      -56
      -113
      -85
      -30
      30
      37
      59
      -16
      </filter>
    
      <rxAdcProfile num=42>
      261
      144
      181
      90
      1280
      366
      1258
      27
      1280
      17
      731
      39
      48
      47
      28
      160
      0
      0
      0
      0
      40
      0
      7
      6
      42
      0
      7
      6
      42
      0
      25
      27
      0
      0
      25
      27
      0
      0
      165
      44
      31
      905
      </rxAdcProfile>
     </rx>
    
     <obsRx name=Rx 5.00MHz, OutputRate 125.00MHz, TotalDecimation 16>
      <obsRxChannelsEnable=TAL_ORX1ORX2>
      <enAdcStitching=0>
      <rxFirDecimation=2>
      <rxDec5Decimation=4>
      <rhb1Decimation=2>
      <orxOutputRate_kHz=125000>
      <rfBandwidth_Hz=5000000>
      <rxBbf3dBCorner_kHz=225000>
      <orxDdcMode=0>
    
      <filter FIR gain_dB=-12 numFirCoefs=72>
      133
      -61
      -60
      -113
      -150
      -225
      -284
      -373
      -443
      -531
      -592
      -656
      -682
      -695
      -656
      -588
      -457
      -281
      -36
      261
      629
      1049
      1531
      2056
      2625
      3216
      3828
      4435
      5031
      5593
      6112
      6568
      6952
      7249
      7453
      7556
      7556
      7453
      7249
      6952
      6568
      6112
      5593
      5031
      4435
      3828
      3216
      2625
      2056
      1531
      1049
      629
      261
      -36
      -281
      -457
      -588
      -656
      -695
      -682
      -656
      -592
      -531
      -443
      -373
      -284
      -225
      -150
      -113
      -60
      -61
      133
      </filter>
    
      <orxLowPassAdcProfile num=42>
      261
      144
      181
      90
      1280
      366
      1258
      27
      1280
      17
      731
      39
      48
      47
      28
      160
      0
      0
      0
      0
      40
      0
      7
      6
      42
      0
      7
      6
      42
      0
      25
      27
      0
      0
      25
      27
      0
      0
      165
      44
      31
      905
      </orxLowPassAdcProfile>
    
      <orxBandPassAdcProfile num=42>
      261
      144
      181
      90
      1280
      366
      1258
      27
      1280
      17
      731
      39
      48
      47
      28
      160
      0
      0
      0
      0
      40
      0
      7
      6
      42
      0
      7
      6
      42
      0
      25
      27
      0
      0
      25
      27
      0
      0
      165
      44
      31
      905
      </orxBandPassAdcProfile>
    
     </obsRx>
    
     <lpbk>
      <rxFirDecimation=2>
      <rhb1Decimation=2>
      <outputRate_kHz=125000>
      <rfBandwidth_Hz=5000000>
      <rxBbf3dBCorner_kHz=225000>
    
      <filter FIR gain_dB=-12 num=72>
      133
      -61
      -60
      -113
      -150
      -225
      -284
      -373
      -443
      -531
      -592
      -656
      -682
      -695
      -656
      -588
      -457
      -281
      -36
      261
      629
      1049
      1531
      2056
      2625
      3216
      3828
      4435
      5031
      5593
      6112
      6568
      6952
      7249
      7453
      7556
      7556
      7453
      7249
      6952
      6568
      6112
      5593
      5031
      4435
      3828
      3216
      2625
      2056
      1531
      1049
      629
      261
      -36
      -281
      -457
      -588
      -656
      -695
      -682
      -656
      -592
      -531
      -443
      -373
      -284
      -225
      -150
      -113
      -60
      -61
      133
      </filter>
    
      <lpbkAdcProfile num=42>
      261
      144
      181
      90
      1280
      366
      1258
      27
      1280
      17
      731
      39
      48
      47
      28
      160
      0
      0
      0
      0
      40
      0
      7
      6
      42
      0
      7
      6
      42
      0
      25
      27
      0
      0
      25
      27
      0
      0
      165
      44
      31
      905
      </lpbkAdcProfile>
     </lpbk>
    
     <tx name=Tx 20.00MHz, InputRate 125.00MHz, TotalInterpolation 16>
      <txChannels=TAL_TX1TX2>
      <dacDiv=1>
      <txFirInterpolation=2>
      <thb1Interpolation=2>
      <thb2Interpolation=2>
      <thb3Interpolation=2>
      <txInt5Interpolation=1>
      <txInputRate_kHz=125000>
      <primarySigBandwidth_Hz=5000000>
      <rfBandwidth_Hz=20000000>
      <txDac3dBCorner_kHz=187000>
      <txBbf3dBCorner_kHz=56000>
    
      <filter FIR gain_dB=-6 numFirCoefs=80>
      2
      3
      5
      5
      1
      -8
      -22
      -36
      -42
      -31
      3
      59
      124
      174
      176
      105
      -47
      -255
      -459
      -575
      -517
      -235
      252
      842
      1350
      1558
      1279
      439
      -865
      -2338
      -3523
      -3900
      -3017
      -634
      3175
      7985
      13081
      17594
      20700
      21807
      20700
      17594
      13081
      7985
      3175
      -634
      -3017
      -3900
      -3523
      -2338
      -865
      439
      1279
      1558
      1350
      842
      252
      -235
      -517
      -575
      -459
      -255
      -47
      105
      176
      174
      124
      59
      3
      -31
      -42
      -36
      -22
      -8
      1
      5
      5
      3
      2
      0
      </filter>
     </tx>
    </profile>

  • 0
    •  Analog Employees 
    on Apr 12, 2021 6:58 PM in reply to ljalil

    The profile assumes the clock chip has already been setup to generate the necessary references, and that the rate you want is provided to the transceiver already.

    Profiles only update the transceiver, no other components.

    -Travis

  • thanks travis for your prompt reply Greetings, Leandro