Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    Reset BME680 over SPI after init?

    Reset BME680 over SPI after init?


    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?


    5 REPLIES 5

    Community Moderator
    Community Moderator

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