EasyManuals Logo

Espressif ESP32-S2 User Manual

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
Page #1039 background imageLoading...
Page #1039 background image
Chapter 2. API Reference
2.6.20 Performance Monitor
The Performance Monitor component provides APIs to use ESP32-S2 internal performance counters to profile func-
tions and applications.
Application Example
An example which combines performance monitor is provided in examples/system/perfmon directory. This
example initializes the performance monitor structure and execute them with printing the statistics.
High level API Reference
Header Files
perfmon/include/perfmon.h
API Reference
Header File
components/perfmon/include/xtensa_perfmon_access.h
Functions
esp_err_t xtensa_perfmon_init(int id, uint16_t select, uint16_t mask, int kernelcnt, int tracelevel)
Init Performance Monitoor.
Initialize performance monitor register with define values
Return
ESP_OK on success
ESP_ERR_INVALID_ARG if one of the arguments is not correct
Parameters
[in] id: performance counter number
[in] select: select value from PMCTRLx register
[in] mask: mask value from PMCTRLx register
[in] kernelcnt: kernelcnt value from PMCTRLx register
[in] tracelevel: tracelevel value from PMCTRLx register
esp_err_t xtensa_perfmon_reset(int id)
Reset PM counter.
Reset PM counter. Writes 0 to the PMx register.
Return
ESP_OK on success
ESP_ERR_INVALID_ARG if id out of range
Parameters
[in] id: performance counter number
void xtensa_perfmon_start(void)
Start PM counters.
Start all PM counters synchronously. Write 1 to the PGM register
void xtensa_perfmon_stop(void)
Stop PM counters.
Stop all PM counters synchronously. Write 0 to the PGM register
Espressif Systems 1028
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish