Skip to content

Commit c29d7de

Browse files
committed
Merge branch 'docs/update_cn_trans_ulp_lp_core' into 'master'
Docs: update cn trans for ulp-lp-core.rst Closes DOC-7458 See merge request espressif/esp-idf!30345
2 parents c119fa0 + 1947185 commit c29d7de

File tree

2 files changed

+36
-12
lines changed

2 files changed

+36
-12
lines changed

docs/en/api-reference/system/ulp-lp-core.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,14 @@ When the ULP is woken up, it will go through the following steps:
142142

143143
.. list::
144144

145-
: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.
145+
: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.
146146
#. Initialize system feature, e.g., interrupts
147147
#. Call user code ``main()``
148148
#. Return from ``main()``
149149
#. If ``lp_timer_sleep_duration_us`` is specified, then configure the next wake-up alarm
150150
#. Call :cpp:func:`ulp_lp_core_halt`
151151

152+
152153
ULP LP-Core Peripheral Support
153154
------------------------------
154155

@@ -169,10 +170,10 @@ To enhance the capabilities of the ULP LP-Core coprocessor, it has access to per
169170

170171
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.
171172

172-
In addition to the boot-up code mentioned above the ROM code also provides the following functions and interfaces:
173+
In addition to the boot-up code mentioned above, the ROM code also provides the following functions and interfaces:
173174

174-
* :component_file:`ROM.ld Interface <esp_rom/esp32p4/ld/esp32p4lp.rom.ld>`
175-
* :component_file:`newlib.ld Interface <esp_rom/esp32p4/ld/esp32p4lp.rom.newlib.ld>`
175+
* :component_file:`ROM.ld Interface <esp_rom/{IDF_TARGET_PATH_NAME}/ld/{IDF_TARGET_PATH_NAME}lp.rom.ld>`
176+
* :component_file:`newlib.ld Interface <esp_rom/{IDF_TARGET_PATH_NAME}/ld/{IDF_TARGET_PATH_NAME}lp.rom.newlib.ld>`
176177

177178
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.
178179

docs/zh_CN/api-reference/system/ulp-lp-core.rst

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,20 +140,43 @@ ULP 有以下唤醒源:
140140

141141
ULP 被唤醒时会经历以下步骤:
142142

143-
1. 初始化系统功能,如中断
144-
2. 调用用户代码 ``main()``
145-
3. 从 ``main()`` 返回
146-
4. 如果指定了 ``lp_timer_sleep_duration_us``,则配置下一个唤醒闹钟
147-
5. 调用 :cpp:func:`ulp_lp_core_halt`
143+
.. list::
144+
145+
:CONFIG_ESP_ROM_HAS_LP_ROM: #. 除非已指定 :cpp:member:`ulp_lp_core_cfg_t::skip_lp_rom_boot`,否则运行 ROM 启动代码并跳转至 LP RAM 中的入口地址。ROM 启动代码将初始化 LP UART 并打印启动信息。
146+
#. 初始化系统功能,如中断
147+
#. 调用用户代码 ``main()``
148+
#. 从 ``main()`` 返回
149+
#. 如果指定了 ``lp_timer_sleep_duration_us``,则配置下一个唤醒闹钟
150+
#. 调用 :cpp:func:`ulp_lp_core_halt`
151+
148152

149153
ULP LP-Core 支持的外设
150154
------------------------------
151155

152156
为了增强 ULP LP-Core 协处理器的功能,它可以访问在低功耗电源域运行的外设。ULP LP-Core 协处理器可以在主 CPU 处于睡眠模式时与这些外设进行交互,并在达到唤醒条件时唤醒主 CPU。以下为支持的外设:
153157

154-
* LP IO
155-
* LP I2C
156-
* LP UART
158+
.. list::
159+
160+
* LP IO
161+
* LP I2C
162+
* LP UART
163+
164+
.. only:: CONFIG_ESP_ROM_HAS_LP_ROM
165+
166+
ULP LP-Core ROM
167+
---------------
168+
169+
ULP LP-Core ROM 是位于 LP-ROM 中的一小段预编译代码,用户无法修改。与主 CPU 运行的引导加载程序 ROM 代码类似,ULP LP-Core ROM 也在 ULP LP-Core 协处理器启动时执行。该 ROM 代码会初始化 ULP LP-Core 协处理器,随后跳转到用户程序。如果已初始化 LP UART,该 ROM 代码还会打印启动信息。
170+
171+
如果已将 :cpp:member:`ulp_lp_core_cfg_t::skip_lp_rom_boot` 设置为真,则不会执行 ULP LP-Core ROM 代码。如需尽快唤醒 ULP,同时避免初始化和信息打印产生额外开销,则可使用这一功能。
172+
173+
除上述启动代码,ULP LP-Core ROM 代码还提供以下功能和接口:
174+
175+
* :component_file:`ROM.ld 接口 <esp_rom/{IDF_TARGET_PATH_NAME}/ld/{IDF_TARGET_PATH_NAME}lp.rom.ld>`
176+
* :component_file:`newlib.ld 接口 <esp_rom/{IDF_TARGET_PATH_NAME}/ld/{IDF_TARGET_PATH_NAME}lp.rom.newlib.ld>`
177+
178+
在任何情况下,这些函数都存在于 LP-ROM 中,因此在程序中使用这些函数可以减少 ULP 应用程序的 RAM 占用。
179+
157180

158181
应用示例
159182
--------------------

0 commit comments

Comments
 (0)