03-30-2021 02:29 PM
Hello,
I am using BME680 measurement in a multi-thread RTOS. Here is my code :
sleep(3000); /* Delay till the measurement is ready */
// Now we get the result of the measures
uint8_t status = bme680_get_sensor_data(&data, &gas_sensor);
// Trigger the next measurement if you would like to read data out continuously
if (gas_sensor.power_mode == BME680_FORCED_MODE) {
bme680_set_sensor_mode(&gas_sensor);
}
and the sleep function is osDelayUntil(osKernelGetTickCount()+t_ms)
At this stage all this well working.
But, as soon as I add below another i2c read from anotehr device on the same bus as BME680 in the same thread, the BME680 status goes from BME680_OK (0) to BME680_W_NO_NEW_DATA (2) and the data values and temperature/humidity/pressure become irrelevant.
Is it due to delay induced by new i2c measurement, to i2c conflicts as the BME data might be read continously, or any other source?
In forced mode, we do bme680_get_sensor_data and then is the BME680 performing background measurements or is it just asked once?
Thank you
03-31-2021 12:00 AM
Hello Chloe,
Could you capture i2c logic analyzer data?
Then, I can look into more details.
Thanks,