diff options
author | Martin Braun <martin.braun@ettus.com> | 2015-01-14 15:25:10 +0100 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-01-14 15:25:10 +0100 |
commit | 39d3818a16ca2317ac64118acf5b59696a8723ca (patch) | |
tree | 99138c68294ea24bf74348d2173301d9ad4d8fbf /host/lib/usrp | |
parent | 2f3f4b18cd18df85c5a5d381b1a331f6c0ebee82 (diff) | |
parent | ec11128445c00a8340b95dae6ed2d3ab5c7a5976 (diff) | |
download | uhd-39d3818a16ca2317ac64118acf5b59696a8723ca.tar.gz uhd-39d3818a16ca2317ac64118acf5b59696a8723ca.tar.bz2 uhd-39d3818a16ca2317ac64118acf5b59696a8723ca.zip |
Merge branch 'maint'
Diffstat (limited to 'host/lib/usrp')
-rw-r--r-- | host/lib/usrp/b200/b200_impl.cpp | 11 | ||||
-rw-r--r-- | host/lib/usrp/b200/b200_impl.hpp | 1 | ||||
-rw-r--r-- | host/lib/usrp/b200/b200_regs.hpp | 1 |
3 files changed, 12 insertions, 1 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index 1523f1858..8ea50296f 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -684,7 +684,9 @@ void b200_impl::setup_radio(const size_t dspno) const fs_path rf_fe_path = mb_path / "dboards" / "A" / (x+"_frontends") / (dspno? "B" : "A"); _tree->create<std::string>(rf_fe_path / "name").set("FE-"+key); - _tree->create<int>(rf_fe_path / "sensors"); //empty TODO + _tree->create<int>(rf_fe_path / "sensors"); + _tree->create<sensor_value_t>(rf_fe_path / "sensors" / "lo_locked") + .publish(boost::bind(&b200_impl::get_fe_pll_locked, this, x == "tx")); BOOST_FOREACH(const std::string &name, ad9361_ctrl::get_gain_names(key)) { _tree->create<meta_range_t>(rf_fe_path / "gains" / name / "range") @@ -1059,3 +1061,10 @@ sensor_value_t b200_impl::get_ref_locked(void) const bool lock = (_local_ctrl->peek32(RB32_CORE_MISC) & 0x1) == 0x1; return sensor_value_t("Ref", lock, "locked", "unlocked"); } + +sensor_value_t b200_impl::get_fe_pll_locked(const bool is_tx) +{ + const boost::uint32_t st = _local_ctrl->peek32(RB32_CORE_PLL); + const bool locked = is_tx ? st & 0x1 : st & 0x2; + return sensor_value_t("LO", locked, "locked", "unlocked"); +} diff --git a/host/lib/usrp/b200/b200_impl.hpp b/host/lib/usrp/b200/b200_impl.hpp index 71592f60b..64d7aa7d0 100644 --- a/host/lib/usrp/b200/b200_impl.hpp +++ b/host/lib/usrp/b200/b200_impl.hpp @@ -149,6 +149,7 @@ private: void update_bandsel(const std::string& which, double freq); 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); //perifs in the radio core struct radio_perifs_t diff --git a/host/lib/usrp/b200/b200_regs.hpp b/host/lib/usrp/b200/b200_regs.hpp index dc8a6b0dc..900651f94 100644 --- a/host/lib/usrp/b200/b200_regs.hpp +++ b/host/lib/usrp/b200/b200_regs.hpp @@ -32,6 +32,7 @@ localparam SR_CORE_PPS_SEL = 48; localparam RB32_CORE_SPI = 8; localparam RB32_CORE_MISC = 16; localparam RB32_CORE_STATUS = 20; +localparam RB32_CORE_PLL = 24; localparam SR_SPI = 8; localparam SR_ATR = 12; |