aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/common
diff options
context:
space:
mode:
authormichael-west <michael.west@ettus.com>2015-12-09 11:40:11 -0800
committerMartin Braun <martin.braun@ettus.com>2015-12-15 10:50:39 -0800
commit10178875a154e58af6c14774621776d13e7e3daa (patch)
treee4ca44f0606d3943f40d5d34840497629fecf714 /host/lib/usrp/common
parent29302223406db5f926e11c11c186425b31897bcd (diff)
downloaduhd-10178875a154e58af6c14774621776d13e7e3daa.tar.gz
uhd-10178875a154e58af6c14774621776d13e7e3daa.tar.bz2
uhd-10178875a154e58af6c14774621776d13e7e3daa.zip
ADF4002: Fix register programming (bug #974)
Diffstat (limited to 'host/lib/usrp/common')
-rw-r--r--host/lib/usrp/common/adf4001_ctrl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/host/lib/usrp/common/adf4001_ctrl.cpp b/host/lib/usrp/common/adf4001_ctrl.cpp
index a7510c272..001b68b7a 100644
--- a/host/lib/usrp/common/adf4001_ctrl.cpp
+++ b/host/lib/usrp/common/adf4001_ctrl.cpp
@@ -81,7 +81,7 @@ boost::uint32_t adf4001_regs_t::get_reg(boost::uint8_t addr) {
reg |= (boost::uint32_t(timer_counter_control) & 0x00000F) << 11;
reg |= (boost::uint32_t(charge_pump_current_1) & 0x000007) << 15;
reg |= (boost::uint32_t(charge_pump_current_2) & 0x000007) << 18;
- reg |= (boost::uint32_t(power_down) & 0x000002) << 21;
+ reg |= (boost::uint32_t(power_down) & 0x000002) << 20;
break;
default:
break;
@@ -128,15 +128,15 @@ void adf4001_ctrl::set_lock_to_ext_ref(bool external) {
void adf4001_ctrl::program_regs(void) {
//no control over CE, only LE, therefore we use the initialization latch method
write_reg(3);
- boost::this_thread::sleep(boost::posix_time::microseconds(1));
+
+ //conduct a function latch (2)
+ write_reg(2);
//write R counter latch (0)
write_reg(0);
- boost::this_thread::sleep(boost::posix_time::microseconds(1));
//write N counter latch (1)
write_reg(1);
- boost::this_thread::sleep(boost::posix_time::microseconds(1));
}