Using ULP without deep_sleep

davdav
Posts: 208
Joined: Thu Nov 17, 2016 2:33 pm

Using ULP without deep_sleep

Postby davdav » Fri Dec 15, 2017 9:23 am

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

User avatar
ESP_krzychb
Posts: 394
Joined: Sat Oct 01, 2016 9:05 am
Contact:

Re: Using ULP without deep_sleep

Postby ESP_krzychb » Fri Dec 15, 2017 9:58 am

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

davdav
Posts: 208
Joined: Thu Nov 17, 2016 2:33 pm

Re: Using ULP without deep_sleep

Postby davdav » Fri Dec 15, 2017 10:43 am

Thank you krzychb. I will take a look at the example

User avatar
urbanze
Posts: 295
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

Re: Using ULP without deep_sleep

Postby urbanze » Fri Dec 15, 2017 11:08 am

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.

davdav
Posts: 208
Joined: Thu Nov 17, 2016 2:33 pm

Re: Using ULP without deep_sleep

Postby davdav » Fri Dec 15, 2017 11:43 am

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

Who is online

Users browsing this forum: Bing [Bot] and 142 guests