Showing results for 
Search instead for 
Did you mean: 

LIS2DW12 fifo bypass-to-continuous mode



I am working on the LIS2DW12 accelerometer, and I need to use the bypass-to-continuous mode for the fifo buffer. The idea is that the accelerometer is in bypass mode when it is inactive and not moving. When the accelerometer is moving and active, it goes into fifo continuous mode. Then the fifo threshold interrupt starts triggering which tells my application to read the fifo.

Reading the fifo buffer when there is a threshold interrupt works just fine for what I've done. My problem is I can't figure out how to tie the bypass-to-continuous trigger to an interrupt of choice. I have sleep state configured for my application, so I would preferably have sleep state "active" as the accelerometer's queue to exit bypass mode and start outputting its data to the fifo buffer in continuous mode. Then the accelerometer would revert back to bypass mode when the accelerometer goes to sleep state "inactive." I read the application note for the bypass-to-continuous section, and all it tells you is to read the interrupt generation section of the document. It doesn't elaborate on how to use your configured interrupts to trigger the fifo mode change between bypass and continuous.

Please let me know if you know how to configure the accelerometer bypass-to-continuous mode trigger for an event of choice.

Federica Bossi
ST Employee

Hi @jlandgraf ,

Welcome to ST Community!

After set XL Output Data Rate, Configure FIFO and Enable Block Data Update, you need to set the wake-up and sleep duration in  WAKE_UP_DUR register. Then set the Activity wake-up threshold in WAKE_UP_THS register. 2. Then, set FTH[4:0] to 31, set INT1_FTH to ‘1’: to enable FIFO threshold interrupt and activate Bypass-to-Continuous mode by setting the FMode[2:0] field to 100b in the FIFO_CTRL register (2Eh). In this way, as soon as an event occurs (wakeup in this case), the FIFO switches to Continuous mode and starts to store the samples at the configured data rate. When the programmed threshold is reached, the FTH interrupt goes high, and the application processor may start reading all FIFO samples. Continuous mode and starts to store the samples at the configured data rate.

 If my reply answered your question, please click on Accept as Solution at the bottom of this post. This will help other users with the same issue to find the answer faster 🙂


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.