Skip to content

Commit c304ce8

Browse files
committed
Merge branch 'docs/sync_cn_and_en_docs' into 'master'
docs: Sync CN and EN docs Closes DOC-10736 See merge request espressif/esp-idf!38734
2 parents 929e149 + 72d858a commit c304ce8

File tree

17 files changed

+195
-43
lines changed

17 files changed

+195
-43
lines changed

docs/en/api-guides/performance/speed.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ The following optimizations improve the execution of nearly all code, including
8787
:SOC_CPU_HAS_FPU: - Avoid using floating point arithmetic ``float``. Even though {IDF_TARGET_NAME} has a single precision hardware floating point unit, floating point calculations are always slower than integer calculations. If possible then use fixed point representations, a different method of integer representation, or convert part of the calculation to be integer only before switching to floating point.
8888
:not SOC_CPU_HAS_FPU: - Avoid using floating point arithmetic ``float``. On {IDF_TARGET_NAME} these calculations are emulated in software and are very slow. If possible, use fixed point representations, a different method of integer representation, or convert part of the calculation to be integer only before switching to floating point.
8989
- Avoid using double precision floating point arithmetic ``double``. These calculations are emulated in software and are very slow. If possible then use an integer-based representation, or single-precision floating point.
90-
:CONFIG_ESP_ROM_HAS_SUBOPTIMAL_NEWLIB_ON_MISALIGNED_MEMORY: - Avoid misaligned 4-byte memory accesses in performance-critical code sections. For potential performance improvements, consider enabling :ref:`CONFIG_LIBC_OPTIMIZED_MISALIGNED_ACCESS`. Note that properly aligned memory operations will always execute at full speed without performance penalties. Requires additional ~190 bytes of IRAM and ~870 bytes of flash memory.
90+
:CONFIG_ESP_ROM_HAS_SUBOPTIMAL_NEWLIB_ON_MISALIGNED_MEMORY: - Avoid misaligned 4-byte memory accesses in performance-critical code sections. For potential performance improvements, consider enabling :ref:`CONFIG_LIBC_OPTIMIZED_MISALIGNED_ACCESS`, which requires approximately 190 bytes of IRAM and 870 bytes of flash memory. Note that properly aligned memory operations will always execute at full speed without performance penalties.
9191

9292

9393
.. only:: esp32s2 or esp32s3 or esp32p4

docs/en/api-reference/bluetooth/controller_vhci.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,4 @@ API Reference
2929
HCI Vendor-specific (VS) Commands
3030
--------------------------------------
3131

32-
Espressif's HCI VS commands are exclusively designed for use with Espressif's Bluetooth Host stack or internal debugging purposes. Application developers **should not** initialize or invoke these VS commands in their applications. Please refer to :doc:`bt_vhci` for detailed information.
33-
32+
Espressif's HCI VS commands are exclusively designed for use with Espressif's Bluetooth Host stack or internal debugging purposes. Application developers **should not** initialize or invoke these VS commands in their applications. Please refer to :doc:`bt_vhci` for detailed information.

docs/en/api-reference/peripherals/isp.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ You can use the created handle to enable/disable the ISP driver and do other ISP
106106

107107
.. note::
108108

109-
ISP peripheral is necessary if MIPI CSI or ISP_DVP is used as camera controller. This means even if ISP functions are not needed, you still need to install the ISP driver by calling :cpp:func:`esp_isp_new_processor`.
109+
ISP peripheral is necessary if MIPI CSI or ISP_DVP is used as camera controller. This means that even if ISP functions are not needed, you still need to install the ISP driver by calling :cpp:func:`esp_isp_new_processor`.
110110

111-
If ISP functions are not needed, ISP driver supports bypassing ISP pipelines and only necessary functions will be enabled. This can be done by setting :cpp:member:`esp_isp_processor_cfg_t::bypass_isp`.
111+
If ISP functions are not needed, ISP driver supports bypassing ISP pipelines and enabling only the necessary functions. This can be achieved by setting :cpp:member:`esp_isp_processor_cfg_t::bypass_isp`.
112112

113113
Install ISP Auto Focus (AF) Driver
114114
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

docs/en/api-reference/peripherals/spi_flash/spi_flash_idf_vs_rom.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Feature Supported by ESP-IDF but Not in Chip-ROM
2424
- :ref:`CONFIG_SPI_FLASH_DANGEROUS_WRITE`, enabling this option checks for flash programming to certain protected regions like bootloader, partition table or application itself.
2525
- :ref:`CONFIG_SPI_FLASH_ENABLE_COUNTERS`, enabling this option to collect performance data for ESP-IDF SPI flash driver APIs.
2626
- :ref:`CONFIG_SPI_FLASH_AUTO_SUSPEND`, enabling this option to automatically suspend or resume a long flash operation when short flash operation happens. Note that this feature is an optional feature, please do read :ref:`auto-suspend-intro` for more limitations.
27-
:ESP_ROM_HAS_SPI_FLASH_MMAP and SOC_SPIRAM_XIP_SUPPORTED and not esp32s3: - :ref:`CONFIG_SPIRAM_XIP_FROM_PSRAM`, enabling this option allows you to use external PSRAM as instruction cache and read-only data cache. Some functions in the ROM don't support this usage, and a ESP-IDF version of these functions is provided.
28-
:esp32s3: - :ref:`CONFIG_SPIRAM_FETCH_INSTRUCTIONS` and :ref:`CONFIG_SPIRAM_RODATA`, enabling these options allows you to use external PSRAM as instruction cache and read-only data cache. Some functions in the ROM don't support this usage, and a ESP-IDF version of these functions is provided.
27+
:ESP_ROM_HAS_SPI_FLASH_MMAP and SOC_SPIRAM_XIP_SUPPORTED and not esp32s3: - :ref:`CONFIG_SPIRAM_XIP_FROM_PSRAM`, enabling this option allows you to use external PSRAM as instruction cache and read-only data cache. Some functions in the ROM don't support this usage, and an ESP-IDF version of these functions is provided.
28+
:esp32s3: - :ref:`CONFIG_SPIRAM_FETCH_INSTRUCTIONS` and :ref:`CONFIG_SPIRAM_RODATA`, enabling these options allows you to use external PSRAM as instruction cache and read-only data cache. Some functions in the ROM don't support this usage, and an ESP-IDF version of these functions is provided.
2929

3030
Bugfixes Introduced in ESP-IDF but Not in Chip-ROM
3131
--------------------------------------------------

docs/en/api-reference/system/console.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ESP-IDF provides ``console`` component, which includes building blocks needed to
1717

1818
.. note::
1919

20-
When using a console application on a chip that supports a hardware USB serial interface, we suggest to disable the secondary serial console output. The secondary output will be output-only and consequently does not make sense in an interactive application.
20+
When using a console application on a chip that supports a hardware USB serial interface, we suggest disabling the secondary serial console output. The secondary output will be output-only and consequently does not make sense in an interactive application.
2121

2222
Line Editing
2323
------------
@@ -57,8 +57,7 @@ Linenoise library does not need explicit initialization. However, some configura
5757

5858
- :cpp:func:`linenoiseSetReadCharacteristics`
5959

60-
Set the characteristics of the read file descriptor (e.g., blocking or non blocking mode). The function has a weak definition in linenoise.c that can be overridden
61-
by providing a strong definition of the function.
60+
Set the characteristics of the read file descriptor (e.g., blocking or non-blocking mode). The function has a weak definition in ``linenoise.c`` that can be overridden by providing a strong definition of the function.
6261

6362
Main Loop
6463
^^^^^^^^^

docs/en/api-reference/system/log.rst

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -414,11 +414,11 @@ Binary logging is a feature available only in **Log V2**, enabling logs to be tr
414414

415415
By default, when **Log V2** is enabled, the logging system uses **text mode**. Enabling binary logging reduces flash memory usage by removing log format strings from flash and sending only their addresses instead. Additionally, ``printf`` functions are not used, which reduces both stack usage and flash consumption.
416416

417-
This feature introduces the :c:macro:`ESP_LOG_ATTR_STR` macro, which relocates format strings to a ``.noload`` section, effectively removing them from the final binary image. Developers can also use this mechanism for assertions or user-defined logging messages to further minimize flash usage.
417+
This feature introduces the :c:macro:`ESP_LOG_ATTR_STR` macro, which relocates format strings to a ``.noload`` section, effectively removing them from the final binary image. You can also use this mechanism for assertions or user-defined logging messages to further minimize flash usage.
418418

419419
Summary of Benefits:
420420

421-
- Reduces **flash size** by approximately **10% - 35%**, depending on the application. The more extensive the logging in a program, the greater the potential savings.
421+
- Reduces **flash size** by approximately **10% 35%**, depending on the application. The more extensive the logging in a program, the greater the potential savings.
422422
- Minimizes **stack usage** by eliminating the need for the ``vprintf``-like function for log formatting.
423423
- Reduces **log transmission overhead** by transmitting compact binary data.
424424

@@ -429,24 +429,26 @@ Binary Logging Workflow
429429

430430
Binary logging consists of two main components:
431431

432-
1. **Chip Side**: Encodes and transmits log data:
432+
1. :ref:`Chip Side <chip-side>`: Encodes and transmits log data.
433433

434-
- Encoding process
435-
- Argument type encoding
436-
- Runtime argument type encoding
434+
- Encoding process
435+
- Argument type encoding
436+
- Runtime argument type encoding
437437

438-
2. **Host Side**: Receives and decodes data using the `esp-idf-monitor tool <https://github.com/espressif/esp-idf-monitor>`_. The ``idf.py monitor`` command automatically decodes binary logs.
438+
2. :ref:`Host Side <host-side>`: Receives and decodes data using the `esp-idf-monitor tool <https://github.com/espressif/esp-idf-monitor>`_. The ``idf.py monitor`` command automatically decodes binary logs.
439439

440-
- Detects binary log packets.
441-
- Extracts packet fields (log level, format, tag, timestamp, arguments).
442-
- Determines whether addresses reference:
440+
- Detects binary log packets.
441+
- Extracts packet fields (log level, format, tag, timestamp, arguments).
442+
- Determines whether addresses reference:
443443

444-
- **ELF file** (requires lookup)
445-
- **Embedded string** (contained in the packet)
444+
- **ELF file** (requires lookup)
445+
- **Embedded string** (contained in the packet)
446446

447-
- Decodes arguments using the format string and the given array of arguments.
448-
- Reconstructs the final log message by coupling the format string with the decoded arguments.
449-
- Applies terminal colorization.
447+
- Decodes arguments using the format string and the given array of arguments.
448+
- Reconstructs the final log message by coupling the format string with the decoded arguments.
449+
- Applies terminal colorization.
450+
451+
.. _chip-side:
450452

451453
Chip Side
452454
^^^^^^^^^
@@ -484,7 +486,7 @@ The embedded string format is used if string is not present in ELF file, it foll
484486
Argument Type Encoding
485487
""""""""""""""""""""""
486488

487-
Since the format string is removed from the final binary, the chip must still identify argument types to correctly transmit them to the host. This is achieved using the :c:macro:`ESP_LOG_ARGS_TYPE` macro, which leverages the `_Generic` feature to classify user arguments at compile time into three categories: **32-bit**, **64-bit**, and **pointers**. This macro generates an **argument type array** at runtime, which is passed to ``esp_log`` before the user arguments. This ensures that:
489+
Since the format string is removed from the final binary, the chip must still identify argument types to correctly transmit them to the host. This is achieved using the :c:macro:`ESP_LOG_ARGS_TYPE` macro, which leverages the `_Generic` feature to classify user arguments at compile time into three categories: **32-bit**, **64-bit**, and **pointers**. This macro generates an **argument type array** at runtime and passes it to ``esp_log`` before the user arguments, ensuring that:
488490

489491
- The chip transmits data with the correct size and offset.
490492
- The host tool reconstructs the log message accurately.
@@ -505,7 +507,9 @@ Binary logging supports buffer log functions such as:
505507
- :c:macro:`ESP_LOG_BUFFER_CHAR_LEVEL`
506508
- :c:macro:`ESP_LOG_BUFFER_HEXDUMP`
507509

508-
For these cases, binary log handlers check whether the format address matches predefined constants (e.g., ``ESP_BUFFER_HEX_FORMAT``). Instead of sending a format string, the handler **directly transmits raw buffer data**.
510+
In such cases, the binary log handler checks whether the format address matches any predefined constants (e.g., ``ESP_BUFFER_HEX_FORMAT``). If it does, the handler skips sending a format string and instead **transmits the raw buffer data directly**.
511+
512+
.. _host-side:
509513

510514
Host Side (Monitor Tool)
511515
^^^^^^^^^^^^^^^^^^^^^^^^

docs/en/api-reference/system/sleep_modes.rst

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ RTC peripherals or RTC memories do not need to be powered on during sleep in thi
318318

319319
In Light-sleep mode, if you set Kconfig option :ref:`CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP`, to continue using :cpp:func:`gpio_wakeup_enable` for GPIO wakeup, you need to first call :cpp:func:`rtc_gpio_init` and :cpp:func:`rtc_gpio_set_direction`, setting the RTCIO to input mode.
320320

321-
.. only:: not SOC_RTCIO_WAKE_SUPPORTED
321+
.. only:: not SOC_RTCIO_WAKE_SUPPORTED and not esp32h2
322322

323323
GPIO Wakeup
324324
^^^^^^^^^^^
@@ -329,12 +329,20 @@ RTC peripherals or RTC memories do not need to be powered on during sleep in thi
329329

330330
.. only:: SOC_PM_SUPPORT_TOP_PD
331331

332-
.. note::
332+
.. note::
333333

334334
.. only:: SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP
335335

336336
In Light-sleep mode, if you set Kconfig option :ref:`CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP`, you can use :cpp:func:`esp_deep_sleep_enable_gpio_wakeup` directly for GPIO wakeup, because the digital IO power domain is being powered off, where the situation is the same as entering Deep-sleep.
337337

338+
.. only:: esp32h2
339+
340+
GPIO Wakeup
341+
^^^^^^^^^^^
342+
343+
Any IO can be used as the external input to wake up the chip from Light-sleep. Each pin can be individually configured to trigger wakeup on high or low level using the :cpp:func:`gpio_wakeup_enable` function. Then the :cpp:func:`esp_sleep_enable_gpio_wakeup` function should be called to enable this wakeup source.
344+
345+
338346
UART Wakeup (Light-sleep Only)
339347
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
340348

@@ -475,7 +483,9 @@ Application Examples
475483
:SOC_WIFI_SUPPORTED: - :example:`wifi/power_save` demonstrates the usage of Wi-Fi Modem-sleep mode and automatic Light-sleep feature to maintain Wi-Fi connections.
476484
:SOC_BT_SUPPORTED: - :example:`bluetooth/nimble/power_save` demonstrates the usage of Bluetooth Modem-sleep mode and automatic Light-sleep feature to maintain Bluetooth connections.
477485
:SOC_ULP_SUPPORTED: - :example:`system/deep_sleep` demonstrates the usage of various Deep-sleep wakeup triggers and ULP coprocessor programming.
478-
:not SOC_ULP_SUPPORTED: - :example:`system/deep_sleep` demonstrates the usage of Deep-sleep wakeup triggered by various sources, such as the RTC timer, GPIOs, EXT0, EXT1, supported by {IDF_TARGET_NAME}.
486+
:not SOC_ULP_SUPPORTED and not esp32c3 and not esp32h2: - :example:`system/deep_sleep` demonstrates the usage of Deep-sleep wakeup triggered by various sources, such as the RTC timer, GPIOs, EXT0, EXT1, supported by {IDF_TARGET_NAME}.
487+
:esp32c3: - :example:`system/deep_sleep` demonstrates the usage of Deep-sleep wakeup triggered by various sources, such as the RTC timer, GPIOs, supported by ESP32-C3.
488+
:esp32h2: - :example:`system/deep_sleep` demonstrates the usage of Deep-sleep wakeup triggered by various sources, such as the RTC timer, EXT0, EXT1, supported by ESP32-H2.
479489
- :example:`system/light_sleep` demonstrates the usage of Light-sleep wakeup triggered by various sources, such as the timer, GPIOs, supported by {IDF_TARGET_NAME}.
480490
:SOC_TOUCH_SENSOR_SUPPORTED and SOC_PM_SUPPORT_TOUCH_SENSOR_WAKEUP: - :example:`peripherals/touch_sensor/touch_sens_sleep` demonstrates the usage of Light-sleep and Deep-sleep wakeup triggered by the touch sensor.
481491

docs/zh_CN/api-guides/performance/speed.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
:SOC_CPU_HAS_FPU: - 避免使用浮点运算 ``float``。尽管 {IDF_TARGET_NAME} 具备单精度浮点运算器,但是浮点运算总是慢于整数运算。因此可以考虑使用不同的整数表示方法进行运算,如定点表示法,或者将部分计算用整数运算后再切换为浮点运算。
8888
:not SOC_CPU_HAS_FPU: - 避免使用浮点运算 ``float``。{IDF_TARGET_NAME} 通过软件模拟进行浮点运算,因此速度非常慢。可以考虑使用不同的整数表示方法进行运算,如定点表示法,或者将部分计算用整数运算后再切换为浮点运算。
8989
- 避免使用双精度浮点运算 ``double``。{IDF_TARGET_NAME} 通过软件模拟进行双精度浮点运算,因此速度非常慢。可以考虑使用基于整数的表示方法或单精度浮点数。
90+
:CONFIG_ESP_ROM_HAS_SUBOPTIMAL_NEWLIB_ON_MISALIGNED_MEMORY: - 在性能要求较高的代码段中,应避免执行未对齐的 4 字节内存访问。为提升性能,可以考虑启用 :ref:`CONFIG_LIBC_OPTIMIZED_MISALIGNED_ACCESS`。启用此选项将额外占用约 190 字节的 IRAM 和 870 字节的 flash 存储。请注意,正确对齐的内存操作始终能够以全速执行,且不会产生性能损耗。
9091

9192

9293
.. only:: esp32s2 or esp32s3 or esp32p4

docs/zh_CN/api-reference/peripherals/ecdsa.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ ECDSA 密钥可以通过 ``idf.py`` 脚本在外部编程。以下是关于编
8080

8181
{IDF_TARGET_NAME} 的 ECDSA 外设还支持使用确定性推导参数 K 来生成确定性签名,详见 `RFC 6979 <https://tools.ietf.org/html/rfc6979>`_ 第 3.2 节。
8282

83-
8483
生成非确定性签名
8584
----------------
8685

docs/zh_CN/api-reference/peripherals/isp.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ ISP 驱动程序需要由 :cpp:type:`esp_isp_processor_cfg_t` 指定配置。
104104
105105
使用上述句柄,可以启用/禁用 ISP 驱动程序,也可以安装其他 ISP 模块。
106106

107+
.. note::
108+
109+
如果将 MIPI CSI 或 ISP_DVP 用作摄像头控制器,则必须使用 ISP 外设。因此即便无需使用 ISP 功能,也要调用 :cpp:func:`esp_isp_new_processor` 函数安装 ISP 驱动程序。
110+
111+
如果无需使用 ISP 功能,也可以设置 :cpp:member:`esp_isp_processor_cfg_t::bypass_isp`,使 ISP 驱动程序绕过 ISP 流水线,仅启用必要的功能。
107112

108113
安装 ISP 自动对焦 (AF) 驱动程序
109114
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)