12-08-2021 03:52 AM
I am experiencing an issue with the BMP280 where writing to 0xF4 (ctrl_meas) register only results in changes being made for the osrs_p and osrs_t fields. I can see my I2C writes only apply to these fields in the register and not the power mode (last 2 bits). My problem is my BMP280 is currently in sleep mode it seems and stuck in this mode permanently (from reading the 0xF4 register I keep getting xxxx xx00, depending on how I set up osrs_t and osrs_p). The chip ID reading is correct. I have tried checking the value I am sending over a scope and it looks like I am sending the correct info.
Solved! Go to Solution.
12-08-2021 04:35 AM
Hello user1397215,
The bits mode[1:0] in 0xF4 register determined the power mode.
You could see data sheet and github drive how to change power mode.
https://github.com/BoschSensortec/BMP280_driver/blob/master/examples/pressure.c
/* Always set the power mode after setting the configuration */
rslt = bmp280_set_power_mode(BMP280_NORMAL_MODE, &bmp);
12-16-2021 07:43 PM - edited 12-16-2021 07:44 PM
Thanks @BSTRobin I was able to get this working now. I found that the sensor was constantly set to sleep mode (it seemed I was not reading it at all when I set it to Forced mode). So got it working now by setting it to Normal mode, performing a read, then back to sleep mode.
12-21-2021 08:49 AM
Good news, user1397215