Skip to main content
Visitor II
June 29, 2021
Solved

lis2dw12 continues mode

  • June 29, 2021
  • 2 replies
  • 1172 views

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?

    This topic has been closed for replies.
    Best answer by Eleon BORLINI

    Hi @Msaga.1​ ,

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

    -Eleon

    2 replies

    ST Employee
    June 29, 2021

    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.1Author
    Visitor II
    June 30, 2021

    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.

    ST Employee
    July 1, 2021

    Hi @Msaga.1​ ,

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

    -Eleon