summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2012-07-19 14:20:45 -0700
committerJosh Blum <josh@joshknows.com>2012-07-19 14:20:45 -0700
commitba9a627475446582afa9b6e624a1248748a98951 (patch)
treea99797a4ca29d662b136b0e53414b1f32194d521 /host
parent9d0ce59f3c3be59165e348c3a9d4bc3429821dcc (diff)
downloaduhd-ba9a627475446582afa9b6e624a1248748a98951.tar.gz
uhd-ba9a627475446582afa9b6e624a1248748a98951.tar.bz2
uhd-ba9a627475446582afa9b6e624a1248748a98951.zip
b100/e100: clock source option for pps phase sync abuse
Diffstat (limited to 'host')
-rw-r--r--host/docs/usrp_e1x0.rst2
-rw-r--r--host/lib/usrp/b100/b100_impl.cpp13
-rw-r--r--host/lib/usrp/e100/e100_impl.cpp13
3 files changed, 27 insertions, 1 deletions
diff --git a/host/docs/usrp_e1x0.rst b/host/docs/usrp_e1x0.rst
index 9373e5255..189cbb86b 100644
--- a/host/docs/usrp_e1x0.rst
+++ b/host/docs/usrp_e1x0.rst
@@ -130,7 +130,7 @@ The LEDs on the front panel can be useful in debugging hardware and software
issues. The LEDs reveal the following about the state of the device:
* **LED A:** transmitting
-* **LED B:** fpga loaded
+* **LED B:** PPS signal
* **LED C:** receiving
* **LED D:** fpga loaded
* **LED E:** reference lock
diff --git a/host/lib/usrp/b100/b100_impl.cpp b/host/lib/usrp/b100/b100_impl.cpp
index 94dc88db4..b226e113a 100644
--- a/host/lib/usrp/b100/b100_impl.cpp
+++ b/host/lib/usrp/b100/b100_impl.cpp
@@ -554,6 +554,19 @@ void b100_impl::set_db_eeprom(const std::string &type, const uhd::usrp::dboard_e
}
void b100_impl::update_clock_source(const std::string &source){
+
+ if (source == "pps_sync"){
+ _clock_ctrl->use_external_ref();
+ _fifo_ctrl->poke32(TOREG(SR_MISC+2), 1);
+ return;
+ }
+ if (source == "_pps_sync_"){
+ _clock_ctrl->use_external_ref();
+ _fifo_ctrl->poke32(TOREG(SR_MISC+2), 3);
+ return;
+ }
+ _fifo_ctrl->poke32(TOREG(SR_MISC+2), 0);
+
if (source == "auto") _clock_ctrl->use_auto_ref();
else if (source == "internal") _clock_ctrl->use_internal_ref();
else if (source == "external") _clock_ctrl->use_external_ref();
diff --git a/host/lib/usrp/e100/e100_impl.cpp b/host/lib/usrp/e100/e100_impl.cpp
index a517dfcba..ef0351bd2 100644
--- a/host/lib/usrp/e100/e100_impl.cpp
+++ b/host/lib/usrp/e100/e100_impl.cpp
@@ -486,6 +486,19 @@ void e100_impl::set_db_eeprom(const std::string &type, const uhd::usrp::dboard_e
}
void e100_impl::update_clock_source(const std::string &source){
+
+ if (source == "pps_sync"){
+ _clock_ctrl->use_external_ref();
+ _fifo_ctrl->poke32(TOREG(SR_MISC+2), 1);
+ return;
+ }
+ if (source == "_pps_sync_"){
+ _clock_ctrl->use_external_ref();
+ _fifo_ctrl->poke32(TOREG(SR_MISC+2), 3);
+ return;
+ }
+ _fifo_ctrl->poke32(TOREG(SR_MISC+2), 0);
+
if (source == "auto") _clock_ctrl->use_auto_ref();
else if (source == "internal") _clock_ctrl->use_internal_ref();
else if (source == "external") _clock_ctrl->use_external_ref();