cancel
Showing results for 
Search instead for 
Did you mean: 

LSM6DSV320X LPF2 not working

svb_parametric
Associate II

Hi 

Because our recorded LG acceleration data shows strong aliasing artifacts we tried differten sensor configurations but nothing realy helped. Even worse we coud not see any effect of the LPF2 filter despide ODR and filter frequency settings. So we wunder if we have an error in our configuration or if the LPF2 not works as expected. 

With the following LSM configuration we expectect that the spectogram of the LG sensosr data would not show any artifacts of frequency above 250Hz.
But what we see:
- Frequencies below 250Hz apear as expected 
- Frequencies above 250Hz are folded down into the range 0-250Hz

We are using the FIFO buffer to achieve constand sampling while retriving the data from the sensor with the MCU via I2C in a batch abaut 5 times per secound. For the sensor control we use the mems c-driver from gitHub (https://github.com/STMicroelectronics/STMems_Standard_C_drivers/tree/master/lsm6dsv320x_STdC).

The current LMS configuration :
- High Accuracy Operation Mode
- ODR : 1000
- LPF2 : ODR/4
- FIFO Continuous mode with BDR: 480 (500)
- UI XLG fitler chain configuration (according AN6119 Chap. 3.8) :
-> Analog Filter (Fc:?) -> ADC (Fs:1000sps) -> LPF1 (Fc:500Hz) -> LPF2 (Fc:250Hz) -> FIFO (Fs:500sps) 

----

/* Sensor reset */
...

/* Enable Block Data Update */
lsm6dsv320x_block_data_update_set(&xImuIntApi, PROPERTY_ENABLE); 

/* Set operation mode */
lsm6dsv320x_xl_mode_set(&xImuIntApi, LSM6DSV320X_XL_HIGH_ACCURACY_ODR_MD);

/* Set full scale */
lsm6dsv320x_xl_full_scale_set(&xImuIntApi, LSM6DSV320X_16g); 

/* Configure filtering chain */
lsm6dsv320x_filt_xl_hp_set(&xImuIntApi, PROPERTY_DISABLE);
lsm6dsv320x_filt_xl_lp2_set(&xImuIntApi, PROPERTY_ENABLE);
lsm6dsv320x_filt_xl_lp2_bandwidth_set(&xImuIntApi, LSM6DSV320X_XL_ULTRA_LIGHT); // ODR/4

/* Set FIFO batch XL/Gyro ODR */
lsm6dsv320x_fifo_xl_batch_set(&xImuIntApi, LSM6DSV320X_XL_BATCHED_AT_480Hz);

/* Set FIFO mode to Stream mode (aka Continuous Mode) */
lsm6dsv320x_fifo_mode_set(&xImuIntApi, LSM6DSV320X_STREAM_MODE);

/* Set Output Data Rate */
lsm6dsv320x_xl_data_rate_set(&xImuIntApi, LSM6DSV320X_ODR_HA01_AT_1000Hz);
----

We also tried other configuratons e.g ODR:500Hz , LPF: ODR/2 or to force an effect ODR: 4000Hz, LPF2: ODR/200 (Fc: 20Hz!) but the spectrogram look still the same.

What's wrong with the configuration or do we missunderstand the LPF2 functionality?

1 REPLY 1
svb_parametric
Associate II

Hi 
Attached the register dump of the LSM6 after configuration.

Can anybody help?