I use an Urukul board to generate RF with an AD9910 at 80 MHz and found an interesting behaviour. I would like to know, if it is by design or not intended.
When I use the following code to start the AD9910 after disconnecting ARTIQ from the power supply, there is no output measurable at any frequency even though the LED panel is green:
def build(self):
self.setattr_device("core")
self.dev1 = self.get_device("urukul1_cpld")
self.urk1_ch0 = self.get_device("urukul1_ch0")
@kernel
def run(self):
self.dev1.init()
self.dev1.cfg_switches(0b1111)
self.urk1_ch0.init()
delay(1000*us)
self.dev1.get_att_mu()
delay(1000*us)
self.urk1_ch0.set_att(0*dB)
delay(100*us)
self.urk1_ch0.set_frequency(80*MHz)
delay(100*us)
self.urk1_ch0.set_amplitude(1.0)
delay(100*us)
self.core.wait_until_mu(now_mu())
If I use the set
function instead of set_frequency
, I measure the expected output at 80 MHz. Also afterwards I can change the frequency by using set_frequency
:
def build(self):
self.setattr_device("core")
self.dev1 = self.get_device("urukul1_cpld")
self.urk1_ch0 = self.get_device("urukul1_ch0")
@kernel
def run(self):
self.dev1.init()
self.dev1.cfg_switches(0b1111)
self.urk1_ch0.init()
delay(1000*us)
self.dev1.get_att_mu()
delay(1000*us)
self.urk1_ch0.set_att(0*dB)
delay(100*us)
self.urk1_ch0.set(80*MHz)
delay(100*us)
self.urk1_ch0.set_amplitude(1.0)
delay(100*us)
self.core.wait_until_mu(now_mu())
I checked the documentation, but no such behaviour is mentioned in set_frequency
or set_ftw
. When looking at the source code, there is a comment in set_mu
(which is called from set
), that mentions the shared IO update pin is pulsed to activate the data. No such comment is found in set_ftw
and also I do not see any code, that would pulse the IO pin.
Is this behaviour by design? If yes, why is it not mentioned in the documentation itself?