forked from M-Labs/artiq
1
0
Fork 0

ad53xx: distinguish errors

This commit is contained in:
Robert Jördens 2020-09-17 14:13:10 +00:00
parent c55f2222dc
commit a65239957f
1 changed files with 2 additions and 0 deletions

View File

@ -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)