qllopg It occurs again. And the RTIO underflow occurs in the io update function. Now I move break_realtime()
before the io update in order to solve this problem. Bellow is the current code.
self.write32(_AD9910_REG_CFR3, cfr3 | 0x400) # PFD reset
self.cpld.io_update.pulse(1 * us)
if self.pll_en:
self.write32(_AD9910_REG_CFR3, cfr3)
self.core.break_realtime() # added here
self.cpld.io_update.pulse(1 * us)
if blind:
delay(100 * ms)
else:
# Wait for PLL lock, up to 100 ms
for i in range(100):
sta = self.cpld.sta_read()
lock = urukul_sta_pll_lock(sta)
delay(1 * ms)
if lock & (1 << self.chip_select - 4):
break
if i >= 100 - 1:
raise ValueError("PLL lock timeout")