From d82d21246d4bc32997f6c92d0dd56cc0b5ef38a1 Mon Sep 17 00:00:00 2001 From: michael-west Date: Thu, 29 Nov 2018 12:20:16 -0800 Subject: TwinRX: Tuning improvements - Added delay for VTUNE calibration as per ADF5355 and ADF5356 data sheets - Increased SPI clock to 10 MHz - Removed write to register 10 during tuning of ADF5356 to match ADF5355 code and reduce tune time --- host/lib/usrp/common/adf535x.cpp | 10 +++++----- host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp | 9 +++++++-- 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'host/lib/usrp') diff --git a/host/lib/usrp/common/adf535x.cpp b/host/lib/usrp/common/adf535x.cpp index 67a94bcc1..ab81fbee7 100644 --- a/host/lib/usrp/common/adf535x.cpp +++ b/host/lib/usrp/common/adf535x.cpp @@ -6,12 +6,12 @@ #include -adf535x_iface::sptr adf535x_iface::make_adf5355(write_fn_t write) +adf535x_iface::sptr adf535x_iface::make_adf5355(write_fn_t write, wait_fn_t wait) { - return std::make_shared>(write); + return std::make_shared>(write, wait); } -adf535x_iface::sptr adf535x_iface::make_adf5356(write_fn_t write) +adf535x_iface::sptr adf535x_iface::make_adf5356(write_fn_t write, wait_fn_t wait) { - return std::make_shared>(write); -} \ No newline at end of file + return std::make_shared>(write, wait); +} diff --git a/host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp b/host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp index 1b45805e7..55b74753c 100644 --- a/host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp +++ b/host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp @@ -25,7 +25,7 @@ namespace { const double TWINRX_DESIRED_REFERENCE_FREQ = 50e6; const double TWINRX_REV_AB_PFD_FREQ = 6.25e6; const double TWINRX_REV_C_PFD_FREQ = 12.5e6; - const double TWINRX_SPI_CLOCK_FREQ = 3e6; + const double TWINRX_SPI_CLOCK_FREQ = 10e6; } class twinrx_ctrl_impl : public twinrx_ctrl { @@ -99,14 +99,19 @@ public: _lo1_iface[i] = adf535x_iface::make_adf5356( [this](const std::vector& regs) { _write_lo_spi(dboard_iface::UNIT_TX, regs); + }, + [this](uint32_t microseconds) { + _db_iface->sleep(boost::chrono::microseconds(microseconds)); } ); _lo1_iface[i]->set_pfd_freq(TWINRX_REV_C_PFD_FREQ); - } else { _lo1_iface[i] = adf535x_iface::make_adf5355( [this](const std::vector& regs) { _write_lo_spi(dboard_iface::UNIT_TX, regs); + }, + [this](uint32_t microseconds) { + _db_iface->sleep(boost::chrono::microseconds(microseconds)); } ); _lo1_iface[i]->set_pfd_freq(TWINRX_REV_AB_PFD_FREQ); -- cgit v1.2.3