diff options
author | Sugandha Gupta <sugandha.gupta@ettus.com> | 2018-07-26 15:36:11 -0700 |
---|---|---|
committer | Brent Stapleton <bstapleton@g.hmc.edu> | 2018-07-31 14:02:02 -0700 |
commit | 0e0b62baf86e572a362d39211165badb14ebdc66 (patch) | |
tree | 5bae0845c74a116c13bf2f4b6b87fb7eefda2f4c /mpm/python | |
parent | e570d13daa87011fe1044893ef42684d36e63fb3 (diff) | |
download | uhd-0e0b62baf86e572a362d39211165badb14ebdc66.tar.gz uhd-0e0b62baf86e572a362d39211165badb14ebdc66.tar.bz2 uhd-0e0b62baf86e572a362d39211165badb14ebdc66.zip |
e320: Add 'ref_locked' sensor to mboard sensors
Diffstat (limited to 'mpm/python')
-rw-r--r-- | mpm/python/usrp_mpm/periph_manager/e320.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/e320.py b/mpm/python/usrp_mpm/periph_manager/e320.py index 848b320b0..461527f59 100644 --- a/mpm/python/usrp_mpm/periph_manager/e320.py +++ b/mpm/python/usrp_mpm/periph_manager/e320.py @@ -80,6 +80,7 @@ class e320(ZynqComponents, PeriphManagerBase): } mboard_max_rev = 2 # RevB mboard_sensor_callback_map = { + 'ref_locked': 'get_ref_lock_sensor', 'gps_locked': 'get_gps_lock_sensor', 'temp': 'get_temp_sensor', 'fan': 'get_fan_sensor', @@ -591,6 +592,19 @@ class e320(ZynqComponents, PeriphManagerBase): ########################################################################### # Sensors ########################################################################### + def get_ref_lock_sensor(self): + """ + Get refclk lock from CLK_MUX_OUT signal from ADF4002 + """ + self.log.trace("Querying ref lock status from adf4002.") + lock_status = self.mboard_regs_control.get_refclk_lock() + return { + 'name': 'ref_locked', + 'type': 'BOOLEAN', + 'unit': 'locked' if lock_status else 'unlocked', + 'value': str(lock_status).lower(), + } + def get_temp_sensor(self): """ Get temperature sensor reading of the E320. |