07-25-2021 05:48 PM - edited 07-25-2021 05:50 PM
Hi all
I am using BMI160 in my application to sense motion. It's in a PCB where the main Micro controller is a Nordic nRF52833. I am using the BMI160 to wake the MCU up through interrups such as double tap. I am experiencing a strange behaviour. See below the flow of events in a continous loop:
The issue I am facing is after running this loop a few times (about 8 times), the BMI160 seems to stop operating - ie I don't get any interrupts from the sensor. To prove this, I set the BMI160 accelerometer in Normal mode all the time (even when MCU is in sleep mode). In this case, I don't see the described issue.
Is this a known issue? Is there any explanation to this behaviour? Am I doing something wrong?
PS: The reason I am switching the BMI160 into low power mode when the MCU is in sleep mode is to save the energy usage. My PCB is powered by a battery that I need to make sure it doesn't drain quickly.
Many thanks for you support in advance
Kind regards
Solved! Go to Solution.
07-27-2021 08:07 AM
Hello Katie2020,
In another ticket, there was discussion of BMI160 TAP: https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/bmi160-tap-detection/td-p/21749
ODR should be equal and more than 200 Hz, otherwise TAP will be not triggered.
08-08-2021 07:05 PM - edited 08-08-2021 09:07 PM
Many thanks for your feedback.
I am using 2 interrupts from the BMI160: double tap and flat detect. What would be the best configuration for 2 interrupts? Do they need to be on 2 different channels? Could this be a problem?
I noticed that flat detect is not triggered either when the BMI160 is in Low power mode. It's behaving like double tap. Could this be a setting problem? Using the sensor at 200Hz didn't help.
I also would like to clear and re-configure the interrupts before switching to sleep mode. How can I do that? Can you please share the code for re-configuration and clearning of interrupts?
Thank you very much for your support.
08-13-2021 09:15 AM
Hi
Could you please provide a feedback to my last questions?
Many thanks
08-13-2021 11:26 AM
Hello Katie2020,
TAP and flas interrupt could be mapped to one INT pin.
All features could be supported under low power mode. But for sleep mode(suspend with ACC) it has lowest power consumption, but features were not supported.
If you want to swith to sleep mode, you could write register value to archieve it.
#define BMI160_ACCEL_NORMAL_MODE UINT8_C(0x11)
#define BMI160_ACCEL_LOWPOWER_MODE UINT8_C(0x12)
#define BMI160_ACCEL_SUSPEND_MODE UINT8_C(0x10)
/* Gyro power mode */
#define BMI160_GYRO_SUSPEND_MODE UINT8_C(0x14)
#define BMI160_GYRO_NORMAL_MODE UINT8_C(0x15)
#define BMI160_GYRO_FASTSTARTUP_MODE UINT8_C(0x17)
/* Set the sensor configuration */
rslt = bmi160_set_sens_conf(dev);