Page 1 of 1

Is it possible to wake up ULP from RTC timer?

Posted: Mon Dec 11, 2017 5:41 am
by san27deep
Hi,
I want to keep complete system into deep sleep mode, including ULP, only RTC timer and RTC memory will be powered on. Once RTC timer reaches its expected timer value I want ULP processor to wake up and do some calcualtions. Is it possible to do so?
If yes Is there any guide to do that?

Re: Is it possible to wake up ULP from RTC timer?

Posted: Mon Dec 11, 2017 7:38 am
by WiFive

Re: Is it possible to wake up ULP from RTC timer?

Posted: Mon Dec 11, 2017 9:28 am
by san27deep
This looks like, ULP is still on. I want ULP to be switched on once I reach that timer value. is it doing that? I might not understood that, correct me

Re: Is it possible to wake up ULP from RTC timer?

Posted: Mon Dec 11, 2017 10:40 am
by WiFive
The ULP co-processor puts itself into sleep mode by executing the HALT instruction. This also triggers the ULP
timer to start counting RTC_SLOW_CLK ticks which, by default, originate from an internal 150 kHz RC oscillator.
Once the timer expires, the ULP co-processor is powered up and runs a program with the program counter (PC)
which is stored in register SENS_PC_INIT.

Re: Is it possible to wake up ULP from RTC timer?

Posted: Mon Dec 11, 2017 10:46 am
by ESP_krzychb
san27deep wrote:Once RTC timer reaches its expected timer value I want ULP processor to wake up and do some calcualtions. Is it possible to do so?
Yes, this is intended / designed behavior of the ULP timer waking up the ULP coprocessor. You can also check more detailed description including flow diagrams in TRM, chapter 28.5 ULP Program Execution.

Re: Is it possible to wake up ULP from RTC timer?

Posted: Tue Dec 12, 2017 6:52 am
by san27deep
Thanks a lot it is working fine. One more query.
I tried to hold ULP in active state using "wait no_of_cycle" instruction. It is working as expected but one concern is it is consuming lot of power. in active ULP state when using wait it took almost 1.5mA. which sould be according to datasheet 200uA. Is there any specific reason to this?