Commit Graph

103 Commits

Author SHA1 Message Date
Chen Chen 17d2041821 refactor(i2c): cleanup I2C definitions in soc_caps.h 2026-01-12 17:07:04 +08:00
Sudeep Mohanty c002cb67d1 fix(lp_mailbox): Fixed LP mailbox operation when LP core interrupts are enabled
This commit fixes the following issues with the LP mailbox when LP core
interrupts are enabled -
1. Removed static storage classifier on the interrupt handler to remove
   internal linkage and allow the linker to override the weak symbol.
2. Fixed a bug in the interrupt handler where the ACK bit interrupt was
   not being cleared correctly.
3. Fixed a bug in the LP core interrupt handler where the message mask
   was not being set correctly.

Closes https://github.com/espressif/esp-idf/issues/18095
2026-01-08 11:14:07 +01:00
Meet Patel 4b02a7e320 fix(spinlock): Added fence instruction in spinlock acquire and release
The existing spinlock mechanism possibly has an overlap of memory
operations during multi core execution, as visible in CI testing. When
running the example inter_cpu_critical_section, shared count increment
stops at 299999 instead of reaching 300000, but this only happens
randomly 1 out of 10 times. It is suspected that a memory operation
happens simultaneously from both core, even though spinlock protection
is in place.

To handle this problem, a memory barrier (fence instruction) is added
at critical places during spinlock acquire and release, to ensure that
all memory operations upto that point are completed and synchronised
before proceeding further.
2026-01-06 10:13:00 +05:30
wuzhenghui 48ba430297 change(esp_hal_rtc_timer): unify lp_timer/rtc_timer naming to RTC_TIMER 2025-12-30 11:35:36 +08:00
Song Ruo Jing 74aeb3f41f refactor(uart): split UART HAL into separate component 2025-12-25 14:41:28 +08:00
Konstantin Kondrashov e7054752ed feat(ulp): Removes ambiguity between ticks and cycles in ULP APIs
Closes https://github.com/espressif/esp-idf/issues/17820
2025-11-06 11:11:11 +02:00
Omar Chebib 32bb32b598 fix(ulp): fix warning in lp core I2C driver 2025-09-25 10:25:15 +08:00
Omar Chebib 324446da95 feat(mailbox): define and implement a mailbox API with hardware and software support 2025-09-25 10:25:15 +08:00
Meet Patel 93cbfcf139 refactor(lp_core_i2c): Modify lp_core_i2c header to support ESP32C5
lp_core_i2c.h header file has sda and scl pins hardcoded to GPIO6 and
GPIO7 which works only for ESP32C6. ESP32C5 uses GPIO2 and GPIO3 for
I2C SDA and SCL. Hence, added LP_I2C_SCL_IO and LP_I2C_SDA_IO macros
under conditional compilation in library header file, so there is no
need to hardcode I2C GPIO pins and any other test apps or examples
that are including the LP I2C header file can also use Macro directly.
2025-09-15 17:30:20 +05:30
Marius Vikhammer 140effda53 fix(lp_core): fixed array-bound warning when compiling on P4 with -Os
Closes https://github.com/espressif/esp-idf/issues/17054
2025-08-28 13:19:56 +08:00
Song Ruo Jing 6bfdc93593 feat(uart): add DTR and DSR signals support for UART 2025-08-05 16:45:46 +08:00
Samuel Obuch 7024babc31 fix(lp_core): dont reset lp cpu with debug attached 2025-07-31 13:48:45 +02:00
morris c4d7b1cfce refactor(uart)!: deprcated esp_rom_uart.h 2025-07-08 18:56:17 +08:00
Sudeep Mohanty 0f45b6c6c3 change(lp-core): Update LP I2C and LP UART drivers to use raw interrupt status
This commit updates the LP I2C and LP UART drivers to use the raw
interrupt status without enabling the interrupts.
2025-05-13 15:43:39 +02:00
Sudeep Mohanty 692512c0b3 Merge branch 'contrib/github_pr_15717' into 'master'
feat(ulp): LP Timer interrupt support (GitHub PR)

Closes IDFGH-15026

See merge request espressif/esp-idf!38613
2025-04-25 16:07:31 +08:00
X-Ryl669 4c3fa95c94 fix(ulp): Add missing wake up enable and disable functions for LP core
This commit adds wrapper APIs to enable and disable LP IO as a wakeup
source for the LP Core.

Merges https://github.com/espressif/esp-idf/pull/15837
2025-04-24 11:14:12 +02:00
jath03 a9eba4058e feat(ulp): LP Timer interrupt support
This commit adds support for the LP Timer interrupt to be used by the LP
Core.

Merges https://github.com/espressif/esp-idf/pull/15717
2025-04-23 09:52:45 +02:00
morris a4d32bb460 Merge branch 'feature/esp32c5_eco2_gpio_update' into 'master'
feat(gpio): esp32c5 eco2 gpio update

Closes IDF-12653, IDF-12710, and IO22-24

See merge request espressif/esp-idf!38358
2025-04-21 14:29:51 +08:00
Song Ruo Jing ec5176e95a fix(gpio): IO7 is not a LP IO anymore on C5 ECO2 chip 2025-04-18 19:03:08 +08:00
Konstantin Kondrashov 44983e6496 fix(ulp): Fix accumulation of wakeup cause bits in ULP
Closes https://github.com/espressif/esp-idf/issues/15794
2025-04-18 12:14:07 +03:00
morris 122d122c64 refactor(gpio): reuse gpio_int_type_t in the rtc io driver 2025-04-01 18:21:57 +08:00
laokaiyao c9cc7bb216 feat(ulp_touch): add example for lp_touch 2025-03-14 21:56:05 +08:00
laokaiyao ffb8adcf49 feat(ulp_touch): support ulp touch driver on p4 2025-03-14 21:10:16 +08:00
Song Ruo Jing 1b09bb3037 fix(uart): LP UART does not have the pre-divider for its clock source
Closes https://github.com/espressif/esp-idf/issues/15427
2025-03-06 20:35:48 +08:00
Sudeep Mohanty b4f59dae9c fix(lp_uart): Update the lp_core_uart_tx_flush() API to wait for Tx idle
This commit updates the lp_core_uart_tx_flush() API to wait for the Tx line
to become idle, therefore confirming that all bytes are sent out.

Closes https://github.com/espressif/esp-idf/issues/15433
2025-02-28 10:40:38 +01:00
wuzhenghui c0f98621d7 fix(examples): fix esp32c5 ulp examples 2025-02-08 16:04:49 +08:00
igor.udot f742a05b28 feat: supports lp uart wakeup 2025-02-05 14:54:48 +08:00
morris 8da529e5eb Merge branch 'refactor/i2c_ll_trm_sync' into 'master'
refactor(i2c): rename some LL functions according to TRM descriptions

See merge request espressif/esp-idf!35049
2024-11-22 10:13:29 +08:00
Armando 0cbcd652a3 doc(lp_vad): lp vad programming guide 2024-11-21 11:08:11 +08:00
morris 3fb7461eb0 refactor(i2c): rename some LL functions according to TRM descriptions 2024-11-20 19:16:23 +08:00
Marius Vikhammer 1f1954378e Merge branch 'feature/lp_core_gpio_wakeup' into 'master'
feat(lp_core): added support for LP-IO as LP-core wakeup source

Closes IDF-10200

See merge request espressif/esp-idf!31828
2024-10-18 09:32:49 +08:00
Armando 1792aba1dc feat(vad): lp vad driver and wakeup feature 2024-10-16 17:27:27 +08:00
Marius Vikhammer b4c501374f feat(lp_core): added support for LP-IO as LP-core wakeup source 2024-10-16 09:34:20 +08:00
morris 39d6f35594 refactor(lp_core): unify LL functions of ETM wake up lp system 2024-09-26 11:48:15 +08:00
Liu Xiao Yu e051b921b8 Merge branch 'feat/lp_spinlock' into 'master'
feat(ulp): implement inter-hp-lp-cpu spinlock/critical section

Closes IDF-10206

See merge request espressif/esp-idf!32775
2024-09-20 17:09:50 +08:00
Marius Vikhammer 564d777018 Merge branch 'feature/lp_core_40_mhz' into 'master'
feat(system): support choosing xtal as rtc-fast clock src on P4 and C5

Closes IDF-10203

See merge request espressif/esp-idf!32450
2024-09-20 10:57:15 +08:00
Xiaoyu Liu 446528d40f feat(ulp): implement ulp lp core spinlock 2024-09-20 10:22:45 +08:00
Marius Vikhammer 00eb97725b feat(system): support choosing xtal as rtc-fast clock src on P4 and C5
With xtal as rtc-fast clock source the LP-Core can run at twice the default
clock frequency. 40 MHz as opposed to 20 MHz.
2024-09-19 17:30:44 +08:00
Sudeep Mohanty 3c65f1b654 fix(lp_uart): Added lp_uart flush feature
This commit adds the lp_core_uart_flush() API to flush the LP UART Tx
FIFO. This API is automatically called once the program returns from the
main function().

Closes https://github.com/espressif/esp-idf/issues/14530
2024-09-19 09:36:04 +02:00
Wu Zheng Hui 6abe40e590 Merge branch 'feature/optimize_esp32p4_active_power_eco1' into 'master'
feat(system): Optimize esp32p4 active state  power consumption

Closes PM-103 and IDF-7688

See merge request espressif/esp-idf!32950
2024-09-11 23:15:29 +08:00
wuzhenghui 05e74480f5 feat(esp_system): gate some clock by default to optmize esp32p4 active power 2024-09-11 10:53:00 +08:00
Sudeep Mohanty 1e5efd7fa7 feat(lp_adc): Added support to read LP ADC from the LP core
This commit adds APIs to initialize and configure the LP ADC from the HP
core and also adds APIs to read the raw and converted ADC values from the LP core.
2024-09-10 08:45:11 +02:00
Alexey Gerenkov 625c437412 feat(ulp): Add LP core debugging support 2024-09-03 18:28:14 +03:00
andylinpersonal 0dbb6d94ec fix(ulp): Add the missing extern "C" guard to ulp_lp_core_print.h
This commit adds the missing extern `C` guards the ulp_lp_core_print.h
header file.

Closes https://github.com/espressif/esp-idf/pull/14329
2024-08-08 23:23:08 +08:00
Xiaoyu Liu 1216dd1abd change(ulp): bu lp i2c on esp32c5 2024-08-01 14:48:31 +08:00
Marius Vikhammer b825aa9f95 change(lp_core): changed wakeup time calc to use a precomputed tick value
Previously we would calculate the wakeup ticks upon every wakeup using the lp-timer clock frequency,
but this caused the binary to pull in software division functions, increasing the binary size.

This value is now precalculated by the hp-core when we configure the ULP. This saves about 1k bytes.
2024-07-23 14:14:20 +08:00
Marius Vikhammer 692eb01fe1 fix(lp-core): fixed ULP shared mem address being wrong on P4 2024-07-23 14:12:18 +08:00
Marius Vikhammer d70383422b feat(lp-core): add reduced footprint print functions 2024-07-19 09:48:20 +08:00
Marius Vikhammer 74a04c140c feat(ulp): add option for routing LP-printf to HP console 2024-07-17 17:16:40 +08:00
Sudeep Mohanty 945a593de2 fix(lp-i2c): Fixed the generation of spurious I2C start with lp-i2c
This commit fixes an issue with LP I2C and RTC I2C where in the
peripherals generated a spurious I2C start condition when initialized.
This caused some sensors to not respond properly to the following read
or write request.

Closes https://github.com/espressif/esp-idf/issues/14043
Closes https://github.com/espressif/esp-idf/issues/11608
2024-07-11 12:37:04 +02:00