Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BME280 Calibration values for temperature and pressure giving zero after soft reset

    BME280 Calibration values for temperature and pressure giving zero after soft reset

    PANengineer
    New Poster

    We noticed that sometimes the calculated temperature and pressure measurements showed “0.0” as result. After investigation it was noticed that in these cases the calibration data readout values T1, T2, T3, P1 and P2 were “0” resulting in incorrect temperature and pressure calculation. The value P3 was sometimes a different number than the expected value.

    During start-up, the software does configure the BME280 sensor and reads the stored calibration sensor data. Configuration of the sensor is started with reading the Chip ID then sequentially initiate a Soft reset, setting Sleep mode, setting OSR & control values, and then finishing with reading the Calibration values.

    To software we used is task/event based, which means that the timing of the sequence with above described functions (or tasks) can be different between start-ups.

    Using an oscilloscope, the start-up timing for two situations is measured, one with reading correct calibration data (Figure 1) and one with incorrect calibration data (Figure 2). Logic analyzer signals were added in the code to indicate the start of a task (soft reset, set Sleep mode and reading calibration data). The I2C clock was measured to indicate the communication process.

    PANengineer_1-1691590429887.jpeg

    Figure 1: Correct reading of calibration values

    From Figure 1 it can be noticed the time between start of the Soft Reset (SoftRst) and start of reading calibration data (signal RdCal) is ~2.2msec. The blue signal is the I2C SCL clock. We do get the following calibration values:

    • Calibration Data.T1: 28444
    • Calibration Data.T2: 26504
    • Calibration Data.T3: 50
    • Calibration Data.P1: 36562
    • Calibration Data.P2: -10640
    • Calibration Data.P3: 3024
    • Calibration Data.P4: 7491
    • Calibration Data.P5: -157
    • Calibration Data.P6: -7
    • Calibration Data.P7: 9900
    • Calibration Data.P8: -10230
    • Calibration Data.P9: 4285
    • Calibration Data.H1: 75

    PANengineer_2-1691590630910.png

    Figure 2: Incorrect reading of calibration values

    From Figure 2 it can be noticed that the timing between starting the Soft Reset (signal SoftRst) and start of reading calibration data (signal RdCal) is much shorter (~1 msec) compared with the timing shown in Figure 1.

    This results into incorrect calibration values as shown below.

    • Calibration Data.T1: 0
    • Calibration Data.T2: 0
    • Calibration Data.T3: 0
    • Calibration Data.P1: 0
    • Calibration Data.P2: 0
    • Calibration Data.P3: 2816
    • Calibration Data.P4: 7491
    • Calibration Data.P5: -157
    • Calibration Data.P6: -7
    • Calibration Data.P7: 9900
    • Calibration Data.P8: -10230
    • Calibration Data.P9: 4285
    • Calibration Data.H1: 75

     

    According to the BME Sensor datasheet, the start-up time to first communication after power-on is 2ms. Assuming the BME sensor needs some time after Soft Reset initiation (this is not specified in the datasheet), we added an additional delay of 2ms after Soft Reset to prevent reading of incorrect calibration data. 

    The question is now, is our assumption right? How much time is needed before reading calibration data after soft reset? Or is this behaviour caused by something else?

     

    4 REPLIES 4

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    Thanks for your inquiry.

    We will double check the BME280 start-up time from power on to first communication and then get back to you.

    Thanks.

    Note, that we're interested in the time after Soft Reset till first communication...not from Power On. We start with communication a few seconds after power on.

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    Sorry for the delay.

    BME280 specifies the maximum start-up time of 2ms from power on till the first communication. So the start-up time from soft-reset till the first communication should be less than 2ms because BME280 is already powered on.

    We did a few times test on the start-up time from soft-reset command sent till the first communication. It is always about 1.4ms as shown below. Therefore, if you add 2ms delay after you do BME280 soft-rest by writing value of 0xB6 to register 0xE0, then you should be able to read correct values from NVM or other registers robustly.

    BME280 start-up time after soft-reset.png

    Thanks.

    Thanks for taking the time to do some measurements. I do not quite understand the picture, can you give a bit more explanation what I see here? I do see that you write the reset value, but then a write is performed to 0x88, followed by reads to 0x00, 0x88 and 0x77? How can you conclude the communication is ready after soft-reset?

    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