kopia lustrzana https://github.com/espressif/esp-idf
docs: Update CN for sdmmc and ulp-lp-core docs
rodzic
9b233aca2b
commit
90afe1a32f
|
@ -45,8 +45,8 @@ Pin Configurations
|
|||
|
||||
.. list::
|
||||
|
||||
- slot 0 pins are dedicated for UHS-I mode. This is not yet supported in the driver.
|
||||
- slot 1 pins are routed via GPIO Matrix, and it's for non UHS-I usage. You will need to configure the pins in :cpp:type:`sdmmc_slot_config_t` to use the slot 1.
|
||||
- Slot 0 pins are dedicated for UHS-I mode. This is not yet supported in the driver.
|
||||
- Slot 1 pins are routed via GPIO Matrix, and it's for non UHS-I usage. You will need to configure the pins in :cpp:type:`sdmmc_slot_config_t` to use the slot 1.
|
||||
|
||||
Application Example
|
||||
-------------------
|
||||
|
|
|
@ -32,7 +32,7 @@ The ULP LP-Core code is compiled together with your ESP-IDF project as a separat
|
|||
|
||||
The first argument to ``ulp_embed_binary`` specifies the ULP binary name. The name specified here is also used by other generated artifacts such as the ELF file, map file, header file, and linker export file. The second argument specifies the ULP source files. Finally, the third argument specifies the list of component source files which include the header file to be generated. This list is needed to build the dependencies correctly and ensure that the generated header file is created before any of these files are compiled. See the section below for the concept of generated header files for ULP applications.
|
||||
|
||||
1. Enable both :ref:`CONFIG_ULP_COPROC_ENABLED` and :ref:`CONFIG_ULP_COPROC_TYPE` in menucofig, and set :ref:`CONFIG_ULP_COPROC_TYPE` to ``CONFIG_ULP_COPROC_TYPE_LP_CORE``. The :ref:`CONFIG_ULP_COPROC_RESERVE_MEM` option reserves RTC memory for the ULP and must be set to a value big enough to store both the ULP LP-Core code and data. If the application components contain multiple ULP programs, then the size of the RTC memory must be sufficient to hold the largest one.
|
||||
1. Enable both :ref:`CONFIG_ULP_COPROC_ENABLED` and :ref:`CONFIG_ULP_COPROC_TYPE` in menucofig, and set :ref:`CONFIG_ULP_COPROC_TYPE` to ``CONFIG_ULP_COPROC_TYPE_LP_CORE``. The :ref:`CONFIG_ULP_COPROC_RESERVE_MEM` option reserves RTC memory for the ULP, and must be set to a value big enough to store both the ULP LP-Core code and data. If the application components contain multiple ULP programs, then the size of the RTC memory must be sufficient to hold the largest one.
|
||||
|
||||
2. Build the application as usual (e.g., ``idf.py app``).
|
||||
|
||||
|
@ -160,7 +160,7 @@ Application Examples
|
|||
|
||||
* :example:`system/ulp/lp_core/gpio` polls GPIO while main CPU is in deep sleep.
|
||||
* :example:`system/ulp/lp_core/lp_i2c` reads external I2C ambient light sensor (BH1750) while the main CPU is in Deep-sleep and wakes up the main CPU once a threshold is met.
|
||||
* :example:`system/ulp/lp_core/lp_uart/lp_uart_echo` reads data written to a serial console and echoes it back. This example demonstrates the usage of the LP UART driver from the LP core.
|
||||
* :example:`system/ulp/lp_core/lp_uart/lp_uart_echo` reads data written to a serial console and echoes it back. This example demonstrates the usage of the LP UART driver running on the LP core.
|
||||
* :example:`system/ulp/lp_core/lp_uart/lp_uart_print` shows how to print various statements from a program running on the LP core.
|
||||
|
||||
API Reference
|
||||
|
|
|
@ -28,6 +28,25 @@ SDMMC 主机驱动和 SD SPI 主机驱动(:component_file:`esp_driver_sdmmc/in
|
|||
|
||||
协议层通过 :cpp:class:`sdmmc_host_t` 结构体和主机协同工作,该结构体包含指向主机各类函数的指针。
|
||||
|
||||
管脚配置
|
||||
------------------
|
||||
|
||||
..only:: SOC_SDMMC_USE_IOMUX and not SOC_SDMMC_USE_GPIO_MATRIX
|
||||
|
||||
SDMMC 管脚为专用管脚,无需配置。
|
||||
|
||||
..only:: SOC_SDMMC_USE_GPIO_MATRIX and not SOC_SDMMC_USE_IOMUX
|
||||
|
||||
SDMMC 管脚信号通过 GPIO 交换矩阵配置,请在 :cpp:type:`sdmmc_slot_config_t` 中配置管脚。
|
||||
|
||||
..only:: esp32p4
|
||||
|
||||
SDMMC 有两个卡槽:
|
||||
|
||||
.. list::
|
||||
|
||||
- 卡槽 0 管脚为 UHS-I 模式专用,但驱动程序尚不支持此模式。
|
||||
- 卡槽 1 管脚可通过 GPIO 交换矩阵配置,用于 UHS-I 之外的情况。如要使用卡槽 1,请在 :cpp:type:`sdmmc_slot_config_t` 中配置管脚。
|
||||
|
||||
应用示例
|
||||
-------------------
|
||||
|
|
|
@ -32,9 +32,9 @@ ULP LP-Core 代码会与 ESP-IDF 项目共同编译,生成一个单独的二
|
|||
|
||||
``ulp_embed_binary`` 的第一个参数为 ULP 二进制文件的文件名,该文件名也用于其他生成的文件,如 ELF 文件、映射文件、头文件和链接器导出文件。第二个参数为 ULP 源文件。第三个参数为组件源文件列表,用于包含要生成的头文件。要正确构建依赖关系、确保在编译这些文件前创建要生成的头文件,都需要此文件列表。有关 ULP 应用程序生成头文件的概念,请参阅本文档后续章节。
|
||||
|
||||
3. 在 menuconfig 中启用 :ref:`CONFIG_ULP_COPROC_ENABLED` 和 :ref:`CONFIG_ULP_COPROC_TYPE` 选项,并将后者设置为 ``CONFIG_ULP_COPROC_TYPE_LP_CORE``。:ref:`CONFIG_ULP_COPROC_RESERVE_MEM` 选项为 ULP 保留 RTC 内存,因此必须设置为一个足够大的值,以存储 ULP LP-Core 代码和数据。如果应用程序组件包含多个 ULP 程序,那么 RTC 内存的大小必须足够容纳其中最大的程序。
|
||||
1. 在 menuconfig 中启用 :ref:`CONFIG_ULP_COPROC_ENABLED` 和 :ref:`CONFIG_ULP_COPROC_TYPE` 选项,并将 :ref:`CONFIG_ULP_COPROC_TYPE` 设置为 ``CONFIG_ULP_COPROC_TYPE_LP_CORE``。:ref:`CONFIG_ULP_COPROC_RESERVE_MEM` 选项为 ULP 保留 RTC 内存,因此必须设置为一个足够大的值,以存储 ULP LP-Core 代码和数据。如果应用程序组件包含多个 ULP 程序,那么 RTC 内存的大小必须足够容纳其中最大的程序。
|
||||
|
||||
4. 按照常规步骤构建应用程序(例如 ``idf.py app``)。
|
||||
2. 按照常规步骤构建应用程序(例如 ``idf.py app``)。
|
||||
|
||||
在构建过程中,采取以下步骤来构建 ULP 程序:
|
||||
|
||||
|
@ -153,12 +153,15 @@ ULP LP-Core 支持的外设
|
|||
|
||||
* LP IO
|
||||
* LP I2C
|
||||
* LP UART
|
||||
|
||||
应用示例
|
||||
--------------------
|
||||
|
||||
* 在示例 :example:`system/ulp/lp_core/gpio` 中,ULP LP-Core 协处理器在主 CPU 深度睡眠时轮询 GPIO。
|
||||
* 在示例 :example:`system/ulp/lp_core/lp_i2c` 中,ULP LP-Core 协处理器在主 CPU 深度睡眠时读取外部 I2C 环境光传感器 (BH1750),并在达到阈值时唤醒主 CPU。
|
||||
* 在示例 :example:`system/ulp/lp_core/lp_uart/lp_uart_echo` 中,低功耗内核上运行的 LP UART 驱动程序读取并回显写入串行控制台的数据。
|
||||
* :example:`system/ulp/lp_core/lp_uart/lp_uart_print` 展示了如何在低功耗内核上使用串口打印功能。
|
||||
|
||||
API 参考
|
||||
-------------
|
||||
|
@ -168,6 +171,7 @@ API 参考
|
|||
|
||||
.. include-build-file:: inc/ulp_lp_core.inc
|
||||
.. include-build-file:: inc/lp_core_i2c.inc
|
||||
.. include-build-file:: inc/lp_core_uart.inc
|
||||
|
||||
LP 内核 API 参考
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -175,3 +179,5 @@ LP 内核 API 参考
|
|||
.. include-build-file:: inc/ulp_lp_core_utils.inc
|
||||
.. include-build-file:: inc/ulp_lp_core_gpio.inc
|
||||
.. include-build-file:: inc/ulp_lp_core_i2c.inc
|
||||
.. include-build-file:: inc/ulp_lp_core_uart.inc
|
||||
.. include-build-file:: inc/ulp_lp_core_print.inc
|
||||
|
|
Ładowanie…
Reference in New Issue