Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    [BMP581]: Problem reading the pressure via I2C

    [BMP581]: Problem reading the pressure via I2C

    New Poster


    I'm using a BMP581 Shuttle Board 3.0 and I'm having problems reading the pressure via I2C. I read six registers starting at the 0x1D address (TEMP_DATA_XLSB). The temperature data seems to be correct. Nevertheless, the pressure registers are always set to the default value 0x7F. The CS and SDO pins are connected to VDDIO and VDDIO is connected to VDD (3.3V). Moreover, the values I write in ODR_CONFIG and DRIVE_CONFIG registers are not saved and I cannot write to OSR_CONFIG register.

    Which could be the problem?

    12 REPLIES 12


    I have followed your suggestion and I have connected both VDDIO and CS to VDD 3V3. Nevertheless, the result is the same:

    [2022-12-29_21:37:04:04.684438] BMP581_REG_CMD: 0
    [2022-12-29_21:37:04:04.705762] BMP581_REG_CHIP_ID: 0x0
    [2022-12-29_21:37:04:04.716451] BMP581_REG_DRIVE_CONFIG: 0x20
    [2022-12-29_21:37:04:04.719342] BMP581_REG_DRIVE_CONFIG to write: 0x21
    [2022-12-29_21:37:04:04.736170] BMP581_REG_DRIVE_CONFIG: 0x1
    [2022-12-29_21:37:04:04.744970] BMP581_REG_CHIP_ID: 0x0
    [2022-12-29_21:37:04:04.755418] BMP581_REG_DSP_CONFIG: 0x3
    [2022-12-29_21:37:04:04.765523] BMP581_REG_OOR_CONFIG: 0x0
    [2022-12-29_21:37:04:04.776625] BMP581_REG_OSR_CONFIG: 0x0
    [2022-12-29_21:37:04:04.778334] BMP581_REG_OSR_CONFIG to write: 0x60
    [2022-12-29_21:37:04:04.795422] BMP581_REG_OSR_CONFIG: 0x40
    [2022-12-29_21:37:04:04.808031] BMP581_REG_DSP_IIR: 0x0
    [2022-12-29_21:37:04:04.808107] BMP581_REG_DSP_IIR to write: 0x9
    [2022-12-29_21:37:04:04.825126] BMP581_REG_DSP_IIR: 0x1
    [2022-12-29_21:37:04:04.847961] BMP581_ODR_CONFIG: 0x60
    [2022-12-29_21:37:04:04.848042] BMP581_ODR_CONFIG to write: 0x5D
    [2022-12-29_21:37:04:04.875064] BMP581_ODR_CONFIG: 0x19
    [2022-12-29_21:37:04:04.885106] BMP581_REG_OSR_EFF: 0x0
    [2022-12-29_21:37:04:04.895825] BMP581_REG_DSP_CONFIG: 0x3
    [2022-12-29_21:37:04:04.905390] BMP581_REG_OOR_CONFIG: 0x0
    [2022-12-29_21:37:09:09.926876] LIS2DW12 measurements:
    [2022-12-29_21:37:09:09.932608] acc_x_g: -0.0227 acc_y_g: -0.0959 acc_z_g: 1.0014
    [2022-12-29_21:37:09:09.936435] acc_x_ms2: -0.0227 acc_y_ms2: -0.0959 acc_z_ms2: 0.0014
    [2022-12-29_21:37:09:09.936505] raw_t: -2688 14.5000
    [2022-12-29_21:37:09:09.947718] BMP581 data: 0x1 0x1C 0xF 0x9 0x8 0x40
    [2022-12-29_21:37:09:09.952780] BMP581_TEMPERATURE: 15.1094
    [2022-12-29_21:37:09:09.952940] BMP581_PRESSURE raw: 0x400809
    [2022-12-29_21:37:09:09.956189] BMP581_PRESSURE: 655.6814 hPa

    [2022-12-29_21:37:10:10.957219] LIS2DW12 measurements:
    [2022-12-29_21:37:10:10.963175] acc_x_g: -0.0298 acc_y_g: -0.0861 acc_z_g: 1.0033
    [2022-12-29_21:37:10:10.966600] acc_x_ms2: -0.0298 acc_y_ms2: -0.0861 acc_z_ms2: 0.0033
    [2022-12-29_21:37:10:10.966661] raw_t: -2672 14.5625
    [2022-12-29_21:37:10:10.977740] BMP581 data: 0x0 0x18 0xF 0x3 0x8 0x40
    [2022-12-29_21:37:10:10.982723] BMP581_TEMPERATURE: 15.0938
    [2022-12-29_21:37:10:10.982881] BMP581_PRESSURE raw: 0x400803
    [2022-12-29_21:37:10:10.984906] BMP581_PRESSURE: 655.6805 hPa
    [2022-12-29_21:37:11:11.987126] LIS2DW12 measurements:
    [2022-12-29_21:37:11:11.992696] acc_x_g: -0.0227 acc_y_g: -0.1003 acc_z_g: 0.9848
    [2022-12-29_21:37:11:11.996768] acc_x_ms2: -0.0227 acc_y_ms2: -0.1003 acc_z_ms2: -0.0152
    [2022-12-29_21:37:11:11.996863] raw_t: -2688 14.5000
    [2022-12-29_21:37:12:12.007728] BMP581 data: 0x20 0x11 0xF 0x0 0x8 0x40
    [2022-12-29_21:37:12:12.012810] BMP581_TEMPERATURE: 15.0669
    [2022-12-29_21:37:12:12.012962] BMP581_PRESSURE raw: 0x400800
    [2022-12-29_21:37:12:12.015015] BMP581_PRESSURE: 655.6800 hPa

    Which could be the problem? I cannot write the needed values via I2C and it seems that only temperature measure-related bits can be written. The temperature measure seems to be correct (near 15 °C).

    Community Moderator
    Community Moderator


    Let's make BMP581 I2C communication work first and then try to read BMP581 pressure and temperature data.

    I have BMP581 shuttle board as well. The shuttle board is plugged onto APP3.0 base board at Then I used DD2.0 GUI SW to set the APP3.0 base board to work at I2C interface with BMP581 7-bit slave address of 0x47. Then I use logic analyzer Saleae to capture the I2C transaction at

    First I read BMP581 chip ID at register 0x01 and got the value of 0x50 back as shown below. This means I2C read is working.

    BMP581 I2C read chip ID.jpg

    Then I write value of 0x60 to register 0x36 as shown below.

    BMP581 I2C register write.jpg

    Then I read register 0x36 again and got the value of 0x60 back. So it means I2C write is working.

    BMP581 I2C read register back.jpg

    BMP581 I2C communication is straight forward. Please try to use a logic analyzer to debug.



    I have tried by connecting a Beagle I2C probe between the microcontroller and the BMP581 sensor. With the I2C probe I see that all the transactions are correct:


    I even see that the registers are correctly written:


    And the measurements values are correct:


    So the problem might be in the microcontroller's I2C driver. I will check that.

    [UPDATE 2023-01-02]: I have changed the master's clock speed from 400 kHz to 1 MHz. At 1 MHz I receive all the values correct. I have also tried with a clock rate of 100 kHz but I get the same results I get at 400 kHz (incongruous measurements even if the I2C probe shows the correct values).

    Thanks for your help.