cancel
Showing results for 
Search instead for 
Did you mean: 

LSM6DSO ACC and GYR setting

JXiao.1
Associate II

Hi,

I am using LSM6DSO to measure acceleration and angular velocity. To save the power of device, I want to use accelerator in most case. Some conditions, the gyroscope will need to open.

I used the function 'lsm6dso_fifo_xl_batch_set', 'lsm6dso_fifo_gy_batch_set', 'lsm6dso_xl_data_rate_set' and 'lsm6dso_gy_data_rate_set' to control the sensor. The function is provided by lsm6dso_reg.c. It should be a official library. I used them in the following picture.

0693W00000Ba7ifQAB.pngI found when I set them off simultaneously, there is no data from the sensor. But if one of them is open and another is off, two types' data can be read from sensor. It is very strange. Then I use funcition to check the parameters.

0693W00000Ba8oFQAR.pngI have found the gyroscope cannot be set under 26Hz. When I set it off or 12.5Hz, it will be changed to 26 automatically. But it can be set to higher frequency.How to change the problem?

Do you have some advices?

12 REPLIES 12

Hi @JXiao.1​ ,

can I ask you which drivers are you using?

using the official ones, you can get all the functions you need (the names of the functions are pretty self explanatory)

Niccolò

Hi Niccolo,

I think I am using the official library from github. This is the link of the library: https://github.com/STMicroelectronics/lsm6dso/tree/18059a837b5266604c0a08e6ceffe179f4dd79d9

I didn't found the function to turn off the FSM in the library.​

Hi @JXiao.1​ ,

sorry, I got confused with other sensors.

try to run a lsm6dso_fsm_enable_get to check if it is enabled.

then, just to better understand: do you want to use the FSM without the gyro?

are you sure that your configuration lets you do it?

Niccolò