diff options
author | Martin Braun <martin.braun@ettus.com> | 2015-04-24 15:55:25 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-04-24 15:55:25 -0700 |
commit | 04256ee8c38478a48d5969dc63faff10361962f5 (patch) | |
tree | f1e4ac01be5a6ddde9e411f7590a8396edb37e0f | |
parent | 908b5429917ef8f3f5363f5ffc4710e0258914e6 (diff) | |
parent | d74af0b4d17d66f9bb94638a06a25195f6dc885a (diff) | |
download | uhd-04256ee8c38478a48d5969dc63faff10361962f5.tar.gz uhd-04256ee8c38478a48d5969dc63faff10361962f5.tar.bz2 uhd-04256ee8c38478a48d5969dc63faff10361962f5.zip |
Merge branch 'maint'
-rw-r--r-- | host/lib/usrp/b200/b200_impl.cpp | 20 | ||||
-rw-r--r-- | host/lib/usrp/b200/b200_impl.hpp | 4 | ||||
-rw-r--r-- | host/lib/usrp/dboard/db_ubx.cpp | 2 |
3 files changed, 21 insertions, 5 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index 7a91e3c2a..f3307dc4d 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -306,16 +306,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<size_t>(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 } //////////////////////////////////////////////////////////////////// @@ -1032,7 +1046,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 3628745a1..4dd45baee 100644 --- a/host/lib/usrp/b200/b200_impl.hpp +++ b/host/lib/usrp/b200/b200_impl.hpp @@ -184,7 +184,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; @@ -195,7 +195,7 @@ private: codec_arst = 0; mimo = 0; ref_sel = 0; - atr_sel = 0; + swap_atr = 0; } } _gpio_state; 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 |