cancel
Showing results for 
Search instead for 
Did you mean: 

Lis3DH High-pass filter

Vladimir Ermolenko
Associate II

Hi All.

I want to configure the filter in such a way that the data in the out registers are not filtered, and the data for interrupt AOI are filtered. But I have filtered data in both the interrupt and the output registers.

My settings of filter: AX_Write (0x21, 0xC1);

Whats wrong?

1 ACCEPTED SOLUTION

Accepted Solutions

OK, I see.

First of all, you use not allowed configuration:

0690X000006CMhtQAG.png

Please set the HR bit in CTRL_REG4 to 0, it should start to work as expected.

I will check if the "Autoreset on interrupt event" mode can work also in Normal and High-resolution mode.

View solution in original post

7 REPLIES 7
Miroslav BATEK
ST Employee

If the FDS bit is 0 the in output registers are without high-pass filter.

Can you read back the CTRL_REG2 value and confirm the configuration?

0690X000006CLT0QAO.png

Vladimir Ermolenko
Associate II

"If the FDS bit is 0 the in output registers are without high-pass filter." - that's the question!

I read back all the registers that have been configured. The read data is the same as what was recorded.

Here are all the settings:

AX_Write (0x20, 0x3f);  

AX_Write (0x21, 0xC1);

AX_Write (0x22, 0x40);

AX_Write (0x23, 0x8);

AX_Write (0x32, 10);

AX_Write (0x33, 0x00);

AX_Write (0x30, 0x2A);

AX_Write (0x24, 0x00); 

AX_Write (0x2E, 0x00);

I calculate the angle by acceleration, after the interruption the filter is reset and the calculation of the angle becomes incorrect. If I use AX_Write (0x21, 0x00); angle is calculated correctly. However, I cannot use this setting, because along with the angle I need to detect the presence of movement, and for this I use an interrupt and a filter in Autoreset mode.

Miroslav BATEK
ST Employee

Can you share a data which you read with the configuration 0xC1 in register 0x21 in case the device is steady?

Whith out filter:

 0x20 = 2F 

 0x21 = 0 

 0x22 = 40 

 0x23 = 8 

 0x32 = A 

 0x33 = 0 

 0x30 = 2A 

 0x24 = 0 

 0x2E = 0 

 Acc_X = -1 

 Acc_Y = -1 

 Acc_Z = 63 

 Acc_X = -1 

 Acc_Y = -1 

 Acc_Z = 63 

 Acc_X = -1 

 Acc_Y = -1 

 Acc_Z = 63 

device rotated 180 degrees

 Acc_X = 9 

 Acc_Y = -4 

 Acc_Z = -43 

 Acc_X = 0 

 Acc_Y = -1 

 Acc_Z = -63 

 Acc_X = 0 

 Acc_Y = 0 

 Acc_Z = -62 

 Acc_X = 0 

 Acc_Y = -1 

 Acc_Z = -62 

device rotated back

 Acc_X = 38 

 Acc_Y = 10 

 Acc_Z = -9 

 Acc_X = 0 

 Acc_Y = -2 

 Acc_Z = 64 

 Acc_X = -1 

 Acc_Y = -2 

 Acc_Z = 63

after rotate 360 degrees the accelerometer shows the same data as before turning.

Whith filter: 

0x20 = 2F 

 0x21 = C1 

 0x22 = 40 

 0x23 = 8 

 0x32 = A 

 0x33 = 0 

 0x30 = 2A 

 0x24 = 0 

 0x2E = 0 

 Acc_X = 0 

 Acc_Y = -16 

 Acc_Z = 16 

 Acc_X = 0 

 Acc_Y = -16 

 Acc_Z = 16 

 Acc_X = 0 

 Acc_Y = -16 

 Acc_Z = 16 

 device rotated 180 degrees

 Acc_X = 112 

 Acc_Y = 96 

 Acc_Z = -32 

 Acc_X = 48 

 Acc_Y = 0 

 Acc_Z = 80 

 Acc_X = 48 

 Acc_Y = 0 

 Acc_Z = 80 

 Acc_X = 48 

 Acc_Y = 0 

 Acc_Z = 80 

device rotated back

 Acc_X = -96 

 Acc_Y = -96 

 Acc_Z = -16 

 Acc_X = -16 

 Acc_Y = -16 

 Acc_Z = 16 

 Acc_X = -16 

 Acc_Y = -16 

 Acc_Z = 16 

after turning 360 degrees, the accelerometer shows other data.

OK, I see.

First of all, you use not allowed configuration:

0690X000006CMhtQAG.png

Please set the HR bit in CTRL_REG4 to 0, it should start to work as expected.

I will check if the "Autoreset on interrupt event" mode can work also in Normal and High-resolution mode.

Miroslav, thanks for your time. The device worked as it should after setting the HR bit to 0.

Miroslav BATEK
ST Employee

One more thing:

"Autoreset on interrupt event" high-pass filter mode can work in High-resolution sensor mode only if FDS bit is set to 1. In case accelerometer raw data (not high-pass filtered) are needed on output data registers, Normal or Low Power mode has to be used.