diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-04-02 09:28:02 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-04-02 14:56:39 -0700 |
commit | 08245bb92c92c1ac0c81e91c25936b9934e79b57 (patch) | |
tree | 01652f89149e8317c528f6d7675bf993d626472d /mpm | |
parent | baad5d789fde546ed5e3fccd865e49ba15b98145 (diff) | |
download | uhd-08245bb92c92c1ac0c81e91c25936b9934e79b57.tar.gz uhd-08245bb92c92c1ac0c81e91c25936b9934e79b57.tar.bz2 uhd-08245bb92c92c1ac0c81e91c25936b9934e79b57.zip |
mpm: n3xx: Disable PPS out during initialization
Diffstat (limited to 'mpm')
-rw-r--r-- | mpm/python/usrp_mpm/periph_manager/n3xx.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/n3xx.py b/mpm/python/usrp_mpm/periph_manager/n3xx.py index ec7fedad9..726f978f8 100644 --- a/mpm/python/usrp_mpm/periph_manager/n3xx.py +++ b/mpm/python/usrp_mpm/periph_manager/n3xx.py @@ -35,6 +35,7 @@ N3XX_DEFAULT_CLOCK_SOURCE = 'internal' N3XX_DEFAULT_TIME_SOURCE = 'internal' N3XX_DEFAULT_ENABLE_GPS = True N3XX_DEFAULT_ENABLE_FPGPIO = True +N3XX_DEFAULT_ENABLE_PPS_EXPORT = True N3XX_FPGA_COMPAT = (5, 2) N3XX_MONITOR_THREAD_INTERVAL = 1.0 # seconds N3XX_SFP_TYPES = {0:"", 1:"1G", 2:"10G", 3:"A", 4:"W"} @@ -600,7 +601,7 @@ class n3xx(PeriphManagerBase): default_args.get('time_source', N3XX_DEFAULT_TIME_SOURCE) ) self.enable_pps_out( - default_args.get('pps_export', True) + default_args.get('pps_export', N3XX_DEFAULT_ENABLE_PPS_EXPORT) ) def _init_meas_clock(self): @@ -710,6 +711,13 @@ class n3xx(PeriphManagerBase): self.log.error( "Cannot run init(), device was never fully initialized!") return False + # We need to disable the PPS out during clock initialization in order + # to avoid glitches. + enable_pps_out_state = self._default_args.get( + 'pps_export', + N3XX_DEFAULT_ENABLE_PPS_EXPORT + ) + self.enable_pps_out(False) if "clock_source" in args: self.set_clock_source(args.get("clock_source")) if "clock_source" in args or "time_source" in args: @@ -725,6 +733,9 @@ class n3xx(PeriphManagerBase): "external LOs! Setting to internal.") args[lo_source] = 'internal' result = super(n3xx, self).init(args) + # Now the clocks are all enabled, we can also re-enable PPS export if + # it was turned off: + self.enable_pps_out(enable_pps_out_state) for xport_mgr in itervalues(self._xport_mgrs): xport_mgr.init(args) return result |