Closed deblauwetom closed 5 years ago
Hi deblauwetom,
Yes I confirm the raw value can be read using the
/sys/bus/iio/devices/iio:devicex/in_xxx_x_raw /sys/bus/iio/devices/iio:devicex/in_xxx_y_raw /sys/bus/iio/devices/iio:devicex/in_xxx_z_raw
but is very slow because is only for spare access
To read data in a standard way (using FIFO and iio channels) there is the generic_buffer iio utility in linux kernel documentation, otherwise you can use the Linux/Android HAL in this repository: https://github.com/STMicroelectronics/STMems_Android_Sensor_HAL_IIO
Generic Buffer utility need the scan_elements directory but in st_imu68 there should be this entry path (please see in CONFIG_IIO_BUFFER is enabled in your .config)
I compiled the st_imu68_i2c driver for use with a 4.14 linux kernel with the industrial IO subsystem successfully. And I could read values from the device using the files that provide the "raw" values. However, it is very slow when I just cat the raw values very fast. Normally, in IIO you can define a hrtimer with scan_elements, but the iio device you get from the linux driver does not contain such a 'scan_elements' subdir so it seems I can't attach a hrtimer trigger to it. However, there is a sample_frequency file, but not clear to me what this then does or how it is supposed to work. Is there maybe a high level overview documentation somewhere of how you can get the values faster?