10-27-2020 05:21 PM
Hi there,
I wonder if there is any dependency between any-motion/no-motion interrupt generation and configured output data rate (ODR).
Oddly enough, but no interrupts are generated when I configure ODR down below 12.5 Hz.
Thus setting ODR in range from 6.25 Hz to 0.78 Hz cause no interrupt, no matter how long I wait or strong shake the board.
Here is sample configuration at 3.12 Hz, which causes no interrupt with bma456_v2.12.8 release;
=== Get accelerator configuration successful ===
odr = 8
range = 1
bandwidth = 2
perf_mode = 1
=== Set accelerator configuration successful ===
odr = 3
range = 1
bandwidth = 2
perf_mode = 1
=== Get any-motion configuration successful ===
axis_en = 0x0
duration = 0x5
threshold = 0xaa
=== Get no-motion configuration successful ===
axis_en = 0x0
duration = 0x5
threshold = 0xaa
=== Set any-motion configuration successful ===
axis_en = 0x7
duration = 0x5
threshold = 0x400
=== Set no-motion configuration successful ===
axis_en = 0x7
duration = 0x1f4
threshold = 0xcc
10-27-2020 07:36 PM
Hello,
One thing I'd like to mention that the ODR range for performance is from 12.5 to 1600, and the ODR range for low power mode is from 0.78 to 400.
No motion and any motion should work in low power mode as well, but you should consider how it works.
Regarding any motion, the idea is if the data is over the threshold and it keeps over duration, any motion interrupt is generated.
No motion is vice versa.
If ODR is slow, it takes longer time for duration therefore you have to modify duration value.
If you are using github API, you can check in bma456h_feature_enable.
BMI270 datasheet has detailed information about anymotion and nomotion.
https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmi270-ds000.pdf
Please let me know if you have any quesitons.
Thanks,
10-28-2020 02:58 PM - edited 10-28-2020 02:59 PM
Hi,
@Minhwan: Thanks for prompt reply!
Please allow me to share my findings first.
I digged more caerfully into documentation.
There is indeed ODR restriction implied by performance mode settings.
According to documentation (BST-MAS-AN032-00, Revision_1.0_082019), page 5
It describes single-/double-tap requirements, but I've found no clue of no-motion/any-motion requirements.
Moreover, there are some ODR related status flags in INTERNAL_STATUS (0x2A).
Playing around with various settings I observe the error bits set or cleared.
However my outcome is, that generation of no-motion/any-motion interrupts depends on ODR settings only.
Whatever mode (performance or duty-cycle), bandwidth I tried, the only ODR makes the difference.
Status flags of INTERNAL_STATUS register are irrelevent too.
@Minhwan wrote:Hello,
One thing I'd like to mention that the ODR range for performance is from 12.5 to 1600, and the ODR range for low power mode is from 0.78 to 400.
No motion and any motion should work in low power mode as well, but you should consider how it works.
Regarding any motion, the idea is if the data is over the threshold and it keeps over duration, any motion interrupt is generated.
No motion is vice versa.
If ODR is slow, it takes longer time for duration therefore you have to modify duration value.
If you are using github API, you can check in bma456h_feature_enable.
BMI270 datasheet has detailed information about anymotion and nomotion.
https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmi270-ds000.pdf
Please let me know if you have any quesitons.
Thanks,
If ODR is slow, it takes longer time for duration therefore you have to modify duration value.
I am not so sure about that. Documentation states that duration is expressed in 20 ms (1/50 Hz⁻1) units.
Besides that, I waited for minutes for an interrupt. It did not occur.
BST-MAS-AN032-00, Revision_1.0_082019, page 54
FEATURES_IN, defintion of any-motion duration field
Defines the number of consecutive data
points for which the threshold condition
must be respected, for interrupt
assertion.
It is expressed in in 50 Hz samples (20
ms). Range is 0 to 163sec. Default
value is 5=100ms.
If you are using github API, you can check in bma456h_feature_enable.
Yes, I do use the driver v2.12.8.
There is bma456_feature_enable API function.
But in order to enable any-motion/no-motion feature one must use bma456_set_any_mot_config/bma456_set_no_mot_config rather than using bma456_feature_enable. Since it controls wearible features (e.g. counter, activity and so) only.
10-31-2020 02:24 AM
Hello,
I don't understand what you talk about fully, but let me clear.
any motion and no motion can be generated regardless of ODR.
However, any motion and no motion needs more time if ODR is slow due to duration.
Could you give me your configuration setting for no motion?
Thanks,
10-31-2020 04:33 PM - edited 10-31-2020 05:32 PM
@Minhwan wrote:Hello,
I don't understand what you talk about fully, but let me clear.
any motion and no motion can be generated regardless of ODR.
However, any motion and no motion needs more time if ODR is slow due to duration.
Could you give me your configuration setting for no motion?
Thanks,
Hi,
Thanks for feedback!
Let me try to expain the issue in more details.
Unfortunately my observations condtradite these statements.
You may find BMA456 settings in attached archive.
BMA456 supports ODR in range from 0.78 Hz up to 1600 Hz.
In my test no-motion/any-motion interrupts are configured in performance mode.
Time delay between end of sensor initialisation and first no-motion interrupt is measured.
no-motion threshold: 100 mG
no-motion duration: 10 s
ODR, Hz | Time delay to first no-motion interrupt, s |
800 | 10 |
400 | 10 |
200 | 10 |
25 | 10 |
12.5 | 10 |
6.25 | No interrupt occurred |
no-motion threshold: 100 mG
no-motion duration: 5 s
ODR, Hz | Time delay to first no-motion interrupt, s |
800 | 5 |
400 | 5 |
12.5 | 5 |
6.25 | No interrupt occurred |
no-motion threshold: 100 mG
no-motion duration: 20 s
ODR, Hz | Time delay to first no-motion interrupt, s |
800 | 20 |