Bosch Sensortec Community

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

    BHI360 + BMM350 : No Mag data on custom board

    BHI360 + BMM350 : No Mag data on custom board

    FCO_VK
    Member

    Hello Bosch Sensortec community,

    I am working on a custom board with a BHI360 and a BMM350 connected as an external sensor in I2C. I am writing my own library to communicate from my host CPU to the BHI360.

    Here are some information about my setup:

    - I followed the BHI360 datasheet (4.1.2) to connect the BMM350 (see my schematic below).

    - I successfully flashed the "BHI360_BMM350C" firmware.

    - My host CPU can read the BHI360 Acc and Gyro data without any issue. (Although the gyro sensor self-test reports an Error 7: Multiple Axis Failed or Single Test Failed.)

    - The BMM350 self test returns 0: Test passed. However, when I try to use any virtual sensor using the BMM350 (such as the Magnetometer corrected or the rotation vector), I have the following errors for the Magnetometer: (0x24 Sensor Error: No Valid Data) and (0x25: Slow Sample Rate).

    - The virtual sensor rate is set to 100 Hz. I am using the non-wake up FIFO.

    - The Physical sensor information for the BMM350  are shown below, one strange thing is that its Master interface flag bits are "0b1010", which is not one of the possibilities of Table 65.

    Here are my questions:

    - Do you have any idea why I cannot get data from the BMM350 ? Do I have to do additionnal configuration steps besides loading your firmware and starting a virtual sensor to make it work ? Do I need to manually configure the BMM350 using the soft pass-through feature of the BHI360 (13.2.4) ?

    - Is there something wrong with my schematic ? I didn't wire the interrupt pin of the BMM350, is it mandatory?

    - What can I do about the Gyroscope self-test error ? The output data looks ok, it's not 0 when still, but the variations when I move the sensor around make sense.

    Thank you very much for your help.

    10 REPLIES 10

    BSTRobin
    Community Moderator
    Community Moderator

    Hi FCO_VK,

    After review from your schematic, you need connect pin 4 (HIRQ) of BHI360 to the host MCU, whether you are using hardware interrupt mode or polling mode.

    Hi BSTRobin,

    Indeed we are using the polling mode only. As you suggested, we connected the HIRQ pin of the BHI360 to our MCU, but it did not change the errors we were getting. We are still able to read the BHI360 FIFO with our MCU, but the BHI360 doesn't seem to be able to read the BMM350 data.

    May I ask why connecting the HIRQ pin of the BHI360 to my MCU would help the communication between the BHI360 and the BMM350 ?

    Do you have any documentation on how to set up these two sensors together ?

    Thank you.

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    You may refer to BHI360 shuttle board schematics at https://www.bosch-sensortec.com/media/boschsensortec/downloads/shuttle_board_flyer/application_board... to see how BMM350 is connected to BHI360.

    Please see the attached PDF file Section 3.2 about how to use COINES to play with BHI360 + BMM350. You may copy and paste example C code from COINES to your host processor IDE.

    Thanks.

    Hi,

    I see on the BHI360 shuttle board schematic that the INT pad of the BMM350 is connected to the JTAG_DIO pad of the BHI360 (and disconnected from the OCSB pad). Does it mean that in the BHI360_BMM350C firmware, you are monitoring BHI360's JTAG_DIO to know when Mag data is available ? Or are you polling the BMM350 INT_STATUS (0x30) register ?

    If you are indeed reading the INT signal of the BMM350 with JTAG_DIO, is there a way to use the INT_STATUS register instead since I have no way of connecting these two now that everything is soldered ?

    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