diff options
author | Grant Meyerhoff <grant.meyerhoff@ni.com> | 2021-06-18 17:23:49 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-06-22 07:44:09 -0500 |
commit | a8cb5d635996d9eee0838cfae88c9928a64d83e6 (patch) | |
tree | 2cd398c649450c1874e1431148a39b8edc9ce094 /mpm/python/usrp_mpm/periph_manager/x4xx.py | |
parent | 550b704c740c130a2a1e7bbf567905a70c8c701b (diff) | |
download | uhd-a8cb5d635996d9eee0838cfae88c9928a64d83e6.tar.gz uhd-a8cb5d635996d9eee0838cfae88c9928a64d83e6.tar.bz2 uhd-a8cb5d635996d9eee0838cfae88c9928a64d83e6.zip |
mpm: restore rfdc nco frequency after setting sync source
After setting sync sources, the RFDCs get reset, we need to restore the previously set frequencies so that the device continues to transmit/receive at the requested frequency
Diffstat (limited to 'mpm/python/usrp_mpm/periph_manager/x4xx.py')
-rw-r--r-- | mpm/python/usrp_mpm/periph_manager/x4xx.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/x4xx.py b/mpm/python/usrp_mpm/periph_manager/x4xx.py index b32cbeb08..70a087d14 100644 --- a/mpm/python/usrp_mpm/periph_manager/x4xx.py +++ b/mpm/python/usrp_mpm/periph_manager/x4xx.py @@ -876,6 +876,10 @@ class x4xx(ZynqComponents, PeriphManagerBase): # and throw an exception. We need to put the device back into a safe # state in that case. self.set_master_clock_rate(self._master_clock_rate) + # Restore the nco frequency to the same values as before the sync source + # was changed, to ensure the device transmission/acquisition continues at + # the requested frequency. + self.rfdc.rfdc_restore_nco_freq() except RuntimeError as ex: err = f"Setting clock_source={clock_source},time_source={time_source} " \ f"failed, falling back to {self._safe_sync_source}. Error: " \ |