Bosch Sensortec Community

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

    BHI260AP I2C Host connection

    BHI260AP I2C Host connection

    dariosortino
    Established Member

    Dear Community.

    My team and I are pretty new to the BHI260AP and are exploring ways to integrate it with the BMM150 into our PCB designs.

    We wanted to interface the BHI with a host MCU, placed in another PCB, using I2C. So we were considering only 4 connections from MCU to the BHI: VDD, GND, SDA, and SCK; We realized that the pin HIRQ, from the documentation, is also required to be connected to the MCU.

    Is there a setup in which we can skip this connection? I can tell that in our design it should be the MCU to interrogate the BHI for data, even if there is no interrupt. Can someone give us some hints?

    4 REPLIES 4

    BSTRobin
    Community Moderator
    Community Moderator

    Hi dariosortino,

    You could refer schematic in shuttle board or data sheet to connect BHI260AP to host.
    https://www.bosch-sensortec.com/media/boschsensortec/downloads/shuttle_board_flyer/application_board...

    BHI260AP diagram.png

    And refer sensor API(https://github.com/BoschSensortec/BHY2-Sensor-API) and attached example code.

    Hello Robin,

    thanks for checking in.

    I am already using the guidelines that you suggested (both from the shuttle board and from the datasheet).

    Let me reformulate the question: what happens if I don't connect the HIRQ pin? Will I still be able to exchange messages via I2C? 

    As I can see here, around lines 181-189, it is interrogated the get_interrupt_status() in order to check if there is anything new in the FIFO before reading it and parsing it, and it's not making use of an interrupt request in the host MCU. So I am thinking about just not connecting the HIRQ pin.

    Am I wrong? Any elaboration on this?

    Thanks,

    Dario

     

    Hi dariosortino,

    As you can see it in example code, you can initialize sensor successfully if you don't connect HIRQ pin. But you don't know when FIFO data is ready. So you can follow the connection in reference hardware schematic.

    while (rslt == BHY2_OK)
    {
    if (get_interrupt_status())
    {
    /* Data from the FIFO is read and the relevant callbacks if registered are called */
    rslt = bhy2_get_and_process_fifo(work_buffer, WORK_BUFFER_SIZE, &bhy2);
    print_api_error(rslt, &bhy2);
    }
    }

    Instead to check the physical HIRQ pin, there is a register that reflect the status of the FIFO, as explained in the datasheet.

    dariosortino_0-1661244528451.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