Skip to main content
Simon.Ko
Associate
May 6, 2021
Solved

How to use IIO triggered buffer?

0693W00000ANUmLQAX.pngI 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.

​

This topic has been closed for replies.
Eleon BORLINI
Eleon BORLINIBest answer
ST Employee
May 6, 2021

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

4 replies

Eleon BORLINI
Eleon BORLINIBest answer
ST Employee
May 6, 2021

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

Simon.Ko
Simon.KoAuthor
Associate
May 17, 2021

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?

Eleon BORLINI
ST Employee
May 20, 2021

Hi @Simon.Ko​ ,

I suggest you to ask for help on the Github issue page (link), our experts are there...

-Eleon