Wrong ULP Consumption ?

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

Wrong ULP Consumption ?

Postby urbanze » Mon May 21, 2018 8:31 pm

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


WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Wrong ULP Consumption ?

Postby WiFive » Mon May 21, 2018 10:59 pm

Did you try adc_power_off

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

Re: Wrong ULP Consumption ?

Postby urbanze » Tue May 22, 2018 1:25 am

WiFive wrote:Did you try adc_power_off
I test it now but still ~1.50mA. Why this x10 error?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Wrong ULP Consumption ?

Postby WiFive » Tue May 22, 2018 1:33 am

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

keramazigh
Posts: 4
Joined: Fri May 18, 2018 11:14 am

Re: Wrong ULP Consumption ?

Postby keramazigh » Tue May 22, 2018 9:31 am

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.

keramazigh
Posts: 4
Joined: Fri May 18, 2018 11:14 am

Re: Wrong ULP Consumption ?

Postby keramazigh » Tue May 22, 2018 9:31 am

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.

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

Re: Wrong ULP Consumption ?

Postby urbanze » Tue May 22, 2018 6:30 pm

WiFive wrote: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
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? >:(

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

Re: Wrong ULP Consumption ?

Postby urbanze » Sat May 26, 2018 1:44 pm

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?

mikemoy
Posts: 626
Joined: Fri Jan 12, 2018 9:10 pm

Re: Wrong ULP Consumption ?

Postby mikemoy » Sat May 26, 2018 7:11 pm

Never hurts to ask. What are you powering the ESP32 with, and what are you measuring the current with.

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

Re: Wrong ULP Consumption ?

Postby urbanze » Tue Jul 17, 2018 8:05 pm

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();
}


Who is online

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