BME680 Save and Load State Issue

Hi

I am using BSEC library with BME680 5min interval. The flow of our device goes like this:

  • Wakeup from device deep sleep "uC is off" then on, only external RTC is up,
  • Collect BME680 reading (accuracy 0), save state on each reading in EEPROM

 

 

bsec_iot_loop(bme680_sleep, esp_timer_get_time, output_ready, state_save, 1/* 10000 */);​

 

 

  • Power-off uC.
  • Wake up, load the previous reading, and get new reading then save state, and so on..

The problem is that accuracy is always 0. Appreciate your support on this and if I misunderstood the whole mechanism.. the assumption is that we'll store the state regardless of the accuracy, as it should be cumulatively changed to acc=3 over time.. also I didnt change the timestamp, so each time the device restart (wake-up from deep sleep it'll start counting from the beginning, since in my implementation the uC is completely off), each time it will reset, assuming it will load the state regardless of the timestamp since it should start from there? or I should only store it if its acc=3? Appreciate more clarification.

Note: The sensor works perfectly in normal operation, with 5 min intervals; no deepsleep.

14 replies