Skip to main content
Explorer
March 19, 2024
Question

Retrieve acceleration data with and without high pass filter - LIS2DW12

  • March 19, 2024
  • 1 reply
  • 1099 views

Greetings

Is it possible to run the LIS2DW12 accelerometer for a single sample with its high-pass filter disabled?

I am using the FIFO with the high-pass filter enabled for regular sampling on interrupt wake-up, but would like atleast a single sample on demand, with the high-pass filter disabled, after reading the FIFO data.

In my INT1 ISR, I have tried turning the filter off after reading all the samples from the FIFO, but no samples are returned. 

@Federica Bossi 

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    March 19, 2024

    Hi @ZAIDS-S23 ,

    I am not sure I understood the question: do you mean whether you can acquire a single sample while keeping the HPF disabled?

    ZAIDS-S23Author
    Explorer
    March 19, 2024

    Yes, that is correct, but after originally enabling it and starting the sensor. 

    Currently, my logic to read samples from the sensor:

    - Enable HPF in CTRL6 register, enable wake-up interrupt and fifo.

    - Start the sensor by writing configuration to CTRL1 register.

    When the sensor wakes up, samples and stores the samples in the Fifo, i read them out. 

    After reading them out, I want to obtain a single sample with the HPF disabled

     

    Technical Moderator
    March 19, 2024

    Ok, this procedure works. When you remove the filter the effect is instantaneous so I confirm that you can acquire the single sample.