DISCONTINUED (October 2022): the maintenance for this repository has been discontinued. Please refer to https://github.com/STMicroelectronics/st-mems-android-linux-drivers-iio for the up-to-date drivers repository. This repository contains Linux Kernel (v3.10, v3.14, v3.18, v4.9, v4.14, v4.19) including STMicroelectronics MEMS IIO sensor support
Other
75
stars
42
forks
source link
Configuring a hrtimer-trigger or buffered-trigger for iio-device and ODR in driver lower than actual ODR #19
Hello, I have been having issues with configuring configuring a hrtimer-trigger or buffered-trigger for my iio-device. I am using a ISM330dlc (IMU) and it is connected to a rasberry pi cm4. As a driver I am using the LSM6DSX driver because my IMU is listed as configurable sensor in the Documentation. My problem is that when I load my device tree overlay (dtbo file) the /sys/bus/iio/devices/iio:deviceX/ directory appears but only these files appear.
In basically every documentation file, they say that a /sys/bus/iio/devices/iio:deviceX/trigger/ directory should appear and it doesn't matter what I do it doesn't appear. I have checked and the ISM330dlc supports triggers, even 2. Chatgpt has suggested I should change some parameters in the config.txt, but I have checked and every functionality I need.
And as you can see everything is set to "m" or "y" so there shouldn't be a problem there.
I have also looked into my dts file:
And chatgbt suggested I should do it in this fashion:
Unfortunately I haven't found anything regarding triggers under this Documentation path linux/Documentation/devicetree/bindings/iio/imu /st,lsm6dsx.yaml .
Also just a side question, is the buffered trigger a hardware trigger from the IMU because that is what I need besides the Hrtimer-trigger. What I really need, is to compare:
-polling the Data-ready register to see whether new data is ready which then serves me as an interrupt if the data is ready
-waiting for hardware interrupt when new data is ready
To compare them I need to know if there is any chance I can do this by using iio-devices or moreover iio-triggers.
And also my ODR can just be configured to 433Hz even though I know for a fact that my IMU can be configured to an ODR of even 1.6KHz. I only need it set to 833Hz but the issue remains. I am a newbie linux, the iio-framework and the device tree, so I would be extremely thankful if you could provide some backround information to your answer, if you think you might have a solution for me.
Thank you very much in advance.
Hello, I have been having issues with configuring configuring a hrtimer-trigger or buffered-trigger for my iio-device. I am using a ISM330dlc (IMU) and it is connected to a rasberry pi cm4. As a driver I am using the LSM6DSX driver because my IMU is listed as configurable sensor in the Documentation. My problem is that when I load my device tree overlay (dtbo file) the /sys/bus/iio/devices/iio:deviceX/ directory appears but only these files appear.
In basically every documentation file, they say that a /sys/bus/iio/devices/iio:deviceX/trigger/ directory should appear and it doesn't matter what I do it doesn't appear. I have checked and the ISM330dlc supports triggers, even 2. Chatgpt has suggested I should change some parameters in the config.txt, but I have checked and every functionality I need.
And as you can see everything is set to "m" or "y" so there shouldn't be a problem there.
I have also looked into my dts file:
And chatgbt suggested I should do it in this fashion:
Unfortunately I haven't found anything regarding triggers under this Documentation path linux/Documentation/devicetree/bindings/iio/imu /st,lsm6dsx.yaml .
Also just a side question, is the buffered trigger a hardware trigger from the IMU because that is what I need besides the Hrtimer-trigger. What I really need, is to compare: -polling the Data-ready register to see whether new data is ready which then serves me as an interrupt if the data is ready -waiting for hardware interrupt when new data is ready To compare them I need to know if there is any chance I can do this by using iio-devices or moreover iio-triggers.
And also my ODR can just be configured to 433Hz even though I know for a fact that my IMU can be configured to an ODR of even 1.6KHz. I only need it set to 833Hz but the issue remains. I am a newbie linux, the iio-framework and the device tree, so I would be extremely thankful if you could provide some backround information to your answer, if you think you might have a solution for me. Thank you very much in advance.