diff options
author | michael-west <michael.west@ettus.com> | 2014-05-13 16:09:13 -0700 |
---|---|---|
committer | michael-west <michael.west@ettus.com> | 2014-05-13 16:09:13 -0700 |
commit | 01e5d630d9d5525b46d2814808a974084f1e13fb (patch) | |
tree | 38158dc3c8144011917e06a0f8a719452ee4c096 /host | |
parent | 0e51394db05b3e66ed5f7335eff363d658b3f47c (diff) | |
download | uhd-01e5d630d9d5525b46d2814808a974084f1e13fb.tar.gz uhd-01e5d630d9d5525b46d2814808a974084f1e13fb.tar.bz2 uhd-01e5d630d9d5525b46d2814808a974084f1e13fb.zip |
Fix for BUG 473: UHD: DBSRX2 VCO Autoselect Failing / Wrong Frequency Range
- Corrected frequency range for DBSRX2
- Corrected register write order when changing frequency
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/usrp/dboard/db_dbsrx2.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/host/lib/usrp/dboard/db_dbsrx2.cpp b/host/lib/usrp/dboard/db_dbsrx2.cpp index 8a8f61a69..d4d1e8de1 100644 --- a/host/lib/usrp/dboard/db_dbsrx2.cpp +++ b/host/lib/usrp/dboard/db_dbsrx2.cpp @@ -40,7 +40,7 @@ using namespace boost::assign; /*********************************************************************** * The DBSRX2 constants **********************************************************************/ -static const freq_range_t dbsrx2_freq_range(0.8e9, 2.4e9); +static const freq_range_t dbsrx2_freq_range(0.8e9, 2.3e9); //Multiplied by 2.0 for conversion to complex bandpass from lowpass static const freq_range_t dbsrx2_bandwidth_range(2.0*4.0e6, 2.0*40.0e6); @@ -245,7 +245,7 @@ double dbsrx2::set_lo_freq(double target_freq){ //target_freq = dbsrx2_freq_range.clip(target_freq); //variables used in the calculation below - int scaler = target_freq > 1125e6 ? 2 : 4; + int scaler = target_freq >= 1125e6 ? 2 : 4; double ref_freq = this->get_iface()->get_clock_rate(dboard_iface::UNIT_RX); int R, intdiv, fracdiv, ext_div; double N; @@ -280,7 +280,8 @@ double dbsrx2::set_lo_freq(double target_freq){ << std::endl; //send the registers - send_reg(0x0, 0x7); + send_reg(0x5, 0x7); + send_reg(0x0, 0x4); //FIXME: probably unnecessary to call get_locked here //get_locked(); |