summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/docs/build.rst8
-rw-r--r--host/lib/usrp/dboard/db_dbsrx.cpp7
-rw-r--r--host/lib/usrp/usrp1/dboard_iface.cpp12
3 files changed, 20 insertions, 7 deletions
diff --git a/host/docs/build.rst b/host/docs/build.rst
index 8f0d0db59..d7dfd05e5 100644
--- a/host/docs/build.rst
+++ b/host/docs/build.rst
@@ -53,6 +53,14 @@ Boost
* **Download URL (windows installer):** http://www.boostpro.com/download
^^^^^^^^^^^^^^^^
+LibUSB
+^^^^^^^^^^^^^^^^
+* **Purpose:** USB userspace library
+* **Version:** at least 1.0
+* **Required for:** build time + run time (optional)
+* **Download URL:** http://www.libusb.org/
+
+^^^^^^^^^^^^^^^^
Python
^^^^^^^^^^^^^^^^
* **Purpose:** used by Cheetah and utility scripts
diff --git a/host/lib/usrp/dboard/db_dbsrx.cpp b/host/lib/usrp/dboard/db_dbsrx.cpp
index 06cf91d3b..81434f054 100644
--- a/host/lib/usrp/dboard/db_dbsrx.cpp
+++ b/host/lib/usrp/dboard/db_dbsrx.cpp
@@ -205,7 +205,12 @@ dbsrx::dbsrx(ctor_args_t args) : rx_dboard_base(args){
//set the gpio directions and atr controls (identically)
this->get_iface()->set_pin_ctrl(dboard_iface::UNIT_RX, 0x0); // All unused in atr
- this->get_iface()->set_gpio_ddr(dboard_iface::UNIT_RX, 0x0); // All Inputs
+ if (this->get_iface()->get_special_props().soft_clock_divider){
+ this->get_iface()->set_gpio_ddr(dboard_iface::UNIT_RX, 0x1); // GPIO0 is clock
+ }
+ else{
+ this->get_iface()->set_gpio_ddr(dboard_iface::UNIT_RX, 0x0); // All Inputs
+ }
//send initial register settings
this->send_reg(0x0, 0x5);
diff --git a/host/lib/usrp/usrp1/dboard_iface.cpp b/host/lib/usrp/usrp1/dboard_iface.cpp
index b2221e221..454de3ece 100644
--- a/host/lib/usrp/usrp1/dboard_iface.cpp
+++ b/host/lib/usrp/usrp1/dboard_iface.cpp
@@ -49,8 +49,8 @@ public:
_codec = codec;
//init the clock rate shadows
- this->set_clock_rate(UNIT_RX, _clock->get_master_clock_freq());
- this->set_clock_rate(UNIT_TX, _clock->get_master_clock_freq());
+ this->set_clock_rate(UNIT_RX, this->get_clock_rates(UNIT_RX).front());
+ this->set_clock_rate(UNIT_TX, this->get_clock_rates(UNIT_TX).front());
}
~usrp1_dboard_iface()
@@ -134,14 +134,14 @@ void usrp1_dboard_iface::set_clock_rate(unit_t unit, double rate)
_clock_rates[unit] = rate;
if (unit == UNIT_RX && _rx_dboard_id == dbsrx_classic_id){
- size_t divider = size_t(rate/_clock->get_master_clock_freq());
+ size_t divider = size_t(_clock->get_master_clock_freq()/rate);
switch(_dboard_slot){
case usrp1_impl::DBOARD_SLOT_A:
- _iface->poke32(FR_RX_A_REFCLK, (divider & 0x7f) | 0x80);
+ _iface->poke32(FR_RX_A_REFCLK, (2*divider & 0x7f) | 0x80);
break;
case usrp1_impl::DBOARD_SLOT_B:
- _iface->poke32(FR_RX_B_REFCLK, (divider & 0x7f) | 0x80);
+ _iface->poke32(FR_RX_B_REFCLK, (2*divider & 0x7f) | 0x80);
break;
}
}
@@ -151,7 +151,7 @@ std::vector<double> usrp1_dboard_iface::get_clock_rates(unit_t unit)
{
std::vector<double> rates;
if (unit == UNIT_RX && _rx_dboard_id == dbsrx_classic_id){
- for (size_t div = 1; div <= 127; div++)
+ for (size_t div = 8; div <= 127; div++)
rates.push_back(_clock->get_master_clock_freq() / div);
}
else{