Skip to main content
Visitor II
November 9, 2018
Solved

Lis3DH High-pass filter

  • November 9, 2018
  • 4 replies
  • 2062 views

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?

    This topic has been closed for replies.
    Best answer by Miroslav BATEK

    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.

    4 replies

    ST Employee
    November 9, 2018

    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

    Visitor II
    November 12, 2018

    "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.

    ST Employee
    November 12, 2018

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

    Visitor II
    November 13, 2018

    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.

    ST Employee
    November 13, 2018

    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.

    ST Employee
    November 19, 2018

    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.