Page 1 of 1

ULP running in background

Posted: Wed Aug 30, 2017 2:45 am
by cruzxia
I am working on a project that needs to run in low power battery backup mode if the mains fails.
I have to increment some timing variables with a 1ms base, and they need to run uninterrupted non stop.
I am using an external 32768 crystal to run the RTC.
Currently I am using an interrupt timer on the main processor to run the timing, I was hoping to migrate it into the ULP.

My questions are:

1. If I setup the ULP to increment the timing variables, can I leave it running in an endless timing loop whilst the main processor is operating?
2. Can I read the timing variables in the main processor while the ULP is running?
3. How do I access the ULP variables from the main processor?
4. What is the processor speed of the ULP?

If the power fails I was planning to enable ULP wake up and enter deep sleep.
The main processor could then be woken via button push or ADC voltage level (power restored) in the ULP.

Re: ULP running in background

Posted: Wed Aug 30, 2017 6:35 am
by ESP_krzychb
Hi cruzxia,
1. If I setup the ULP to increment the timing variables, can I leave it running in an endless timing loop whilst the main processor is operating?
Yes
2. Can I read the timing variables in the main processor while the ULP is running?
Yes
3. How do I access the ULP variables from the main processor?
See https://github.com/espressif/esp-idf/tr ... system/ulp
4. What is the processor speed of the ULP?
ULP uses RTC_FAST_CLK, which is 8 MHz