Devkit - ESP32 S3 N16
Other Peripherals - Nordic PPK2 and ESP-Prog
Goal - I want to achieve the power consumption of 240 uA using esp_light_sleep_start() function and 8 uA using esp_deep_sleep_start() function. I don't know why I am not able to achieve those results. At present when esp_light_sleep_start() is used I am getting around 1.8 mA and when esp_deep_sleep_start() is used I am getting around 860 uA.
Steps tried
- Tried disabling the unnecessary modules in the menuconfig which might cause this problems for example USB-JTAG-CONSOLE.
- Initialized and deinitialized Wi-Fi module and UART module.
- Reduced the main clock speed to 80 MHz from 160 MHz
- Referred to various other references as well but the solutions were not working for me.
- Also followed this URL https://docs.espressif.com/projects/esp ... dules.html connection for testing the power consumption
Link to references which I tried to follow
- viewtopic.php?p=135259&hilit=esp_light_ ... 36#p135259
- https://esp32.com/viewtopic.php?t=23166
Requesting the community to help me in solving this problem.
Attaching code below
Code: Select all
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "esp_sleep.h"
#include "esp_wifi.h"
void app_main(void)
{
esp_sleep_enable_timer_wakeup(30 * 1000 * 1000);
esp_light_sleep_start();
while (1)
{
vTaskDelay(1);
}
}Code: Select all
{"version": 2, "set": { "ESP_SLEEP_POWER_DOWN_FLASH": true }}
Set ESP_SLEEP_POWER_DOWN_FLASH
{"version": 2, "values": {"ESP_SLEEP_POWER_DOWN_FLASH": true}, "ranges": {}, "visible": {"ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND": false, "ESP_SLEEP_MSPI_NEED_ALL_IO_PU": false}}
{"version": 2, "set": { "PM_ENABLE": true }}
Set PM_ENABLE
{"version": 2, "values": {"USJ_NO_AUTO_LS_ON_CONNECTION": false, "PM_ENABLE": true, "PM_DFS_INIT_AUTO": false, "PM_PROFILING": false, "PM_TRACE": false, "PM_LIGHTSLEEP_RTC_OSC_CAL_INTERVAL": 1, "FREERTOS_USE_TICKLESS_IDLE": false}, "ranges": {"PM_LIGHTSLEEP_RTC_OSC_CAL_INTERVAL": [1, 128], "ESP_CONSOLE_UART_BAUDRATE": [1200, 1000000]}, "visible": {"USJ_NO_AUTO_LS_ON_CONNECTION": true, "PM_DFS_INIT_AUTO": true, "PM_PROFILING": true, "PM_TRACE": true, "PM_LIGHTSLEEP_RTC_OSC_CAL_INTERVAL": true, "FREERTOS_USE_TICKLESS_IDLE": true}}
{"version": 2, "set": { "FREERTOS_USE_TICKLESS_IDLE": true }}
Set FREERTOS_USE_TICKLESS_IDLE
{"version": 2, "values": {"ESP_SLEEP_EVENT_CALLBACKS": false, "ESP_PHY_MAC_BB_PD": false, "PM_SLP_IRAM_OPT": false, "PM_RTOS_IDLE_OPT": false, "PM_SLP_DISABLE_GPIO": true, "PM_LIGHT_SLEEP_CALLBACKS": false, "FREERTOS_USE_TICKLESS_IDLE": true, "FREERTOS_IDLE_TIME_BEFORE_SLEEP": 3}, "ranges": {"FREERTOS_IDLE_TIME_BEFORE_SLEEP": [2, 4294967295]}, "visible": {"ESP_SLEEP_EVENT_CALLBACKS": true, "ESP_PHY_MAC_BB_PD": true, "PM_SLP_IRAM_OPT": true, "PM_RTOS_IDLE_OPT": true, "PM_SLP_DISABLE_GPIO": true, "PM_LIGHT_SLEEP_CALLBACKS": true, "FREERTOS_IDLE_TIME_BEFORE_SLEEP": true}}