AnsweredAssumed Answered

AD9361 RF DC offset calibration timeout

Question asked by joekoolade on Nov 24, 2014
Latest reply on Nov 26, 2014 by joekoolade


The RF DC offset calibration is timing out. This is happening in the ad9361_setup() function which is called when the driver is being installed. The register being monitored is 0x016, the calibration control register. It is waiting for the D1/[DC cal RF start] bit to clear. It timed out in about 5 seconds. I have increased the timeout to 10 seconds but that does not help. The debug messages from the driver loading are at the end of this message.  You will see this message before each calibration performed:

 

ad9361_run_calibration: calctrl=0 ensm state=5 config1=1 config2=4

 

Which is a dump of the registers 0x16, 0x17, 0x14, 0x15 in order.

 

I noticed in the log file that before the RF DC offset calibration is run, that the ensm state = 0x15. Why the calibration state be set 1 which means that calibrations are done? Is that indicative of a problem since two more calibrations need to be run?

 

thansk


[ 69.784484] ad9361 spi2.1: ad9361_probe : enter

[ 69.791778] ad9361 spi2.1: Registered external reference clock

[ 69.801025] ad9361 spi2.1: Allocated IIO device

[ 69.808410] ad9361 spi2.1: Setup default values

[ 69.815551] ad9361 spi2.1: ad9361_probe: getting product id

[ 69.824188] ad9361 spi2.1: AD9361 revision 0x2

[ 69.830993] ad9361 spi2.1: ad9361_rfpll_recalc_rate: Parent Rate 24000000 Hz

[ 69.838562] ad9361 spi2.1: ad9361_rfpll_recalc_rate: Parent Rate 24000000 Hz

[ 69.846862] ad9361 spi2.1: ad9361_setup

[ 69.851531] ad9361 spi2.1: ad9361_set_dcxo_tune : coarse 8 fine 5920

[ 69.859283] ad9361 spi2.1: ad9361_set_clk_scaler: source 0 multi 2 div 1

[ 69.867462] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 48000000 Hz Parent Rate 24000000 Hz

[ 69.876464] ad9361 spi2.1: ad9361_set_clk_scaler: source 0 multi 2 div 1

[ 69.884277] ad9361 spi2.1: ad9361_bbpll_set_rate: Rate 768000000 Hz Parent Rate 48000000 Hz

[ 69.893646] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 96000000 Hz Parent Rate 768000000 Hz

[ 69.903289] ad9361 spi2.1: ad9361_set_clk_scaler: source 4 multi 1 div 8

[ 69.911071] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 96000000 Hz Parent Rate 96000000 Hz

[ 69.920104] ad9361 spi2.1: ad9361_set_clk_scaler: source 9 multi 1 div 1

[ 69.927917] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 48000000 Hz Parent Rate 96000000 Hz

[ 69.936920] ad9361 spi2.1: ad9361_set_clk_scaler: source 10 multi 1 div 2

[ 69.944793] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 24000000 Hz Parent Rate 48000000 Hz

[ 69.953826] ad9361 spi2.1: ad9361_set_clk_scaler: source 11 multi 1 div 2

[ 69.961669] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 12000000 Hz Parent Rate 24000000 Hz

[ 69.970794] ad9361 spi2.1: ad9361_set_clk_scaler: source 12 multi 1 div 2

[ 69.978668] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 3000000 Hz Parent Rate 12000000 Hz

[ 69.987609] ad9361 spi2.1: ad9361_set_clk_scaler: source 13 multi 1 div 4

[ 69.995452] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 48000000 Hz Parent Rate 96000000 Hz

[ 70.004486] ad9361 spi2.1: ad9361_set_clk_scaler: source 5 multi 1 div 2

[ 70.012237] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 24000000 Hz Parent Rate 48000000 Hz

[ 70.021270] ad9361 spi2.1: ad9361_set_clk_scaler: source 6 multi 1 div 2

[ 70.029022] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 12000000 Hz Parent Rate 24000000 Hz

[ 70.038055] ad9361 spi2.1: ad9361_set_clk_scaler: source 7 multi 1 div 2

[ 70.045776] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 3000000 Hz Parent Rate 12000000 Hz

[ 70.054687] ad9361 spi2.1: ad9361_set_clk_scaler: source 8 multi 1 div 4

[ 70.062438] ad9361 spi2.1: ad9361_set_trx_clock_chain

[ 70.068389] ad9361 spi2.1: ad9361_set_clk_scaler: source 4 multi 1 div 32

[ 70.076446] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 24000000 Hz Parent Rate 768000000 Hz

[ 70.085510] ad9361 spi2.1: ad9361_set_clk_scaler: source 4 multi 1 div 32

[ 70.093353] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 24000000 Hz Parent Rate 24000000 Hz

[ 70.102386] ad9361 spi2.1: ad9361_set_clk_scaler: source 9 multi 1 div 1

[ 70.110107] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 12000000 Hz Parent Rate 24000000 Hz

[ 70.119110] ad9361 spi2.1: ad9361_set_clk_scaler: source 10 multi 1 div 2

[ 70.126983] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 6000000 Hz Parent Rate 12000000 Hz

[ 70.135925] ad9361 spi2.1: ad9361_set_clk_scaler: source 11 multi 1 div 2

[ 70.143737] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 3000000 Hz Parent Rate 6000000 Hz

[ 70.152557] ad9361 spi2.1: ad9361_set_clk_scaler: source 12 multi 1 div 2

[ 70.160369] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 3000000 Hz Parent Rate 3000000 Hz

[ 70.169189] ad9361 spi2.1: ad9361_set_clk_scaler: source 13 multi 1 div 1

[ 70.176605] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 12000000 Hz Parent Rate 24000000 Hz

[ 70.186004] ad9361 spi2.1: ad9361_set_clk_scaler: source 5 multi 1 div 2

[ 70.193756] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 6000000 Hz Parent Rate 12000000 Hz

[ 70.202697] ad9361 spi2.1: ad9361_set_clk_scaler: source 6 multi 1 div 2

[ 70.210418] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 3000000 Hz Parent Rate 6000000 Hz

[ 70.219268] ad9361 spi2.1: ad9361_set_clk_scaler: source 7 multi 1 div 2

[ 70.226989] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 3000000 Hz Parent Rate 3000000 Hz

[ 70.235809] ad9361 spi2.1: ad9361_set_clk_scaler: source 8 multi 1 div 1

[ 70.243957] ad9361 spi2.1: ad9361_clk_factor_round_rate: divide by zero because rate=0

[ 70.252166] ad9361 spi2.1: ad9361_set_clk_scaler: source 9 multi 1 div 1

[ 70.261962] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 24000000 Hz Parent Rate 24000000 Hz

[ 70.271057] ad9361 spi2.1: ad9361_set_clk_scaler: source 9 multi 1 div 1

[ 70.278381] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 12000000 Hz Parent Rate 24000000 Hz

[ 70.288085] ad9361 spi2.1: ad9361_set_clk_scaler: source 10 multi 1 div 2

[ 70.296081] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 6000000 Hz Parent Rate 12000000 Hz

[ 70.305023] ad9361 spi2.1: ad9361_set_clk_scaler: source 11 multi 1 div 2

[ 70.312927] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 3000000 Hz Parent Rate 6000000 Hz

[ 70.321746] ad9361 spi2.1: ad9361_set_clk_scaler: source 12 multi 1 div 2

[ 70.329589] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 3000000 Hz Parent Rate 3000000 Hz

[ 70.338470] ad9361 spi2.1: ad9361_set_clk_scaler: source 13 multi 1 div 1

[ 70.346710] ad9361 spi2.1: ad9361_set_clk_scaler: source 5 multi 1 div 1

[ 70.354248] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 24000000 Hz Parent Rate 24000000 Hz

[ 70.363281] ad9361 spi2.1: ad9361_set_clk_scaler: source 5 multi 1 div 1

[ 70.371032] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 12000000 Hz Parent Rate 24000000 Hz

[ 70.380035] ad9361 spi2.1: ad9361_set_clk_scaler: source 6 multi 1 div 2

[ 70.387359] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 6000000 Hz Parent Rate 12000000 Hz

[ 70.396667] ad9361 spi2.1: ad9361_set_clk_scaler: source 7 multi 1 div 2

[ 70.404449] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 6000000 Hz Parent Rate 6000000 Hz

[ 70.413299] ad9361 spi2.1: ad9361_set_clk_scaler: source 8 multi 1 div 1

[ 70.421417] ad9361 spi2.1: ad9361_clk_factor_round_rate: divide by zero because rate=0

[ 70.429626] ad9361 spi2.1: ad9361_set_clk_scaler: source 10 multi 1 div 1

[ 70.439392] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 24000000 Hz Parent Rate 24000000 Hz

[ 70.448516] ad9361 spi2.1: ad9361_set_clk_scaler: source 10 multi 1 div 1

[ 70.456695] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 12000000 Hz Parent Rate 24000000 Hz

[ 70.465728] ad9361 spi2.1: ad9361_set_clk_scaler: source 11 multi 1 div 2

[ 70.473724] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 6000000 Hz Parent Rate 12000000 Hz

[ 70.482727] ad9361 spi2.1: ad9361_set_clk_scaler: source 12 multi 1 div 2

[ 70.490692] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 6000000 Hz Parent Rate 6000000 Hz

[ 70.499572] ad9361 spi2.1: ad9361_set_clk_scaler: source 13 multi 1 div 1

[ 70.507873] ad9361 spi2.1: ad9361_set_clk_scaler: source 6 multi 1 div 1

[ 70.515380] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 24000000 Hz Parent Rate 24000000 Hz

[ 70.524383] ad9361 spi2.1: ad9361_set_clk_scaler: source 6 multi 1 div 1

[ 70.532165] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 12000000 Hz Parent Rate 24000000 Hz

[ 70.541198] ad9361 spi2.1: ad9361_set_clk_scaler: source 7 multi 1 div 2

[ 70.548950] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 12000000 Hz Parent Rate 12000000 Hz

[ 70.557983] ad9361 spi2.1: ad9361_set_clk_scaler: source 8 multi 1 div 1

[ 70.566162] ad9361 spi2.1: ad9361_clk_factor_round_rate: divide by zero because rate=0

[ 70.574371] ad9361 spi2.1: ad9361_set_clk_scaler: source 11 multi 1 div 1

[ 70.584320] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 24000000 Hz Parent Rate 24000000 Hz

[ 70.593383] ad9361 spi2.1: ad9361_set_clk_scaler: source 11 multi 1 div 1

[ 70.601531] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 12000000 Hz Parent Rate 24000000 Hz

[ 70.610626] ad9361 spi2.1: ad9361_set_clk_scaler: source 12 multi 1 div 2

[ 70.618621] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 12000000 Hz Parent Rate 12000000 Hz

[ 70.627655] ad9361 spi2.1: ad9361_set_clk_scaler: source 13 multi 1 div 1

[ 70.635955] ad9361 spi2.1: ad9361_set_clk_scaler: source 7 multi 1 div 1

[ 70.643432] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 24000000 Hz Parent Rate 24000000 Hz

[ 70.652465] ad9361 spi2.1: ad9361_set_clk_scaler: source 7 multi 1 div 1

[ 70.660247] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 24000000 Hz Parent Rate 24000000 Hz

[ 70.669342] ad9361 spi2.1: ad9361_set_clk_scaler: source 8 multi 1 div 1

[ 70.677551] ad9361 spi2.1: ad9361_clk_factor_round_rate: divide by zero because rate=0

[ 70.685729] ad9361 spi2.1: ad9361_set_clk_scaler: source 12 multi 1 div 1

[ 70.695190] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 24000000 Hz Parent Rate 24000000 Hz

[ 70.704254] ad9361 spi2.1: ad9361_set_clk_scaler: source 12 multi 1 div 1

[ 70.712341] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 24000000 Hz Parent Rate 24000000 Hz

[ 70.721435] ad9361 spi2.1: ad9361_set_clk_scaler: source 13 multi 1 div 1

[ 70.730133] ad9361 spi2.1: ad9361_clk_factor_round_rate: divide by zero because rate=0

[ 70.738311] ad9361 spi2.1: ad9361_set_clk_scaler: source 13 multi 1 div 1

[ 70.748077] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 24000000 Hz Parent Rate 24000000 Hz

[ 70.757141] ad9361 spi2.1: ad9361_set_clk_scaler: source 13 multi 1 div 1

[ 70.766906] ad9361 spi2.1: ad9361_rssi_setup

[ 70.772399] ad9361 spi2.1: ad9361_auxadc_setup

[ 70.777496] ad9361 spi2.1: ad9361_rf_port_setup : INPUT_SELECT 0x43

[ 70.784851] ad9361 spi2.1: ad9361_pp_port_setup

[ 70.790283] ad9361 spi2.1: ad9361_auxdac_setup

[ 70.795318] ad9361 spi2.1: ad9361_auxdac_set DAC1 = 0 mV

[ 70.801086] ad9361 spi2.1: ad9361_auxdac_set DAC2 = 0 mV

[ 70.807861] ad9361 spi2.1: ad9361_auxadc_setup

[ 70.813049] ad9361 spi2.1: ad9361_ctrl_outs_setup

[ 70.818389] ad9361 spi2.1: ad9361_gpo_setup

[ 70.823120] ad9361 spi2.1: ad9361_set_ref_clk_cycles : ref_clk_hz 24000000

[ 70.831054] ad9361 spi2.1: ad9361_rfpll_recalc_rate: Parent Rate 24000000 Hz

[ 70.838897] ad9361 spi2.1: ad9361_set_clk_scaler: source 1 multi 2 div 1

[ 70.846527] ad9361 spi2.1: ad9361_rfpll_recalc_rate: Parent Rate 48000000 Hz

[ 70.853942] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 48000000 Hz Parent Rate 24000000 Hz

[ 70.863403] ad9361 spi2.1: ad9361_set_clk_scaler: source 1 multi 2 div 1

[ 70.871246] ad9361 spi2.1: ad9361_rfpll_set_rate: Rate 0 Hz Parent Rate 48000000 Hz

[ 70.879180] ad9361 spi2.1: ad9361_fastlock_prepare: RX Profile 0: Un-Prepare

[ 70.886901] ad9361 spi2.1: ad9361_rfpll_recalc_rate: Parent Rate 48000000 Hz

[ 70.894744] ad9361 spi2.1: ad9361_rfpll_recalc_rate: Parent Rate 24000000 Hz

[ 70.902557] ad9361 spi2.1: ad9361_set_clk_scaler: source 2 multi 2 div 1

[ 70.910186] ad9361 spi2.1: ad9361_rfpll_recalc_rate: Parent Rate 48000000 Hz

[ 70.917572] ad9361 spi2.1: ad9361_clk_factor_set_rate: Rate 48000000 Hz Parent Rate 24000000 Hz

[ 70.927062] ad9361 spi2.1: ad9361_set_clk_scaler: source 2 multi 2 div 1

[ 70.934448] ad9361 spi2.1: ad9361_rfpll_set_rate: Rate 0 Hz Parent Rate 48000000 Hz

[ 70.942840] ad9361 spi2.1: ad9361_fastlock_prepare: TX Profile 0: Un-Prepare

[ 70.950225] ad9361 spi2.1: ad9361_rfpll_recalc_rate: Parent Rate 48000000 Hz

[ 70.958221] ad9361 spi2.1: ad9361_txrx_synth_cp_calib : ref_clk_hz 48000000 : is_tx 0

[ 70.967529] ad9361 spi2.1: ad9361_txrx_synth_cp_calib : ref_clk_hz 48000000 : is_tx 1

[ 70.977111] ad9361 spi2.1: ad9361_rfpll_recalc_rate: Parent Rate 48000000 Hz

[ 70.985046] ad9361 spi2.1: ad9361_rfpll_set_rate: Rate 768000000 Hz Parent Rate 48000000 Hz

[ 70.994201] ad9361 spi2.1: ad9361_fastlock_prepare: RX Profile 0: Un-Prepare

[ 71.001922] ad9361 spi2.1: ad9361_rfpll_vco_init : vco_freq 6144000000 : ref_clk 48000000 : range 0

[ 71.011718] ad9361 spi2.1: ad9361_rfpll_vco_init : freq 6128 MHz : index 49

[ 71.019775] ad9361 spi2.1: ad9361_load_gt: frequency 1536000000

[ 71.026306] ad9361 spi2.1: ad9361_load_gt: frequency 1536000000 (band 1)

[ 71.041809] ad9361 spi2.1: ad9361_rfpll_recalc_rate: Parent Rate 48000000 Hz

[ 71.049682] ad9361 spi2.1: ad9361_rfpll_recalc_rate: Parent Rate 48000000 Hz

[ 71.057525] ad9361 spi2.1: ad9361_rfpll_set_rate: Rate 816000000 Hz Parent Rate 48000000 Hz

[ 71.066619] ad9361 spi2.1: ad9361_fastlock_prepare: TX Profile 0: Un-Prepare

[ 71.074340] ad9361 spi2.1: ad9361_rfpll_vco_init : vco_freq 6528000000 : ref_clk 48000000 : range 0

[ 71.084106] ad9361 spi2.1: ad9361_rfpll_vco_init : freq 6482 MHz : index 42

[ 71.092559] ad9361 spi2.1: ad9361_rfpll_recalc_rate: Parent Rate 48000000 Hz

[ 71.100402] ad9361 spi2.1: ad9361_load_mixer_gm_subtable

[ 71.109436] ad9361 spi2.1: ad9361_gc_setup

[ 71.117401] ad9361 spi2.1: ad9361_rx_bb_analog_filter_calib : rx_bb_bw 1000000 bbpll_freq 768000000

[ 71.127593] ad9361 spi2.1: ad9361_run_calibration: calctrl=0 ensm state=5 config1=1 config2=4

[ 71.137237] ad9361 spi2.1: ad9361_run_calibration: CAL Mask 0x80

[ 71.143554] ad9361 spi2.1: ad9361_tx_bb_analog_filter_calib : tx_bb_bw 400000 bbpll_freq 768000000

[ 71.153594] ad9361 spi2.1: ad9361_run_calibration: calctrl=0 ensm state=5 config1=1 config2=4

[ 71.163177] ad9361 spi2.1: ad9361_run_calibration: CAL Mask 0x40

[ 71.169525] ad9361 spi2.1: ad9361_rx_tia_calib : bb_bw_Hz 1000000

[ 71.176086] ad9361 spi2.1: ad9361_tx_bb_second_filter_calib : tx_rf_bw 800000

[ 71.184631] ad9361 spi2.1: ad9361_rx_adc_setup : BBBW 992085 : ADCfreq 24000000

[ 71.192657] ad9361 spi2.1: c3_msb 0x9 : c3_lsb 0x1 : r2346 0x4 :

[ 71.199127] ad9361 spi2.1: invrc_tconst_1e6 1015697, sqrt_inv_rc_tconst_1e3 1007

[ 71.207611] ad9361 spi2.1: scaled_adc_clk_1e6 37500, inv_scaled_adc_clk_1e3 26667

[ 71.215759] ad9361 spi2.1: tmp_1e3 1113, sqrt_term_1e3 193, min_sqrt_term_1e3 387

[ 71.225006] ad9361 spi2.1: ad9361_bb_dc_offset_calib

[ 71.230255] ad9361 spi2.1: ad9361_run_calibration: calctrl=0 ensm state=5 config1=1 config2=4

[ 71.239837] ad9361 spi2.1: ad9361_run_calibration: CAL Mask 0x1

[ 71.257629] ad9361 spi2.1: ad9361_rfpll_recalc_rate: Parent Rate 48000000 Hz

[ 71.265502] ad9361 spi2.1: ad9361_rf_dc_offset_calib : rx_freq 1536000000

[ 71.273254] ad9361 spi2.1: ad9361_run_calibration: calctrl=0 ensm state=15 config1=1 config2=4

[ 71.282958] ad9361 spi2.1: ad9361_run_calibration: CAL Mask 0x2

[ 77.209136] ad9361 spi2.1: Calibration TIMEOUT (0x16, 0x2)

[ 77.215698] ad9361 spi2.1: ad9361_tx_quad_calib : bw 400000 clkrf 24000000 clktf 24000000

[ 77.227142] ad9361 spi2.1: Tx NCO frequency: 750000 (BW/4: 100000) txnco_word 0

[ 77.236328] ad9361 spi2.1: ad9361_run_calibration: calctrl=2 ensm state=33 config1=1 config2=4

[ 77.245910] ad9361 spi2.1: ad9361_run_calibration: CAL Mask 0x10

[ 77.252136] ad9361 spi2.1: ad9361_tracking_control : bbdc_track=1, rfdc_track=1, rxquad_track=1

[ 77.261779] ad9361 spi2.1: ad9361_pp_port_setup

[ 77.267181] ad9361 spi2.1: ad9361_set_tx_atten : attenuation 10000 mdB tx1=1 tx2=1

[ 77.275695] ad9361 spi2.1: ad9361_rssi_setup

[ 77.281250] ad9361 spi2.1: ad9361_txmon_setup

[ 77.286041] ad9361 spi2.1: Device is in 5 state, moving to A state

[ 77.298339] ad9361 spi2.1: ad9361_register_axi_converter

[ 77.305572] ad9361 spi2.1: ad9361_probe : AD9361 Rev 2 successfully initialized

Outcomes