Merge branch 'fix/s31_cam_freq_limit' into 'master'

dvp / lcd: added pclk freq limit in programming guide

See merge request espressif/esp-idf!49205
This commit is contained in:
morris
2026-06-08 16:55:58 +08:00
6 changed files with 62 additions and 0 deletions
@@ -149,6 +149,18 @@ You can implement the camera controller driver using one of the following method
* Full range: 0-255 for both RGB and YUV * Full range: 0-255 for both RGB and YUV
* Limited range: RGB 16-240, YUV Y:16-240, U-V:16-235 * Limited range: RGB 16-240, YUV Y:16-240, U-V:16-235
.. note::
- When :cpp:member:`esp_cam_ctlr_dvp_config_t::cam_data_width` is set to 8:
- The CAM_PCLK frequency is recommended to be less than 80 MHz.
- If YUV-RGB format conversion is also configured via :cpp:func:`esp_cam_ctlr_format_conversion`, the CAM_PCLK frequency is recommended to be less than 60 MHz.
- When :cpp:member:`esp_cam_ctlr_dvp_config_t::cam_data_width` is set to 16:
- The CAM_PCLK frequency is recommended to be less than 40 MHz.
- If YUV-RGB format conversion is also configured via :cpp:func:`esp_cam_ctlr_format_conversion`, the CAM_PCLK frequency is recommended to be less than 30 MHz.
.. code:: c .. code:: c
#include "esp_err.h" #include "esp_err.h"
@@ -42,6 +42,13 @@ I80 Interfaced LCD
- :cpp:member:`esp_lcd_panel_io_i80_config_t::lcd_cmd_bits` and :cpp:member:`esp_lcd_panel_io_i80_config_t::lcd_param_bits` set the bit width of the command and parameter that recognized by the LCD controller chip. This is chip specific, you should refer to your LCD spec in advance. - :cpp:member:`esp_lcd_panel_io_i80_config_t::lcd_cmd_bits` and :cpp:member:`esp_lcd_panel_io_i80_config_t::lcd_param_bits` set the bit width of the command and parameter that recognized by the LCD controller chip. This is chip specific, you should refer to your LCD spec in advance.
- :cpp:member:`esp_lcd_panel_io_i80_config_t::trans_queue_depth` sets the maximum number of transactions that can be queued in the LCD IO device. A bigger value means more transactions can be queued up, but it also consumes more memory. - :cpp:member:`esp_lcd_panel_io_i80_config_t::trans_queue_depth` sets the maximum number of transactions that can be queued in the LCD IO device. A bigger value means more transactions can be queued up, but it also consumes more memory.
.. note::
The output pixel clock PCLK frequency has an upper limit that depends on the data bus width:
- When :cpp:member:`esp_lcd_i80_bus_config_t::bus_width` is 8, the PCLK frequency is recommended to be less than 80 MHz.
- When :cpp:member:`esp_lcd_i80_bus_config_t::bus_width` is 16, the PCLK frequency is recommended to be less than 40 MHz.
.. code-block:: c .. code-block:: c
esp_lcd_panel_io_handle_t io_handle = NULL; esp_lcd_panel_io_handle_t io_handle = NULL;
@@ -16,6 +16,18 @@ RGB LCD panel is created by :cpp:func:`esp_lcd_new_rgb_panel`, with various conf
- :cpp:member:`esp_lcd_rgb_panel_config_t::num_fbs` specifies how many frame buffers the driver should allocate. For backward compatibility, setting this to ``0`` will allocate a single frame buffer. If you don't want to allocate any frame buffer, use :cpp:member:`esp_lcd_rgb_panel_config_t::no_fb` instead. - :cpp:member:`esp_lcd_rgb_panel_config_t::num_fbs` specifies how many frame buffers the driver should allocate. For backward compatibility, setting this to ``0`` will allocate a single frame buffer. If you don't want to allocate any frame buffer, use :cpp:member:`esp_lcd_rgb_panel_config_t::no_fb` instead.
- :cpp:member:`esp_lcd_rgb_panel_config_t::no_fb` determines whether frame buffer will be allocated. When it is set, no frame buffer will be allocated. This is also called the :ref:`bounce_buffer_only` mode. - :cpp:member:`esp_lcd_rgb_panel_config_t::no_fb` determines whether frame buffer will be allocated. When it is set, no frame buffer will be allocated. This is also called the :ref:`bounce_buffer_only` mode.
.. note::
- When :cpp:member:`esp_lcd_rgb_panel_config_t::data_width` is 8:
- The PCLK frequency is recommended to be less than 80 MHz.
- If YUV-RGB format conversion is also configured via :cpp:func:`esp_lcd_rgb_panel_set_yuv_conversion`, the PCLK frequency is recommended to be less than 60 MHz.
- When :cpp:member:`esp_lcd_rgb_panel_config_t::data_width` is 16:
- The PCLK frequency is recommended to be less than 40 MHz.
- If YUV-RGB format conversion is also configured, the PCLK frequency is recommended to be less than 30 MHz.
GPIO Matrix and IOMUX Pins GPIO Matrix and IOMUX Pins
-------------------------- --------------------------
@@ -149,6 +149,18 @@
* 全色彩空间:RGB 和 YUV 的取值范围为 0-255 * 全色彩空间:RGB 和 YUV 的取值范围为 0-255
* 有限色彩空间:RGB 取值范围为 16-240,YUV Y 分量取值范围为 16-240,U-V 分量取值范围为 16-235 * 有限色彩空间:RGB 取值范围为 16-240,YUV Y 分量取值范围为 16-240,U-V 分量取值范围为 16-235
.. note::
- 当 :cpp:member:`esp_cam_ctlr_dvp_config_t::cam_data_width` 配置为 8 时:
- 像素时钟 CAM_PCLK 频率建议值需小于 80 MHz;
- 如果同时通过 :cpp:func:`esp_cam_ctlr_format_conversion` 配置了 YUV 与 RGB 之间的格式转换,则 CAM_PCLK 频率建议值需小于 60 MHz。
- 当 :cpp:member:`esp_cam_ctlr_dvp_config_t::cam_data_width` 配置为 16 时:
- CAM_PCLK 频率建议值需小于 40 MHz;
- 如果同时通过 :cpp:func:`esp_cam_ctlr_format_conversion` 配置了 YUV 与 RGB 之间的格式转换,则 CAM_PCLK 频率建议值需小于 30 MHz。
.. code:: c .. code:: c
#include "esp_err.h" #include "esp_err.h"
@@ -42,6 +42,13 @@ I80 接口的 LCD
- :cpp:member:`esp_lcd_panel_io_i80_config_t::lcd_cmd_bits` 和 :cpp:member:`esp_lcd_panel_io_i80_config_t::lcd_param_bits` 分别设置 LCD 控制器芯片可识别的命令及参数的位宽。不同芯片对位宽要求不同,请提前参阅 LCD 规格书。 - :cpp:member:`esp_lcd_panel_io_i80_config_t::lcd_cmd_bits` 和 :cpp:member:`esp_lcd_panel_io_i80_config_t::lcd_param_bits` 分别设置 LCD 控制器芯片可识别的命令及参数的位宽。不同芯片对位宽要求不同,请提前参阅 LCD 规格书。
- :cpp:member:`esp_lcd_panel_io_i80_config_t::trans_queue_depth` 设置在 LCD IO 设备中可以排队的最大传输量。该值越大,可以排队的传输越多,但消耗的内存也越多。 - :cpp:member:`esp_lcd_panel_io_i80_config_t::trans_queue_depth` 设置在 LCD IO 设备中可以排队的最大传输量。该值越大,可以排队的传输越多,但消耗的内存也越多。
.. note::
输出像素时钟 PCLK 频率存在上限,具体取决于数据总线位宽:
- 当 :cpp:member:`esp_lcd_i80_bus_config_t::bus_width` 为 8 时,PCLK 频率建议值需小于 80 MHz;
- 当 :cpp:member:`esp_lcd_i80_bus_config_t::bus_width` 为 16 时,PCLK 频率建议值需小于 40 MHz。
.. code-block:: c .. code-block:: c
esp_lcd_panel_io_handle_t io_handle = NULL; esp_lcd_panel_io_handle_t io_handle = NULL;
@@ -16,6 +16,18 @@ RGB LCD 面板的分配步骤只需一步,即调用函数 :cpp:func:`esp_lcd_n
- :cpp:member:`esp_lcd_rgb_panel_config_t::num_fbs` 设置由驱动程序分配的 frame buffer 的数量。为了向后兼容,``0`` 表示分配 ``一个`` frame buffer。如果不想分配任何 frame buffer,请设置 :cpp:member:`esp_lcd_rgb_panel_config_t::no_fb`。 - :cpp:member:`esp_lcd_rgb_panel_config_t::num_fbs` 设置由驱动程序分配的 frame buffer 的数量。为了向后兼容,``0`` 表示分配 ``一个`` frame buffer。如果不想分配任何 frame buffer,请设置 :cpp:member:`esp_lcd_rgb_panel_config_t::no_fb`。
- :cpp:member:`esp_lcd_rgb_panel_config_t::no_fb` 可决定是否分配 frame buffer。设置该字段后将不分配 frame buffer。这也被称为 :ref:`bounce_buffer_only` 模式。 - :cpp:member:`esp_lcd_rgb_panel_config_t::no_fb` 可决定是否分配 frame buffer。设置该字段后将不分配 frame buffer。这也被称为 :ref:`bounce_buffer_only` 模式。
.. note::
- 当 :cpp:member:`esp_lcd_rgb_panel_config_t::data_width` 为 8 时:
- 像素时钟 PCLK 频率建议值需小于 80 MHz;
- 如果同时通过 :cpp:func:`esp_lcd_rgb_panel_set_yuv_conversion` 配置了 YUV 与 RGB 之间的格式转换,则 PCLK 频率建议值需小于 60 MHz。
- 当 :cpp:member:`esp_lcd_rgb_panel_config_t::data_width` 为 16 时:
- PCLK 频率建议值需小于 40 MHz;
- 如果同时配置了 YUV 与 RGB 之间的格式转换,则 PCLK 频率建议值需小于 30 MHz。
GPIO 矩阵与 IOMUX 管脚 GPIO 矩阵与 IOMUX 管脚
---------------------- ----------------------