cancel
Showing results for 
Search instead for 
Did you mean: 

Hi, I want to implement the wake up state machine of Lis3dsh. I studied the application note and tried to set the registers as needed. I am unable to set 0x01 to Control Register 1. How can I Set it?

AK.08
Associate III

Since the default value of the register is not changing, the state machine is not enabling and thus, I am not getting any interrupt.

20 REPLIES 20

Unfortunately, trying with another device is not really possible, specially when all the other registers are working properly. I will try if something is possible.

I have trouble writing into Registers 1 and 3. register 2 is not a part of the wake up state machine, so I need not use it, but I tried writing to it with your suggestion. That doesn't work either.

Can you please check if you can write to this register?

Is there any sequence in which the registers need to be written or any steps to be followed?

Hi @Community member​ ,

I actually tried to read this registers and I'm able to do it, that's why I'm running out of suggestions.

By the way, you can for example refer to the double-tap recognition in the DT0077, p.3: in this example, CTRL_REG3 is written after CTRL_REG4 and CTRL_REG1 is written at the end of the configuration.

0693W000006FEbtQAG.png 

-Eleon

AK.08
Associate III

I guess, the problem is in writing and not reading. thank you for sharing this. I will try it and come back. :)

Is there any such Design Tip for the "wake Up" state Machine? that would really be helpful

AK.08
Associate III

I tried writing the registers following this pattern, register 4, 3, 5 then the threshold and mask and sett registers. in that case only the 3 control registers were written successfully. trying to write ST1 values and register 1 at the end didn't solve my problem. I am still unable to write register 1 and now with this pattern, threshold, mask and sett registers

AK.08
Associate III

Hi Eleon,

I tried with a different sensor, but that has the same issue. Is there any dependency for register 1 to be written? is there something I am missing?

The configuration should be ok...

-Eleon

AK.08
Associate III

Hi Eleon,

I am still stuck on this. Since you tried writing into register 1, can you send me a code snippet or sequence in which u enabled the state machine?

It would be really helpful

Hi @Community member​ ,

Back to you after internal alignment. Can you confirm you are setting the CTRL_REG1 register (the one that enable the FSM) as last register writing step (you should then check the content of the other registers, if it still doesn't work).

Moreover, from your previously-shared code, it seems you are using the FIFO... can you please try to disable it and check you you face again these issues?

-Eleon

AK.08
Associate III

Hi, I have fixed the isuse and the state machine works fine. It was some problem with I2C. Thak you for your support throughout :)