Bosch Sensortec Community

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

    How do I disable the no-motion on BMI160?

    How do I disable the no-motion on BMI160?

    agoransson
    Member

    Hello

     

    I'm working on integrating the no-motion interrupt on BMI160 in an Android environment. The sensor is connected and running already, and the no-motion interrupt has been configured on INT1 with duration, and threshold. It is firing as expected.

    However, the interrupt needs to be controllable on/off from the Android UI. This is working as intended as well - almost.

    After having configured the interrupt off (INT_MAP_0, bit 3) the interrupt is not firing any more. However, when I enable the interrupt again and read the status bit (INT_STATUS_0, bit 7) it is immediately "1". I am expecting it to be "0".

     

    Reviewing the datasheet:

    "Register (0x1C-0x1F) INT_STATUS

    Each flag is associated with a specific interrupt function. It is set when the associated interrupt
    triggers. The setting of <3:0> controls if the interrupt signal and hence the respective interrupt
    flag will be permanently latched, temporarily latched or not latched. The interrupt function
    associated with a specific status flag must be enabled."

     

    Have I misunderstood the datasheet? How do I ensure that the status bit is not written after having disabled the interrupt?

    3 REPLIES 3

    agoransson
    Member

    To clarify.

     

    When I disable the interrupt (INT_MAP_0, bit 3) _I also disable the three axes (INT_EN_2, bits 0,1,2).

    kgoveas
    Community Moderator
    Community Moderator

    Hi agoransson,

    I am not sure if it was a typo in your post, but INT_STATUS_0, bit 7 is the flat_int  flag and not the nomo_int flag. That would be INT_STATUS_1, bit 7. 

    The INT_MAP registers only 'connect' the interrupt engine to the interrupt pin. In order to disable an interrupt, the INT_EN registers will need to be used as you have already mentioned. What is the order of configuration for enabling and disabling the interrupt?

    While enabling it is recommended that you first connect/disconnect using INT_MAP registers and then configure the INT_EN registers to enable/disable the required interrupt. 

    While disabling it is recommended that you first configure the INT_EN registers to enable/disable the required interrupt and then the connect/disconnect using INT_MAP registers. 

    Regards,
    kgoveas

     

    Yes, that was a typo. I meant to write STATUS_1.

    What worked for me was to run the interrupt reset cmd (0xB1) every time the no-motion was triggered. That seems to do the trick.

    I was also doing it the opposite order, EN then MAP. I will change that.

     

    Thanks.

    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