Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BHI160-No interrupt on INT line

    BHI160-No interrupt on INT line

    mehmetbekir
    New Poster

    Hello. I want to receive data from BHI160 sensor using microcontroller(STM32). For this, I added the library related to the company's MCU solution to my own project. The return values ​​of bhy_initialize_support(),bhy_driver_init(&bhy1_fw),bhy_install_sensor_callback() and bhy_enable_virtual_sensor() functions are 0 so they are successful but when I try to read data from fifo the INT pin is only It goes high the first time, then it stays low all the time, so there is no interrupt. what would be the reason

    9 REPLIES 9

    BSTRobin
    Community Moderator
    Community Moderator

    Hello mehmetbekir,

    Sorry, you could read interrupt status register 0x36 value, bit0 is host status. Previous attachment reference code work well on my side with STM32F4, could you try to only run the reference code?

    /* wait until the interrupt fires */
    /* unless we already know there are bytes remaining in the fifo */
    while (!bhi160b_get_int_status() && !bytes_remaining);

     

    int bhi160b_get_int_status()
    {
    uint8_t value;

    bhy_read_reg(BHY_I2C_REG_INT_STATUS_ADDR, &value, 1);
    return(value&0x01);
    }

    I don't use external sensors. I just use the BHI160 chip. Could it have something to do with it not working?

    BSTRobin
    Community Moderator
    Community Moderator

    Hello mehmetbekir,

    This is the code to access the BHI160 register, not the external sensor.

    soroush
    Established Member

    I have a similar problem.
    All initialization steps pass with BHY_SUCCESS. Read product ID: 0x83. I receive the first interrupt. Then, I receive 10 bytes in the FIFO decoded as follows:
    bhy_meta_event_type_t: BHY_META_EVENT_TYPE_ERROR 
    bhy_data_meta_event_t.meta_event_id: 254
    bhy_data_meta_event_t.event_number: 4
    bhy_data_meta_event_t.sensor_type: 33
    bhy_data_meta_event_t.event_specific: 21

    Then no interrupt, and FIFO always has zero bytes_remaining.

    I am using BHI160B, the latest standalone firmware (Bosch_PCB_7183_di03_BMI160-7183_di03.2.1.11824). STM32L4 MCU. I am running the rotation_vector_example.c code.

    SOLVED:

    It turned out our electrical hardware designer missed the pull-up resistors for the auxiliary I2C bus.

    BSTRobin
    Community Moderator
    Community Moderator

    Good news.

    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