Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BMI160 switching the interrupt used on a channel

    BMI160 switching the interrupt used on a channel

    tsg97
    New Poster

    Hi,

    Is there a seqeunce of commands to be followed while changing the interrupt assgined to an interrupt channel during runtime without resetting the BMI160?

    For eg, I have High-G Interrupt configured on the INT-1 pin. When a condition is hit in my code, I would configure Low-G Interrupt to INT-1 pin.

    1. Is calling bmi160_set_int_config with the updated bmi160_int_setting structure enough? 
    2. If I enable a latch on the High-G Interrupt and then configure INT-1 to Low-G interrupt, will the latch be cleared?
    3. Is the same behaviour expected for the interrupts on the BMI270?

    Thanks

     

    3 REPLIES 3

    BSTRobin
    Community Moderator
    Community Moderator

    Hi tsg97,

    bmi160_ set_ int_ config() can be used to reconfigure interrupts.

    If you configure the interrupt as latched mode, the interrupt will be cleared after reading the interrupt status register.

    For your description "For eg, I have High-G Interrupt configured on the INT-1 pin. When a condition is hit in my code, I would configure Low-G Interrupt to INT-1 pin.", BMI160 has two interrupt pins, INT1 and INT2. You could map high-g to INT1 and low-g to INT2.

    Hi BSTRobin,

    Just to confirm, would reading the interrupt status register clear the latch even if it is not permanently latched but is latched for a specific time duration? For eg, if it was configured to be latched for 80ms(BMI160_LATCH_DUR_80_MILLI_SEC).

    And the scenario I had described was for a sitatuion where the INT2 pin was already used for a different interrupt, for eg DREADY. So I would still need to switch the interrupt on INT1.

    Thanks

    BSTRobin
    Community Moderator
    Community Moderator

    Hi tsg97,

    You could refer the following behavior for your application.

    BMI160 I2C TAP interrupt non latch: if you set interrupt without latch, interrupt signal will be released rapidly.

    BMI160 I2C TAP interrupt non latch.png

    BMI160 I2C TAP interrupt 80ms latch:

    BMI160 I2C TAP interrupt 80ms latch.png

    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