ad9361 filter wizard

Hello all,

We are using picozed and our application is for narrow band signals. Our application needs a sampling rate of 532800 sps. we used the MATLAB filter wizard (16.1.3) to get the various clock rates. We changed the values in "default_init_param" from:

/* Rate & BW Control */

// {983040000, 245760000, 122880000, 61440000, 30720000, 30720000},//uint32_t rx_path_clock_frequencies[6] *** adi,rx-path-clock-frequencies

// {983040000, 122880000, 122880000, 61440000, 30720000, 30720000},//uint32_t tx_path_clock_frequencies[6] *** adi,tx-path-clock-frequencies

// 18000000,//rf_rx_bandwidth_hz *** adi,rf-rx-bandwidth-hz

// 18000000,//rf_tx_bandwidth_hz *** adi,rf-tx-bandwidth-hz

To

{818380800, 25574400, 8524800, 4262400, 2131200, 532800},//uint32_t rx_path_clock_frequencies[6] *** adi,rx-path-clock-frequencies

{818380800, 25574400, 8524800, 4262400, 2131200, 532800},//uint32_t tx_path_clock_frequencies[6] *** adi,tx-path-clock-frequencies

200000,//rf_rx_bandwidth_hz *** adi,rf-rx-bandwidth-hz

200000,//rf_tx_bandwidth_hz *** adi,rf-tx-bandwidth-hz

But when we use the console to read the sampling frequency "rx_samp_freq?", we get 2131200 instead of 532800?!

Are we making a mistake mapping the filter wizard values to this array?

we tried committing out:

ad9361_set_tx_fir_config(ad9361_phy, tx_fir_config);

ad9361_set_rx_fir_config(ad9361_phy, rx_fir_config);

we also tried

double param[5] = {532800, 0, 0, 0, 0};

set_tx_samp_freq(param, 1);

set_rx_samp_freq(param, 1);

We also tried keeping the bandwidth to 18000000

an non helped.

btw: we receive the signal correctly but with wrong sampling rate (4 times what we expected)

We are using the example project from GitHub for adc_capture()

Regards,

Murad

 

Parents
  • +1
    •  Analog Employees 
    on Dec 18, 2018 1:06 AM in reply to DrMurad

    To go below 2.08MHz you have to load an FIR filter. The filter wizard will generate the filter structures for you with the  "Coefficients to no-os" button.

    -Travis

  • 2.08 MHz as a data rate?...I thought the minimum is 25MHz/48 = 520.8 KHz!?...The "Coefficients to no-os" is disabled on the GUI...Do I have to connect to a board to enable it?

  • Got the "no-os" enabled and replaced the code with the following...but still wrong rx_samp_freq

    AD9361_RXFIRConfig rx_fir_config = {

    3, // rx

    -12, // rx_gain

    4, // rx_dec

    {21,13,5,-34,-100,-204,-332,-469,-585,-648,-631,-520,-322,-71,184,382,471,420,238,-32,-312,-518,-578,-459,-179,188,534,745,737,488,52,-451,-865,-1043,-901,-446,210,876,1335,1409,1026,255,-702,-1553,-2003,-1846,-1048,223,1619,2697,3044,2414,831,-1374,-3605,-5127,-5243,-3487,232,5560,11737,17741,22501,25131,25131,22501,17741,11737,5560,232,-3487,-5243,-5127,-3605,-1374,831,2414,3044,2697,1619,223,-1048,-1846,-2003,-1553,-702,255,1026,1409,1335,876,210,-446,-901,-1043,-865,-451,52,488,737,745,534,188,-179,-459,-578,-518,-312,-32,238,420,471,382,184,-71,-322,-520,-631,-648,-585,-469,-332,-204,-100,-34,5,13,21}, // rx_coef[128]

    128, // rx_coef_size

    {818380800,25574400,8524800,4262400,2131200,532800}, // rx_path_clks[6]

    444739 // rx_bandwidth

    };

    AD9361_TXFIRConfig tx_fir_config = {

    3, // tx

    0, // tx_gain

    4, // tx_int

    {3,-20,-54,-120,-215,-339,-474,-599,-684,-701,-629,-467,-232,36,281,448,492,398,185,-94,-361,-535,-557,-405,-112,245,558,725,676,406,-24,-494,-855,-980,-802,-344,280,886,1275,1294,893,148,-741,-1502,-1871,-1672,-890,306,1585,2542,2807,2171,670,-1375,-3413,-4770,-4819,-3144,322,5247,10930,16439,20798,23204,23204,20798,16439,10930,5247,322,-3144,-4819,-4770,-3413,-1375,670,2171,2807,2542,1585,306,-890,-1672,-1871,-1502,-741,148,893,1294,1275,886,280,-344,-802,-980,-855,-494,-24,406,676,725,558,245,-112,-405,-557,-535,-361,-94,185,398,492,448,281,36,-232,-467,-629,-701,-684,-599,-474,-339,-215,-120,-54,-20,3}, // tx_coef[128]

    128, // tx_coef_size

    {818380800,25574400,8524800,4262400,2131200,532800}, // tx_path_clks[6]

    1253912 // tx_bandwidth

    };

  • 0
    •  Analog Employees 
    on Dec 18, 2018 6:22 PM in reply to DrMurad

    Are you enabling the filters? ad9361_set_trx_fir_en_dis will be the function call you want to use.

    -Travis

Reply Children