Deepsleep is counting up

ginodecock
Posts: 30
Joined: Thu Jun 29, 2017 7:10 pm

Deepsleep is counting up

Postby ginodecock » Mon Jul 16, 2018 8:37 pm

Hi,

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);
When the wakeup from the deepsleep counter doesn't work anymore I see that the deepsleep counter is counting up and it's not possible anymore to re-initialise. At normal operation the deepsleep counter is counting down until it's time to offload.

Any idea in what situation the deepsleep counter is in when it's counting up?

Thanks,

Who is online

Users browsing this forum: No registered users and 106 guests