Page 1 of 1

Using ULP without deep_sleep

Posted: Fri Dec 15, 2017 9:23 am
by davdav
Hi everybody,

is it possible to use ULP without forcing the module to go in deep_sleep?

In the examples provided in the SDK the program calls

Code: Select all

esp_deep_sleep_start();

I would like to use the ULP, reading inputs and ADC, in both case when module is full power and deep sleep. Is this possible?

Thanks

Re: Using ULP without deep_sleep

Posted: Fri Dec 15, 2017 9:58 am
by ESP_krzychb
davdav wrote:is it possible to use ULP without forcing the module to go in deep_sleep?
Hi davdav,
Yes, see https://github.com/espressif/esp-idf/tr ... system/ulp

Re: Using ULP without deep_sleep

Posted: Fri Dec 15, 2017 10:43 am
by davdav
Thank you krzychb. I will take a look at the example

Re: Using ULP without deep_sleep

Posted: Fri Dec 15, 2017 11:08 am
by urbanze
Fortunately it does and makes it a very useful tool if you can use it well. If your project is too heavy, using the "third core" to read sensors or perform some operations can rid the Main Core of this and not interrupt your application.
Just be careful with wake up timer and halt, maybe you want it to run "infinitely" like in a loop and without the care about the above items, it can act in a "weird" way.

Re: Using ULP without deep_sleep

Posted: Fri Dec 15, 2017 11:43 am
by davdav
Ok @urbanze, thanks for highlighting.

You got exactly what I would like to do..let the ULP to read ADC and talking to an I2C port expander to read some inputs and set some outputs without need of main processor.
Just be careful with wake up timer and halt, maybe you want it to run "infinitely" like in a loop and without the care about the above items, it can act in a "weird" way.
In theory I do not want to go in deep sleep and wake up continuosly, maybe only when external power supply is lost (I have battery backup). Do you know some docs or resource (examples, forum threads) I can check to avoid the "weird" behaviour?

Thanks