mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-19 00:16:29 +08:00
adf5356: sync before setting muxout
This commit is contained in:
parent
49e402780b
commit
48f3071ee8
@ -84,10 +84,11 @@ class ADF5356:
|
|||||||
|
|
||||||
:param blind: Do not attempt to verify presence.
|
:param blind: Do not attempt to verify presence.
|
||||||
"""
|
"""
|
||||||
|
self.sync()
|
||||||
if not blind:
|
if not blind:
|
||||||
# MUXOUT = VDD
|
# MUXOUT = VDD
|
||||||
self.regs[4] = ADF5356_REG4_MUXOUT_UPDATE(self.regs[4], 1)
|
self.regs[4] = ADF5356_REG4_MUXOUT_UPDATE(self.regs[4], 1)
|
||||||
self.sync()
|
self.write(self.regs[4])
|
||||||
delay(1000 * us)
|
delay(1000 * us)
|
||||||
if not self.read_muxout():
|
if not self.read_muxout():
|
||||||
raise ValueError("MUXOUT not high")
|
raise ValueError("MUXOUT not high")
|
||||||
@ -95,7 +96,7 @@ class ADF5356:
|
|||||||
|
|
||||||
# MUXOUT = DGND
|
# MUXOUT = DGND
|
||||||
self.regs[4] = ADF5356_REG4_MUXOUT_UPDATE(self.regs[4], 2)
|
self.regs[4] = ADF5356_REG4_MUXOUT_UPDATE(self.regs[4], 2)
|
||||||
self.sync()
|
self.write(self.regs[4])
|
||||||
delay(1000 * us)
|
delay(1000 * us)
|
||||||
if self.read_muxout():
|
if self.read_muxout():
|
||||||
raise ValueError("MUXOUT not low")
|
raise ValueError("MUXOUT not low")
|
||||||
@ -103,8 +104,7 @@ class ADF5356:
|
|||||||
|
|
||||||
# MUXOUT = digital lock-detect
|
# MUXOUT = digital lock-detect
|
||||||
self.regs[4] = ADF5356_REG4_MUXOUT_UPDATE(self.regs[4], 6)
|
self.regs[4] = ADF5356_REG4_MUXOUT_UPDATE(self.regs[4], 6)
|
||||||
else:
|
self.write(self.regs[4])
|
||||||
self.sync()
|
|
||||||
|
|
||||||
@kernel
|
@kernel
|
||||||
def set_att(self, att):
|
def set_att(self, att):
|
||||||
|
Loading…
Reference in New Issue
Block a user