forked from M-Labs/artiq
1
0
Fork 0

ad9910: add power down method

Signed-off-by: Robert Jördens <rj@quartiq.de>
This commit is contained in:
Robert Jördens 2018-10-25 16:02:54 +00:00
parent 3538444876
commit 0b3b07a7da
1 changed files with 10 additions and 0 deletions

View File

@ -165,6 +165,16 @@ class AD9910:
return
raise ValueError("PLL lock timeout")
@kernel
def power_down(self, bits=0b1111):
"""Power down DDS.
:param bits: power down bits, see datasheet
"""
self.write32(_AD9910_REG_CFR1, 0x00000002 | (bits << 4))
delay(1*us)
self.cpld.io_update.pulse(1*us)
@kernel
def set_mu(self, ftw, pow=0, asf=0x3fff):
"""Set profile 0 data in machine units.