Commit Graph

445 Commits

Author SHA1 Message Date
Jiang Jiang Jian 4d9c8f3064 Merge branch 'feature/improve_ulp_delay_api_v6.0' into 'release/v6.0'
feat(ulp): Improved ULP delay accuracy and removed floating point operations (v6.0)

See merge request espressif/esp-idf!46423
2026-03-21 14:32:29 +08:00
Marius Vikhammer 0794ac84c3 Merge branch 'bugfix/fence_instruction_spinlock_v6.0' into 'release/v6.0'
fix(spinlock): Added fence instruction in spinlock acquire and release (v6.0)

See merge request espressif/esp-idf!46804
2026-03-21 14:31:43 +08:00
Konstantin Kondrashov 144c74a1fe revert(ulp): drop riscv timeout helper from backports 2026-03-20 16:44:14 +08:00
Konstantin Kondrashov bc2081ca1e revert(ulp): drop lp timeout helper from backports 2026-03-20 16:44:14 +08:00
Konstantin Kondrashov 6fe2cf575f 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-20 16:44:14 +08:00
Frantisek Hrbata e14d50b79b 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-20 08:16:52 +01:00
Meet Patel 1d7d6eaf30 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:28 +05:30
Jiang Jiang Jian dfa5e5d53a Merge branch 'bugfix/esp_idf_s3_deepsleep_dead_v6.0' into 'release/v6.0'
fix(hal): fix the issue of dual-core contention for RTC_CNTL regs(v6.0)

See merge request espressif/esp-idf!46180
2026-03-20 10:15:14 +08:00
Marius Vikhammer 1640707473 Merge branch 'fix/lp_core_wake_stub_pmu_sw_int_v6.0' into 'release/v6.0'
fix(esp_hw_support): clear LP core SW interrupt in wake stub before sleep (v6.0)

See merge request espressif/esp-idf!46550
2026-03-20 09:20:50 +08:00
Marius Vikhammer 67913c7df8 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-12 16:46:21 +08:00
hebinglin e2e1aa4502 fix(hal): fix the issue of dual-core contention for RTC_CNTL regs 2026-03-02 14:29:08 +08:00
Sudeep Mohanty 4177d83566 fix(lp_adc): Update ADC threshold values for LP core LP ADC test 2026-02-09 12:36:05 +01:00
Sudeep Mohanty b9c375d09b change(lp_adc): Cleanup LP ADC driver and example 2026-02-09 12:36:04 +01:00
Sudeep Mohanty a6c11f9e84 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:04 +01:00
Song Ruo Jing 89da3742b8 refactor(clk): split clock HAL into separate component 2026-01-31 22:32:37 +08:00
wuzhenghui 2d8c6ed6b4 change(esp_hal_rtc_timer): unify lp_timer/rtc_timer naming to RTC_TIMER 2026-01-31 22:31:34 +08:00
wuzhenghui 12b9fb6549 feat(esp_hal_rtc_timer): introduce new RTC timer component and refactor existing timer functions 2026-01-31 22:29:20 +08:00
Jiang Jiang Jian 54adf452c6 Merge branch 'bugfix/adc_read_ci_issue2200_v6.0' into 'release/v6.0'
fix(lp_adc): Fix LP ADC 1-byte read CI issue on ESP32P4

See merge request espressif/esp-idf!45439
2026-01-30 17:54:48 +08:00
morris 4ed63f006b Merge branch 'refactor/i2c_soc_caps_cleanup_v6.0' into 'release/v6.0'
refactor(i2c): cleanup I2C definitions in soc_caps.h (v6.0)

See merge request espressif/esp-idf!45053
2026-01-29 15:02:03 +08:00
Jiang Jiang Jian 2359d58fbf Merge branch 'refactor/independent_esp_hal_pmu_v6.0' into 'release/v6.0'
feat(hal): graduate pmu/rtc_cntl hal driver into a new component: esp_hal_pmu (v6.0)

See merge request espressif/esp-idf!44954
2026-01-28 19:02:36 +08:00
Meet Patel e7eb27ad9b 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.
2026-01-27 14:32:59 +05:30
Chen Chen b7e82de9d8 refactor(i2c): cleanup I2C definitions in soc_caps.h 2026-01-13 17:29:23 +08:00
wuzhenghui de5e57d296 feat(esp_hal_pmu): graduate pmu/rtc_cntl hal driver into a new component: esp_hal_pmu 2026-01-12 14:48:49 +08:00
Sudeep Mohanty e6d6eac004 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-09 09:10:54 +01:00
Jiang Jiang Jian 770c0b781c Merge branch 'bugfix/adc_read_ci_issue_v6.0' into 'release/v6.0'
fix(lp_adc): Fix LP ADC 1-byte read CI issue on ESP32P4 (v6.0)

See merge request espressif/esp-idf!44507
2026-01-08 20:36:10 +08:00
Song Ruo Jing ce475d901d refactor(uart): split UART HAL into separate component 2026-01-04 16:02:57 +08:00
Meet Patel 9a0f7c3fa3 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-24 10:35:21 +05:30
wanckl d12f941787 feat(driver_spi): split spi hal component 2025-12-16 20:38:09 +08:00
laokaiyao 841cb4caa1 feat(hal): graudate the adc/dac hal driver into a new component 2025-12-11 10:27:00 +08:00
laokaiyao 9657fde797 feat(hal): graudate the touch sensor hal driver into a new component 2025-12-11 10:26:55 +08:00
Alexey Lapshin ad7f4b9670 feat(esp_libc): make picolibc default libc 2025-12-06 00:08:35 +07:00
Marius Vikhammer 02b891f9de fix(lp-core): fixed rtc mem conflict on p4 eco5 between app and ULP 2025-11-25 13:35:50 +05:30
armando 714b022a43 ci(p4): disable p4 rev3 invalid tests temporarily 2025-11-21 02:48:05 +00:00
Marius Vikhammer c453efbff9 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:26 +08:00
Marius Vikhammer 865f0f4f0e ci(ulp): reset board between ulp-fsm tests 2025-10-24 10:15:35 +08:00
Chen Chen 4ac9954101 refactor(i2c): Add disclaimer for legacy driver 2025-10-20 11:38:26 +08:00
laokaiyao 14cf724f64 refactor(touch): remove legacy touch driver dependency in ulp 2025-10-15 09:44:43 +08:00
Chen Chen a4710cc206 refactor(driver): remove redundant driver dependencies
now the driver component only contains legacy code for i2c, twai and
touch sensor
2025-09-30 15:47:45 +08: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
Guillaume Souchere 1e0463673b feat(ulp): Allow usage oof ADC unit 2 on RISCV co processor 2025-09-22 12:38:37 +02:00
Marius Vikhammer 0ac9dfbbe0 Merge branch 'feature/lp_core_exception_wake' into 'master'
feat(ulp): added lp-core exception as wake-up source

See merge request espressif/esp-idf!39159
2025-09-19 14:48:33 +08:00
Marius Vikhammer 04fdae2f67 feat(ulp): added lp-core exception as wake-up source 2025-09-18 11:14:02 +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 5d98c9010b Merge branch 'bugfix/lp_core_array_bounds_p4' into 'master'
fix(lp_core): fixed array-bound warning when compiling on P4 with -Os

Closes IDFGH-16115

See merge request espressif/esp-idf!41583
2025-08-29 09:55:12 +08:00
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
Marius Vikhammer a791f7e85d ci(ulp): fixed default config not running in CI 2025-08-27 17:13:46 +08:00
Meet Patel f5b7cb6766 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-08-20 14:16:44 +05:30
Meet Patel 7abc48157e 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-08-20 14:16:44 +05:30
Marek Fiala 9d35d63651 feat(cmake): Update minimum cmake version to 3.22 (whole repository) 2025-08-19 14:44:32 +02:00