mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 17:49:10 -04:00
Docs: update cn trans for ulp-lp-core.rst
This commit is contained in:
parent
5f9b691017
commit
19471852af
@ -142,13 +142,14 @@ When the ULP is woken up, it will go through the following steps:
|
|||||||
|
|
||||||
.. list::
|
.. list::
|
||||||
|
|
||||||
:CONFIG_ESP_ROM_HAS_LP_ROM: #. Unless :cpp:member:`ulp_lp_core_cfg_t::skip_lp_rom_boot` is specified: run ROM start-up code and jump to the entry point in LP RAM. ROM start-up code will initialize lp-uart as well as print boot messages.
|
:CONFIG_ESP_ROM_HAS_LP_ROM: #. Unless :cpp:member:`ulp_lp_core_cfg_t::skip_lp_rom_boot` is specified, run ROM start-up code and jump to the entry point in LP RAM. ROM start-up code will initialize LP UART as well as print boot messages.
|
||||||
#. Initialize system feature, e.g., interrupts
|
#. Initialize system feature, e.g., interrupts
|
||||||
#. Call user code ``main()``
|
#. Call user code ``main()``
|
||||||
#. Return from ``main()``
|
#. Return from ``main()``
|
||||||
#. If ``lp_timer_sleep_duration_us`` is specified, then configure the next wake-up alarm
|
#. If ``lp_timer_sleep_duration_us`` is specified, then configure the next wake-up alarm
|
||||||
#. Call :cpp:func:`ulp_lp_core_halt`
|
#. Call :cpp:func:`ulp_lp_core_halt`
|
||||||
|
|
||||||
|
|
||||||
ULP LP-Core Peripheral Support
|
ULP LP-Core Peripheral Support
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
@ -169,10 +170,10 @@ To enhance the capabilities of the ULP LP-Core coprocessor, it has access to per
|
|||||||
|
|
||||||
The ROM code is not executed if :cpp:member:`ulp_lp_core_cfg_t::skip_lp_rom_boot` is set to true. This is useful when you need the ULP to wake-up as quickly as possible and the extra overhead of initializing and printing is unwanted.
|
The ROM code is not executed if :cpp:member:`ulp_lp_core_cfg_t::skip_lp_rom_boot` is set to true. This is useful when you need the ULP to wake-up as quickly as possible and the extra overhead of initializing and printing is unwanted.
|
||||||
|
|
||||||
In addition to the boot-up code mentioned above the ROM code also provides the following functions and interfaces:
|
In addition to the boot-up code mentioned above, the ROM code also provides the following functions and interfaces:
|
||||||
|
|
||||||
* :component_file:`ROM.ld Interface <esp_rom/esp32p4/ld/esp32p4lp.rom.ld>`
|
* :component_file:`ROM.ld Interface <esp_rom/{IDF_TARGET_PATH_NAME}/ld/{IDF_TARGET_PATH_NAME}lp.rom.ld>`
|
||||||
* :component_file:`newlib.ld Interface <esp_rom/esp32p4/ld/esp32p4lp.rom.newlib.ld>`
|
* :component_file:`newlib.ld Interface <esp_rom/{IDF_TARGET_PATH_NAME}/ld/{IDF_TARGET_PATH_NAME}lp.rom.newlib.ld>`
|
||||||
|
|
||||||
Since these functions are already present in LP-ROM no matter what, using these in your program allows you to reduce the RAM footprint of your ULP application.
|
Since these functions are already present in LP-ROM no matter what, using these in your program allows you to reduce the RAM footprint of your ULP application.
|
||||||
|
|
||||||
|
@ -140,20 +140,43 @@ ULP 有以下唤醒源:
|
|||||||
|
|
||||||
ULP 被唤醒时会经历以下步骤:
|
ULP 被唤醒时会经历以下步骤:
|
||||||
|
|
||||||
1. 初始化系统功能,如中断
|
.. list::
|
||||||
2. 调用用户代码 ``main()``
|
|
||||||
3. 从 ``main()`` 返回
|
:CONFIG_ESP_ROM_HAS_LP_ROM: #. 除非已指定 :cpp:member:`ulp_lp_core_cfg_t::skip_lp_rom_boot`,否则运行 ROM 启动代码并跳转至 LP RAM 中的入口地址。ROM 启动代码将初始化 LP UART 并打印启动信息。
|
||||||
4. 如果指定了 ``lp_timer_sleep_duration_us``,则配置下一个唤醒闹钟
|
#. 初始化系统功能,如中断
|
||||||
5. 调用 :cpp:func:`ulp_lp_core_halt`
|
#. 调用用户代码 ``main()``
|
||||||
|
#. 从 ``main()`` 返回
|
||||||
|
#. 如果指定了 ``lp_timer_sleep_duration_us``,则配置下一个唤醒闹钟
|
||||||
|
#. 调用 :cpp:func:`ulp_lp_core_halt`
|
||||||
|
|
||||||
|
|
||||||
ULP LP-Core 支持的外设
|
ULP LP-Core 支持的外设
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
为了增强 ULP LP-Core 协处理器的功能,它可以访问在低功耗电源域运行的外设。ULP LP-Core 协处理器可以在主 CPU 处于睡眠模式时与这些外设进行交互,并在达到唤醒条件时唤醒主 CPU。以下为支持的外设:
|
为了增强 ULP LP-Core 协处理器的功能,它可以访问在低功耗电源域运行的外设。ULP LP-Core 协处理器可以在主 CPU 处于睡眠模式时与这些外设进行交互,并在达到唤醒条件时唤醒主 CPU。以下为支持的外设:
|
||||||
|
|
||||||
* LP IO
|
.. list::
|
||||||
* LP I2C
|
|
||||||
* LP UART
|
* LP IO
|
||||||
|
* LP I2C
|
||||||
|
* LP UART
|
||||||
|
|
||||||
|
.. only:: CONFIG_ESP_ROM_HAS_LP_ROM
|
||||||
|
|
||||||
|
ULP LP-Core ROM
|
||||||
|
---------------
|
||||||
|
|
||||||
|
ULP LP-Core ROM 是位于 LP-ROM 中的一小段预编译代码,用户无法修改。与主 CPU 运行的引导加载程序 ROM 代码类似,ULP LP-Core ROM 也在 ULP LP-Core 协处理器启动时执行。该 ROM 代码会初始化 ULP LP-Core 协处理器,随后跳转到用户程序。如果已初始化 LP UART,该 ROM 代码还会打印启动信息。
|
||||||
|
|
||||||
|
如果已将 :cpp:member:`ulp_lp_core_cfg_t::skip_lp_rom_boot` 设置为真,则不会执行 ULP LP-Core ROM 代码。如需尽快唤醒 ULP,同时避免初始化和信息打印产生额外开销,则可使用这一功能。
|
||||||
|
|
||||||
|
除上述启动代码,ULP LP-Core ROM 代码还提供以下功能和接口:
|
||||||
|
|
||||||
|
* :component_file:`ROM.ld 接口 <esp_rom/{IDF_TARGET_PATH_NAME}/ld/{IDF_TARGET_PATH_NAME}lp.rom.ld>`
|
||||||
|
* :component_file:`newlib.ld 接口 <esp_rom/{IDF_TARGET_PATH_NAME}/ld/{IDF_TARGET_PATH_NAME}lp.rom.newlib.ld>`
|
||||||
|
|
||||||
|
在任何情况下,这些函数都存在于 LP-ROM 中,因此在程序中使用这些函数可以减少 ULP 应用程序的 RAM 占用。
|
||||||
|
|
||||||
|
|
||||||
应用示例
|
应用示例
|
||||||
--------------------
|
--------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user