This version is outdated by a newer approved version.This version (20 Aug 2021 10:03) is a draft.
Approvals: 0/1
This is an old revision of the document!
IIO System Considerations Tips & Tricks
IIO context timeout (libiio)
May be triggered by low sample rates and large buffers
Long blocking calls (some calibration, profile load, etc.)
Increase iio_context_set_timeout() timeout parameter or set to 0 to disables the timeout
Buffer handling, sizes and counts
Typically set to a frame or chunk size suitable for signal processing (e.g. N x FFT_size)
Number of discrete buffers are configurable, default is 4.
Can change this using iio_device_set_kernel_buffers_count()
Capturing starts as soon as the buffer is created!
iio_device_create_buffer()
FIFO like behavior new data is dropped in case it's not consumed fast enough!
IIO buffer DMA max block size
Max buffer size is limited by the max_block_size parameter
Default 16M
Can be adjusted
There are two ways to adjust the max block size
sysfs
Set via /sys/module/industrialio_buffer_dma/parameters/max_block_size in bytes
This specifies any shell prompt running on the target
root@analog:~# echo 67108864 > /sys/module/industrialio_buffer_dma/parameters/max_block_size
root@analog:~# cat /sys/module/industrialio_buffer_dma/parameters/max_block_size
67108864
root@analog:~#
Kernel command line
Append the following to your kernel command line