EasyManua.ls Logo

Espressif ESP32-S2 - Page 1040

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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 xtensa_perfmon_config_t *config)
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 1029
Submit Document Feedback
Release v4.4

Table of Contents