From 4cbd29e5474d7a355e97cf9a1e436ab77f627037 Mon Sep 17 00:00:00 2001 From: Jon Szymaniak Date: Thu, 29 Jan 2015 16:03:54 -0500 Subject: [PATCH] libbladeRF: Load LMS DC cal registers every time init_device() is called Addresses issue #370. The LMS calibration registers must be loaded each time init_device() is called, as opposed to only during the post-FPGA load init, because the the user may have updated his or her calibration table since then. --- host/libraries/libbladeRF/src/bladerf_priv.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/host/libraries/libbladeRF/src/bladerf_priv.c b/host/libraries/libbladeRF/src/bladerf_priv.c index cda2dc8e1..cacb33e25 100644 --- a/host/libraries/libbladeRF/src/bladerf_priv.c +++ b/host/libraries/libbladeRF/src/bladerf_priv.c @@ -240,11 +240,17 @@ int init_device(struct bladerf *dev) return status; } - /* Set up LMS DC offset register calibration and initial IQ settings, - * if any tables have been loaded already */ - status = apply_lms_dc_cals(dev); } + /* Set up LMS DC offset register calibration and initial IQ settings, + * if any tables have been loaded already. + * + * This is done every time the device is opened (with an FPGA loaded), + * as the user may change/update DC calibration tables without reloading the + * FPGA. + */ + status = apply_lms_dc_cals(dev); + return status; }