From 09de3c0768d2961ec3668882b4284e0db3b37eb8 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 8 Aug 2012 12:48:40 -0700 Subject: sbx/wbx: clear R/N counters before tuning the LO This helps consistent phase offset between mixers when a timed tune is performed. --- host/lib/usrp/dboard/db_wbx_version3.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'host/lib/usrp/dboard/db_wbx_version3.cpp') diff --git a/host/lib/usrp/dboard/db_wbx_version3.cpp b/host/lib/usrp/dboard/db_wbx_version3.cpp index 6771d184f..3e8fc8095 100644 --- a/host/lib/usrp/dboard/db_wbx_version3.cpp +++ b/host/lib/usrp/dboard/db_wbx_version3.cpp @@ -348,6 +348,11 @@ double wbx_base::wbx_version3::set_lo_freq(dboard_iface::unit_t unit, double tar } + //reset the N and R counter + regs.counter_reset = adf4350_regs_t::COUNTER_RESET_ENABLED; + self_base->get_iface()->write_spi(unit, spi_config_t::EDGE_RISE, regs.get_reg(2), 32); + regs.counter_reset = adf4350_regs_t::COUNTER_RESET_DISABLED; + //write the registers //correct power-up sequence to write registers (5, 4, 3, 2, 1, 0) int addr; -- cgit v1.2.3