diff options
author | Josh Blum <josh@joshknows.com> | 2011-04-01 10:40:16 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-04-01 10:40:16 -0700 |
commit | daf91c0a8877909a7100c2ed0274ef3002de0725 (patch) | |
tree | 28103ab930583cd75335bfdabf448b757189d332 /host | |
parent | 70e014dffed8dde8de838dc99e70fc482f87fbb8 (diff) | |
parent | f64dad9d95550aaf8ed56ab4f107b2e7632921eb (diff) | |
download | uhd-daf91c0a8877909a7100c2ed0274ef3002de0725.tar.gz uhd-daf91c0a8877909a7100c2ed0274ef3002de0725.tar.bz2 uhd-daf91c0a8877909a7100c2ed0274ef3002de0725.zip |
Merge branch 'rfx400_tx'
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/usrp/dboard/db_rfx.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/host/lib/usrp/dboard/db_rfx.cpp b/host/lib/usrp/dboard/db_rfx.cpp index 4d8222a52..725b5cc03 100644 --- a/host/lib/usrp/dboard/db_rfx.cpp +++ b/host/lib/usrp/dboard/db_rfx.cpp @@ -294,6 +294,9 @@ double rfx_xcvr::set_lo_freq( target_freq = _freq_range.clip(target_freq); if (_div2[unit]) target_freq *= 2; + //rfx400 rx is a special case with div2 in mixer, so adf4360 must output fundamental + bool is_rx_rfx400 = ((get_rx_id() == 0x0024) && unit != dboard_iface::UNIT_TX); + //map prescalers to the register enums static const uhd::dict<int, adf4360_regs_t::prescaler_value_t> prescaler_to_enum = map_list_of (8, adf4360_regs_t::PRESCALER_VALUE_8_9) @@ -341,8 +344,8 @@ double rfx_xcvr::set_lo_freq( } done_loop: if (rfx_debug) std::cerr << boost::format( - "RFX tune: R=%d, BS=%d, P=%d, B=%d, A=%d" - ) % R % BS % P % B % A << std::endl; + "RFX tune: R=%d, BS=%d, P=%d, B=%d, A=%d, DIV2=%d" + ) % R % BS % P % B % A % int(_div2[unit] && (!is_rx_rfx400)) << std::endl; //load the register values adf4360_regs_t regs; @@ -361,7 +364,7 @@ double rfx_xcvr::set_lo_freq( regs.a_counter = A; regs.b_counter = B; regs.cp_gain_1 = adf4360_regs_t::CP_GAIN_1_SET1; - regs.divide_by_2_output = (_div2[unit] && (get_rx_id() != 0x0024)) ? // Special case RFX400 RX Mixer divides by two + regs.divide_by_2_output = (_div2[unit] && (!is_rx_rfx400)) ? // Special case RFX400 RX Mixer divides by two adf4360_regs_t::DIVIDE_BY_2_OUTPUT_DIV2 : adf4360_regs_t::DIVIDE_BY_2_OUTPUT_FUND ; regs.divide_by_2_prescaler = adf4360_regs_t::DIVIDE_BY_2_PRESCALER_FUND; |