Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    Increase ODR to 300Hz BMM150

    Increase ODR to 300Hz BMM150

    PioT
    New Poster

    I am trying to use the BMM150 with a higher ODR but I am not able to do it.

     

    I have some questions I would need help with.

    First. Do I need to set FORCE mode right before a reading? I am finding that in case I do not do that, measure is not refreshed.

    Second. I have read on the manual that in order to get ODR > 300Hz I should use LOW POWER PRESET  with Rep XY 3 and Rep Z 3. Recommended ODR is 10 but then I should use FORCE MODE.

    This is the configuration I use:

    REP XY register should be 1 because the formula says that (RepXY = Register value * 2 +1)

    REP Z register should be 2. As manual says, REPZ = Register value + 1. 

    On the 0x4E register I configure the following:

    |DRDY Enable|INT disable|CZ enable|CY Enable|CX Enable|DR Pol High|ILatch NO|IPOL High|

    This gives me a register of 0x85

     

    On register 0x4C I configure the following:

    |ADVST NORMAL|ODR 10|OPMODE NORMAL|ST DIS|

    This gives me a register of 0x00

    Then, every time I want to read I send the 0x4C register to be set as FORCE (register 0x4C set to 0x02) and then I performe a read of 8 values on the 0x42 address.

    I do not see improvements of doing this instead of checking the DRDY bit status and then perform a reading. Is there something else I need to do? Is there anything wrong on the configuration?

     

    Thank you!

    3 REPLIES 3

    BSTRobin
    Community Moderator
    Community Moderator

    Hello PioT,

    Yes, you should set BMM160 to low power preset, and read data by force mode, then you could get high ODR.
    There was example code in github, you could refer it.
    https://github.com/BoschSensortec/BMM150-Sensor-API

    Thank you BSTRobin.

     

    I have checked that repo but I could not find any example of force measure. Only low/high threshold and drdy interrupt. 

    BSTRobin
    Community Moderator
    Community Moderator

    Hello PioT,

    Refer the API in driver code.

    /**
    * \ingroup bmm150
    * \defgroup bmm150ApiPowermode Power mode
    * @brief Set / Get power mode of the sensor
    */
     
    /*!
    * \ingroup bmm150ApiPowermode
    * \page bmm150_api_bmm150_set_op_mode bmm150_set_op_mode
    * \code
    * int8_t bmm150_set_op_mode(const struct bmm150_settings *settings, struct bmm150_dev *dev);
    * \endcode
    * @details This API is used to set the power mode of the sensor.
    *
    * @param[in] settings : Structure instance of bmm150_settings.
    * @param[in] dev : Structure instance of bmm150_dev.
    *
    *@verbatim
    * settings->pwr_mode | Power mode
    * ------------------------|-----------------------
    * 0x00 | BMM150_POWERMODE_NORMAL
    * 0x01 | BMM150_POWERMODE_FORCED
    * 0x03 | BMM150_POWERMODE_SLEEP
    * 0x04 | BMM150_POWERMODE_SUSPEND
    *@endverbatim
    *
    * @return Result of API execution status
    * @retval 0 -> Success
    * @retval >0 -> Warning
    * @retval <0 -> Fail
    */

    int8_t bmm150_set_op_mode(const struct bmm150_settings *settings, struct bmm150_dev *dev);

    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