Bosch Sensortec Community

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

    How to put BHI260AP+BMM150 in sleep mode

    How to put BHI260AP+BMM150 in sleep mode

    zkz
    New Poster

    I have a BHI260AP+BMM150 board (similar to shuttle board). BHI260AP is connected to a host via i2c. The whole system can be put into sleep mode. Before sleep the host, I want to make sure BHI260AP+BMM150 is in sleep in order to minimise power consumption during sleep. However, I cannot find anything to control the power mode of BHI260AP and/or BMM150 via the host interface.

    Is there a way to achieve this? Or am I in a wrong path?

    7 REPLIES 7

    BSTRobin
    Community Moderator
    Community Moderator

    Hi zkz,

    After the firmware is loaded, no sensors are enabled by default. Refer to chapter 19.3 of the data sheet for power consumption at this time.

    Current consumption total on pins VDD and VDDIO.png

    If the sensor is enabled in your application, you should turn it off before entering low power consumption.

    Example:
    float sample_rate = 50.0f; /* Read out data measured at 10Hz */
    uint32_t report_latency_ms = 0; /* Report immediately */


    /*load firmware*/
    ...

    rslt = bhy2_register_fifo_parse_callback(BHY2_SENSOR_ID_ORI_WU, parse_euler, (void*)&euler_accuracy, &bhy2);
    print_api_error(rslt, &bhy2);

    rslt = bhy2_set_virt_sensor_cfg(BHY2_SENSOR_ID_ORI_WU, sample_rate, report_latency_ms, &bhy2);
    print_api_error(rslt, &bhy2);
    PDEBUG("Enable %s at %.2fHz.\r\n", get_sensor_name(BHY2_SENSOR_ID_ORI_WU), sample_rate);

    /*run user code*/
    ...

    /*enter to low power*/
    sample_rate = 0.0f;
    rslt = bhy2_set_virt_sensor_cfg(BHY2_SENSOR_ID_ORI_WU, 0, report_latency_ms, &bhy2);
    print_api_error(rslt, &bhy2);
    PDEBUG("Disable %s at %.2fHz.\r\n", get_sensor_name(BHY2_SENSOR_ID_ORI_WU), sample_rate);

    Thanks, BSTRobin.

    I know what to do now.

    Your help is highly appreciated.

    BSTRobin
    Community Moderator
    Community Moderator

    Welcome, zkz.

    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