AnsweredAssumed Answered

ADRV9364 confusion setting up sampling rate

Question asked by SirJanA on Mar 12, 2018
Latest reply on Mar 13, 2018 by mhennerich

Hello, I am trying to set up the ADRV9364 sampling rate.  I am trying to set the board to have a 1 MHz sampling rate.  I used the AD9361 Filter Design Wizard and I get the following settings:

 

{1024000000, 16000000, 8000000, 4000000, 2000000, 1000000},// rx_path_clock_frequencies[6] ***adi,tx-path-clock-frequencies 
{1024000000, 16000000, 8000000, 4000000, 2000000, 1000000},// tx_path_clock_frequencies[6] *** adi,tx-path-clock-frequencies
800000,//rf_rx_bandwidth_hz *** adi,rf-rx-bandwidth-hz
800000,//rf_tx_bandwidth_hz *** adi,rf-tx-bandwidth-hz

 

(This is a low-pass filter with a decimation rate of 2)

AD9361_RXFIRConfig rx_fir_config = {
3, // rx
-6, // rx_gain
2, // rx_dec
{-38, -90, -114, -62, 31, 68, 9, -66, -45, 48,
80, -12, -99, -44, 92, 102, -49, -148, -25,
156, 118, -116, -199, 22, 243, 107, -219, -244,
119, 342, 52, -363, -255, 275, 440, -76, -542,
-207, 506, 508, -304, -744, -53, 825, 505,
-678, -950, 272, 1257, 364, -1286, -1139,
920, 1897, -76, -2430, -1293, 2469, 3261,
-1579 -6170 -1531, 12917, 26135, 26135,
12917, -1531, -6170, -1579, 3261, 2469, -1293,
-2430, -76, 1897, 920, -1139, -1286, 364,
1257, 272, -950, -678, 505, 825, -53, -744,
-304, 508, 506, -207, -542, -76, 440, 275,
-255, -363, 52, 342, 119, -244, -219, 107,
243, 22, -199, -116, 118, 156, -25, -148 -49,
102, 92, -44, -99, -12, 80, 48, -45, -66, 9,
68, 31, -62, -114, -90, -38}, // rx_coef[128]
128, // rx_coef_size
{0, 0, 0, 0, 0, 0}, //rx_path_clks[6]
0 // rx_bandwidth
};

 

I set the ADRV9364 to TDD mode and then:

 

if (!ad9361_phy->pdata->fdd) {
ad9361_set_en_state_machine_mode(ad9361_phy, ENSM_MODE_RX);
ad9361_get_en_state_machine_mode(ad9361_phy, &ensm_mode);
printf("SPI control - RX: %s\n",
ensm_mode == ENSM_MODE_RX ? "OK" : "Error");
mdelay(1000);
}

ad9361_trx_load_enable_fir(ad9361_phy,rx_fir_config,tx_fir_config);
ad9361_set_trx_fir_en_dis(ad9361_phy, ENABLE);
dac_init(ad9361_phy, DATA_SEL_DDS, 1);

ad9361_set_rx_gain_control_mode(ad9361_phy,RX1,RF_GAIN_MGC);
ad9361_set_rx_rf_gain(ad9361_phy,0,40);

 

When I run this with console commands, there are no errors.  This is the output:

 

adc_init: interface clock is (1 MHz).
ad9361_init : AD936x Rev 2 successfully initialized
SPI control - RX: OK

 

However, when I run the console command rx_samp_freq?, i get a sampling rate of 2 MHz.  Has the board been able to set the sampling rate successfully to 1 MHz?  

 

Note, when I try to set the sampling rate at 1 MHz manually via console commands, it gives me an error:

ad9361_calculate_rf_clock_chain: Failed to find suitable dividers: ADC clock below limit

 

Am I initializing the board properly?

 

Thank you.

Outcomes