Espressif ESP32-S2 Programming Manual page 1116

Table of Contents

Advertisement

Chapter 2. API Reference
• RTC and high-resolution timer (ESP32S2_TIME_SYSCALL_USE_RTC_FRC1)
• RTC (ESP32S2_TIME_SYSCALL_USE_RTC)
• High-resolution timer (ESP32S2_TIME_SYSCALL_USE_FRC1)
• None (ESP32S2_TIME_SYSCALL_USE_NONE)
CONFIG_ESP32S2_RTC_CLK_SRC
RTC clock source
Found in:
Component config
Choose which clock is used as RTC clock source.
•"Internal 90kHz oscillator"option provides lowest deep sleep current consumption, and does not
require extra external components. However frequency stability with respect to temperature is
poor, so time may drift in deep/light sleep modes.
•"External 32kHz crystal" provides better frequency stability, at the expense of slightly higher (1uA)
deep sleep current consumption.
•"External 32kHz oscillator"allows using 32kHz clock generated by an external circuit. In this
case, external clock signal must be connected to 32K_XN pin. Amplitude should be <1.2V in
case of sine wave signal, and <1V in case of square wave signal. Common mode voltage should be
0.1 < Vcm < 0.5Vamp, where Vamp is the signal amplitude. Additionally, 1nF capacitor must be
connected between 32K_XP pin and ground. 32K_XP pin can not be used as a GPIO in this case.
•"Internal 8MHz oscillator divided by 256"option results in higher deep sleep current (by 5uA)
but has better frequency stability than the internal 90kHz oscillator. It does not require external
components.
Available options:
• Internal 90kHz RC oscillator (ESP32S2_RTC_CLK_SRC_INT_RC)
• External 32kHz crystal (ESP32S2_RTC_CLK_SRC_EXT_CRYS)
• External 32kHz oscillator at 32K_XN pin (ESP32S2_RTC_CLK_SRC_EXT_OSC)
• Internal
(ESP32S2_RTC_CLK_SRC_INT_8MD256)
CONFIG_ESP32S2_RTC_CLK_CAL_CYCLES
Number of cycles for RTC_SLOW_CLK calibration
Found in:
Component config
When the startup code initializes RTC_SLOW_CLK, it can perform calibration by comparing
the RTC_SLOW_CLK frequency with main XTAL frequency. This option sets the number of
RTC_SLOW_CLK cycles measured by the calibration routine. Higher numbers increase calibration
precision, which may be important for applications which spend a lot of time in deep sleep. Lower
numbers reduce startup time.
When this option is set to 0, clock calibration will not be performed at startup, and approximate clock
frequencies will be assumed:
• 90000 Hz if internal RC oscillator is used as clock source. For this use value 1024.
• 32768 Hz if the 32k crystal oscillator is used. For this use value 3000 or more. In case more value
will help improve the definition of the launch of the crystal. If the crystal could not start, it will be
switched to internal RC.
Range:
• from 0 to 125000
Default value:
• 3000 if ESP32S2_RTC_CLK_SRC_EXT_CRYS || ESP32S2_RTC_CLK_SRC_EXT_OSC
|| ESP32S2_RTC_CLK_SRC_INT_8MD256
• 576
Espressif Systems
>
ESP32S2-specific
8MHz
oscillator,
>
ESP32S2-specific
1105
Submit Document Feedback
divided
by
256
(~32kHz)
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