2021-04-22 05:39 AM
To set the wakeup thershold, I use WAKE_UP_THS and for single-tap I use the same functions as the example (https://github.com/STMicroelectronics/STMems_Standard_C_drivers/blob/master/lis2dw12_STdC/example/lis2dw12_tap_single.c). Morever, I set 0x01100000 in CTRL4_INT1_PAD_CTRL, to enable wakeup and single tap interrupts. And when I do that, the bit SINGLE_TAP in STATUS is never at 1, but when I set 0x01000000, it works.
Solved! Go to Solution.
2021-04-23 06:26 AM
Hi Cassandre @CSo.1 ,
I'm sorry, you are right. So the fix was to set the LIR bit of register CTRL3 to have latched interrupt and adjust the wake up threshold.
regarding the libraries, the lis2dw12.c/h can be considered a wrapping of the most commonly used functions of lis2dw12_reg.c/h.
for example, I usually use functions from lis2dw12.c/h (or the ones from the sensor I'm working with) while programming and use general register writing/reading functions when I want to do something else.
Niccolò
p.s. if you select a "best answer" you can help future users with similar problems =)
2021-04-23 06:31 AM
Hi,
Ok thank you :)
Cassandre
p.s. ok it's done