Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    can't read bmm150 through bmi160

    can't read bmm150 through bmi160

    Mathi123
    New Poster

    I have done the following configuration as per the datasheet of BMI160 for secondary interface 

    uint8_t configData3[2] = {0x7E, 0x19};

    uint8_t BMX160_MAGN_IF_0_ADDR[2]= {0x4c,0x80};
    uint8_t BMX160_MAGN_IF_1_ADDR[2]= {0x4F,0x01};
    uint8_t BMX160_MAGN_IF_2_ADDR[2]= {0x4E,0x4B};
    uint8_t BMX160_MAGN_IF_3_ADDR[2]= {0x4F,0x01};
    uint8_t BMX160_MAGN_IF_4_ADDR[2]= {0x4E,0x51};
    uint8_t BMI160_MAGN_IF_ADDR[2] = {0x4F,0x0E};
    uint8_t BMX160_MAGN_IF_5_ADDR[2]= {0x4E,0x52};

    uint8_t BMX160_MAGN_IF_6_ADDR[2]= {0x4F,0x02};
    uint8_t BMX160_MAGN_IF_7_ADDR[2]= {0x4E,0x4C};
    uint8_t BMX160_MAGN_IF_8_ADDR[2]= {0x4D,0x42};
    uint8_t BMX160_MAGN_IF_9_ADDR[2]= {0x44,0x05};
    uint8_t BMX160_MAGN_IF_10_ADDR[2]= {0x4C,0x00};

     

    and tried to read magneto data using 0x04 register of BMI160, Magneto values are coming as zero. 

    I'm using STM32CUBE IDE and STM32l433 Nucleo board

    3 REPLIES 3

    BSTRobin
    Community Moderator
    Community Moderator

    Hi Mathi123,

    There are sensor APIs & example code for BMM150 and BMI160 on Github, which can accelerate your software development.
    https://github.com/boschsensortec/BMI160_driver
    https://github.com/boschsensortec/BMM150-Sensor-API

    I also uploaed example on STM32 for your reference. I hope it will be helpful for you.

    BMI160 was not recommended for new design, you choose other part by referring product selector guide https://www.bosch-sensortec.com/media/boschsensortec/downloads/promotion_material/product-selector-e...

    Hii Robin

    thanks for your reply.

    i have  already tried with the API library. I can't able to get the magneto value, can you please provide the stm code which get BMM150 data through BMI160 

    BSTRobin
    Community Moderator
    Community Moderator

    Hi Mathi123,

    Do you mean you need full STM32 project code?

    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