Powering down all peripherals doesn't help. It still draws about
32uA, here is the code I'm testing:
Code: Select all
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_system.h"
#include "nvs_flash.h"
#include "esp_deep_sleep.h"
void hello_task(void *pvParameter)
{
printf("Hello world!\n");
esp_deep_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_OFF);
esp_deep_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_OFF);
esp_deep_sleep_pd_config(ESP_PD_DOMAIN_RTC_FAST_MEM, ESP_PD_OPTION_OFF);
esp_deep_sleep_start();
}
void app_main()
{
nvs_flash_init();
xTaskCreate(&hello_task, "hello_task", 2048, NULL, 5, NULL);
}
This is the board (the blue one), I take 3v power supply from sparkfun board:
Here is the log:
Code: Select all
I (46) boot: ESP-IDF v2.0-rc1-26-gc78aa13 2nd stage bootloader
I (47) boot: compile time 10:42:16
I (47) boot: Enabling RNG early entropy source...
I (67) boot: SPI Speed : 40MHz
I (80) boot: SPI Mode : DIO
I (92) boot: SPI Flash Size : 4MB
I (104) boot: Partition Table:
I (116) boot: ## Label Usage Type ST Offset Length
I (138) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (162) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (185) boot: 2 factory factory app 00 00 00010000 00100000
I (208) boot: End of partition table
I (221) boot: Disabling RNG early entropy source...
I (238) boot: Loading app partition at offset 00010000
I (725) boot: segment 0: paddr=0x00010018 vaddr=0x00000000 size=0x0ffe8 ( 65512)
I (725) boot: segment 1: paddr=0x00020008 vaddr=0x3f400010 size=0x06a74 ( 27252) map
I (741) boot: segment 2: paddr=0x00026a84 vaddr=0x3ffb0000 size=0x0245c ( 9308) load
I (771) boot: segment 3: paddr=0x00028ee8 vaddr=0x40080000 size=0x00400 ( 1024) load
I (794) boot: segment 4: paddr=0x000292f0 vaddr=0x40080400 size=0x13ddc ( 81372) load
I (859) boot: segment 5: paddr=0x0003d0d4 vaddr=0x400c0000 size=0x00034 ( 52) load
I (860) boot: segment 6: paddr=0x0003d110 vaddr=0x00000000 size=0x02ef8 ( 12024)
I (878) boot: segment 7: paddr=0x00040010 vaddr=0x400d0018 size=0x21c74 (138356) map
I (905) heap_alloc_caps: Initializing. RAM available for dynamic allocation:
I (928) heap_alloc_caps: At 3FFB5670 len 0002A990 (170 KiB): DRAM
I (948) heap_alloc_caps: At 3FFE8000 len 00018000 (96 KiB): D/IRAM
I (969) heap_alloc_caps: At 400941DC len 0000BE24 (47 KiB): IRAM
I (990) cpu_start: Pro cpu up.
I (1001) cpu_start: Starting app cpu, entry point is 0x40080a58
I (0) cpu_start: App cpu up.
I (1033) cpu_start: Pro cpu start user code
V (1087) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (1088) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xE
D (1126) intr_alloc: Connected src 56 to int 2 (cpu 0)
V (1175) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (1232) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xE
D (1306) intr_alloc: Connected src 16 to int 3 (cpu 0)
V (1354) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (1414) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0x40E
D (1490) intr_alloc: Connected src 24 to int 12 (cpu 0)
D (1542) nvs: nvs_flash_init_custom start=9 count=6
D (1637) phy_init: loading PHY init data from application binary
D (1641) nvs: nvs_open phy 0
D (1669) nvs: nvs_get cal_version 4
V (1702) phy_init: phy_get_rf_cal_version: 258
D (1744) nvs: nvs_get_str_or_blob cal_mac
D (1784) nvs: nvs_get_str_or_blob cal_data
D (1835) nvs: nvs_close 1
V (1846) phy_init: register_chipv7_phy, init_data=0x3f401f88, cal_data=0x3ffb6e80, mode=0
I (2046) phy: phy_version: 258, Nov 29 2016, 15:51:07, 0, 0
D (2047) nvs: nvs_open phy 1
V (2048) phy_init: phy_get_rf_cal_version: 258
D (2072) nvs: nvs_set cal_version 4 258
D (2112) nvs: nvs_set_blob cal_mac 6
D (2146) nvs: nvs_set_blob cal_data 1904
D (2603) nvs: nvs_close 2
I (2604) cpu_start: Starting scheduler on PRO CPU.
V (1584) intr_alloc: esp_intr_alloc_intrstatus (cpu 1): checking args
V (1584) intr_alloc: esp_intr_alloc_intrstatus (cpu 1): Args okay. Resulting flags 0x40E
D (1594) intr_alloc: Connected src 25 to int 2 (cpu 1)
I (1594) cpu_start: Starting scheduler on APP CPU.
Hello world!
D (1604) deepsleep: RTC_PERIPH: OFF, RTC_SLOW_MEM: OFF, RTC_FAST_MEM: OFF