Espressif ESP32-S2 Programming Manual page 1040

Table of Contents

Advertisement

Chapter 2. API Reference
uint32_t xtensa_perfmon_value(int id)
Read PM counter.
Read value of defined PM counter.
Return
• Performance counter value
Parameters
• [in] id: performance counter number
esp_err_t
xtensa_perfmon_overflow(int id)
Read PM overflow state.
Read overflow value of defined PM counter.
Return
• ESP_OK if there is no overflow (overflow = 0)
• ESP_FAIL if overflow occure (overflow = 1)
Parameters
• [in] id: performance counter number
void xtensa_perfmon_dump(void)
Dump PM values.
Dump all PM register to the console.
Header File
components/perfmon/include/xtensa_perfmon_apis.h
Functions
esp_err_t
xtensa_perfmon_exec(const
Execute PM.
Execute performance counter for dedicated function with defined parameters
Return
• ESP_OK if no errors
• ESP_ERR_INVALID_ARG if one of the required parameters not defined
• ESP_FAIL - counter overflow
Parameters
• [in] config: pointer to the configuration structure
void xtensa_perfmon_view_cb(void *params, uint32_t select, uint32_t mask, uint32_t value)
Dump PM results.
Callback to dump perfmon result to a FILE* stream specified in perfmon_config_t::callback_params. If call-
back_params is set to NULL, will print to stdout
Parameters
• [in] params: used parameters passed from configuration (callback_params). This parameter
expected as FILE* hanle, where data will be stored. If this parameter NULL, then data will be
stored to the stdout.
• [in] select: select value for current counter
• [in] mask: mask value for current counter
• [in] value: counter value for current counter
Structures
struct xtensa_perfmon_config
Performance monitor configuration structure.
Structure to configure performance counter to measure dedicated function
Espressif Systems
xtensa_perfmon_config_t
1029
Submit Document Feedback
*config)
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