cancel
Showing results for 
Search instead for 
Did you mean: 

lis2dw12 continues mode

Msaga.1
Associate II

Hi I want to use the continues mode feature, so I can read and write from the buffer simultaneously. I have trued to find an example, do you have anything that help?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Msaga.1​ ,

I see you posted this question, can we refer to that one?

-Eleon

View solution in original post

3 REPLIES 3
Eleon BORLINI
ST Employee

Hi @Msaga.1​ ,

did you already check the C example on Github that implements the FIFO mode for the LIS2DW12? --> lis2dw12_read_fifo.c

Starting from this example, and referring to the AN5038 application note at p.39:

Follow these steps for FIFO Continuous configuration which sets a threshold to generate an interrupt to trigger a read by the application processor:

1. Set FTH[4:0] to 31 #watermark level at full scale

2. Set INT1_FTH to ‘1’ #enable FIFO threshold interrupt

3. Activate Continuous mode by setting the FMode[2:0] field to 110b in the FIFO_CTRL register (2Eh) #when the FTH interrupt is generated, data is read from the accelerometer output registers.

Can this operating mode fit your target application?

-Eleon

Msaga.1
Associate II

yes i did this , however will this enable me to read and write from the accelerometer buffer at the same time?

for example - I want to be able to read before the buffer is full ( so less then 32 samples) and at the same time the next samples will be writen.

Hi @Msaga.1​ ,

I see you posted this question, can we refer to that one?

-Eleon