diff options
author | michael-west <michael.west@ettus.com> | 2018-10-12 17:34:06 -0700 |
---|---|---|
committer | Brent Stapleton <bstapleton@g.hmc.edu> | 2018-10-17 15:59:08 -0700 |
commit | 20f061689c9eb3024d8579331e5ba790320425f2 (patch) | |
tree | 98af37ec828c0b0b5e7d544ef226f3fb4be6674a /host/lib | |
parent | b7b6af75212de0886afc4c68042e9ed65e72058b (diff) | |
download | uhd-20f061689c9eb3024d8579331e5ba790320425f2.tar.gz uhd-20f061689c9eb3024d8579331e5ba790320425f2.tar.bz2 uhd-20f061689c9eb3024d8579331e5ba790320425f2.zip |
B200: Restore asynchronous reset of AD936x.
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/usrp/b200/b200_impl.cpp | 11 | ||||
-rw-r--r-- | host/lib/usrp/b200/b200_impl.hpp | 8 |
2 files changed, 15 insertions, 4 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index ae6e0b0d7..d87f70273 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -585,6 +585,7 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s // Init codec - turns on clocks //////////////////////////////////////////////////////////////////// UHD_LOGGER_INFO("B200") << "Initialize CODEC control..." ; + reset_codec(); ad9361_params::sptr client_settings; if (_product == B200MINI or _product == B205MINI) { client_settings = boost::make_shared<b2xxmini_ad9361_client_t>(); @@ -1228,6 +1229,14 @@ void b200_impl::update_bandsel(const std::string& which, double freq) update_gpio_state(); } +void b200_impl::reset_codec() +{ + _gpio_state.codec_arst = 1; + update_gpio_state(); + _gpio_state.codec_arst = 0; + update_gpio_state(); +} + void b200_impl::update_gpio_state(void) { const uint32_t misc_word = 0 @@ -1237,7 +1246,7 @@ void b200_impl::update_gpio_state(void) | (_gpio_state.rx_bandsel_a << 5) | (_gpio_state.rx_bandsel_b << 4) | (_gpio_state.rx_bandsel_c << 3) - // Bit 2 currently not used. + | (_gpio_state.codec_arst << 2) | (_gpio_state.mimo << 1) | (_gpio_state.ref_sel << 0) ; diff --git a/host/lib/usrp/b200/b200_impl.hpp b/host/lib/usrp/b200/b200_impl.hpp index 12678c13d..f691b371f 100644 --- a/host/lib/usrp/b200/b200_impl.hpp +++ b/host/lib/usrp/b200/b200_impl.hpp @@ -41,8 +41,8 @@ static const uint8_t B200_FW_COMPAT_NUM_MAJOR = 8; static const uint8_t B200_FW_COMPAT_NUM_MINOR = 0; -static const uint16_t B200_FPGA_COMPAT_NUM = 15; -static const uint16_t B205_FPGA_COMPAT_NUM = 6; +static const uint16_t B200_FPGA_COMPAT_NUM = 16; +static const uint16_t B205_FPGA_COMPAT_NUM = 7; static const double B200_BUS_CLOCK_RATE = 100e6; static const uint32_t B200_GPSDO_ST_NONE = 0x83; static const size_t B200_MAX_RATE_USB2 = 53248000; // bytes/s @@ -175,6 +175,7 @@ private: void sync_times(void); void update_clock_source(const std::string &); void update_bandsel(const std::string& which, double freq); + void reset_codec(void); void update_antenna_sel(const size_t which, const std::string &ant); uhd::sensor_value_t get_ref_locked(void); uhd::sensor_value_t get_fe_pll_locked(const bool is_tx); @@ -211,7 +212,7 @@ private: void handle_overflow(const size_t radio_index); struct gpio_state { - uint32_t tx_bandsel_a, tx_bandsel_b, rx_bandsel_a, rx_bandsel_b, rx_bandsel_c, mimo, ref_sel, swap_atr; + 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; @@ -219,6 +220,7 @@ private: rx_bandsel_a = 0; rx_bandsel_b = 0; rx_bandsel_c = 0; + codec_arst = 0; mimo = 0; ref_sel = 0; swap_atr = 0; |