lsm6dsm tilt detection

Hi

I am using lsm6dsm sensor with nrf5340, could you please provide me an example code for that for tilt detection functionality

Thanks
Sumant

Parents
  • I can't speak for the LSM6DSM but most of the STM IMU drivers I've seen on Zephyr don't have direct support for the "extra" functionality (MLC, pedometer, built-in activity detection, sensor fusion, FIFO, etc.) aside from sensor hub. You would probably need to add that support in manually, or use a generic I2C/SPI interface for a custom driver. ST provides a platform-agnostic C driver repository with example code for everything you may want to configure on your IMU. The repo is also baked into Zephyr, and the LSM drivers all seem to call the functions within the linked repo. For context, in Zephyr they're under zephyr/drivers/sensor/st/stmemsc. 

Reply
  • I can't speak for the LSM6DSM but most of the STM IMU drivers I've seen on Zephyr don't have direct support for the "extra" functionality (MLC, pedometer, built-in activity detection, sensor fusion, FIFO, etc.) aside from sensor hub. You would probably need to add that support in manually, or use a generic I2C/SPI interface for a custom driver. ST provides a platform-agnostic C driver repository with example code for everything you may want to configure on your IMU. The repo is also baked into Zephyr, and the LSM drivers all seem to call the functions within the linked repo. For context, in Zephyr they're under zephyr/drivers/sensor/st/stmemsc. 

Children
No Data
Related