I am combining ULP wakeup and deepsleep timer wakeup. When the RTC memory is full the ULP CPU triggers a wakeup and the RTC memory is written to flash.
When it's time to offload the data the main CPU wil be triggerd by the deepsleep timer wakeup.
This way of working seems to work ok. However sometimes, more often when the ULP is in a faster logging routine the wake up by the deepsleep timer doesn't work anymore.
I monitor the deepsleep counter:
Code: Select all
long long sleep_counter = (long long) (REG_READ(RTC_CNTL_SLP_TIMER1_REG) & UINT16_MAX) << 32 | REG_READ(RTC_CNTL_SLP_TIMER0_REG);
Any idea in what situation the deepsleep counter is in when it's counting up?
Thanks,