forked from M-Labs/artiq
phaser: workaround malformed output with `mixer_ena=1` & `nco_ena=0`
When Phaser is powered on and `init()` is first called, enabling the DAC-mixer while leaving the NCO disabled causes malformed output. This commit implements a workaround by making sure the NCO is enabled, before being set to the disired state. This commit also avoids the following procedure, resulting in malformed output: 1. Operate Phaser with the DAC Mixer and NCO enabled 2. Set the NCO to a non-zero frequency 3. Disable the NCO in the device_db 4. Re-initialise Phaser After this procedure, with CMIX disabled, incorrect output is produced. To clear the fault one must re-enable the NCO and write the NCO freqeuncy to zero before disabling the NCO. Signed-off-by: Marius Weber <marius.weber@physics.ox.ac.uk>
This commit is contained in:
parent
4fa2028671
commit
f97baa8aec
|
@ -279,6 +279,16 @@ class Phaser:
|
|||
else:
|
||||
raise ValueError("DAC alarm")
|
||||
|
||||
# avoid malformed output for: mixer_ena=1, nco_ena=0 after power up
|
||||
self.dac_write(self.dac_mmap[2] >> 16, self.dac_mmap[2] | (1 << 4))
|
||||
delay(40*us)
|
||||
self.dac_sync()
|
||||
delay(100*us)
|
||||
self.dac_write(self.dac_mmap[2] >> 16, self.dac_mmap[2])
|
||||
delay(40*us)
|
||||
self.dac_sync()
|
||||
delay(100*us)
|
||||
|
||||
# power up trfs, release att reset
|
||||
self.set_cfg(clk_sel=self.clk_sel, dac_txena=0)
|
||||
|
||||
|
|
Loading…
Reference in New Issue