Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    BMI160 Sensor turning off and not recovering

    BMI160 Sensor turning off and not recovering

    Katie2020
    New Poster

    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:

    1. MCU in sleep mode, BMI160 accelerometer in Low power mode and Gyro in Suspend mode (I only need the accelormeter to use the interrupts). The setting of the accelerometer are: BMI160_ACCEL_ODR_100HZ, BMI160_ACCEL_RANGE_2G and BMI160_ACCEL_BW_NORMAL_AVG4. 
    2. Double tap the PCB -> MCU wakes up -> set the BMI 160 in Normal mode (both acceleormeter and gyro) in order to recorder the motion and process the data. 
    3. When data processing is finished, MCU goes back to sleep mode and so the BMI160 back in Low power mode (accelerometer in low power and gyro in suspend mode)

    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

    4 REPLIES 4

    BSTRobin
    Community Moderator
    Community Moderator

    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.

    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. 

     

    Hi 

    Could you please provide a feedback to my last questions?

    Many thanks

     

    BSTRobin
    Community Moderator
    Community Moderator

    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);

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist