From a65239957f2152fd799301314190e937f006a712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Thu, 17 Sep 2020 14:13:10 +0000 Subject: [PATCH] ad53xx: distinguish errors --- artiq/coredevice/ad53xx.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/artiq/coredevice/ad53xx.py b/artiq/coredevice/ad53xx.py index c4ff6d3aa..3445555d9 100644 --- a/artiq/coredevice/ad53xx.py +++ b/artiq/coredevice/ad53xx.py @@ -178,6 +178,8 @@ class AD53xx: self.write_offset_dacs_mu(self.offset_dacs) if not blind: ctrl = self.read_reg(channel=0, op=AD53XX_READ_CONTROL) + if ctrl == 0xffff: + raise ValueError("DAC not found") if ctrl & 0b10000: raise ValueError("DAC over temperature") delay(25*us)