From 2e4138d82a4ad33183a6cbff868b9e6c0d82f239 Mon Sep 17 00:00:00 2001 From: Tom Tsou Date: Tue, 30 Jun 2015 12:27:43 -0700 Subject: ad9361: Delay Tx Quad Cal from initialization to streamer start Patch addresses issue: #742 "tx_waveforms seems to produce unexpectedly large image" Tx Quad Cal performance is temporally dependent with better results when run after the AD9361 is configured for transmission than at initialization. This gets is roughly 5-10 dB of additional quadrature image suppression. Even better performance can be reached when Tx Quad Cal is run after streaming and the AD9361 is actively transmitting. Calibration in this state, however, requires user intervention by retuning the transmit chain by > 100 MHz. Total IQ suppression should be in the range of 40-50+ dBFS dependent on operating frequency. Signed-off-by: Tom Tsou --- host/lib/usrp/common/ad9361_driver/ad9361_device.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'host/lib') diff --git a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp index 0505343ab..c3bc2d32b 100644 --- a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp +++ b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp @@ -1717,7 +1717,6 @@ void ad9361_device_t::initialize() _calibrate_baseband_dc_offset(); _calibrate_rf_dc_offset(); - _calibrate_tx_quadrature(); _calibrate_rx_quadrature(); /* @@ -1855,7 +1854,6 @@ double ad9361_device_t::set_clock_rate(const double req_rate) _calibrate_baseband_dc_offset(); _calibrate_rf_dc_offset(); - _calibrate_tx_quadrature(); _calibrate_rx_quadrature(); /* @@ -1970,6 +1968,14 @@ void ad9361_device_t::set_active_chains(bool tx1, bool tx2, bool rx1, bool rx2) _io_iface->poke8(0x002, _regs.txfilt); _io_iface->poke8(0x003, _regs.rxfilt); + /* + * Last unconditional Tx calibration point. Any later Tx calibration will + * require user intervention (currently triggered by tuning difference that + * is > 100 MHz). Late calibration provides better performance. + */ + if (tx1 | tx2) + _calibrate_tx_quadrature(); + /* Put back into FDD state if necessary */ if (set_back_to_fdd) _io_iface->poke8(0x014, 0x21); -- cgit v1.2.3