I am using iio.py to interface with the ADRV9009. I want to use this library to transmit samples and mirror the DAC Buffer Output behaviour of the iio-oscilloscope. I have set the tx device 'raw' attribute of altvoltage0, altvoltage1, altvoltage2 and altvoltage3 to 0. I have enabled voltage0, voltage1, voltage2 and voltage 3 of the tx device. I have also created a cyclic buffer within the tx device. However, I haven't written anything to the buffer and I get a tone. Any suggestions?
It appears that when I create the buffer the DDS is enabled despite setting 'raw' to 0 for every transmit channel.
Solution was to constantly push to transmit buffer in an endless loop.
Just an FYI, by default the transmitters will use the DDS sources until you push a buffer to the DAC DMAs. When the destructors are called in python for the transmitter, after you have pushed a buffer, the DAC source goes back to the DDSs. So if you submit a cyclic buffer then your python app exits, it will go back to the DDSs.
Thanks. A quick question regarding bandwidth. I tried reducing the rx bandwidth to 100MHz using:
self._ctx = iio.NetworkContext(ip_addr)
self._ctrl = self._ctx.find_device("adrv9009-phy")
rx_bw = self._ctrl.find_channel('voltage0',False)
rx_bw.attrs['sampling_frequency'].value = str(100000000)
However, i get an OSError: [Errno 22] Invalid argument (_checkNegative, raise OSError(-result,_stderror(-result))
To change bandwidth on ADRV9009 requires loading profiles. Very few IIO attributes can be configured dynamically.