summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/b200
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2013-08-13 10:56:22 -0700
committerJosh Blum <josh@joshknows.com>2013-08-13 10:56:22 -0700
commit77f360afdad3af71d125ca375a00221ad231792e (patch)
treef8c8ce6751871eeb06aee787c0d5f77ebc6dd4b9 /host/lib/usrp/b200
parent9f1d6bdc501e04aa205f88ed5ef95e38c1bec03b (diff)
downloaduhd-77f360afdad3af71d125ca375a00221ad231792e.tar.gz
uhd-77f360afdad3af71d125ca375a00221ad231792e.tar.bz2
uhd-77f360afdad3af71d125ca375a00221ad231792e.zip
b200: changed for pps select register
Diffstat (limited to 'host/lib/usrp/b200')
-rw-r--r--host/lib/usrp/b200/b200_impl.cpp24
-rw-r--r--host/lib/usrp/b200/b200_impl.hpp2
-rw-r--r--host/lib/usrp/b200/b200_regs.hpp1
3 files changed, 6 insertions, 21 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp
index 4c70e7f7b..8bacaf764 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -293,11 +293,7 @@ b200_impl::b200_impl(const device_addr_t &device_addr)
// Initialize the properties tree
////////////////////////////////////////////////////////////////////
_tree->create<std::string>("/name").set("B-Series Device");
- switch (boost::lexical_cast<boost::uint16_t>(mb_eeprom["product"]))
- {
- case 0x0001: _tree->create<std::string>(mb_path / "name").set("B200"); break;
- case 0x0002: _tree->create<std::string>(mb_path / "name").set("B210"); break;
- }
+ _tree->create<std::string>(mb_path / "name").set("B200");
_tree->create<std::string>(mb_path / "codename").set("Sasquatch");
////////////////////////////////////////////////////////////////////
@@ -333,20 +329,12 @@ b200_impl::b200_impl(const device_addr_t &device_addr)
////////////////////////////////////////////////////////////////////
{
const fs_path codec_path = mb_path / ("rx_codecs") / "A";
- switch (boost::lexical_cast<boost::uint16_t>(mb_eeprom["product"]))
- {
- case 0x0001: _tree->create<std::string>(codec_path / "name").set("B200 RX dual ADC"); break;
- case 0x0002: _tree->create<std::string>(codec_path / "name").set("B210 RX dual ADC"); break;
- }
+ _tree->create<std::string>(codec_path / "name").set("B200 RX dual ADC");
_tree->create<int>(codec_path / "gains"); //empty cuz gains are in frontend
}
{
const fs_path codec_path = mb_path / ("tx_codecs") / "A";
- switch (boost::lexical_cast<boost::uint16_t>(mb_eeprom["product"]))
- {
- case 0x0001: _tree->create<std::string>(codec_path / "name").set("B200 TX dual DAC"); break;
- case 0x0002: _tree->create<std::string>(codec_path / "name").set("B210 TX dual DAC"); break;
- }
+ _tree->create<std::string>(codec_path / "name").set("B200 TX dual DAC");
_tree->create<int>(codec_path / "gains"); //empty cuz gains are in frontend
}
@@ -745,11 +733,7 @@ void b200_impl::update_time_source(const std::string &source)
else if (source == "external"){}
else if (source == "gpsdo"){}
else throw uhd::key_error("update_time_source: unknown source: " + source);
- for (size_t i = 0; i < _radio_perifs.size(); i++)
- {
- _radio_perifs[i].time64->set_time_source((source == "external")? "external" : "internal");
- }
- this->update_gpio_state();
+ _local_ctrl->poke32(TOREG(SR_CORE_PPS_SEL), (source == "external")? 1 : 0);
}
/***********************************************************************
diff --git a/host/lib/usrp/b200/b200_impl.hpp b/host/lib/usrp/b200/b200_impl.hpp
index d8a2232e0..a59e0b977 100644
--- a/host/lib/usrp/b200/b200_impl.hpp
+++ b/host/lib/usrp/b200/b200_impl.hpp
@@ -50,7 +50,7 @@ static const std::string B200_FPGA_FILE_NAME = "usrp_b200_fpga.bin";
static const std::string B210_FPGA_FILE_NAME = "usrp_b210_fpga.bin";
static const boost::uint8_t B200_FW_COMPAT_NUM_MAJOR = 0x02;
static const boost::uint8_t B200_FW_COMPAT_NUM_MINOR = 0x00;
-static const boost::uint16_t B200_FPGA_COMPAT_NUM = 0x01;
+static const boost::uint16_t B200_FPGA_COMPAT_NUM = 0x02;
static const double B200_LINK_RATE_BPS = (5e9)/8; //practical link rate (5 Gbps)
static const double B200_BUS_CLOCK_RATE = 100e6;
static const double B200_DEFAULT_TICK_RATE = 32e6;
diff --git a/host/lib/usrp/b200/b200_regs.hpp b/host/lib/usrp/b200/b200_regs.hpp
index 0e4cc82cd..ae39b95b2 100644
--- a/host/lib/usrp/b200/b200_regs.hpp
+++ b/host/lib/usrp/b200/b200_regs.hpp
@@ -28,6 +28,7 @@ localparam SR_CORE_SPI = 8;
localparam SR_CORE_MISC = 16;
localparam SR_CORE_COMPAT = 24;
localparam SR_CORE_GPSDO_ST = 40;
+localparam SR_CORE_PPS_SEL = 48;
localparam RB32_CORE_SPI = 8;
localparam RB32_CORE_MISC = 16;
localparam RB32_CORE_STATUS = 20;