From ed1afe02d02b6bb8fe760807bfc96e15108f10de Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 4 Dec 2012 15:41:24 -0800 Subject: xcvr2450: created xcvr2450 r21 that uses external divider --- host/lib/usrp/dboard/db_xcvr2450.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/host/lib/usrp/dboard/db_xcvr2450.cpp b/host/lib/usrp/dboard/db_xcvr2450.cpp index 439e1b35e..af5af6894 100644 --- a/host/lib/usrp/dboard/db_xcvr2450.cpp +++ b/host/lib/usrp/dboard/db_xcvr2450.cpp @@ -190,6 +190,7 @@ static dboard_base::sptr make_xcvr2450(dboard_base::ctor_args_t args){ UHD_STATIC_BLOCK(reg_xcvr2450_dboard){ //register the factory function for the rx and tx dbids dboard_manager::register_dboard(0x0061, 0x0060, &make_xcvr2450, "XCVR2450"); + dboard_manager::register_dboard(0x0061, 0x0059, &make_xcvr2450, "XCVR2450 - r2.1"); } /*********************************************************************** @@ -370,7 +371,7 @@ double xcvr2450::set_lo_freq_core(double target_freq){ //variables used in the calculation below double scaler = xcvr2450::is_highband(target_freq)? (4.0/5.0) : (4.0/3.0); - double ref_freq = this->get_iface()->get_clock_rate(dboard_iface::UNIT_TX); + double ref_freq = this->get_iface()->get_codec_rate(dboard_iface::UNIT_TX); int R, intdiv, fracdiv; //loop through values until we get a match @@ -410,6 +411,16 @@ double xcvr2450::set_lo_freq_core(double target_freq){ //new band select settings and ad9515 divider this->update_atr(); + const bool div_ext(this->get_tx_id == 0x0059); + if (div_ext) + { + this->set_clock_rate(dboard_iface::UNIT_TX, ref_freq/_ad9515div); + } + else + { + this->set_clock_rate(dboard_iface::UNIT_TX, ref_freq); + } + //load new counters into registers _max2829_regs.int_div_ratio_word = intdiv; _max2829_regs.frac_div_ratio_lsb = fracdiv & 0x3; -- cgit v1.2.3 From 7a062c3822d247b76ee85da122c442afce27205b Mon Sep 17 00:00:00 2001 From: Nick Foster Date: Tue, 4 Dec 2012 15:47:23 -0800 Subject: Fix syntax in XCVR driver. --- host/lib/usrp/dboard/db_xcvr2450.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/host/lib/usrp/dboard/db_xcvr2450.cpp b/host/lib/usrp/dboard/db_xcvr2450.cpp index af5af6894..108a85161 100644 --- a/host/lib/usrp/dboard/db_xcvr2450.cpp +++ b/host/lib/usrp/dboard/db_xcvr2450.cpp @@ -411,14 +411,14 @@ double xcvr2450::set_lo_freq_core(double target_freq){ //new band select settings and ad9515 divider this->update_atr(); - const bool div_ext(this->get_tx_id == 0x0059); + const bool div_ext(this->get_tx_id() == 0x0059); if (div_ext) { - this->set_clock_rate(dboard_iface::UNIT_TX, ref_freq/_ad9515div); + this->get_iface()->set_clock_rate(dboard_iface::UNIT_TX, ref_freq/_ad9515div); } else { - this->set_clock_rate(dboard_iface::UNIT_TX, ref_freq); + this->get_iface()->set_clock_rate(dboard_iface::UNIT_TX, ref_freq); } //load new counters into registers -- cgit v1.2.3