cancel
Showing results for 
Search instead for 
Did you mean: 

h3lis331dl trigger and data

CHRISTOA
Associate

Hi,

I am using h3lis331dl accelerometer with imx8mp and also using the default st_accel and st_accel_i2c drivers in Linux. Most of the part works correctly. 

I am using udevadm to monitor the trigger in C# code.

/bin/udevadm monitor iio:device0

This works when I manually trigger with the command "sudo udevadm trigger /sys/bus/iio/devices/iio:device0"

Is it the right way to monitor the trigger/interrupt?

Also, in_accel_*_raw and in_accel_*_scale files are available in /sys/bus/iio/devices/iio:device0 directory. How can I calculate the acceleration with the raw, scale and mount_matrix? 

Could someone please help me?

Here is the device tree node:

 

accelerometer@19 {
compatible = "st,h3lis331dl-accel"; 
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_accel>;
reg = <0x19>;
        st,drdy-int-pin = <1>;
vdd-supply = <&reg_board>;
vddio-supply = <&reg_board>; 
interrupt-parent = <&gpio3>;
interrupts = <29 IRQ_TYPE_LEVEL_HIGH>, <28 IRQ_TYPE_LEVEL_HIGH>;
};

Thanks

Chris

0 REPLIES 0