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_sbx_version4.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'host/lib/usrp/dboard/db_sbx_version4.cpp') diff --git a/host/lib/usrp/dboard/db_sbx_version4.cpp b/host/lib/usrp/dboard/db_sbx_version4.cpp index f091caab7..27fd68b05 100644 --- a/host/lib/usrp/dboard/db_sbx_version4.cpp +++ b/host/lib/usrp/dboard/db_sbx_version4.cpp @@ -168,6 +168,11 @@ double sbx_xcvr::sbx_version4::set_lo_freq(dboard_iface::unit_t unit, double tar UHD_ASSERT_THROW(rfdivsel_to_enum.has_key(RFdiv)); regs.rf_divider_select = rfdivsel_to_enum[RFdiv]; + //reset the N and R counter + regs.counter_reset = adf4351_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 = adf4351_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