diff --git a/platform/srf06-cc26xx/sensortag/bmp-280-sensor.c b/platform/srf06-cc26xx/sensortag/bmp-280-sensor.c index a3b85ccc2..067fe79b9 100644 --- a/platform/srf06-cc26xx/sensortag/bmp-280-sensor.c +++ b/platform/srf06-cc26xx/sensortag/bmp-280-sensor.c @@ -136,7 +136,7 @@ static int enabled = SENSOR_STATUS_DISABLED; static uint8_t sensor_value[SENSOR_DATA_BUF_SIZE]; /*---------------------------------------------------------------------------*/ /* Wait SENSOR_STARTUP_DELAY clock ticks for the sensor to be ready - ~80ms */ -#define SENSOR_STARTUP_DELAY 11 +#define SENSOR_STARTUP_DELAY 3 static struct ctimer startup_timer; /*---------------------------------------------------------------------------*/ @@ -187,7 +187,7 @@ enable_sensor(bool enable) if(enable) { /* Enable forced mode */ - val = PM_NORMAL | OSRSP(1) | OSRST(1); + val = PM_FORCED | OSRSP(1) | OSRST(1); } else { val = PM_OFF; } @@ -345,6 +345,7 @@ configure(int type, int enable) case SENSORS_HW_INIT: enabled = SENSOR_STATUS_INITIALISED; init(); + enable_sensor(0); break; case SENSORS_ACTIVE: /* Must be initialised first */ diff --git a/platform/srf06-cc26xx/sensortag/bmp-280-sensor.h b/platform/srf06-cc26xx/sensortag/bmp-280-sensor.h index e27013c40..8bff65787 100644 --- a/platform/srf06-cc26xx/sensortag/bmp-280-sensor.h +++ b/platform/srf06-cc26xx/sensortag/bmp-280-sensor.h @@ -42,12 +42,10 @@ * * Once the sensor is stable, the driver will generate a sensors_changed event. * - * Once a reading has been taken, the caller has two options: - * - Turn the sensor off by calling SENSORS_DEACTIVATE, but in order to take - * subsequent readings SENSORS_ACTIVATE must be called again - * - Leave the sensor on. In this scenario, the caller can simply keep calling - * value() for subsequent readings, but having the sensor on will consume - * energy + * We take readings in "Forced" mode. In this mode, the BMP will take a single + * measurement and it will then automatically go to sleep. + * + * SENSORS_ACTIVATE must be called again to trigger a new reading cycle * @{ * * \file