2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

ad53xx: distinguish errors

This commit is contained in:
Robert Jördens 2020-09-17 14:13:10 +00:00
parent c55f2222dc
commit a65239957f

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)