460 Commits

Author SHA1 Message Date
hebinglin b8e0ee431c change(ulp): add HP Core wakeup causes save test cases 2026-04-22 16:22:13 +08:00
hebinglin 0603e0eb23 fix(ulp): record wakeup causes before lp core request sleep 2026-04-22 16:22:11 +08:00
Marius Vikhammer 10637dbf5e feat(ulp): add support for ulp on esp32s31 2026-04-20 14:45:23 +08:00
He Binglin 4e1b02d90c Merge branch 'change/esp_idf_ulp_add_int_api' into 'master'
change(ulp): add lp periph intr enable apis

See merge request espressif/esp-idf!47160
2026-04-14 17:23:22 +08:00
hebinglin 40d8483c2e change(ulp): add lp periph intr enable apis 2026-04-14 12:24:17 +08:00
Eren Terzioglu ba8d16dbd4 fix(ulp): Fix build warning for esp32p4 lpcore 2026-03-24 18:47:32 +01:00
Meet Patel a3f167f1c4 refactor(ulp): Allow both ULP-FSM and ULP-RISCV to enable at build time
Updated kconfig option type and other supporting changes in build system
to allow enabling both ULP FSM and ULP RISCV simultaneously. Users can
choose at run time which one to initialize and use.
NOTE: Both ULP FSM and ULP RISCV can't be used simultaneously at run
time because they share some common hardware like RTC slow memory space.

Closes https://github.com/espressif/esp-idf/issues/12999
2026-03-15 14:01:30 +05:30
Frantisek Hrbata f46b26fa47 fix(ulp): add sdkconfig directory to ULP target include directories
The ULP sources include sdkconfig.h for compile-time configuration
values. The sdkconfig directory was previously available to the ULP
target indirectly through the COMPONENT_INCLUDES variable, which is
populated from the parent component's INTERFACE_INCLUDE_DIRECTORIES.
In cmake v1, idf_component_register() adds the config_dir as PUBLIC
include directory to every component (component.cmake:498), so it
ends up in INTERFACE_INCLUDE_DIRECTORIES and gets passed to the ULP
subproject via COMPONENT_INCLUDES.

In cmakev2, the config_dir is added as a build-level property and
applied to components as PRIVATE (component.cmake:1053), so it no
longer appears in INTERFACE_INCLUDE_DIRECTORIES. As a result, the
sdkconfig directory is missing from the ULP target's include paths.

Add the sdkconfig directory explicitly to the ULP target's include
directories. Note that SDKCONFIG_HEADER is already passed to the ULP
subproject and its directory is already extracted into sdkconfig_dir
for linker script preprocessing (IDFULPProject.cmake:40).

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-03-11 15:44:30 +08:00
Marius Vikhammer d2567b6e45 Merge branch 'fix/lp_core_wake_stub_pmu_sw_int' into 'master'
fix(esp_hw_support): clear LP core SW interrupt in wake stub before sleep

Closes IDFGH-17328

See merge request espressif/esp-idf!46337
2026-03-11 13:35:52 +08:00
Marius Vikhammer cc9a929ea6 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-09 10:56:33 +08:00
Konstantin Kondrashov 74561963e1 feat(ulp): Improved ULP delay API accuracy and removed floating point operations
Closes https://github.com/espressif/esp-idf/issues/17494
Closes https://github.com/espressif/esp-idf/issues/16891
2026-03-05 10:39:34 +02:00
He Binglin 1b547ca0ba Merge branch 'bugfix/esp_idf_s3_deepsleep_dead' into 'master'
fix(hal): fix the issue of dual-core contention for RTC_CNTL regs

See merge request espressif/esp-idf!41680
2026-03-02 11:35:53 +08:00
puyogo-suzuki 75323ea767 fix(ulp): disable unsupported LP_IO_NUM7 for ESP32-C5 2026-02-25 11:20:00 +02:00
Wu Zheng Hui ad1f0f870b Merge branch 'feat/support_esp32s31_pmu_basic' into 'master'
feat(esp_hw_support): support esp32s31 pmu basic

Closes IDF-14642

See merge request espressif/esp-idf!45494
2026-02-24 14:11:27 +08:00
Meet Patel 7b30754d33 fix(ulp): correct ULP LP and RISCV interrupt wait cycle duration
Current implementation of interrupt wait cycle calculation depends on a
delay and local counter method, which is inaccurate in achieving precise
timeouts. This commit updates the implementaion to use CPU cycles
instead, as they are more accurate.

Closes https://github.com/espressif/esp-idf/pull/18208
2026-02-19 13:32:31 +05:30
wuzhenghui 0b27301a09 feat(soc): support esp32s31 lp_aon & rtc_wdt & rtc_timer 2026-02-11 15:03:35 +08:00
hebinglin baeabe48c3 fix(hal): fix the issue of dual-core contention for RTC_CNTL regs 2026-02-10 12:08:03 +08:00
Sudeep Mohanty 12fdd20da1 Merge branch 'fix/lp_adc_not_working_on_lp_core' into 'master'
Fixes for LP ADC to work when used from the LP core

Closes PM-646, IDFCI-5374, IDFCI-5375, IDFCI-5376, and IDFCI-5377

See merge request espressif/esp-idf!45165
2026-02-09 12:29:41 +01:00
Marius Vikhammer 5f914189c2 ci(core): removed common_components from core test-apps dependencies 2026-01-26 11:47:23 +08:00
Igor Udot f4cb052666 Merge branch 'ci/base_components' into 'master'
ci: use common_components in depends_components

See merge request espressif/esp-idf!45070
2026-01-26 09:08:11 +08:00
morris 0469db2f83 refactor(rcc): unify the usage of clock control macros for peripherals
- Removed conditional definitions for various RCC_ATOMIC macros across
multiple files, replacing them with a unified PERIPH_RCC_ATOMIC() macro.
- Updated instances where specific RCC_ATOMIC macros were used to ensure
consistent usage of PERIPH_RCC_ATOMIC().
- Deleted unused uart_share_hw_ctrl.h file as its functionality is now
integrated into the new structure.
2026-01-23 18:28:13 +08:00
igor.udot 4c26ab876b ci: update build-test-rules to use common_components 2026-01-23 10:14:09 +08:00
Sudeep Mohanty e0c7dc93e7 fix(lp_adc): Update ADC threshold values for LP core LP ADC test 2026-01-16 08:22:36 +01:00
Sudeep Mohanty 5f6fab3dde change(lp_adc): Cleanup LP ADC driver and example 2026-01-16 08:22:36 +01:00
Sudeep Mohanty dad79f0464 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-01-16 08:22:36 +01:00
Song Ruo Jing 62511d61e9 refactor(clk): split clock HAL into separate component 2026-01-13 15:50:20 +08:00
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 cc4c3380f1 Merge branch 'bugfix/fence_instruction_spinlock' into 'master'
fix(spinlock): Added fence instruction in spinlock acquire and release

Closes IDFCI-3828

See merge request espressif/esp-idf!44815
2026-01-07 17:45:28 +05:30
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
Marius Vikhammer cc7ac472e6 ci(ulp): change depends_components for ULP tests and examples 2026-01-06 09:41:35 +08:00
Wu Zheng Hui dcca718908 Merge branch 'refactor/independent_rtc_timer_hal' into 'master'
feat(hal): graduate rtc_cntl_timer/lp_timer hal/ll  into a new component: esp_hal_rtc_timer and unify naming

Closes IDF-15045

See merge request espressif/esp-idf!44573
2025-12-31 05:22:06 +08:00
wuzhenghui 48ba430297 change(esp_hal_rtc_timer): unify lp_timer/rtc_timer naming to RTC_TIMER 2025-12-30 11:35:36 +08:00
wuzhenghui 0d93c29143 feat(esp_hal_rtc_timer): introduce new RTC timer component and refactor existing timer functions 2025-12-30 10:33:34 +08:00
Meet Patel 017ae532c0 fix(lp_adc): Fix LP ADC 1-byte read CI issue on ESP32P4
This is a follow up commit on top of below commit:
c061c781a3

This commit further increases the ADC_TEST_LOW_VAL threshold from 2165
to 2200, because some tests were found to be failing with ADC reading
values such as 2171, 2172, 2182 etc. Suspecting the ADC callibration or
surrounding temperature to cause such fluctuations which need higher
threshold to avoid test failures.
2025-12-29 13:26:14 +05:30
Song Ruo Jing 74aeb3f41f refactor(uart): split UART HAL into separate component 2025-12-25 14:41:28 +08:00
Wu Zheng Hui de6068006f Merge branch 'refactor/independent_esp_hal_pmu' into 'master'
feat(hal): graduate pmu/rtc_cntl hal driver into a new component: esp_hal_pmu

Closes IDF-14110

See merge request espressif/esp-idf!44196
2025-12-23 22:05:48 +08:00
wuzhenghui 20c2dab09c feat(esp_hal_pmu): graduate pmu/rtc_cntl hal driver into a new component: esp_hal_pmu 2025-12-22 16:03:43 +08:00
Meet Patel c061c781a3 fix(lp_adc): Fix LP ADC 1-byte read CI issue on ESP32P4
The low power ADC in ESP32P4 sometimes reads the data value as 2160,
2161 or a bit greater than that when running the CI test case named
esp32p4.defaults.test_lp_core -> LP ADC 1 raw read stress test. However,
the test only passes if value stays below the LOW_VAL threshold of 2160.
Hence, updated the LOW_VAL threshold to 2165 keeping some margin,
because ADC readings may differ slightly from board to board, so this
type of small variations in ADC values are expected.
2025-12-18 11:18:39 +05:30
morris 291554cd09 refactor(global): remove completed todos in the codebase 2025-12-15 22:40:15 +08:00
wanckl 6449181ce0 feat(driver_spi): split spi hal component 2025-12-11 15:00:18 +08:00
laokaiyao e39c9781f3 feat(hal): graudate the adc/dac hal driver into a new component 2025-12-04 10:38:24 +08:00
laokaiyao 5e249409ff feat(hal): graudate the touch sensor hal driver into a new component 2025-12-04 10:34:57 +08:00
Alexey Lapshin 31810ae993 feat(esp_libc): make picolibc default libc 2025-12-03 13:31:42 +07:00
Marius Vikhammer cd0e6ec2ca fix(lp-core): fixed rtc mem conflict on p4 eco5 between app and ULP 2025-11-20 17:03:23 +08:00
Marius Vikhammer d3ffbccfb8 Merge branch 'ci/ulp_fsm_i_wr_reg' into 'master'
test(ulp): added larger delay in ULP FSM I_WR_REG instruction test

Closes IDFCI-3495 and IDFCI-3334

See merge request espressif/esp-idf!43420
2025-11-18 09:30:25 +08:00
Marius Vikhammer da79b1989f 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:03:21 +08:00
armando b25ba4a0c1 ci(p4): disable p4 rev3 invalid tests temporarily 2025-11-17 12:11:39 +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
Marius Vikhammer 865f0f4f0e ci(ulp): reset board between ulp-fsm tests 2025-10-24 10:15:35 +08:00