Wiki

This version (19 Mar 2021 08:22) was approved by Cristian Pop.The Previously approved version (27 Jan 2021 08:43) is available.Diff

no-OS IIO

IIO interfaces and application documentation available at : http://analogdevicesinc.github.io/no-OS/index.html under IIO headline.

BUILD PROJECT WITH IIO SUPPORT

Go to no-OS To build project with no-OS IIO support go to no-OS folder and do:

git submodule update --recursive

Then go to the project “/no-OS/projects/project_name” and execute:

make clean_all

make TINYIIOD=y

For more information about building projects, go to: https://github.com/analogdevicesinc/no-OS/wiki/Building-no-OS-on-Linux. After build, execute command:

make run

The binaries are loaded to the board. Next, it is possible to connect with a libiio client.

For debugging and development execute command:

xsdk -workspace build

IIO-Oscilloscope client

IIO-Oscilloscope is one possible client (it has to be built with SERIAL_BACKEND option), select the corresponding serial port and set baud rate to 921600. For more information about IIO Oscilloscope go to: https://wiki.analog.com/resources/tools-software/linux-software/iio_oscilloscope

Python device over iio client

Helper utilities as client

Helper utilities from Libiio can be used also:

iio_readdev -u serial:/dev/ttyUSB0,921600 -b 400 -s 6400 cf-ad9361-lpc > sample.dat

For more details about libiio helper utilities please visit following link: https://wiki.analog.com/resources/tools-software/linux-software/libiio/iio_readdev

IIO DEMO APPLICATION

A demo iio application can be found in the following location:

https://github.com/analogdevicesinc/no-OS/tree/master/projects/iio_demo

This project is independent of a physical device and should be used as reference, when creating a new iio application for a new iio device. To load data into RAM, that could be seen in iio-oscilloscope application, execute the following command:

cat sample_sine.dat | iio_writedev -u serial:/dev/ttyUSB0,921600 -b 400 demo_device

This will write 400 samples to “demo_device” from “sample_sine.dat” file.

FOLDER STRUCTURE

iio_app – IIO application interface. Sets IIO application communication interface and executes the main application, where commands are received, parsed, and executed. This module is necessary.

iio_ad9361 – This module will register a new interface into iio_interfaces element. Wrapper over ad9361 api, it adapts the interface to iio. This module is optional.

iio_axi_adc – This module will register a new interface into iio_interfaces element. It also creates an iio_axi_adc device instance and a struct iio_device element, that specifies it’s channels and attributes. Wrapper over axi_adc_core, it adapts the interface to iio. This module is optional.

iio_axi_dac – This module will register a new interface into iio_interfaces element. It also creates an iio_axi_dac device instance and a struct iio_device element, that specifies it’s channels and attributes. Wrapper over axi_adc_core, it adapts the interface to iio. This module is optional.

iio_demo – This module is hardware independent and should be used as reference, when creating a new new iio device.

iio – Sets tinyiiod ops callbacks for communicating with the client and ops callbacks for communicating with IIO devices and contains the callbacks used by libtinyiiod.

SOFTWARE ARCHITECTURE

The relations between modules can be seen in the following figure. Doted lines represent function callbacks.

An iio_app instance is always necessary, since it instantiates libtinyiiod library, the rest of iio modules (iio_demo) are optional, each one registering a new device to be checked when a command is received.

LIBTINYIIOD

Is a library to ease the development of software interfacing I/O (IIO) devices. The library abstracts the low-level details of hardware, and provides a simple yet complete programming interface that can be used for advanced projects.

https://github.com/analogdevicesinc/libtinyiiod

resources/tools-software/no-os-software/iio.txt · Last modified: 19 Mar 2021 08:21 by Cristian Pop