2020-10-30 01:09 AM
LSM6DSL is connected to processor via i2c bus
Following are the configuration made in dts and config file:
imu: st-lsm6dsl@6b {
compatible = "st,lsm6dsl";
reg = <0x6b>;
};
config file
CONFIG_IIO_ST_LSM6DSX=y
CONFIG_IIO_ST_LSM6DSX_I2C=y
I am able to see device address (0x6B) at boot time but not able to read value from sys/bus/i2c/devices/2-006B/iio:device0 and iio:device1 on doing cat in_accel_x_raw
2020-11-02 04:04 AM
Hi @RMath.3 ,
are you using the STMems_Linux_IIO_drivers for LSM6DSL you can find on Ghithub? (Well, they are for the LSM6DSM, but they are compatible too)
You have to write at least this instruction the to be able to read the dataout (p.22 of the AN5040 app note).
1. Write CTRL1_XL = 60h // Acc = 416 Hz (High-Performance mode)
-Eleon
2020-11-03 12:28 AM
Hi @Eleon BORLINI
I am using a driver similar to following one, with Linux 5.4
https://github.com/torvalds/linux/tree/master/drivers/iio/imu/st_lsm6dsx
-Rohan M
2020-11-24 03:32 AM
Hi @RMath.3 ,
did you solve your issue or did you try with posting your question on Github?
-Eleon