Skip to main content
Visitor II
October 13, 2023
Question

[LIS2DUXS12] Set FIFO_MODE when using FSM

  • October 13, 2023
  • 1 reply
  • 988 views

I had an idea to start recording accelerometer data in the FIFO by switching to FIFO mode at one point in the Finite State Machine. This would be done by setting FIFO_MODE bits in the FIFO_CTRL register by using the SETR command. However, in the an5902-lis2duxs12-finite-state-machine document there is a small note that "FIFO_MODE change not supported." when using the SETR command.

Is there a way to start recording in the FIFO mode when the FSM reaches a certain point in the program?

The reason why I want to do it like this is that when the FIFO is filled the main processor does not need to hurry to read out the FIFO buffer, the values stays there until it is ready to read.

 

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    October 20, 2023

    Hi @BD651 ,

    To do what you want you need to:

    1. Set the FIFO to bypass mode
    2. Insert a command that generates an interrupt (e.g. OUTC) at the point in the FSM where you would like to start recording the accelerometer in FIFO
    3. Start the FSM

    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 :)