diff options
author | Mark Meserve <mark.meserve@ni.com> | 2018-09-25 16:41:17 -0500 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-10-17 15:15:12 -0700 |
commit | de4cfd9e832cbef9bdf713a079a7b17d31bae3a9 (patch) | |
tree | b4db64cc71293a0b7b0930c7d3b7940ad42b8edc | |
parent | f7d3cf84a513d124131c46ac806a0d1b068d25ba (diff) | |
download | uhd-de4cfd9e832cbef9bdf713a079a7b17d31bae3a9.tar.gz uhd-de4cfd9e832cbef9bdf713a079a7b17d31bae3a9.tar.bz2 uhd-de4cfd9e832cbef9bdf713a079a7b17d31bae3a9.zip |
lmx2592: remove initial scratch register readback
- This is the only read operation in the driver, so removing it simplifies the
driver's requirements significantly.
-rw-r--r-- | host/lib/usrp/common/lmx2592.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/host/lib/usrp/common/lmx2592.cpp b/host/lib/usrp/common/lmx2592.cpp index 131ecc436..c10a36ed2 100644 --- a/host/lib/usrp/common/lmx2592.cpp +++ b/host/lib/usrp/common/lmx2592.cpp @@ -130,30 +130,6 @@ public: // The bit is cleared on the synth during the reset _regs.reset = 0; - // Enable SPI Readback - _regs.muxout_sel = lmx2592_regs_t::muxout_sel_t::MUXOUT_SEL_READBACK; - UHD_LOG_TRACE("LMX2592", "Enabling SPI Readback"); - _write_fn(_regs.ADDR_R0, _regs.get_reg(_regs.ADDR_R0)); - - // Test Write/Read - const auto random_number = // Derived from current time - static_cast<uint16_t>( - std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()) & 0x0FFF); - _write_fn(_regs.ADDR_R40, random_number); - const auto readback = _read_fn(_regs.ADDR_R40); - if (readback == random_number) { - UHD_LOG_TRACE("LMX2592", "Register loopback test passed"); - } else { - throw runtime_error( - str(boost::format( - "LMX2592 register loopback test failed. Expected 0x%04X, Read 0x%04X") % - random_number % readback)); - } - - _regs.muxout_sel = lmx2592_regs_t::muxout_sel_t::MUXOUT_SEL_LOCK_DETECT; - UHD_LOG_TRACE("LMX2592", "Disabling SPI Readback"); - _write_fn(_regs.ADDR_R0, _regs.get_reg(_regs.ADDR_R0)); - // Set register values where driver defaults differ from the datasheet values _regs.acal_enable = 0; _regs.fcal_enable = 0; |