From 52cfd1bf24f84085e0b1cbbb647884fbc23f1742 Mon Sep 17 00:00:00 2001 From: Linda Date: Mon, 26 Feb 2024 16:35:38 +0800 Subject: [PATCH] docs: fix clock sources for esp32c6 --- .../esp_hw_support/port/esp32c2/Kconfig.rtc | 6 ++-- .../esp_hw_support/port/esp32c3/Kconfig.rtc | 8 ++--- .../esp_hw_support/port/esp32c5/Kconfig.rtc | 6 ++-- .../esp_hw_support/port/esp32c6/Kconfig.rtc | 8 ++--- .../esp_hw_support/port/esp32h2/Kconfig.rtc | 8 ++--- .../esp_hw_support/port/esp32p4/Kconfig.rtc | 6 ++-- .../esp_hw_support/port/esp32s3/Kconfig.rtc | 8 ++--- docs/en/api-reference/peripherals/ledc.rst | 23 ++++++++++-- docs/en/api-reference/system/system_time.rst | 2 +- docs/zh_CN/api-reference/peripherals/ledc.rst | 35 ++++++++++++++----- .../api-reference/system/system_time.rst | 2 +- 11 files changed, 75 insertions(+), 37 deletions(-) diff --git a/components/esp_hw_support/port/esp32c2/Kconfig.rtc b/components/esp_hw_support/port/esp32c2/Kconfig.rtc index dff672e1c6..610a14c46a 100644 --- a/components/esp_hw_support/port/esp32c2/Kconfig.rtc +++ b/components/esp_hw_support/port/esp32c2/Kconfig.rtc @@ -5,11 +5,11 @@ choice RTC_CLK_SRC Choose which clock is used as RTC clock source. config RTC_CLK_SRC_INT_RC - bool "Internal 136kHz RC oscillator" + bool "Internal 136 kHz RC oscillator" config RTC_CLK_SRC_EXT_OSC - bool "External 32kHz oscillator at pin0" + bool "External 32 kHz oscillator at pin0" config RTC_CLK_SRC_INT_8MD256 - bool "Internal 17.5MHz oscillator, divided by 256" + bool "Internal 17.5 MHz oscillator, divided by 256" endchoice config RTC_CLK_CAL_CYCLES diff --git a/components/esp_hw_support/port/esp32c3/Kconfig.rtc b/components/esp_hw_support/port/esp32c3/Kconfig.rtc index 2125a01f52..149e63eb57 100644 --- a/components/esp_hw_support/port/esp32c3/Kconfig.rtc +++ b/components/esp_hw_support/port/esp32c3/Kconfig.rtc @@ -5,15 +5,15 @@ choice RTC_CLK_SRC Choose which clock is used as RTC clock source. config RTC_CLK_SRC_INT_RC - bool "Internal 136kHz RC oscillator" + bool "Internal 136 kHz RC oscillator" config RTC_CLK_SRC_EXT_CRYS - bool "External 32kHz crystal" + bool "External 32 kHz crystal" select ESP_SYSTEM_RTC_EXT_XTAL config RTC_CLK_SRC_EXT_OSC - bool "External 32kHz oscillator at 32K_XP pin" + bool "External 32 kHz oscillator at 32K_XP pin" select ESP_SYSTEM_RTC_EXT_OSC config RTC_CLK_SRC_INT_8MD256 - bool "Internal 17.5MHz oscillator, divided by 256" + bool "Internal 17.5 MHz oscillator, divided by 256" endchoice config RTC_CLK_CAL_CYCLES diff --git a/components/esp_hw_support/port/esp32c5/Kconfig.rtc b/components/esp_hw_support/port/esp32c5/Kconfig.rtc index bb758061ec..1a7746df2e 100644 --- a/components/esp_hw_support/port/esp32c5/Kconfig.rtc +++ b/components/esp_hw_support/port/esp32c5/Kconfig.rtc @@ -10,13 +10,13 @@ choice RTC_CLK_SRC depends on IDF_TARGET_ESP32C5_MP_VERSION bool "Internal 136kHz RC oscillator" config RTC_CLK_SRC_EXT_CRYS - bool "External 32kHz crystal" + bool "External 32 kHz crystal" select ESP_SYSTEM_RTC_EXT_XTAL config RTC_CLK_SRC_EXT_OSC - bool "External 32kHz oscillator at 32K_XP pin" + bool "External 32 kHz oscillator at 32K_XP pin" select ESP_SYSTEM_RTC_EXT_OSC config RTC_CLK_SRC_INT_RC32K - bool "Internal 32kHz RC oscillator" + bool "Internal 32 kHz RC oscillator" endchoice config RTC_CLK_CAL_CYCLES diff --git a/components/esp_hw_support/port/esp32c6/Kconfig.rtc b/components/esp_hw_support/port/esp32c6/Kconfig.rtc index 180a559f38..b02d6e6cc0 100644 --- a/components/esp_hw_support/port/esp32c6/Kconfig.rtc +++ b/components/esp_hw_support/port/esp32c6/Kconfig.rtc @@ -5,15 +5,15 @@ choice RTC_CLK_SRC Choose which clock is used as RTC clock source. config RTC_CLK_SRC_INT_RC - bool "Internal 150 kHz RC oscillator" + bool "Internal 136 kHz RC oscillator" config RTC_CLK_SRC_EXT_CRYS - bool "External 32kHz crystal" + bool "External 32 kHz crystal" select ESP_SYSTEM_RTC_EXT_XTAL config RTC_CLK_SRC_EXT_OSC - bool "External 32kHz oscillator at 32K_XP pin" + bool "External 32 kHz oscillator at 32K_XP pin" select ESP_SYSTEM_RTC_EXT_OSC config RTC_CLK_SRC_INT_RC32K - bool "Internal 32kHz RC oscillator" + bool "Internal 32 kHz RC oscillator" endchoice config RTC_CLK_CAL_CYCLES diff --git a/components/esp_hw_support/port/esp32h2/Kconfig.rtc b/components/esp_hw_support/port/esp32h2/Kconfig.rtc index 180a559f38..b02d6e6cc0 100644 --- a/components/esp_hw_support/port/esp32h2/Kconfig.rtc +++ b/components/esp_hw_support/port/esp32h2/Kconfig.rtc @@ -5,15 +5,15 @@ choice RTC_CLK_SRC Choose which clock is used as RTC clock source. config RTC_CLK_SRC_INT_RC - bool "Internal 150 kHz RC oscillator" + bool "Internal 136 kHz RC oscillator" config RTC_CLK_SRC_EXT_CRYS - bool "External 32kHz crystal" + bool "External 32 kHz crystal" select ESP_SYSTEM_RTC_EXT_XTAL config RTC_CLK_SRC_EXT_OSC - bool "External 32kHz oscillator at 32K_XP pin" + bool "External 32 kHz oscillator at 32K_XP pin" select ESP_SYSTEM_RTC_EXT_OSC config RTC_CLK_SRC_INT_RC32K - bool "Internal 32kHz RC oscillator" + bool "Internal 32 kHz RC oscillator" endchoice config RTC_CLK_CAL_CYCLES diff --git a/components/esp_hw_support/port/esp32p4/Kconfig.rtc b/components/esp_hw_support/port/esp32p4/Kconfig.rtc index a69c765a5f..19541352ab 100644 --- a/components/esp_hw_support/port/esp32p4/Kconfig.rtc +++ b/components/esp_hw_support/port/esp32p4/Kconfig.rtc @@ -5,12 +5,12 @@ choice RTC_CLK_SRC Choose which clock is used as RTC clock source. config RTC_CLK_SRC_INT_RC - bool "Internal 150 kHz RC oscillator" + bool "Internal 136 kHz RC oscillator" config RTC_CLK_SRC_EXT_CRYS - bool "External 32kHz crystal" + bool "External 32 kHz crystal" select ESP_SYSTEM_RTC_EXT_XTAL config RTC_CLK_SRC_INT_RC32K - bool "Internal 32kHz RC oscillator" + bool "Internal 32 kHz RC oscillator" endchoice config RTC_CLK_CAL_CYCLES diff --git a/components/esp_hw_support/port/esp32s3/Kconfig.rtc b/components/esp_hw_support/port/esp32s3/Kconfig.rtc index 2125a01f52..149e63eb57 100644 --- a/components/esp_hw_support/port/esp32s3/Kconfig.rtc +++ b/components/esp_hw_support/port/esp32s3/Kconfig.rtc @@ -5,15 +5,15 @@ choice RTC_CLK_SRC Choose which clock is used as RTC clock source. config RTC_CLK_SRC_INT_RC - bool "Internal 136kHz RC oscillator" + bool "Internal 136 kHz RC oscillator" config RTC_CLK_SRC_EXT_CRYS - bool "External 32kHz crystal" + bool "External 32 kHz crystal" select ESP_SYSTEM_RTC_EXT_XTAL config RTC_CLK_SRC_EXT_OSC - bool "External 32kHz oscillator at 32K_XP pin" + bool "External 32 kHz oscillator at 32K_XP pin" select ESP_SYSTEM_RTC_EXT_OSC config RTC_CLK_SRC_INT_8MD256 - bool "Internal 17.5MHz oscillator, divided by 256" + bool "Internal 17.5 MHz oscillator, divided by 256" endchoice config RTC_CLK_CAL_CYCLES diff --git a/docs/en/api-reference/peripherals/ledc.rst b/docs/en/api-reference/peripherals/ledc.rst index c865ca5618..f9b45db16c 100644 --- a/docs/en/api-reference/peripherals/ledc.rst +++ b/docs/en/api-reference/peripherals/ledc.rst @@ -150,7 +150,26 @@ The source clock can also limit the PWM frequency. The higher the source clock f - 40 MHz - Dynamic Frequency Scaling compatible -.. only:: esp32c6 or esp32p4 +.. only:: esp32c6 + + .. list-table:: Characteristics of {IDF_TARGET_NAME} LEDC source clocks + :widths: 15 15 30 + :header-rows: 1 + + * - Clock name + - Clock freq + - Clock capabilities + * - PLL_80M_CLK + - 80 MHz + - / + * - RC_FAST_CLK + - ~ 17.5 MHz + - Dynamic Frequency Scaling compatible, Light sleep compatible + * - XTAL_CLK + - 40 MHz + - Dynamic Frequency Scaling compatible + +.. only:: esp32p4 .. list-table:: Characteristics of {IDF_TARGET_NAME} LEDC source clocks :widths: 15 15 30 @@ -270,7 +289,7 @@ The LEDC hardware provides the means to gradually transition from one duty cycle On {IDF_TARGET_NAME}, the hardware additionally allows to perform up to {IDF_TARGET_LEDC_MAX_FADE_RANGE_NUM} consecutive linear fades without CPU intervention. This feature can be useful if you want to do a fade with gamma correction. - The luminance perceived by human eyes does not have a linear relationship with the PWM duty cycle. In order to make human feel the LED is dimming or lightening linearly, the change in duty cycle should be non-linear, which is the so-called gamma correction. The LED controller can simulate a gamma curve fading by piecewise linear approximation. :cpp:func:`ledc_fill_multi_fade_param_list` is a function that can help to construct the parameters for the piecewise linear fades. First, you need to allocate a memory block for saving the fade parameters, then by providing start/end PWM duty cycle values, gamma correction function, and the total number of desired linear segments to the helper function, it will fill the calculation results into the allocated space. You can also construct the array of :cpp:type:`ledc_fade_param_config_t` manually. Once the fade parameter structs are prepared, a consecutive fading can be configured by passing the pointer to the prepared :cpp:type:`ledc_fade_param_config_t` list and the total number of fade ranges to :cpp:func:`ledc_set_multi_fade`. + The luminance perceived by human eyes does not have a linear relationship with the PWM duty cycle. In order to make human feel the LED is dimming or lighting linearly, the change in duty cycle should be non-linear, which is the so-called gamma correction. The LED controller can simulate a gamma curve fading by piecewise linear approximation. :cpp:func:`ledc_fill_multi_fade_param_list` is a function that can help to construct the parameters for the piecewise linear fades. First, you need to allocate a memory block for saving the fade parameters, then by providing start/end PWM duty cycle values, gamma correction function, and the total number of desired linear segments to the helper function, it will fill the calculation results into the allocated space. You can also construct the array of :cpp:type:`ledc_fade_param_config_t` manually. Once the fade parameter structs are prepared, a consecutive fading can be configured by passing the pointer to the prepared :cpp:type:`ledc_fade_param_config_t` list and the total number of fade ranges to :cpp:func:`ledc_set_multi_fade`. .. only:: esp32 diff --git a/docs/en/api-reference/system/system_time.rst b/docs/en/api-reference/system/system_time.rst index f959f1c42c..10b87da10a 100644 --- a/docs/en/api-reference/system/system_time.rst +++ b/docs/en/api-reference/system/system_time.rst @@ -3,7 +3,7 @@ System Time :link_to_translation:`zh_CN:[中文]` -{IDF_TARGET_RTC_CLK_FRE:default="Not updated", esp32="150 kHz", esp32s2="90 kHz", esp32s3="136 kHz", esp32c3="136 kHz", esp32c2="136 kHz", esp32c6="150 kHz", esp32h2="150 kHz", esp32p4="150 kHz"} +{IDF_TARGET_RTC_CLK_FRE:default="136 kHz", esp32="150 kHz", esp32s2="90 kHz", esp32s3="136 kHz", esp32c3="136 kHz", esp32c2="136 kHz", esp32c6="136 kHz", esp32h2="136 kHz", esp32p4="136 kHz"} {IDF_TARGET_INT_OSC_FRE:default="Not updated", esp32="8.5 MHz", esp32s2="8.5 MHz", esp32s3="17.5 MHz", esp32c3="17.5 MHz", esp32c2="17.5 MHz"} {IDF_TARGET_INT_OSC_FRE_DIVIDED:default="Not updated", esp32="about 33 kHz", esp32s2="about 33 kHz", esp32s3="about 68 kHz", esp32c3="about 68 kHz", esp32c2="about 68 kHz"} {IDF_TARGET_EXT_CRYSTAL_PIN:default="Not updated", esp32="32K_XP and 32K_XN", esp32s2="XTAL_32K_P and XTAL_32K_N", esp32s3="XTAL_32K_P and XTAL_32K_N", esp32c3="XTAL_32K_P and XTAL_32K_N", esp32c6="XTAL_32K_P and XTAL_32K_N", esp32h2="XTAL_32K_P and XTAL_32K_N", esp32p4="XTAL_32K_P and XTAL_32K_N"} diff --git a/docs/zh_CN/api-reference/peripherals/ledc.rst b/docs/zh_CN/api-reference/peripherals/ledc.rst index 0f4e382756..9d689bb637 100644 --- a/docs/zh_CN/api-reference/peripherals/ledc.rst +++ b/docs/zh_CN/api-reference/peripherals/ledc.rst @@ -88,7 +88,7 @@ LED PWM 控制器可在无需 CPU 干预的情况下自动改变占空比,实 * - RC_FAST_CLK - ~ 8 MHz - 低速 - - 支持动态调频(DFS)功能,支持 Light-sleep 模式 + - 支持动态调频 (DFS) 功能,支持 Light-sleep 模式 .. only:: esp32s2 @@ -107,7 +107,7 @@ LED PWM 控制器可在无需 CPU 干预的情况下自动改变占空比,实 - 支持动态调频 (DFS) 功能 * - RC_FAST_CLK - ~ 8 MHz - - 支持动态调频(DFS)功能,支持 Light-sleep 模式 + - 支持动态调频 (DFS) 功能,支持 Light-sleep 模式 * - XTAL_CLK - 40 MHz - 支持动态调频 (DFS) 功能 @@ -126,10 +126,10 @@ LED PWM 控制器可在无需 CPU 干预的情况下自动改变占空比,实 - / * - RC_FAST_CLK - ~ 20 MHz - - 支持动态调频(DFS)功能,支持 Light-sleep 模式 + - 支持动态调频 (DFS) 功能,支持 Light-sleep 模式 * - XTAL_CLK - 40 MHz - - 支持动态调频(DFS)功能 + - 支持动态调频 (DFS) 功能 .. only:: esp32c2 @@ -145,12 +145,31 @@ LED PWM 控制器可在无需 CPU 干预的情况下自动改变占空比,实 - / * - RC_FAST_CLK - ~ 20 MHz - - 支持动态调频(DFS)功能,支持 Light-sleep 模式 + - 支持动态调频 (DFS) 功能,支持 Light-sleep 模式 * - XTAL_CLK - 40 MHz - 支持动态调频 (DFS) 功能 -.. only:: esp32c6 or esp32p4 +.. only:: esp32c6 + + .. list-table:: {IDF_TARGET_NAME} LEDC 时钟源特性 + :widths: 10 10 30 + :header-rows: 1 + + * - 时钟名称 + - 时钟频率 + - 时钟功能 + * - PLL_80M_CLK + - 80 MHz + - / + * - RC_FAST_CLK + - ~ 17.5 MHz + - 支持动态调频 (DFS) 功能,支持 Light-sleep 模式 + * - XTAL_CLK + - 40 MHz + - 支持动态调频 (DFS) 功能 + +.. only:: esp32p4 .. list-table:: {IDF_TARGET_NAME} LEDC 时钟源特性 :widths: 10 10 30 @@ -164,7 +183,7 @@ LED PWM 控制器可在无需 CPU 干预的情况下自动改变占空比,实 - / * - RC_FAST_CLK - ~ 20 MHz - - 支持动态调频(DFS)功能,支持 Light-sleep 模式 + - 支持动态调频 (DFS) 功能,支持 Light-sleep 模式 * - XTAL_CLK - 40 MHz - 支持动态调频 (DFS) 功能 @@ -183,7 +202,7 @@ LED PWM 控制器可在无需 CPU 干预的情况下自动改变占空比,实 - / * - RC_FAST_CLK - ~ 8 MHz - - 支持动态调频(DFS)功能,支持 Light-sleep 模式 + - 支持动态调频 (DFS) 功能,支持 Light-sleep 模式 * - XTAL_CLK - 32 MHz - 支持动态调频 (DFS) 功能 diff --git a/docs/zh_CN/api-reference/system/system_time.rst b/docs/zh_CN/api-reference/system/system_time.rst index f14dc18861..dca5901a6d 100644 --- a/docs/zh_CN/api-reference/system/system_time.rst +++ b/docs/zh_CN/api-reference/system/system_time.rst @@ -3,7 +3,7 @@ :link_to_translation:`en:[English]` -{IDF_TARGET_RTC_CLK_FRE:default="未更新", esp32="150 kHz", esp32s2="90 kHz", esp32s3="136 kHz", esp32c3="136 kHz", esp32c2="136 kHz", esp32c6="150 kHz", esp32h2="150 kHz", esp32p4="150 kHz"} +{IDF_TARGET_RTC_CLK_FRE:default="未更新", esp32="150 kHz", esp32s2="90 kHz", esp32s3="136 kHz", esp32c3="136 kHz", esp32c2="136 kHz", esp32c6="136 kHz", esp32h2="136 kHz", esp32p4="136 kHz"} {IDF_TARGET_INT_OSC_FRE:default="未更新", esp32="8.5 MHz", esp32s2="8.5 MHz", esp32s3="17.5 MHz", esp32c3="17.5 MHz", esp32c2="17.5 MHz"} {IDF_TARGET_INT_OSC_FRE_DIVIDED:default="未更新", esp32="约 33 kHz", esp32s2="约 33 kHz", esp32s3="约 68 kHz", esp32c3="约 68 kHz", esp32c2="约 68 kHz"} {IDF_TARGET_EXT_CRYSTAL_PIN:default="未更新", esp32="32K_XP 和 32K_XN", esp32s2="XTAL_32K_P 和 XTAL_32K_N", esp32s3="XTAL_32K_P 和 XTAL_32K_N", esp32c3="XTAL_32K_P 和 XTAL_32K_N", esp32c6="XTAL_32K_P 和 XTAL_32K_N", esp32h2="XTAL_32K_P 和 XTAL_32K_N", esp32p4="XTAL_32K_P 和 XTAL_32K_N"}