aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python
diff options
context:
space:
mode:
authorDavid Raeman <david@synopticengineering.com>2022-02-16 17:51:57 +0000
committerAaron Rossetto <aaron.rossetto@ni.com>2022-03-03 14:02:30 -0600
commit7599789f83bcf9f9e9bdef3432c37e460bddc1e4 (patch)
treebf05fd15759619fcfbd76357046c3f0ee4dfe0a8 /mpm/python
parentcd4b9cb96c00497d3121c59bd97c60e9fcf7e7bc (diff)
downloaduhd-7599789f83bcf9f9e9bdef3432c37e460bddc1e4.tar.gz
uhd-7599789f83bcf9f9e9bdef3432c37e460bddc1e4.tar.bz2
uhd-7599789f83bcf9f9e9bdef3432c37e460bddc1e4.zip
mpm: fix ref_locked sensor on n320
The ref_locked mboard sensor on the n320 always returned true without querying hardware. On this device family, mboard sensor callback in n3xx.py returns the "and" of its daughterboard LMK PLLs by querying the get_ref_lock() function on each dboard manager. However, that function only existed for the Magnesium daughterbaord. For the Rhodium daughterboard, the function didn't exist and so a true value was automatically returned. This commit adds the get_ref_lock() implementations for Rhodium and EISCAT daughterboards, which are identical to the implementation already present for Magnesium. Co-authored-by: Martin Braun <martin.braun@ettus.com>
Diffstat (limited to 'mpm/python')
-rw-r--r--mpm/python/usrp_mpm/dboard_manager/rhodium.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/mpm/python/usrp_mpm/dboard_manager/rhodium.py b/mpm/python/usrp_mpm/dboard_manager/rhodium.py
index e80b33d25..93b9f2186 100644
--- a/mpm/python/usrp_mpm/dboard_manager/rhodium.py
+++ b/mpm/python/usrp_mpm/dboard_manager/rhodium.py
@@ -454,6 +454,21 @@ class Rhodium(BfrfsEEPROM, DboardManagerBase):
" Return master clock rate (== sampling rate / 2) "
return self.master_clock_rate
+ def get_ref_lock(self):
+ """
+ Returns True if the LMK reference is locked.
+
+ Note: This does not return a sensor dict. The sensor API call is
+ in the motherboard class.
+ """
+ if self.lmk is None:
+ self.log.trace("LMK object not yet initialized, defaulting to " \
+ "no ref locked!")
+ return False
+ lmk_lock_status = self.lmk.check_plls_locked()
+ self.log.trace("LMK lock status is: {}".format(lmk_lock_status))
+ return lmk_lock_status
+
def update_ref_clock_freq(self, freq, **kwargs):
"""
Call this function if the frequency of the reference clock changes