Page 1 of 1
Wrong ULP Consumption ?
Posted: Mon May 21, 2018 8:31 pm
by urbanze
What is the consumption of ULP in 100% Duty Cycle? Datasheet says about 150uA, however, I getting 1.50~1.40mA, why?
I tried power down some domains manually but this doesn't change consumption.
C
Code: Select all
extern const uint8_t ulp_main_bin_start[] asm("_binary_ulp_main_bin_start");
extern const uint8_t ulp_main_bin_end[] asm("_binary_ulp_main_bin_end");
void initULP()
{
ulp_load_binary(0, ulp_main_bin_start, (ulp_main_bin_end - ulp_main_bin_start) / sizeof(uint32_t));
ulp_run((&ulp_main - RTC_SLOW_MEM) / sizeof(uint32_t));
}
extern "C" void app_main()
{
if (esp_sleep_get_wakeup_cause() == ESP_SLEEP_WAKEUP_ULP)
{
ESP_LOGI("ESP32", "ULP Wakeup");
}
else
{
ESP_LOGI("ESP32", "!= Wakeup");
initULP();
}
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_AUTO);
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_AUTO);
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_FAST_MEM, ESP_PD_OPTION_AUTO);
esp_deep_sleep(1800000000);
}
ASM
Code: Select all
.bss
.text
.global main
main:
loop:
jump loop
Re: Wrong ULP Consumption ?
Posted: Mon May 21, 2018 10:59 pm
by WiFive
Did you try adc_power_off
Re: Wrong ULP Consumption ?
Posted: Tue May 22, 2018 1:25 am
by urbanze
WiFive wrote:Did you try adc_power_off
I test it now but still ~1.50mA. Why this x10 error?
Re: Wrong ULP Consumption ?
Posted: Tue May 22, 2018 1:33 am
by WiFive
1.4mA is usually with adc or touch powered on. You are measuring module/chip consumption only right?
Although for some reason it is reported as 1.4ma here
https://github.com/espressif/esp-iot-so ... -processor
Re: Wrong ULP Consumption ?
Posted: Tue May 22, 2018 9:31 am
by keramazigh
Hi,
What kind of board are you using ? I made some tests with ULP (I tried the ULP example in the SDK) and I managed to reach around 15uA with a bare ESP-WROOM 32 (without external electronic, except pull-up resistor on EN pin). With ESP-WROOM dev kit I was not able to get below 1-2 mA.
Re: Wrong ULP Consumption ?
Posted: Tue May 22, 2018 9:31 am
by keramazigh
Hi,
What kind of board are you using ? I made some tests with ULP (I tried the ULP example in the SDK) and I managed to reach around 15uA with a bare ESP-WROOM 32 (without external electronic, except pull-up resistor on EN pin). With ESP-WROOM dev kit I was not able to get below 1-2 mA.
Re: Wrong ULP Consumption ?
Posted: Tue May 22, 2018 6:30 pm
by urbanze
Oh, I loved this link, thanks. I'm measuring consumption only of the WROOM module (no extra components). The adc_power_off() function did not have any effects. Do I need to turn off any reg or still geting 10x higher consumption? >:(
Re: Wrong ULP Consumption ?
Posted: Sat May 26, 2018 1:44 pm
by urbanze
keramazigh wrote:Hi,
What kind of board are you using ? I made some tests with ULP (I tried the ULP example in the SDK) and I managed to reach around 15uA with a bare ESP-WROOM 32 (without external electronic, except pull-up resistor on EN pin). With ESP-WROOM dev kit I was not able to get below 1-2 mA.
I just using wroom in simple board (to make wiring easy):
https://cdn.awsli.com.br/600x700/78/781 ... c32a94.jpg
Even disabling adc, gpios, fast memory and etc, consumption continues 1.4mA.
On link by WiFive, says "Delay NOP == 1.4mA", I believe this is with all peripherals are OFF, but... Where 150uA without self-pwm?
Re: Wrong ULP Consumption ?
Posted: Sat May 26, 2018 7:11 pm
by mikemoy
Never hurts to ask. What are you powering the ESP32 with, and what are you measuring the current with.
Re: Wrong ULP Consumption ?
Posted: Tue Jul 17, 2018 8:05 pm
by urbanze
After some time, I returned to test this... This code below generate 320uA, 2x more than spectate.
Where 150uA?
Code: Select all
extern const uint8_t ulp_main_bin_start[] asm("_binary_ulp_main_bin_start");
extern const uint8_t ulp_main_bin_end[] asm("_binary_ulp_main_bin_end");
extern "C" void app_main()
{
ulp_load_binary(0, ulp_main_bin_start, (ulp_main_bin_end - ulp_main_bin_start) / sizeof(uint32_t));
ulp_run((&ulp_main - RTC_SLOW_MEM) / sizeof(uint32_t));
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_AUTO);
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_AUTO);
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_FAST_MEM, ESP_PD_OPTION_AUTO);
esp_sleep_pd_config(ESP_PD_DOMAIN_XTAL, ESP_PD_OPTION_AUTO);
esp_deep_sleep_start();
}
I esp-iot-solution (github) say to disable all vdd3p3 cpu pins, but disabling some pins, consumption increase to 500-400uA?!
Code: Select all
extern const uint8_t ulp_main_bin_start[] asm("_binary_ulp_main_bin_start");
extern const uint8_t ulp_main_bin_end[] asm("_binary_ulp_main_bin_end");
extern "C" void app_main()
{
ulp_load_binary(0, ulp_main_bin_start, (ulp_main_bin_end - ulp_main_bin_start) / sizeof(uint32_t));
ulp_run((&ulp_main - RTC_SLOW_MEM) / sizeof(uint32_t));
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_AUTO);
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_AUTO);
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_FAST_MEM, ESP_PD_OPTION_AUTO);
esp_sleep_pd_config(ESP_PD_DOMAIN_XTAL, ESP_PD_OPTION_AUTO);
rtc_gpio_isolate(GPIO_NUM_0);
rtc_gpio_isolate(GPIO_NUM_2);
rtc_gpio_isolate(GPIO_NUM_15);
esp_deep_sleep_start();
}