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 #1061 background imageLoading...
Page #1061 background image
Chapter 2. API Reference
Return
ESP_OK: Successfully reset the TWDT on behalf of the currently running task
ESP_ERR_NOT_FOUND: Error, the current running task has not subscribed to the TWDT
ESP_ERR_INVALID_STATE: Error, the TWDT has not been initialized yet
esp_err_t esp_task_wdt_delete(TaskHandle_t handle)
Unsubscribes a task from the Task Watchdog Timer (TWDT)
This function will unsubscribe a task from the TWDT. After being unsubscribed, the task should no longer
call esp_task_wdt_reset(). If the task is an IDLE task, this function will automatically disable the calling of
esp_task_wdt_reset() from the Idle Hook. Calling this function whilst the TWDT is uninitialized or attempting
to unsubscribe an already unsubscribed task from the TWDT will result in an error code being returned.
Return
ESP_OK: Successfully unsubscribed the task from the TWDT
ESP_ERR_INVALID_ARG: Error, the task is already unsubscribed
ESP_ERR_INVALID_STATE: Error, the TWDT has not been initialized yet
Parameters
[in] handle: Handle of the task. Input NULL to unsubscribe the current running task.
esp_err_t esp_task_wdt_status(TaskHandle_t handle)
Query whether a task is subscribed to the Task Watchdog Timer (TWDT)
This function will query whether a task is currently subscribed to the TWDT, or whether the TWDT is initial-
ized.
Return :
ESP_OK: The task is currently subscribed to the TWDT
ESP_ERR_NOT_FOUND: The task is currently not subscribed to the TWDT
ESP_ERR_INVALID_STATE: The TWDT is not initialized, therefore no tasks can be subscribed
Parameters
[in] handle: Handle of the task. Input NULL to query the current running task.
2.6.25 System Time
Overview
System time can be kept using either one time source or two time sources simultaneously. The choice depends on the
application purpose and accuracy requirements for system time.
There are the following two time sources:
RTC timer: Allows keeping the system time during any resets and sleep modes, only the power-up reset leads
to resetting the RTC timer. The frequency deviation depends on an RTC Clock Source and affects accuracy
only in sleep modes, in which case the time will be measured at 6.6667 us resolution.
High-resolution timer: Not available during any reset and sleep modes. The reason for using this timer is
to achieve greater accuracy. It uses the APB_CLK clock source (typically 80 MHz), which has a frequency
deviation of less than ±10 ppm. Time will be measured at 1 us resolution.
The settings for the system time source are as follows:
RTC and high-resolution timer (default)
RTC
High-resolution timer
None
It is recommended to stick to the default setting which provides maximum accuracy. If you want to choose a different
timer, configure CONFIG_ESP32S2_TIME_SYSCALL in project configuration.
RTC Clock Source
The RTC timer has the following clock sources:
Espressif Systems 1050
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