From 08855405d6511774f65d2b7c7a976202e215bb7d Mon Sep 17 00:00:00 2001 From: Michael West Date: Tue, 10 Apr 2018 12:24:36 -0700 Subject: X300: Change default dboard_clock_rate depending on master_clock_rate --- host/lib/usrp/x300/x300_impl.cpp | 5 +++-- host/lib/usrp/x300/x300_impl.hpp | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'host/lib') diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp index 209fd598f..4a8c12e04 100644 --- a/host/lib/usrp/x300/x300_impl.cpp +++ b/host/lib/usrp/x300/x300_impl.cpp @@ -887,11 +887,12 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr) UHD_LOGGER_DEBUG("X300") << "Setting up RF frontend clocking..."; //Initialize clock control registers. NOTE: This does not configure the LMK yet. + const double requested_mcr = dev_addr.cast("master_clock_rate", X300_DEFAULT_TICK_RATE); mb.clock = x300_clock_ctrl::make(mb.zpu_spi, 1 /*slaveno*/, mb.hw_rev, - dev_addr.cast("master_clock_rate", X300_DEFAULT_TICK_RATE), - dev_addr.cast("dboard_clock_rate", X300_DEFAULT_DBOARD_CLK_RATE), + requested_mcr, + dev_addr.cast("dboard_clock_rate", requested_mcr / 4), dev_addr.cast("system_ref_rate", X300_DEFAULT_SYSREF_RATE)); //Initialize clock source to use internal reference and generate diff --git a/host/lib/usrp/x300/x300_impl.hpp b/host/lib/usrp/x300/x300_impl.hpp index df6af5521..35bd8ce8f 100644 --- a/host/lib/usrp/x300/x300_impl.hpp +++ b/host/lib/usrp/x300/x300_impl.hpp @@ -37,7 +37,6 @@ static const std::string X300_FW_FILE_NAME = "usrp_x300_fw.bin"; static const std::string X300_DEFAULT_CLOCK_SOURCE = "internal"; static const double X300_DEFAULT_TICK_RATE = 200e6; //Hz -static const double X300_DEFAULT_DBOARD_CLK_RATE = 50e6; //Hz static const double X300_BUS_CLOCK_RATE = 187.5e6; //Hz static const size_t X300_RX_SW_BUFF_SIZE_ETH = 0x2000000;//32MiB For an ~8k frame size any size >32MiB is just wasted buffer space -- cgit v1.2.3