Commit Graph

406 Commits

Author SHA1 Message Date
Jiang Jiang Jian 8ff9c4de4b Merge branch 'bugfix/fence_instruction_spinlock_v5.5' into 'release/v5.5'
fix(spinlock): Added fence instruction in spinlock acquire and release (v5.5)

See merge request espressif/esp-idf!46805
2026-03-31 10:49:27 +08:00
Marius Vikhammer fe62bfcc2d fix(esp_hw_support): clear LP core SW interrupt in wake stub before sleep
When ulp_lp_core_wakeup_main_processor() is called, it sets the
PMU_SW_INT_RAW bit on the HP side. The normal sleep path clears this
bit before re-entering sleep, but esp_wake_stub_sleep() did not, leaving
the wakeup cause sticky. This caused the PMU to immediately re-trigger a
wakeup as soon as sleep was requested from the wake stub, producing a
rapid re-wakeup loop that eventually triggered LP_WDT_SYS resets.

Add a test case that verifies the wake stub can return to sleep correctly
across multiple LP core wakeup cycles without the re-wakeup bug.

Closing https://github.com/espressif/esp-idf/issues/18308

Made-with: Cursor
2026-03-27 11:50:35 +08:00
Meet Patel f562a2bdef 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-03-20 11:46:37 +05:30
hebinglin a2840f0287 fix(hal): fix the issue of dual-core contention for RTC_CNTL regs 2026-03-06 20:07:26 +08:00
Alexey Gerenkov 0c7eac2565 Merge branch 'feature/picolibc_v5.5' into 'release/v5.5'
feat(build): add Picolibc support (v5.5)

See merge request espressif/esp-idf!44108
2026-02-26 18:12:58 +08:00
Sudeep Mohanty 660200f05e fix(lp_adc): Update ADC threshold values for LP core LP ADC test 2026-02-09 12:37:17 +01:00
Sudeep Mohanty 66c76d0c34 change(lp_adc): Cleanup LP ADC driver and example 2026-02-09 12:36:18 +01:00
Sudeep Mohanty 0ebd2fd79e feat(lp_adc): Set LP ADC calibration params
This commit sets the calibration parameters for a a given LP ADC unit
and channel to improve the raw LP ADC reading when read from the LP
core. The calibration params are set from the HP core.
2026-02-09 12:36:17 +01:00
Alexey Lapshin 0b3929d0d9 feat(esp_libc): add full support for picolibc 2026-01-30 23:39:53 +07:00
Marius Vikhammer 91e8dc6b53 fix(lp-core): fixed rtc mem conflict on p4 eco5 between app and ULP 2025-11-26 11:40:01 +05:30
armando 304ba1655b fix check test scripts build issue 2025-11-20 11:33:36 +08:00
armando cdff2570c7 ci(p4): disable p4 rev3 invalid tests temporarily 2025-11-20 11:33:36 +08:00
Marius Vikhammer 17dd84e012 test(ulp): added larger delay in ULP FSM I_WR_REG instruction test
Test is flakey, could possibly be due to the ULP occasionally needing
a bit more time to start up.
2025-11-17 16:23:34 +08:00
Marius Vikhammer 9be2f4f7b0 ci(ulp): reset board between ulp-fsm tests 2025-10-24 11:25:06 +08:00
Jiang Jiang Jian 3a6614bf8e Merge branch 'fix/ulp_riscv_delay_cycles_v5.5' into 'release/v5.5'
fix(ulp_riscv): Fix ulp_riscv_delay_cycles() to handle small delays correctly (v5.5)

See merge request espressif/esp-idf!41941
2025-09-28 18:52:09 +08:00
Marius Vikhammer b0e0b4ddb9 Merge branch 'refactor/lp_core_i2c_esp32c5_support_v5.5' into 'release/v5.5'
refactor(lp_core_i2c): Modify lp_core_i2c header to support ESP32C5 (v5.5)

See merge request espressif/esp-idf!41927
2025-09-17 10:15:00 +08:00
Konstantin Kondrashov e9cae6c805 fix(ulp_riscv): Fix a delay function to handle small delays correctly
Fixed ulp_riscv_delay_cycles function

Closes https://github.com/espressif/esp-idf/issues/16891
2025-09-16 10:43:21 +03:00
Meet Patel 9bcf41fa6e 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-16 11:19:32 +05:30
Meet Patel 6e2db679da refactor(ulp_riscv): Modify ulp i2c read/write functions to return error code
Updated the i2c read/write APIs ulp_riscv_i2c_master_read_from_device
and ulp_riscv_i2c_master_write_to_device in ulp_riscv component to
return error codes back to the application

Closes https://github.com/espressif/esp-idf/issues/15904
2025-09-15 10:35:14 +05:30
Meet Patel 6cd7f74877 refactor(ulp_riscv): Modify ESP_EARLY_LOG to ESP_LOG and move it outside critical section
Moved the error logs outside critical section for i2c communication errors
like READ fail, WRITE fail etc. in the ulp_riscv_i2c component

Also changed the error log API from ESP_EARLY_LOG to ESP_LOG, so we can support
tag based filtering and enabling/disabling of logs

Closes https://github.com/espressif/esp-idf/issues/17425
2025-09-15 10:35:14 +05:30
Jiang Jiang Jian bf1fe556ee Merge branch 'feat/esp32c5_lp_debug_example_v5.5' into 'release/v5.5'
feat(ulp): esp32c5 and esp32p4 support in debugging example (v5.5)

See merge request espressif/esp-idf!41006
2025-09-02 14:19:46 +08:00
Marius Vikhammer 6e7dab576f Merge branch 'ci/ulp_defaults_config_v5.5' into 'release/v5.5'
ci(ulp): fixed default config not running in CI (v5.5)

See merge request espressif/esp-idf!41611
2025-09-01 14:56:55 +08:00
Marius Vikhammer 19f91cfad9 fix(lp_core): fixed array-bound warning when compiling on P4 with -Os
Closes https://github.com/espressif/esp-idf/issues/17054
2025-08-29 09:57:05 +08:00
Marius Vikhammer 88165f9735 ci(ulp): fixed default config not running in CI 2025-08-29 09:56:38 +08:00
Samuel Obuch 92feb8c4f8 fix(lp_core): dont reset lp cpu with debug attached 2025-08-27 13:28:09 +02:00
wanckl 7bc929997e ci(esp32c61): enable multi dut runner for c61 2025-07-30 09:32:09 +08:00
Marius Vikhammer da2c5b1228 test(lp_core): re-enabled C5 lp-core test 2025-07-16 08:47:24 +08:00
Sudeep Mohanty a544a33131 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-19 10:33:10 +02:00
Marius Vikhammer 3058e24af9 Merge branch 'feature/lp_core_c5_eco2' into 'master'
feat(ulp): update ulp for c5 eco2

Closes IDF-8637

See merge request espressif/esp-idf!38431
2025-05-12 13:35:25 +08:00
Marius Vikhammer 2fbbcc6d36 feat(ulp): updated to reflect eco2 ulp changes 2025-05-12 10:22:20 +08:00
Shen Meng Jing 62d4115e08 docs: Fix some typos 2025-04-30 18:35:39 +08: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
igor.udot daf2d31008 test: format all test scripts 2025-03-05 12:08: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 51205a8fd8 fix(esp_hw_support): fix esp32s2/esp32s3 RTC IOMUX clock management 2025-02-19 16:02:25 +08:00
Sudeep Mohanty 800b5f8072 fix(lp_uart): Fixed flaky LP UART unit tests
This commit fixes some flaky LP UART multi device tests. It also adds
code to put the HP core to light sleep for few tests.
2025-02-13 12:28:26 +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
Song Ruo Jing 486c95557a Merge branch 'bugfix/gpio_8_16_bit_access' into 'master'
feat(gpio): add gpio_config_as_analog() API

Closes IDF-10247 and IDFGH-12754

See merge request espressif/esp-idf!35856
2025-01-10 15:14:19 +08:00
Song Ruo Jing 52c0278361 feat(gpio): add gpio_config_as_analog API 2025-01-08 21:58:12 +08:00
Sudeep Mohanty 24d44e1696 fix(ulp): Added unit tests for ulp binary embed with prefix and misc fixes
This commit:
- Removes the link time symbol name clash detection.
- Extracts symbols of type NOTYPE for global identifiers defined in
  assembly files.
- Makes the prefix argument optional for ulp_add_build_binary_targets().
- Adds a unit test for the ulp binary embed with a prefix feature.
2025-01-08 14:55:58 +08:00