From 48f3071ee8ff95d8ed74a5f8a01248a3064c0244 Mon Sep 17 00:00:00 2001 From: mwojcik Date: Thu, 30 May 2024 16:55:23 +0800 Subject: [PATCH] adf5356: sync before setting muxout --- artiq/coredevice/adf5356.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/artiq/coredevice/adf5356.py b/artiq/coredevice/adf5356.py index 0bffb91be..38e5b7d6c 100644 --- a/artiq/coredevice/adf5356.py +++ b/artiq/coredevice/adf5356.py @@ -84,10 +84,11 @@ class ADF5356: :param blind: Do not attempt to verify presence. """ + self.sync() if not blind: # MUXOUT = VDD self.regs[4] = ADF5356_REG4_MUXOUT_UPDATE(self.regs[4], 1) - self.sync() + self.write(self.regs[4]) delay(1000 * us) if not self.read_muxout(): raise ValueError("MUXOUT not high") @@ -95,7 +96,7 @@ class ADF5356: # MUXOUT = DGND self.regs[4] = ADF5356_REG4_MUXOUT_UPDATE(self.regs[4], 2) - self.sync() + self.write(self.regs[4]) delay(1000 * us) if self.read_muxout(): raise ValueError("MUXOUT not low") @@ -103,8 +104,7 @@ class ADF5356: # MUXOUT = digital lock-detect self.regs[4] = ADF5356_REG4_MUXOUT_UPDATE(self.regs[4], 6) - else: - self.sync() + self.write(self.regs[4]) @kernel def set_att(self, att):