Hello
Reading temp and press from BMP280 in normal mode, return reset values 0x80000 for both of them.
In forced mode reading returns expected values.
I use the APIs provided here https://github.com/boschsensortec/BMP2-Sensor-API, ported for ESP32.
I'm aware about the old topic /mems-sensors-forum-jrmujtaw/post/bmp280---always-initial-values-wfe6w4mIV3wDFrD but the behavior i see is different. and the sensor power supply should be fine.
In my case after a power cycle of the system, the reading is normal. If i reset esp32 (hard or soft) then reading returns 0x80000. This happens only if power mode is set to BMP2_POWERMODE_NORMAL. If power mode is set to BMP2_POWERMODE_FORCED then no issue.
API sequence used is the following in both cases: normal and forced
- bmp2_init()
- bmp2_get_config() // get initial configuration
- bmp2_set_power_mode() // set power mode and new configuration
- bmp2_get_config() // ensure new values are stored on device
- // bmp2_set_regs() //select forced mode in 0xf4 ; commented out in normal mode
- bmp2_get_status() // not needed for normal mode, but i keep it here for forced mode
- bmp2_get_sensor_data()
- loop to #5
The configuration i use is this one:
conf.os_mode = BMP2_OS_MODE_ULTRA_HIGH_RESOLUTION;
conf.filter = BMP2_FILTER_COEFF_16;
conf.os_pres = 0;
conf.os_temp = 0;
conf.odr = BMP2_ODR_500_MS;
and i can see it in registers.
It puzzles me it works fine after power cycle but not after reset. My guess is that a power cycle does a reset of bmp280 different from the software reset.
What can i do to bring the sesor in working mode after reset?
Regards
Ves011