Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    [BMP581]: Problem reading the pressure via I2C

    [BMP581]: Problem reading the pressure via I2C

    msu
    New Poster

    Hello,

    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

    BSTRobin
    Community Moderator
    Community Moderator

    Hi msu,

    You could refer example code on github and run the example code.
    https://github.com/BoschSensortec/BMP5-Sensor-API

    Hello,

    I have followed this example. Nevertheless, the measurements I get don't seem to be correct (4.5°C and 688.04 hPa).

    Moreover, in the program I try to set the OSR and ODR as shown in the Github example but I get the following:

    BMP581_REG_OSR_CONFIG: 0x0
    BMP581_REG_OSR_CONFIG to write: 0x56
    BMP581_REG_OSR_CONFIG: 0x4
    BMP581_ODR_CONFIG: 0x60
    BMP581_ODR_CONFIG to write: 0x3D
    BMP581_ODR_CONFIG: 0x39
    BMP581_REG_OSR_EFF: 0x4

    The 'odr_is_valid' bit is zero and the final OSR and ODR values are not the ones I'm trying to set. Which could be the problem?

    Regards,

    BSTRobin
    Community Moderator
    Community Moderator

    Hi msu,

    You can debug the program step by step to see the return of the program.

    Hello,

    I can see the return of the program. What I'd like to know is the sequence to configure the sensor in normal mode for reading the pressure and temperature. I'm following the instructions in the Github example:

    https://github.com/boschsensortec/BMP5-Sensor-API/blob/master/examples/oor_read_sensor_data_normal_m...

    Nevertheless, the sensor is not being configured with the values I'm trying to set:

    BMP581_REG_FIFO_SEL: 0x0
    BMP581_REG_FIFO_SEL to write: 0x3
    BMP581_REG_FIFO_SEL: 0x3
    BMP581_REG_OSR_CONFIG: 0x0
    BMP581_REG_OSR_CONFIG to write: 0x40
    BMP581_REG_OSR_CONFIG: 0x0
    BMP581_REG_OSR_CONFIG to write: 0x16
    BMP581_REG_OSR_CONFIG: 0x4
    BMP581_ODR_CONFIG: 0x60
    BMP581_ODR_CONFIG to write: 0x3C
    BMP581_ODR_CONFIG: 0x38
    BMP581_REG_OSR_EFF: 0x4
    BMP581_ODR_CONFIG: 0x38
    BMP581_ODR_CONFIG to write: 0x39
    BMP581_ODR_CONFIG: 0x31
    BMP581_REG_OSR_EFF: 0x4
    BMP581_DSP_CONFIG: 0x3
    BMP581_REG_STATUS: 0x1

    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