Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BHI160-No interrupt on INT line

    mehmetbekir
    New Poster

    BHI160-No interrupt on INT line

    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

    Re: BHI160-No interrupt on INT line

    Hello mehmetbekir,

    You could refer attached BHI160B example code on STM32.

    /* 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);
    }

    mehmetbekir
    New Poster

    Re: BHI160-No interrupt on INT line

    I tried but nothing changed. MY code is as below

    1.PNG2.PNG3.PNG

    BSTRobin
    Community Moderator

    Re: BHI160-No interrupt on INT line

    Hello mehmetbekir,

    You could read GPIO pin status. Could you directly run reference code and see it again?

    mehmetbekir
    New Poster

    Re: BHI160-No interrupt on INT line

    I tried but no change. Only when the code is run for the first time an interrupt hits the INT pin and 9 bytes are read, then no interrupt.

    foto.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