Power Management - Espressif ESP32-S2 Programming Manual

Hide thumbs Also See for ESP32-S2:
Table of Contents

Advertisement

Chapter 2. API Reference
Public Members
int repeat_count
how much times function will be called before the calback will be repeated
float max_deviation
Difference between min and max counter number 0..1, 0 - no difference, 1 - not used
void *call_params
This pointer will be passed to the call_function as a parameter
void (*call_function)(void *params)
pointer to the function that have to be called
void (*callback)(void *params, uint32_t select, uint32_t mask, uint32_t value)
pointer to the function that will be called with result parameters
void *callback_params
parameter that will be passed to the callback
int tracelevel
trace level for all counters. In case of negative value, the filter will be ignored. If it's >=0, then the
perfmon will count only when interrupt level > tracelevel. It's useful to monitor interrupts.
uint32_t counters_size
amount of counter in the list
const uint32_t *select_mask
list of the select/mask parameters
Type Definitions
typedef struct
xtensa_perfmon_config
Performance monitor configuration structure.
Structure to configure performance counter to measure dedicated function

2.6.21 Power Management

Overview
Power management algorithm included in ESP-IDF can adjust the advanced peripheral bus (APB) frequency, CPU
frequency, and put the chip into light sleep mode to run an application at smallest possible power consumption, given
the requirements of application components.
Application components can express their requirements by creating and acquiring power management locks.
For example:
• Driver for a peripheral clocked from APB can request the APB frequency to be set to 80 MHz while the
peripheral is used.
• RTOS can request the CPU to run at the highest configured frequency while there are tasks ready to run.
• A peripheral driver may need interrupts to be enabled, which means it will have to request disabling light sleep.
Since requesting higher APB or CPU frequencies or disabling light sleep causes higher current consumption, please
keep the usage of power management locks by components to a minimum.
Configuration
Power management can be enabled at compile time, using the option CONFIG_PM_ENABLE.
Enabling power management features comes at the cost of increased interrupt latency. Extra latency depends on
a number of factors, such as the CPU frequency, single/dual core mode, whether or not frequency switch needs
to be done. Minimum extra latency is 0.2 us (when the CPU frequency is 240 MHz and frequency scaling is not
Espressif Systems
xtensa_perfmon_config_t
1030
Submit Document Feedback
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF