forked from M-Labs/artiq
1
0
Fork 0

coredevice: adf5356: add test for failed PLL lock

Signed-off-by: Etienne Wodey <wodey@iqo.uni-hannover.de>
This commit is contained in:
Etienne Wodey 2020-11-09 19:33:20 +01:00 committed by Sébastien Bourdeauducq
parent 3844123c13
commit e8730a7e14
1 changed files with 16 additions and 0 deletions

View File

@ -62,6 +62,17 @@ class ADF5356Exp(EnvExperiment):
delay(5 * ms)
self.set_dataset("muxout", self.dev.read_muxout())
@kernel
def muxout_lock_detect_no_lock(self):
self.core.break_realtime()
self.dev.cpld.init()
self.dev.init()
# set external SMA reference input
self.dev.cpld.write_reg(1, (1 << 4))
self.dev.set_frequency(100 * MHz)
delay(5 * ms)
self.set_dataset("muxout", self.dev.read_muxout())
@kernel
def set_get_output_power(self):
self.core.break_realtime()
@ -168,6 +179,11 @@ class ADF5356Test(ExperimentCase):
muxout = self.dataset_mgr.get("muxout")
self.assertTrue(muxout)
def test_muxout_lock_detect_no_lock(self):
self.execute(ADF5356Exp, "muxout_lock_detect_no_lock")
muxout = self.dataset_mgr.get("muxout")
self.assertFalse(muxout)
def test_set_too_high_frequency(self):
with self.assertRaises(ValueError):
self.execute(ADF5356Exp, "set_too_high_frequency")