From 2bb08f3f70cdf8c7184f4f6b5dcf03b3b20449d5 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 21 Nov 2011 16:21:03 -0800 Subject: dbsrx: set initial freq and bw filter after clocks enabled --- host/lib/usrp/dboard/db_dbsrx.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'host/lib/usrp') diff --git a/host/lib/usrp/dboard/db_dbsrx.cpp b/host/lib/usrp/dboard/db_dbsrx.cpp index 7a90467ef..ff4bce20d 100644 --- a/host/lib/usrp/dboard/db_dbsrx.cpp +++ b/host/lib/usrp/dboard/db_dbsrx.cpp @@ -210,8 +210,7 @@ dbsrx::dbsrx(ctor_args_t args) : rx_dboard_base(args){ .set(dbsrx_gain_ranges[name]); } this->get_rx_subtree()->create("freq/value") - .coerce(boost::bind(&dbsrx::set_lo_freq, this, _1)) - .set(dbsrx_freq_range.start()); + .coerce(boost::bind(&dbsrx::set_lo_freq, this, _1)); this->get_rx_subtree()->create("freq/range") .set(dbsrx_freq_range); this->get_rx_subtree()->create("antenna/value") @@ -225,8 +224,7 @@ dbsrx::dbsrx(ctor_args_t args) : rx_dboard_base(args){ this->get_rx_subtree()->create("use_lo_offset") .set(false); this->get_rx_subtree()->create("bandwidth/value") - .coerce(boost::bind(&dbsrx::set_bandwidth, this, _1)) - .set(2.0*_bandwidth); //_bandwidth in lowpass, convert to complex bandpass + .coerce(boost::bind(&dbsrx::set_bandwidth, this, _1)); this->get_rx_subtree()->create("bandwidth/range") .set(dbsrx_bandwidth_range); @@ -241,6 +239,12 @@ dbsrx::dbsrx(ctor_args_t args) : rx_dboard_base(args){ else{ this->get_iface()->set_gpio_ddr(dboard_iface::UNIT_RX, 0x0); // All Inputs } + + //now its safe to set inital freq and bw + this->get_rx_subtree()->access("freq/value") + .set(dbsrx_freq_range.start()); + this->get_rx_subtree()->access("bandwidth/value") + .set(2.0*_bandwidth); //_bandwidth in lowpass, convert to complex bandpass } dbsrx::~dbsrx(void){ -- cgit v1.2.3