aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/db_xcvr2450.cpp
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2012-12-18 14:33:43 -0800
committerNicholas Corgan <nick.corgan@ettus.com>2012-12-18 14:33:43 -0800
commit0a9a002b60a367a6a52b22b967761ecdf706dde4 (patch)
tree712fb366dd6059ce927ca1fef86c0d140e89569f /host/lib/usrp/dboard/db_xcvr2450.cpp
parentcbac62b5175cea0e6fc990ab43f9219cc0cb5657 (diff)
parent8b4cc038e3ec1234522b53379fea68f8eceb3ace (diff)
downloaduhd-0a9a002b60a367a6a52b22b967761ecdf706dde4.tar.gz
uhd-0a9a002b60a367a6a52b22b967761ecdf706dde4.tar.bz2
uhd-0a9a002b60a367a6a52b22b967761ecdf706dde4.zip
Merge branch 'maint34' into maint
Diffstat (limited to 'host/lib/usrp/dboard/db_xcvr2450.cpp')
-rw-r--r--host/lib/usrp/dboard/db_xcvr2450.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/host/lib/usrp/dboard/db_xcvr2450.cpp b/host/lib/usrp/dboard/db_xcvr2450.cpp
index 348195a6e..50c67991a 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->get_iface()->set_clock_rate(dboard_iface::UNIT_TX, ref_freq/_ad9515div);
+ }
+ else
+ {
+ this->get_iface()->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;