Showing results for 
Search instead for 
Did you mean: 

[LIS2DUXS12] Set FIFO_MODE when using FSM

Associate II

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.


Federica Bossi
ST Employee

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 🙂

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.