IIO Linux kernel tools

Stable: 16.01.2020 - 14:07 / Revision: 16.01.2020 - 14:03

I am here to prevent the first-page-empty bug!

Linux® kernel provides some user space tools that can be used for testing the IIO subsystem.

1 Article purpose

The purpose of this article is to:

  • briefly introduce the IIO user space tools that comes with the Linux® kernel
  • provide a few examples using these tools

2 Introduction

These tools use IIO sysfs and character device directly without libiio (See IIO user space interface for further details).

3 Tools

The Linux® kernel provides the following IIO user space tools:

  • lsiio: example application that provides a list of IIO devices and triggers.
root@stm32mp1:~# lsiio
Device 001: 48003000.adc:adc@100
Device 000: 48003000.adc:adc@0
Trigger 018: tim3_ch4
Trigger 007: tim1_ch3
...
root@stm32mp1:~# iio_event_monitor /dev/iio:device0 &
Event: time: 1529352199639112110, type: voltage, channel: 0, evtype: thresh, direction: either
Event: time: ...
  • iio_generic_buffer: example application that reads data from buffer.
  • iio_utils: set of routines built-in above IIO tools, typically used to access sysfs files.

4 Source code

The Linux® kernel IIO tools source code can be found under tools/iio[1] directory:

5 Installation on your target

The Linux® kernel IIO tools aren't embedded by default in OpenSTLinux distribution. They can be compiled independently and then installed on the target. See How to build Linux kernel user space tools.

6 References

  1. tools/iio , Linux®IIO tools source code


IMPORTANT NOTICE – READ CAREFULLY
STMicroelectronics NV and its subsidiaries ("ST") reserve the right to make changes, corrections, enhancements, modifications, and improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgment.

Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of purchasers’ products.

No license, express or implied, to any intellectual property right is granted by ST herein.

Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.

ST and the ST logo are trademarks of ST. For additional information about ST trademarks, refer to www.st.com/trademarks. All other product or service names are the property of their respective owners.

Information in this document supersedes and replaces information previously supplied in any prior versions of this document.