cancel
Showing results for 
Search instead for 
Did you mean: 

How do I enable MLC code in LSM6DSOX driver in Linux 5.10, is there any example?

Evelina CAMILLERI
ST Employee
 
1 ACCEPTED SOLUTION

Accepted Solutions
Evelina CAMILLERI
ST Employee

The LSM6DSOX driver for linux IIO:

https://github.com/STMicroelectronics/STMems_Linux_IIO_drivers/tree/linux-4.19.y-gh/drivers/iio/imu/st_lsm6dsox

embeds a sample code that configures the MLC / FSM for "6D position recognition", this creates an IIO device for generating events when detected the 6D position once enabled through the sysfs by writing 1 in the file:

/sys/bus/iio/devices/iio:device<x>/events/in_activity0_thresh_rising_en

where x represents the IIO index for this MLC/FSM device that depends on the already available IIO devices registered in the board.

The sample code embedded in the IIO LDD can be customized by using the already available application examples for MLC: https://github.com/STMicroelectronics/STMems_Machine_Learning_Core/tree/master/application_examples

View solution in original post

1 REPLY 1
Evelina CAMILLERI
ST Employee

The LSM6DSOX driver for linux IIO:

https://github.com/STMicroelectronics/STMems_Linux_IIO_drivers/tree/linux-4.19.y-gh/drivers/iio/imu/st_lsm6dsox

embeds a sample code that configures the MLC / FSM for "6D position recognition", this creates an IIO device for generating events when detected the 6D position once enabled through the sysfs by writing 1 in the file:

/sys/bus/iio/devices/iio:device<x>/events/in_activity0_thresh_rising_en

where x represents the IIO index for this MLC/FSM device that depends on the already available IIO devices registered in the board.

The sample code embedded in the IIO LDD can be customized by using the already available application examples for MLC: https://github.com/STMicroelectronics/STMems_Machine_Learning_Core/tree/master/application_examples