diff options
author | michael-west <michael.west@ettus.com> | 2021-02-08 20:26:09 -0800 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-02-10 12:38:59 -0600 |
commit | 910db73c9aa9446479f00a4e90521a213568bffa (patch) | |
tree | d2be82b183cad18271e619fb19701a0c52b4ea13 /host/lib/include | |
parent | fa6e7a7430b3f4e4b534ac6d8f7d07b3319e0e39 (diff) | |
download | uhd-910db73c9aa9446479f00a4e90521a213568bffa.tar.gz uhd-910db73c9aa9446479f00a4e90521a213568bffa.tar.bz2 uhd-910db73c9aa9446479f00a4e90521a213568bffa.zip |
TwinRX: Fix LO lock failure
Always write register 6 in the ADF5356. Conditional write was causing
the LO not to lock at some frequencies.
Signed-off-by: michael-west <michael.west@ettus.com>
Diffstat (limited to 'host/lib/include')
-rw-r--r-- | host/lib/include/uhdlib/usrp/common/adf535x.hpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/host/lib/include/uhdlib/usrp/common/adf535x.hpp b/host/lib/include/uhdlib/usrp/common/adf535x.hpp index 20255ad00..de132f5ba 100644 --- a/host/lib/include/uhdlib/usrp/common/adf535x.hpp +++ b/host/lib/include/uhdlib/usrp/common/adf535x.hpp @@ -112,7 +112,6 @@ public: , _wait_fn(std::move(wait_fn)) , _regs() , _rewrite_regs(true) - , _neg_bleed_changed(false) , _wait_time_us(0) , _ref_freq(0.0) , _pfd_freq(0.0) @@ -351,7 +350,6 @@ private: // Members wait_fn_t _wait_fn; adf535x_regs_t _regs; bool _rewrite_regs; - bool _neg_bleed_changed; uint32_t _wait_time_us; double _ref_freq; double _pfd_freq; @@ -606,13 +604,9 @@ inline double adf535x_impl<adf5356_regs_t>::_set_frequency( _regs.mod2_msb = narrow_cast<uint16_t>(MOD2 >> 14); _regs.phase_24_bit = 0; - auto negative_bleed = FRAC1 != 0 or FRAC2 != 0 ? + _regs.negative_bleed = FRAC1 != 0 or FRAC2 != 0 ? adf5356_regs_t::NEGATIVE_BLEED_ENABLED : adf5356_regs_t::NEGATIVE_BLEED_DISABLED; - if (negative_bleed != _regs.negative_bleed) { - _regs.negative_bleed = negative_bleed; - _neg_bleed_changed = true; - } if (flush) commit(); @@ -643,13 +637,10 @@ inline void adf535x_impl<adf5356_regs_t>::_commit() // Frequency update sequence from data sheet _write_fn(addr_vtr_t(ONE_REG, _regs.get_reg(13))); _write_fn(addr_vtr_t(ONE_REG, _regs.get_reg(10))); - if (_neg_bleed_changed) { - _write_fn(addr_vtr_t(ONE_REG, _regs.get_reg(6))); - } + _write_fn(addr_vtr_t(ONE_REG, _regs.get_reg(6))); _write_fn(addr_vtr_t(ONE_REG, _regs.get_reg(2))); _write_fn(addr_vtr_t(ONE_REG, _regs.get_reg(1))); _wait_fn(_wait_time_us); _write_fn(addr_vtr_t(ONE_REG, _regs.get_reg(0))); } - _neg_bleed_changed = false; } |