07-25-2023 10:42 PM - edited 07-26-2023 02:20 AM
We are using a modified example of the bma456w example 'motion_hw_int.c'
We set the no motion duration to 5 seconds but sometimes we get no motion interrupts right after a motion interrupt (less than 1 second after).
See code attached in zip file in examples -> motion_hw_int
We modified it to not use the coines library so we could run the bma456 on our custom board...
The dependencies for running our code are not included but it's pretty self explanatory
All we want to do is
1. receive one interrupt when there is a any motion event
2. receve one interrupt when there a no motion event after 5 seconds of no motion
What we are seeing
1. sometimes we receive an any motion event followed quickly (less than 1 second) by a no motion event and then it just keeps doing that over and over for a few seconds while we move the bma456 around slowly
What should we do to prevent this behavior?
Solved! Go to Solution.
07-26-2023 01:39 AM - edited 07-26-2023 01:39 AM
This bug is easy to reproduce
1. start the main application
2. slowly rotate the bma456 about the x or y axis
3. notice that the no motion / any motion interrupt fires over and over even though the no motion duration is set to 5 seconds it happens instantly after the any motion interrupt fires
4. if I just move the device in short bursts this issue does not happen and I get the no motion interrupt 5 seconds later after I stop moving
08-01-2023 05:43 AM
08-01-2023 10:14 PM
Hi, we found the issue.
Looks like we needed to make a call to 'bma456w_set_no_mot_config' before disabling interrupts: