Im using BMP280 sensor to read temperature and pressure values using the Bosch BMP280 driver . But for the same firmware running on the 3 identical boards, im getting wrong pressure data on 2 boards (one of the board was working fine, but started showing incorrect values recently). Temperature data is good on all boards. The incorrect pressure values are nearly 680 hPa on one board and 90 hPa on the other, where it should be around 1000 hPa.
The communication is done via I2C interface:
bmp_handle.dev_id = BMP280_I2C_ADDR_PRIM; bmp_handle.intf = BMP280_I2C_INTF; bmp_handle.read = BMP280_i2c_read; bmp_handle.write = BMP280_i2c_write; bmp_handle.delay_ms = HAL_Delay;
And with following device configuration:
struct bmp280_config config_val; config_val.os_temp = BMP280_OS_1X; config_val.os_pres = BMP280_OS_4X; config_val.odr = BMP280_ODR_125_MS; config_val.filter = BMP280_FILTER_COEFF_4;
The power mode is set as BMP280_NORMAL_MODE.
What could be the possible issue?
Could we know which HW board you used?
Bosch BMP280 reference HW board is this, do you have it on your hand to compare it?