cancel
Showing results for 
Search instead for 
Did you mean: 

How to clear wakeup event detection status (WU_IA) bit for LIS2DW12

tangtangdn
Associate II

I would like to wake up the processor from the deep sleep mode with the LIS2DW12 wakeup event. After the interrupt signal is generated from the INT1 pin, the processor will be waked up. However, it needs more than 1 second to power down LIS2DW12. During this 1 second period, there will be another interrupt signal generated and the WU_IA bit is read as 1. Once the processor goes to the deep sleep mode after processing some work, it will be waked up immediately by this stored WU_IA. To my knowledge, the WU_IA bit should be cleared once it is read. However, I tried to read STATUS (27h), WAKE_UP_SRC (38h) and ALL_INT_SRC (3Bh), but it does not work. Could someone know how to clear the WU_IA bit without waking up the processor? Thank you so much.

1 REPLY 1
Eleon BORLINI
ST Employee

Hi @tangtangdn​ ,

sorry for the late feedback on your post...

You should be able to clear the event by reading the proper register, in this case the WAKE_UP_SRC (38h)...

can you please check from this sample C code (lis2dw12_wake_up.c) if you correctly configured the wake-up digital feature?

-Eleon