Merge branch 'docs/p4_misc_docs' into 'master'

docs(ulp): updated lp core docs with P4 related info

Closes IDF-7752, IDF-7741, IDF-7740, IDF-9485, IDF-9473, and IDF-9474

See merge request espressif/esp-idf!29592
This commit is contained in:
Marius Vikhammer
2024-03-18 14:12:26 +08:00
3 changed files with 30 additions and 24 deletions

View File

@@ -140,20 +140,42 @@ The ULP has the following wake-up sources:
When the ULP is woken up, it will go through the following steps:
1. Initialize system feature, e.g., interrupts
2. Call user code ``main()``
3. Return from ``main()``
4. If ``lp_timer_sleep_duration_us`` is specified, then configure the next wake-up alarm
5. Call :cpp:func:`ulp_lp_core_halt`
.. 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.
#. Initialize system feature, e.g., interrupts
#. Call user code ``main()``
#. Return from ``main()``
#. If ``lp_timer_sleep_duration_us`` is specified, then configure the next wake-up alarm
#. Call :cpp:func:`ulp_lp_core_halt`
ULP LP-Core Peripheral Support
------------------------------
To enhance the capabilities of the ULP LP-Core coprocessor, it has access to peripherals which operate in the low-power domain. The ULP LP-Core coprocessor can interact with these peripherals when the main CPU is in sleep mode, and can wake up the main CPU once a wakeup condition is reached. The following peripherals are supported:
* LP IO
* LP I2C
* LP UART
.. list::
* LP IO
* LP I2C
* LP UART
.. only:: CONFIG_ESP_ROM_HAS_LP_ROM
ULP LP-Core ROM
---------------
The ULP LP-Core ROM is a small pre-built piece of code located in LP-ROM, which is not modifiable by users. Similar to the bootloader ROM code ran by the main CPU, this code is executed when the ULP LP-Core coprocessor is started. The ROM code initializes the ULP LP-Core coprocessor and then jumps to the user program. The ROM code is responsible for initializing the LP UART and printing boot messages.
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 UART and printing is unwanted.
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:`newlib.ld Interface <esp_rom/esp32p4/ld/esp32p4lp.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.
Application Examples
--------------------