I'm attempting to enable the Transmit / DDS for Transmit (Tx) DMA output buffer transfers for Tx 1 on the PicoZed SDR through a script without the aid of the IIO Oscope application (and the associated IIO server daemon [iiod]).
From my understanding, in order to enable / activate the data for Tx1, I can use the following echo commands to set the following IIO parameters for the cf-ad94361-dds-core-lpc (iio:device2) device to a one (1):
echo 1 > /sys/bus/iio/devices/iio:device2/scan_elements/out_voltage0_en
echo 1 > /sys/bus/iio/devices/iio:device2/scan_elements/out_voltage1_en
echo 1 > /sys/bus/iio/devices/iio:device2/buffer/enable
However, after I a script that contains these commands, it appears that when I write data to the DMA Tx buffer the spectrum doesn't appear to change as if the data isn't being written.
Am I missing something in order to enable the DAC output buffers for Tx1?
Any feedback would be appreciated. I look forward to your response.
Thank you. I will try to use the explicit example for which you provided the link above. I am cross compiling on a PC for the arria10SOC 9371 development kit. I tried installing the libiio for that environment by downloading libiio-setup.exe and running that. However running Make produces:
make all cc -Wall -c -o ad9361-iiostream.o ad9361-iiostream.cad9361-iiostream.c:28:17: fatal error: iio.h: No such file or directory #include <iio.h> ^compilation terminated.make: *** [<builtin>: ad9361-iiostream.o] Error 1
Environment information (running in Cygwin )
(DS-5 built in)
GCC C++ Compiler 4 [arm-linux-gnueabihf]
GCC C Compiler 4 [arm-linux-gnueabihf]GCC Assembler 4 [arm-linux-gnueabihf]GCC C Linker 4 [arm-linux-gnueabihf]GCC C++ Linker 4 [arm-linux-gnueabihf]GCC Archiver 4 [arm-linux-gnueabihf]
Sorry, I know this is likely something straight forward but is there a method for installing the lib so that my cross compile env can reference it properly? Thank you.
The Arria10 is pretty powerful, I would recommend just compiling everything directly on the board itself.
Thank you Travis. Makes sense. I did that after compiling/installing libiio from git repo to fix the missing references to <iio.h> issue I had there too. So seems to be working as I can make the ad9371_iiostream project executable and am able to run it. I need to dig in now to customize it for my project. Thank you for your help!
So, I am still curious though, is there just no way to use the file descriptors to setup the tx DDS streaming. Is that just not possible to your knowledge?
Thank you again.
You can totally control the DDSs through the file descriptors. Its just error prone so we don't recommend it. Basically convert the related libiio calls into their related file descriptors. Enabling the DDS on AD9361 would be like:
echo 1 > /sys/bus/iio/devices/iio:device3/out_altvoltage0_TX1_I_F1_raw
AD9371 would be similar but using a different iio:device number.
Instead of writing the sysfs files directly, you can also use iio_attr tool.