2023-07-02 02:25 AM - edited 2023-07-02 06:58 AM
hello everyone,
I am trying to create an interrupt using LSM6DSO wake-up source with slope filter above a certain threshold.
the problem is that right now I get an interrupt if the accelerometer exceed the threshold at any axis x,y,z.
I want the LSM6DSO interrupt to trigger my esp32 only when it exceed at a specific axis, is there a way I can do it?
thanks.
2023-07-04 12:30 AM
Hi @dino ,
Welcome to ST Community!
As explained in the AN5192 section 5.3, the embedded wake-up feature generates an interrupt when there is a generic acceleration on the device.
You cannot generate the interrupt for only one selected axis but, once received the interrupt, you can check the WU_X, WU_Y and WU_Z bits to see which axis triggered the wake-up event.
Alternatively, you can program the FSM to generate the interrupt when there is an acceleration on a specific axis. All the details in the AN5226.
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 :)
2023-07-04 01:54 AM - edited 2023-07-04 01:55 AM
thank you for replaying.
note that I use the SLOPE FILTER. when I looked at the FSM I didnt see an option to use that slope filter and if so the FSM doesn't help me.
one more thing, I only need to generate the interrupt. so at axises I dont use for the interrupt, I will not use at all. so if there is a way to disable accelerometer measurement at specific axises or something like that, it will be a valid solution as well.
2023-07-04 04:58 AM
Ciao @dino ,
Yes, if you want to use the slope filter you can't use the FSM and you can't set the threshold only for one axis.
Unfortunately, there is not a way to disable some accelerometer axes.
If this helps you, please mark my answer as "Best Answer" by clicking on the "Accept as Solution" button, this can be helpful for Community users to find this solution faster.