From 9ca0473ac09a2f251382b270059278730135b606 Mon Sep 17 00:00:00 2001 From: Michael West Date: Thu, 23 Apr 2015 16:18:45 -0700 Subject: ubx: pfd frequency fix (relevant for X300 operation) --- host/lib/usrp/dboard/db_ubx.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'host/lib') diff --git a/host/lib/usrp/dboard/db_ubx.cpp b/host/lib/usrp/dboard/db_ubx.cpp index 1e79c14b0..7cb4b2d6b 100644 --- a/host/lib/usrp/dboard/db_ubx.cpp +++ b/host/lib/usrp/dboard/db_ubx.cpp @@ -266,6 +266,8 @@ public: } // Enable the reference clocks that we need + _rx_target_pfd_freq = pfd_freq_max; + _tx_target_pfd_freq = pfd_freq_max; if (_rev >= 1) { // set dboard clock rates to as close to the max PFD freq as possible -- cgit v1.2.3 From d74af0b4d17d66f9bb94638a06a25195f6dc885a Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Fri, 24 Apr 2015 15:15:40 -0700 Subject: b200: Fixed FE swapping register --- host/lib/usrp/b200/b200_impl.cpp | 20 +++++++++++++++++--- host/lib/usrp/b200/b200_impl.hpp | 4 ++-- 2 files changed, 19 insertions(+), 5 deletions(-) (limited to 'host/lib') diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index 273153c16..84153309e 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -266,16 +266,30 @@ b200_impl::b200_impl(const device_addr_t &device_addr) : _b200_type = B200; } - //set up frontend mapping + //////////////////////////////////////////////////////////////////// + // Set up frontend mapping + //////////////////////////////////////////////////////////////////// + // Explanation: The AD9361 has 2 frontends, FE1 and FE2. + // On the B210 FE1 maps to the B-side (or radio 1), and FE2 maps + // to the A-side (or radio 0). So, logically, the radios are swapped + // between the host side and the AD9361-side. + // B200 is more complicated: On Revs <= 4, the A-side is connected, + // which means FE2 is used (like B210). On Revs >= 5, the left side + // ("B-side") is connected, because these revs use an AD9364, which + // does not have an FE2, so we don't swap FEs. + + // Swapped setup: _fe1 = 1; _fe2 = 0; + _gpio_state.swap_atr = 1; + // Unswapped setup: if (_b200_type == B200 and not mb_eeprom["revision"].empty() and boost::lexical_cast(mb_eeprom["revision"]) >= 5) { _fe1 = 0; //map radio0 to FE1 _fe2 = 1; //map radio1 to FE2 - _gpio_state.atr_sel = 1; //map radio0 ATR pins to FE2 + _gpio_state.swap_atr = 0; //map radio0 ATR pins to FE2 } //////////////////////////////////////////////////////////////////// @@ -916,7 +930,7 @@ void b200_impl::update_bandsel(const std::string& which, double freq) void b200_impl::update_gpio_state(void) { const boost::uint32_t misc_word = 0 - | (_gpio_state.atr_sel << 8) + | (_gpio_state.swap_atr << 8) | (_gpio_state.tx_bandsel_a << 7) | (_gpio_state.tx_bandsel_b << 6) | (_gpio_state.rx_bandsel_a << 5) diff --git a/host/lib/usrp/b200/b200_impl.hpp b/host/lib/usrp/b200/b200_impl.hpp index 318b35947..f3d3d0e98 100644 --- a/host/lib/usrp/b200/b200_impl.hpp +++ b/host/lib/usrp/b200/b200_impl.hpp @@ -177,7 +177,7 @@ private: void handle_overflow(const size_t radio_index); struct gpio_state { - boost::uint32_t tx_bandsel_a, tx_bandsel_b, rx_bandsel_a, rx_bandsel_b, rx_bandsel_c, codec_arst, mimo, ref_sel, atr_sel; + boost::uint32_t tx_bandsel_a, tx_bandsel_b, rx_bandsel_a, rx_bandsel_b, rx_bandsel_c, codec_arst, mimo, ref_sel, swap_atr; gpio_state() { tx_bandsel_a = 0; @@ -188,7 +188,7 @@ private: codec_arst = 0; mimo = 0; ref_sel = 0; - atr_sel = 0; + swap_atr = 0; } } _gpio_state; -- cgit v1.2.3