Bosch Sensortec Community

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

    Reset BME680 over SPI after init?

    Reset BME680 over SPI after init?

    Tokamak
    Member

    I am still getting up to speed on the BME680; however the datasheet (Memory Map, Table 16) seems to be rather vauge on how to perform a reset after init.

    Specifically, I'm struggling with the register memory map limitation of the SPI implemenation.  The first call to bme680_init function suceeds after a fresh power-on, but any subsequent call into bme680_init fails to confirm chip_id, presumibly because the reset is not being performed correctly after the device is already confgured to Page 1?

    Ultimately, this comes down to ambiguity in Table 16 about the spi_mem_page register.  The table asserts this register is at 0x73 on page 1; however, it presumibly must be reachable from both pages to allow for device reset after initialization...  It is obviously available 0xF3 (page 0), but is it also available at 0x73 (page 1)?  For details see the SPI read/write traces below generated from the bme680 library.

    Tracing the library's read/write callbacks during fresh sensor power-up:
    read 1B: (R reg 73) <- 00
    write 1B: (W reg 60) -> b6
    read 1B: (R reg 73) <- 00
    read 1B: (R reg 50) <- 61
    read 25B: (R reg 09) <- 80 b0 66 03 20 31 8b 68 d7 58 00 2e 18 ba ff 1e 1e 00 00 46 fb 8f f3 1e 8b
    read 16B: (R reg 61) <- 3e 70 34 00 2d 14 78 9c 09 67 4d df d0 12 69 00
    read 1B: (R reg 73) <- 00
    write 1B: (W reg 73) -> 10
    read 1B: (R reg 02) <- 16
    read 1B: (R reg 00) <- 36
    read 1B: (R reg 04) <- e3

    Tracing the library's read/write callbacks after sensor already initalized:
    read 1B: (R reg 73) <- 10
    read 1B: (R reg 73) <- 10
    write 1B: (W reg 73) -> 00   # attempt to change spi_mem_page to page 0 seems to be ignored?
    write 1B: (W reg 60) -> b6  # reset ignored if spi_mem_page failed..?
    read 1B: (R reg 73) <- 10  # spi_mem_page still at page 1...
    read 1B: (R reg 73) <- 10
    write 1B: (W reg 73) -> 00 # another attempt to set page 0 but never confirms result?
    read 1B: (R reg 50) <- 00 # attempts to read chip_id, but comes up empy (presumibly spi_mem_page still at page 1)
    bme680_init returned -3

    The reset after initialization seems like such a fundamental feature, that I have been second guessing myself.  Please let me know if it should indeed be possible to switch to page 0 from page 1 on this sensor.  Are there any critical delays that I need to ensure are adhered to during page swtich and reset?

    Thanks,
    Luke

    5 REPLIES 5

    Vincent
    Community Moderator
    Community Moderator

    Welcome.  i'm glad to know that you find the root cause and fix the issue.

    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