How to use IIO triggered buffer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-05 10:43 PM
I use ASM330LHH as Linux IIO.
Source and DTS were added.
We found that /sys/bus/iio also added a device.
I also checked reading data in direct mode from sysfs.
Therefore, I think there is no problem with the H/W connection.
​
I want to use Trigger mode to read multiple data, but I don't see trigger and buffer in Directory.
I tried the # echo 0> /sys/devices/iio_sysfs_trigger/add_trigger command, but I still don't see trigger.
​
​
Kconfig settings are as below.
config_IIO=Y
CONFIG_IIO_BUFFER=Y
CONFIG_IIO_KFIO_BUF=Y
CONFIG_IIO_TRIGGERED_BUFFER=Y
CONFIG_IIO_TRIGGER=Y
CONFIG_IIO_ST_ASM330LHH=Y
CONFIG_IIO_ST_ASM330LHH_I2C=Y
CONFIG_IIO_ST_ASM330LHH_SPI=Y
CONFIG_IIO_ST_ASM330LHH_MAY_WAKEUP=Y
CONFIG_IIO_ST_ASM330LHH_EN_TEMPERATURE_FIFO=Y
​
​
Is there a way to use triggered buffer mode?
​
Kernel version is 4.9.11.
​
Solved! Go to Solution.
- Labels:
-
Accelerometers
-
OpenSTLinux
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-06 4:00 AM
Hi @Simon.Ko​ ,
Are you using the drivers on Github developed by ST --> st_asm330lhh?
In this case, the triggered buffer mode is not supported by the driver, because it uses only the FIFO interrupt, and not the external trigger.
It is possible to modify it, but in case you are using the Github drivers and you need direct help you can open an issue directly on Github (link), so that our experts can track the request and support it.
Let me know your further progresses.
-Eleon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-06 4:00 AM
Hi @Simon.Ko​ ,
Are you using the drivers on Github developed by ST --> st_asm330lhh?
In this case, the triggered buffer mode is not supported by the driver, because it uses only the FIFO interrupt, and not the external trigger.
It is possible to modify it, but in case you are using the Github drivers and you need direct help you can open an issue directly on Github (link), so that our experts can track the request and support it.
Let me know your further progresses.
-Eleon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-16 11:22 PM
Thank you for answer.
As you said, I used the source uploaded on the ST Github.
Modifying the triggered buffer to be possible will take a long time, so I try to use a FIFO.
But I don't know how to use FIFO Interrupt.
I try to read the value of asm330lhh every 15mS for collision detection.
I want to fetch the collected data rather than reading the value every time.
How should I use it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-20 3:26 AM
Hi @Simon.Ko​ ,
I suggest you to ask for help on the Github issue page (link), our experts are there...
-Eleon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-20 3:52 AM
I will register an issue on github.
Thank you very much for your answer.
