aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSugandha Gupta <sugandha.gupta@ettus.com>2018-09-12 16:28:04 -0700
committerBrent Stapleton <bstapleton@g.hmc.edu>2018-09-24 15:49:14 -0700
commitb9514a6db3ebd06b8ddeddc1283c530d59d60aaf (patch)
tree95ad4c347b3a3193055f9c658b1d0b32ac7fc90e
parent0e130d671eee539543c3d2339bb4e6891de1f21e (diff)
downloaduhd-b9514a6db3ebd06b8ddeddc1283c530d59d60aaf.tar.gz
uhd-b9514a6db3ebd06b8ddeddc1283c530d59d60aaf.tar.bz2
uhd-b9514a6db3ebd06b8ddeddc1283c530d59d60aaf.zip
e320: Fix master_clock_rate setting
The master clock rate was getting overwritten while running the codec loopback self test. So now we save the current rate before running the test and then reapply it.
-rw-r--r--host/lib/usrp/dboard/neon/neon_radio_ctrl_impl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/host/lib/usrp/dboard/neon/neon_radio_ctrl_impl.cpp b/host/lib/usrp/dboard/neon/neon_radio_ctrl_impl.cpp
index 4bf9b7573..71e467848 100644
--- a/host/lib/usrp/dboard/neon/neon_radio_ctrl_impl.cpp
+++ b/host/lib/usrp/dboard/neon/neon_radio_ctrl_impl.cpp
@@ -130,6 +130,8 @@ void neon_radio_ctrl_impl::loopback_self_test(
std::function<void(uint32_t)> poker_functor,
std::function<uint64_t()> peeker_functor
) {
+ // Save current rate before running this test
+ const double current_rate = this->get_rate();
// Set 2R2T mode, stream on all channels
this->set_streaming_mode(true, true, true, true);
// Set maximum rate for 2R2T mode
@@ -180,6 +182,8 @@ void neon_radio_ctrl_impl::loopback_self_test(
// Take AD936x out of loopback mode
_ad9361->data_port_loopback(false);
this->set_streaming_mode(true, false, true, false);
+ // Switch back to current rate
+ this->set_rate(current_rate);
}
double neon_radio_ctrl_impl::set_rate(const double rate)