Merge branch 'feature/esp32h21_esp32h4_ledc_support' into 'master'

feat(ledc): Add LEDC support for ESP32H21 and ESP32H4

Closes IDF-12343, IDF-12344, IDF-12920, IDF-11568, IDF-11569, IDF-12115, and IDF-13672

See merge request espressif/esp-idf!41172
This commit is contained in:
Song Ruo Jing
2025-09-17 10:55:00 +08:00
93 changed files with 2836 additions and 671 deletions

View File

@@ -162,8 +162,6 @@ api-reference/peripherals/lcd/spi_lcd.rst
api-reference/peripherals/lcd/rgb_lcd.rst
api-reference/peripherals/lcd/parl_lcd.rst
api-reference/peripherals/spi_features.rst
api-reference/peripherals/ppa.rst
api-reference/peripherals/ledc.rst
api-reference/system/random.rst
api-reference/system/app_trace.rst
api-reference/system/esp_https_ota.rst

View File

@@ -169,7 +169,6 @@ api-reference/peripherals/lcd/rgb_lcd.rst
api-reference/peripherals/lcd/parl_lcd.rst
api-reference/peripherals/ppa.rst
api-reference/peripherals/ldo_regulator.rst
api-reference/peripherals/ledc.rst
api-reference/system/random.rst
api-reference/system/app_trace.rst
api-reference/system/mm_sync.rst

View File

@@ -1,7 +1,7 @@
LED Control (LEDC)
==================
{IDF_TARGET_LEDC_MAX_FADE_RANGE_NUM: default="1", esp32c6="16", esp32h2="16", esp32p4="16", esp32c5="16", esp32c61="16"}
{IDF_TARGET_LEDC_MAX_FADE_RANGE_NUM: default="1", esp32c6="16", esp32h2="16", esp32p4="16", esp32c5="16", esp32c61="16", esp32h21="16"}
:link_to_translation:`zh_CN:[中文]`
@@ -207,6 +207,25 @@ The source clock can also limit the PWM frequency. The higher the source clock f
- 32 MHz
- Dynamic Frequency Scaling compatible
.. only:: esp32h21 or esp32h4
.. list-table:: Characteristics of {IDF_TARGET_NAME} LEDC source clocks
:widths: 15 15 30
:header-rows: 1
* - Clock name
- Clock freq
- Clock capabilities
* - PLL_96M_CLK
- 96 MHz
- /
* - RC_FAST_CLK
- ~ 20 MHz
- Dynamic Frequency Scaling compatible, Light-sleep compatible
* - XTAL_CLK
- 32 MHz
- Dynamic Frequency Scaling compatible
.. note::
.. only:: SOC_CLK_RC_FAST_SUPPORT_CALIBRATION

View File

@@ -66,6 +66,8 @@ LEDC
- ``LEDC_APB_CLK_HZ`` and ``LEDC_REF_CLK_HZ`` have been removed.
- ``LEDC_SLOW_CLK_RTC8M`` macro has been removed. Please use ``LEDC_SLOW_CLK_RC_FAST`` instead.
- Removed esp_driver_gpio as a public required component from esp_driver_ledc.
- :func:`ledc_isr_register` has been deprecated. LEDC interrupt handling is implemented by driver itself, please only register event callbacks if necessary.

View File

@@ -1,7 +1,7 @@
LED PWM 控制器
==============
{IDF_TARGET_LEDC_MAX_FADE_RANGE_NUM: default="1", esp32c6="16", esp32h2="16", esp32p4="16", esp32c5="16", esp32c61="16"}
{IDF_TARGET_LEDC_MAX_FADE_RANGE_NUM: default="1", esp32c6="16", esp32h2="16", esp32p4="16", esp32c5="16", esp32c61="16", esp32h21="16"}
:link_to_translation:`en:[English]`
@@ -207,6 +207,25 @@ LED PWM 控制器可在无需 CPU 干预的情况下自动改变占空比,实
- 32 MHz
- 支持动态调频 (DFS) 功能
.. only:: esp32h21 or esp32h4
.. list-table:: Characteristics of {IDF_TARGET_NAME} LEDC source clocks
:widths: 15 15 30
:header-rows: 1
* - 时钟名称
- 时钟频率
- 时钟功能
* - PLL_96M_CLK
- 96 MHz
- /
* - RC_FAST_CLK
- ~ 20 MHz
- 支持动态调频 (DFS) 功能,支持 Light-sleep 模式
* - XTAL_CLK
- 32 MHz
- 支持动态调频 (DFS) 功能
.. note::
.. only:: SOC_CLK_RC_FAST_SUPPORT_CALIBRATION

View File

@@ -66,6 +66,8 @@ LEDC
- ``LEDC_APB_CLK_HZ````LEDC_REF_CLK_HZ`` 已被移除。
- ``LEDC_SLOW_CLK_RTC8M`` 宏已被移除。请使用 ``LEDC_SLOW_CLK_RC_FAST`` 代替。
- esp_driver_gpio 不再作为 esp_driver_ledc 的公共依赖组件。
- :func:`ledc_isr_register` 已被弃用。LEDC 中断处理由驱动内部实现,如果需要注册中断回调,仅需要注册事件回调即可。