cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieve acceleration data with and without high pass filter - LIS2DW12

ZAIDS-S23
Associate III

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 

3 REPLIES 3
Federica Bossi
ST Employee

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?

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

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

 

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

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.