OK, I have now figured it out myself. As you can find deeply hidden inside the code (Definition of the CPLD
-class), the setting of the RF-switch register is not kept between experiments:
:param rf_sw: Initial CPLD RF switch register setting (default: 0x0). Knowledge of this state is not transferred between experiments.
Therefore, my code now looks as follows and it seems to work:
@kernel
def run(self):
self.core.reset()
if self.init:
self.cpld.init()
self.dds1.init()
self.dds2.init()
self.core.break_realtime()
sta=self.cpld.sta_read()
sw_sta=urukul.urukul_sta_rf_sw(sta)
self.core.break_realtime()
self.cpld.cfg_write(urukul.urukul_cfg(rf_sw=sw_sta, led=0,
profile=urukul.DEFAULT_PROFILE,
io_update=0, mask_nu=0, clk_sel=0,
sync_sel=0, rst=0, io_rst=0, clk_div=0))
self.core.break_realtime()
if self.first:
self.dds1.cfg_sw(True)
if self.second:
self.dds2.cfg_sw(True)