Page 1 of 1

How to switch the CPU mode between sleep mode and active mode?

Posted: Wed Aug 30, 2017 4:56 am
by sealandhw
I want change cpu's mode to decrease the power consume ,but found no related API.How to do it...

Re: How to switch the CPU mode between sleep mode and active mode?

Posted: Wed Aug 30, 2017 6:48 pm
by enitalp
You mean ?

// Configure sleeping stuff
esp_deep_sleep_enable_ulp_wakeup();
esp_deep_sleep_enable_ext0_wakeup(GPIO_NUM_0,1);
or
esp_deep_sleep((uint64_t)l_SleepAmount*(uint64_t)1000000); // Convert second to microsecond

Re: How to switch the CPU mode between sleep mode and active mode?

Posted: Fri Sep 01, 2017 7:55 am
by kurtzweber
Hi

this is a good tutorial about it --> https://pcbreflux.blogspot.it/2017/02/e ... ample.html